An easy installer script for my AutoHotspot and Static Hotspot setups. Allows a Raspberry Pi to automatically create a WiFi Hotspot when you are out or connect to your home network when you are home.
This script is for installing a Raspberry Pi WiFi setup where the Pi will connect to a previously configured Wifi network when the Pi is in range of the router or Automatically setup a Raspberry Pi WiFi access point when a known wifi network is not in range.
This can also be run manually or with a timer to switch without a reboot.
There are three guides on this website which show the steps on how to install a permanent static access point or two setups that can switch between a Raspberry Pi access point or WiFi network connection without a reboot.
These three guides are now available in an Installer. This guide goes through the steps to setup the installer and what features are available.
Tested on PiOS Bullseye and Buster
Not compatible with PiOS Bookworm. Bookworm version available here
Intro:
If you have not used the Autohotspot setup's before here is a brief intro to what they can do.
Aim:
- When you're home: On starting the Raspberry Pi it connects to your home routers wifi
- When you're out: On starting, if any known wifi connection is not found it will generate an access point so a direct wifi connection can be made to the Raspberry Pi by a tablet, phone or laptop.
- While in access point mode: if an ethernet cable is connected the Raspberry Pi, then it will have network/internet access along with any wifi device connected to the access point.
Additional Features:
Using a Cron, a timer can be setup so the wifi connection can be regularly checked. It will switch between a wifi router and a access point without a reboot depending on the results. This is useful for
- Raspberry Pi in car entertainment systems
- Raspberry Pi Dash Cams
- If the RPi looses wifi connection in your garden or near your home when using the camera or sensors.
- You run a script or program at home connected to your router and wish to monitor it while you are out. As a hotspot is generated without a reboot the script/program is not interrupted.
It is also possible to run the script from a GPIO button so you can manually run the script to switch depending on where you are.
Requirements:
This has been tested on PiOS Bullseye (11) & Buster (10). To see which version you have enter the command lsb_release -a. The scripts via the manual guides below have been tested on Jessie and Stretch and work fine, just this installer has only been tested on Bullseye & Buster. I would say it should work fine on Stretch and Jessie but a computer is involved so you can never be sure!
- Raspberry Pi 3, RPi 3 B+, RPi4
- Raspberry Pi 1 or 2 with a Wifi Dongle*,
- Raspberry Pi Zero W, Zero 2 and Zero with WiFi Dongle* (internet hotspot not useable as it has no ethernet port.
- Wifi already configured for your home router
*some WiFi dongles don't work in adhoc mode or don't work with with the nl80211 driver used in this guide for RPi4, RPi 3, RPi 3B+, Pi Zero W & Pi Zero 2 inbuilt wifi, so you may want to check this first before starting
The manual guides can be found here
Autohotspot with Net Access https://www.raspberryconnect.com/projects/65-raspberrypi-hotspot-accesspoints/157-raspberry-pi-auto-wifi-hotspot-switch-internet
Autohotspot with NO Net Access https://www.raspberryconnect.com/projects/65-raspberrypi-hotspot-accesspoints/158-raspberry-pi-auto-wifi-hotspot-switch-direct-connection
Permanent Static Hotspot with Internet access https://www.raspberryconnect.com/projects/65-raspberrypi-hotspot-accesspoints/168-raspberry-pi-hotspot-access-point-dhcpcd-method
Also available at https://github.com/RaspberryConnect/AutoHotspot-Installer
Installer:
To use the installer:
open a terminal screen
Download the AutoHotspot-Setup.tar.xz archive to the current folder using the command
curl "https://www.raspberryconnect.com/images/hsinstaller/Autohotspot-Setup.tar.xz" -o AutoHotspot-Setup.tar.xz
Unarchive the file to the curent folder using the commandtar -xvJf AutoHotspot-Setup.tar.xz
If you are using the Desktop then you can right click on the AutoHotspot-Setup.tar.xz file and select Extract Here
change directory to the Autohotspot folder with cd Autohotspot
Run the script with the commandsudo ./autohotspot-setup.sh
This script will fail if sudo is not used.
You will presented with these menu option:
1 = Install Autohotspot with eth0 access for Connected Devices
2 = Install Autohotspot with No eth0 for connected devices
3 = Install a Permanent Access Point with eth0 access for connected devices
4 = Uninstall Autohotspot or permanent access point
5 = Add a new wifi network to the Pi (SSID) or update the password for an existing one.
6 = Autohotspot: Force to an access point or connect to WiFi network if a known SSID is in range
7 = Change the access points SSID and password
8 = Exit
Option 1: Install Autohotspot with eth0 access for Connected Devices
Once installed and after a reboot the Raspberry Pi will connect to a router that has previously been connected to and is listed in /etc/wpa_supplicant/wpa_supplicant.conf. If no router is in range then it will generate a WiFi access point.
This will have an SSID of RPiHotspot and password of 1234567890
Use option 7 to change the access point password and also the SSID if required
If an ethernet cable is connected to the Pi with access to the internet then it will allow devices connected to the access point to connect to the internet or local network.
Once a connection to the access point has been made you can access the Raspberry Pi via ssh & VNC with
ssh
vnc: 192.168.50.5::5900
for webservers use http://192.168.50.5/
Option 2: Install Autohotspot with No eth0 for connected devices
This option is similar to option 1 but connected devices have no network/internet connection if an ethernet cable is connected.
The Pi itself can use the eth0 connection and also be accessed from a device on the etho network.
This has been designed so you can access only the Pi from a Laptop, tablet or phone.
The access point SSID will be RPiHotspot with a password of 1234567890
Once a connection to the access point has been made you can access the Raspberry Pi via ssh & VNC with
ssh pi@10.0.0.5
vnc: 10.0.0.5::5900
for webservers use http://10.0.0.5/
Option 3: Install a Permanent Access Point with eth0 access for connected devices
This is for a permanent WiFi access point with network/internet access for connected devices.
The Raspberry Pi will only have network and internet access when an ethernet cable is connected.
Once a connection to the access point has been made, you can access the Raspberry Pi via ssh & VNC with
ssh
vnc: 192.168.50.10::5900
for webservers use http://192.168.50.10/
Additional setup is required if you wanted to use a second WiFi device to connect to the internet rather than a ethernet conection. This is a planned future option.
Option 4: Uninstall Autohotspot or Permanent Access Point
This will disable the setup of any of the three setups and return the Raspberry Pi to default Wifi settings.
Hostapd & dnsmasq will not be uninstalled just disabled. This is so a hotspot setup can be re-installed without access to the internet.
Option 5: Add a new wifi network to the Pi (SSID) or update the password for an existing one
If you are using either of the autohotspot setups in access point mode and wish to connect to a local WiFi network. You will be unable to scan for any networks as the desktop wifi option will be disabled, shown as red crosses. You can manually add the details to /etc/wpa_supplicant/wpa_supplicant.conf if you know them.
This option will allow you to scan for local WiFi networks and update the Pi. If you then reboot or use the Force... option 6 ,see below.
This option only works for WiFi networks where only a password is required. If a username is required this will not work.
Option 6: Autohotspot: Force to an access point or Force to WiFi network if a known SSID is in range
This option is only for the Autohotspot setups.
If you are at home and connected to your home network but would like to use the hotspot. This option will force the pi to access point mode and will ignore your home network untill the next reboot. If you use this option again while in access point mode, it will attempt to connect to a known WiFi network. This will go back to the access point if no valid WiFi network is found or there is a connection issue.
Option 7: Change the Pi's access point SSID and Password
By default the access point SSID is RPiHotSpot with a password of 1234567890. Use this option to change either or both SSID and Password.
You will be prompted to change both but if you make no entry and press enter the existing setting will be kept.
The password must be at least 8 characters.
Option 8: Exit
Exit the script.
Complete the Setup:
If you have installed a hotspot setup with options, 1,2 or 3 then Reboot to activate the setup.
To test the Hotspot mode for the Autohotspot setups; run the installer again and select option 6 to force the Pi into Hotspot mode. You can then test that everything is working ok.
When you have finished either choose option 6 again to reconnect to your router or reboot.
Switching Setups:
You can switch between options 1,2 & 3 at anytime. All configuration will be changed removing the config of the previous setup. Just be aware that each setup has a different IP address for the access point. If you have changed the access points SSID from RPiHotspot or the password from 1234567890 (which is a good idea) it will be reset back to the defaults.
If you find this guide useful and wish to show your appreciation then you are welcome to make a donation or share a link to this article. There is no obligation to do so, this guide is free for use and support is available to everybody as long as I know the answer :)
I am the single developer of this script and website. Any support towards the costs are welcome.
RaspberryConnect.com
Trouble Shooting
If you are in range of your router but the Pi will only create a hotspot even after a reboot then there will be an issue with connecting to your router. This can be caused by an incorrect password or interference especially if you are using 5Mhz wifi on a PI 3B+ or Pi4.
To check the password either use option 5 or check /etc/wpa_supplicant/wpa_supplicant.conf
If your are having interference issues or believe this setup is the cause then use option 4 to uninstall the setup. Reboot and try your Pi again. If you still have a connection issue it will be an issue within your home network.
If it is this setup then it may be the format of your SSID from your router. It can contain spaces and special characters but not a comma. so "My SSID" will be fine but "My,SSID" will fail.
If your wpa_supplicant.conf file was created using a text editor on Microsoft Windows, though Cr (Carrage Returns) are handled, there may be hidden formatting characters other than Cr that are causing the issue. Either just use notepad on Windows or backup and delete /etc/wpa_supplicant/wpa_supplicant.conf and create it again using the Raspbian desktop Wifi settings. Headerless setups can setup WiFi networks in raspi-config. Option 5 will only work if wpa_supplicant.conf already exists.
/etc/network/interfaces file:
many older access points and network setup guides online add entries to the /etc/network/interfaces file. This file is depreciated in Raspbian & PiOS. Any entry in this file is not compatible with these setups. This installer backup and remove any entries found in this file. They will be restored if the uninstall option is used.
Video Guide on using the Installer
On this video I go through following the steps in this guide and setting up a static acces point and a autohotspot, then how to connect to the access points on a tablet.
No it's doesn't use ifup or ifdown. The raspberrypi's don't use the /etc/network/interfaces file as the interfaces are managed through /etc/dhcpcd.conf for PiOS Bullseye and older. So you would need to use "ip link set dev wlan0 down" or "ip link set dev wlan0 up"
Welcome to the Pi world. When you are seeing No Network Interfaces, is this in the wifi menu by the clock? If this is the case, then that is correct because when the Access Point is active the software that controls that is disabled. It will re-appear when
it reconnects to your router. Using a phone/laptops wifi, do you see the AccessPoints SSID of RPiHotspot in the list of local networks? If so then it is working ok and you can connect to it there.
Also in a terminal window, if you enter the command "ip a" it wil show the interfaces. If wlan0 has a IP address starting with 192.168.50 then the access point is running.
If when using "ip a" there is no IP address check the line
"wlan0: mtu 1500 qdisc pfifo_fast state UP"
It should say State UP and not state DOWN.
If you can connect a ethernet cable t the Pi you will still be able to use SSH or VNC desktop sharing to access the PI from another computer on your network.
If it is State DOWN, check that the file /etc/network/interfaces has no entries for any interfaces (ie wlan0, eth0) as this will cause a conflict.
There should just be 3 lines, two starting with a # and one starting with "source".
For your camera, the RPIWeb Cam Interface looks to be out of date as it refers to Jessie and Buster. In Bullseye the cameras started using different libraries to work so any camera software not setup for Bullseye will not work with the cameras. It also seems there where other changes to the camera setup in the latest OS Bookworm.
This link is for the current camera setup, where you can use rpicam-still or rpicam-vid to check your camera works ok.
https://www.raspberrypi.com/documentation/computers/camera_software.html
Camera software written in python needs to be using the picamera2 library for bullseye. Any that use the picamera library will only work in the Buster OS and older.
I hope this helps. If this doesn't resolve the issue with the access point setup please let me know.
It maybe that some other process is making the wifi device unavailable during boot as it is in use.
The script is one of the last things to be loaded at boot so that networking is available.
It will then scan for your router. If the wifi device is busy then it can't do it's scan, it will try for 20 seconds. It will then go to the hotspot.
Alternately if it connects to your router but has not been assigned a IP address within 20 seconds it will also go to the hotspot.
And lastly it will do the same if the password is wrong, but that's not the issue here.
When you do option 6 I suspect things have settles down and things work as expected.
What you can do is manually run sudo autohotspot or sudo /usr/bin/autohotspot and you will get feedback on what the script is detecting and what it is doing.
Other than looking into what else maybe hogging your wifi device you could setup a timer so the autohotspot script is run once every 2 minutes. Then if it goes to a hotspot when it is near your router it will reconnect two minutes later.
In my "Auto Hotspot Scripts no Network" guide on the home page there is a section on setting up a Timer with the Cron.
Try that.
The Pi zeros can be a bit slow but it does work with my ones.
If this still doesn't help let me know and we can look into it further.
-----------------------
hotspot deactivated, bringing wifi up
checking wifi connection ok
failed to connect to non-global ctrl_ifname:wlan0 error: no such file or directory
wifi failed to connect, falling back to hotspot
autohotspot -----------
creating hotspot
From that error it is reading wpa_supplicant.conf and finding a match with a ssid and one being broadcast.
It shuts down the Hotspot and attempts to connect to the router.
Then it waits 20 seconds and checks to see if the router has assigned an IP address. This is where it fails.
this is the command
wpa_cli -i wlan0 status | grep 'ip_address'
can you check that you wpa_supplicant.conf file is complete.
/etc/wpa_supplicant/wpa_supplicant.conf should look like this
"
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=GB
network={
ssid="mySSID1"
psk="myPassword"
key_mgmt=WPA-PSK
}
"
the country code should be for your country if not in the UK
If the top 3 lines are the same, in any order, and the network details are correct for your router then it should be fine.
The wpa-cli command will only work when the access point is disabled. You may have to disable the cron timer and use option 6 to shutdown the hotspot to try this.
The only other issue that can be due to the wpa_supplicant file is if on installing the Pis SD the wpa_supplicant.conf file was created on a Windows computer and copied to the Pi's Boot partition on the SD card. The Windows text format can cause issues. If so rewrite the file on the pi in the format above.
Let me know if you still have issues.
Thank you, i'm glad you like it.
I'm not familiar with the setup of OpenSpeedTest and it would also depend on what option you have installed, out of options 1 or 3.
Your title implies that you need the Pi to issue an IP over eth0. The Pi, normally and with this setup, expects the network connected via eth0 to supply the Ip address unless a static IP has been set in /etc/dhcpcd.conf. So if you need that then you can configure that as you need without issue.
It looks like OpenSpeedTest serves a webpage to control it by. If you are checking the speed via a network or internet then I would expect that network to supply the ip address.
So if that is the case, when the Pi is setup as an access point I would connect e.g my phone to the Pi's Wifi Access point and and then in a webbrowser enter the Pi's access point ip with the OpenSpeedTests server page or port. So for option 1 it may be http://192.168.50.5/openspeedtest.htm or http://192.168.50.5:81 if for example it serves through port 81.
Then you should be able to check speeds with any eth0 connected network.
You won't be able to test the wifi speed while the pi is an access point from a connected eth0 network as to do that you would need a bridge setup which is out of scope for this setup.
If you have more details of what how the setup works I can maybe give you better details.
Which option are you using 1 or 3?
What type of device will be connected over eth0 and will it have dhcp?
How do you usually check the speed via wifi?
Just to let you know that when Raspbian Buster is installed on the BPI M2 Zero and the BPI P2 Zero, your software works fine.
That's good to know, thank you for for the update :)
You are welcome. I have had a look into this. I have installed the latest Bullseye 32bit PiOS with Desktop.
After installing the option 1, I tried option 7, just to change the SSID to "newssid" but just press enter on the password so it wasn't changed.
This worked fine.
Can you give me an example of the style of ssid and password you used, ie was special characters used or spaces.
As you say the wifi stopped working I guess hostapd failed.
If you enter sudo systemctl status hostapd , if there is an error it will be shown there.
Alternately you can look at the config file and edit it directly.
sudo nano /etc/hostapd/hostapd.conf
you want the lines "ssid=" & "wpa_passphrase="
If you are still having issues then let me know what style of ssid and passwords you tried and I will have a go again.
It's no bother at all. I have just had a go with option 7 on the current Bullseye image. I was able to set the ssid and password as you did. Hostapd did except it, as I was able to connect and ssh to the pi.
So you should be able to set it as you wanted. I'm not sure why it failed as I can't replicate that but hopefully it will work next time.
Any further issue then please let me know.
I would like the auto created hot-spot to be open (no password)
Would everything work OK if I just edit hostapd.conf?
The autohotspots will work with no password but you will need to edit the /etc/hostapd/hostapd.conf file after it is installed
Just remove or comment out these lines
wpa=2
wpa_passphrase=1234567890
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP TKIP
rsn_pairwise=CCMP
If you edit the hostapd.conf that is in the installer scripts config folder then the md5 check will fail and the script will not continue with the install.
No that sounds perfectly reasonable as photography and video generate lots of larger files.
You can connect the Notebook to the Pi via Lan. The access point doesn't make any changes to the way the Pi uses eth0 compared to when it is not installed. So the access point setup won't assign an ip to the notebook but when you connect the Pi and notebook they should generate their own ip just for that connection or you can configure a eth0 network in /etc/dhcpcd.conf and your notebook.
The notebook will be able to connect to the Pi itself vis ssh, vnc etc but won't be able to connect to any device connected to the access point as they are on a separate network.
So you should be able to transfer files to and from the pi over lan no problem.
Thanks for the work! I tried running the script on RasPi OS Buster, latest updates, and firmware on a RasPi 4 8Gig. The script installs fine and seems to configure all the needed "conf" files. However, when I run ifconfig, WLAN0 has no IP.
Tried options 1 and 3, ran uninstaller each time but no change.
Thoughts?
With option 1 or 2:
Are you seeing the SSID RPiHotSpot when it is out of range of your known routers? If so what happens if you try to connect to it?
Does it connect to your router ok? This will also confirm the service is working as you would get no wifi otherwise.
I know Raspberry Pi are making changes to the wifi but that has not been activated yet. Can you confirm you that dhcpcd is running.
sudo systemctl status dhcpcd
it should be running.
As you have the 8GB Pi4, are you using the 64bit PiOS?
Though I have tested it on the 64 bit version and all was fine I have not actively used it recently but also I have had no reports that it doesn't work properly, at least yet.
Generally a re-install will do the trick if for some strange reason it is not working as the script does check all the setup of the pi. I know you have done this a couple of times but it does do the checks that are done manually.
Manually check that these services are running without error when the Access Point is up and running.
You can use option 6 for force it to an access point if you are near your router.
sudo systemctl status hostapd
sudo systemctl status dnsmasq
sudo systemctl status autohotspot
For option 3: This is just configuration and has a different setup so should just work but again check
sudo systemctl status hostapd
sudo systemctl status dnsmasq
Let me know if anything shows up and I will see what we can do to resolve any issues.
Your work is outstanding! I aim to have multiple Pis in close proximity, all using install option 3. Ideally, I want to use VNC to connect to each Pi. I have tried assigning a new ip, ssid to each, but if I edit the autohotspotN file then autohotspot-setup.sh returns a checksum error and won't let me proceed. I have followed the instructions you've previously given. I made sure that the ip and dhcpcd ranges match across autohotspotN, /etc/dnsmasq.conf and /etc/dhcpcd.conf. Am I missing a step? Should I ignore the checksum warning and proceed anyway?
Thanks for your help,
Will
Thank you, i'm glad have found it useful.
The script is setup so that you edit them after they are installed. The config folder has the checksum to make sure all files are present and unchanged before the installer starts. It won't start unless all is good.
Option 3 configures a Permanent Access point so just configures the pi for an access point and doesn't use the autohotspot scripts. autohotspotN is for option 1, autohotspot is option 2.
To change the ip address for option 3 change /etc/dhcpcd.conf
static ip_address=192.168.50.10/24
static routers=192.168.50.1
make sure the first 3 digits match.
and as you know make the required changes in /etc/dnsmasq.conf
Only the SSID's need changing so you can identify which Pi you are connecting to. Though the IP's are the same they are all independent from each other, but thats unless you have a specific need to change the IP.
That should get you up and running
But now I do counter a problem that when I'm hooked up to my local network, I cannot SSH into the raspberry pi zero with just http://clearview. Although it works fine when typing the IP address.
Good to know that I made changings in the file /etc/hosts
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
# 127.0.0.1 clearview
192.168.50.5 clearview
There seems to have been a change in how PiOS changes the hostname in Bullseye. If you use raspi-config or the desktop configuration menu and change the hostname you will be able to connect via the hostname clearview but for /etc/hosts on ip 127.0.0.1 it doesn't seem to work anymore.
PiOS now uses the hostnamectl program to set the hostname;
hostnamectl set-hostname clearview
This is just for the Pi while it is connected to a network.
Dnsmasq still uses /etc/hosts so for the access point you will still need to set 192.168.50.5 clearview in /etc/hosts
I'm not sure when this change happened but came across the issue a couple of months back, Hopefully this will be the cause of your issue.
i added an adguard home server on the same rpi4 B, and as it is not on the same subnet, it seems that wifi client dont use this local adguard for dns request, do you have any suggestion to solve it ?
bridge-utils dont work too, and my DHCP Server is on the internet box
thx
Thanks, I'm glad you have found it useful.
You can change the IP address for the access point but it depends on which option is installed.
You will need to change the dhcp-range in /etc/dnsmasq.conf
dhcp-range=xxx.xxx.xx.150,xxx.xxx.xx.200,255.255.255.0,12h
change to x's to what you need.
If you are using the static access point you need to change
static ip_address=xxx.xxx.xx.10/24
static routers=xxx.xxx.xx.1
in /etc/dhcpcd.conf to match what is done in dnsmasq.conf
If using the autohotspots then the ip is set in the scripts. /usr/bin/autohotspot or autohotspotN
Bridging won't work with the autohotspots they need specific changes to the scripts.
For the static access point, hostapd.conf needs the bridge= device adding and dnsmasq disabling if dhcp is managed from Ethernet. Bridging is outside the scope of the setup but this should point you in the right direction.
Two suggestions.
a) Would it not be more normal to set the access point on 192.169.50.1
b) I am going to use this to as anti-geolocation so my next step is to install a VPN client so that I can have a connection back to my Router at home which will act as a VPN server/endpoint. I suspect that is will be a common need, so perhaps time for another option for simple PPTP VPN for all data going in and out including DNS searches.
Anyway thanks
J.
I'm glad you have found it useful.
Maybe it is more normal to use .1 but I have 3 published access point setups and some customised versions so it is easier for me to have different ip address, then I know what i'm working with when I access my Pi's and what scripts people are asking me questions about.
It can be changed in /usr/bin/autohotspotN if you need a different ip. Though make sure /etc/dnsmasq.conf has the same ###.###.## ip i'm dhcp-range=
I have used it with OpenVPN which worked fine.
You will probably need to change the eth0 interface in /usr/bin/autohotspotN to tun0
see this section near the top:
wifidev="wlan0" #device name to use. Default is wlan0.
ethdev="eth0" #Ethernet port to use with IP tables
#use the command: iw dev ,to see wifi interface name
I am currently writing a new version of which VPN's are a consideration among other features.
Yes it can be changed to wlan1 for the access point.
Change the references to wlan0 in
/etc/hostapd/hostapd.conf
/etc/dnsmasq.conf
/usr/bin/autohotspotN (for option1)
/usr/bin/autohotspot (for option 2)
in these two files is this line near the top of the file
wifidev="wlan0" #device name to use. Default is wlan0.
You can reference the manual guides on the website for further information as this shows you how it is all installed.
Let me know if you need further info.
Just one question: In AP mode, I cannot access the RPi cam web interface from my Android when mobile data is activated, since the chrome browser always tries to use the mobile data internet connection because the AP wifi from the Pi Zero has not internet connection. Any ideas how this could be solved?
I know android data is an issue when using ssh, I have to switch off mobile data to use ssh but for VNC and webservers I have not had a problem.
If you have to enter a hostname in chrome to access the Cam Web Interface it may be that, as the access point doesn't have a hostname so Chrome will try and find it on the net instead. You have to use the ap's ip address. The Pi's hostname is only available when the AP is not active. The hostname for the AP can be set in /etc/hosts by adding the ip address and hostname. This doesn't have to match the normal hostname.
If that doesn't help let me know how you are accessing the webserver and I will look into it.
There is a command to change the power for the wifi but in my experience it makes no difference.
Have a look into "iw dev wlan0 set txpower" for more details.
If you need more powerful wifi then it is probably better to go for a USB wifi device.
Also make sure the Pi is receiving enough amps for it's use as low power will weaken the wifi.
Other than trying the usual methods of changing the channel in /etc/hostapd.conf for the access point or your router for home connections to avoid some local wifi interference or testing in a different location in case of external signal interference.
how does it work ?
Using a Cron, a timer can be setup so the wifi connection can be regularly checked. It will switch between a wifi router and a access point without a reboot depending on the results.
Regards Andreas
The cron can be accessed from the terminal with crontab -e
at the bottom of the page enter the command
*/5 * * * * sudo /usr/bin/autohotspotN >/dev/null 2>&1
This will rerun the autohotspotN script (option 1 in the menu) every 5 minutes.
change /5 to the amount of minutes you want. If you want once a minute then just use a star *
then save. This will be activated straight away and will be active at every boot up.
There is slightly more details on the manual guides on the homepage.
"With Network" for option 1 and "no Network for option 2. near the bottom of the articles.
I have not used ufw so I can't say. It may depend on the OS you are using, Buster can use IPtables and Bullseye uses NFtables.
The autohotspot in option 1 will check if NFtables is active and apply NFtables rules. If you have IPtables installed as well then there will be a conflict.
If you only have either IPtables or NFtables installed then the script will use the correct tables.
If you use option 2, no tables are used at all and you can separately setup a firewall which may solve the problem.
The tables entries are in the main script at /usr/bin/autohotspotN if you need to add to them directly.
(Note: If I run a raw bullseye installation, w/o the autohotspot, the USB ports do work.)
If I connect a USB device (say a mouse) to any of the USB ports, the device's LED lights up, but there is nothing registered in the USB device list (as shown by lsusb -v).
I checked my /boot/config.txt, and it has this line enabled:
otg_mode=1
The contents of /boot/cmdline.txt are:
console=serial0,115200 console=tty1 root=PARTUUID=5ae7dd51-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
Is there something else I've overlooked?
Thanks!
-Alex
I would suspect your issue is to do with the power supply. Usually when the USB ports don't function properly it's because there is not enough amps to use them.
When the autohotspot is connected to the router there is no difference compared to when it is not installed. All that is different is wifi is brought up later in the boot process beyond that nothing else is running in addition to a normal setup. The changes only happen when it goes to an access point.
It may be that the access point uses slightly more power but I can't say I have ever checked that.
I have a Pi Zero 2, (using Buster at the moment as I have a project on there), running off a 5v battery and the Autohotspot installed, there is also a gpio hat added. I checked this with a USB memory stick and that wasn't detected at all. No entry in /media/pi/ or lsusb
I then tried again with a 5v 2amp rated mains plug. I could read the USB's directory with Network wifi but not with the access point running as the USB wasn't detected again.
When I tried a 2.4 amp mains plug I got the usb memory stick working properly in both modes.
If that doesn't help then let me know and I will try bullseye on my Pi Zero 2.
Thanks so much for sharing your insight.
Alex
Have fun.
first of all many thanks for this successful script. Very good work! Everything works as it should.
I have a question about option 1 and need a tip on this.
When the RPi is connected to the router via wifi, the RPi gets its IP from the DHCP pool of the router. How can I teach the RPi to always take a specific IP and not the DHCP suggested IP.
I know this can cause problems, but makes sense in my case. I also know that I can have the router associate the MAC address of the RPi with a static IP. However, this is not a solution in this particular case, because new RPi's are always flashed with the same image.
Help would be great.
You can set a static ip in /etc/dhcpcd.conf. When the Pi is connected to a router it can be configured as normal through dhcpcd.conf for interface wlan0. When it goes to an AP it will disables dhcpcd for wlan0 so those settings are automatically dropped.
in /etc/dhcpcd.conf to set the required ip enter:
interface wlan0
static ip_address=192.168.1.99/24
It will use this from the next reboot or switch from AP to Wifi Network.
$ ssh 192.168.50.10
ssh: connect to host 192.168.50.10 port 22: Connection refused.
The RPi can't even connect to itself.
In /etc/services it has the line: ssh 22/tcp
and ps shows the ssh-agent process is running.
What could be going wrong?
Try:
$ ssh pi@192.168.50.10
Is the default ip not 192.168.50.1 ?
Hope it helps.
SSH connection refused as far as i am aware is usually because SSH is not running on the Pi or the details that are being used to make the connection are incorrect.
if ssh 192.168.50.10 is being used then it will fail as their is no user name. try ssh pi@192.168.50.10 or replace pi with what user is on the Pi.
If ps shows it is running then it will be enabled in raspi-config so that's all is needed. You can also check with sudo systemctl status ssh
I'm not sure what you mean by "The RPi can't even connect to itself." Are you using ssh from a device connected to the Pi's wifi Access Point?
If a Phone, laptop etc is connected to the Pi's wifi Access Point then that is working. This will be a separate issue with ssh setup. You should be able to ping 192.168.50.10 to the pi from the connected device to show the connection to the pi is ok.
Thanks! Any advice will help. So far this is the closest I've gotten to turning this into an AP. Great idea!
-Roman
What happens if you don't use option 6? try moving out of range of the router or manually changing the ssid to an invalid one in /etc/wpa_supplicant/wpa_supplicant.conf.
Then run sudo /usr/bin/autohotspotN (option 1 setup) sudo /usr/bin/autohotspot (option 2 setup)
Option 6 is a hybrid of the main script works slightly differently, but that shouldn't stop it from working correctly.
Has there been any changes to the files or is it just as it was installed?
The error is probably related to dnsmasq not working correctly. try sudo systemctl status dnsmasq for any error messages.
Can you confirm which option was installed and what OS is used please.
Let me know and I will look into it further.
If I plug the ethernet into my Raspberry Pi, it is still connected to my wireless router and the AP is not broadcasting. This is still the case after I reboot the device.
I installed using option 1, I'm running the latest update of Raspbian.
The autohotspot only automatically creates an Access point when it can't find the know wifi router.
Then if Ethernet is connected that has internet access the devices connected to the AP also get internet.
If a known wifi network is in range then you will get as you see both Ethernet and wifi connected to the router.
Maybe option 3 is of interest. That will give a permanent access point and ignores the wifi router. This can't be used with option 6 though. That only works for 1 & 2.
Let me know if you need further details
Thanks again!
> Installed Option 1
> Turned off SSID from my Wireless Router
> Plugged RPi into router with ethernet
With this, I can access my RPi-AP from my computer and cell phone
> Unplugged ethernet from router
> changed the name of SSID "myWiFioff" and saved (sudo nano /etc/wpa_supplicant/wpa_supplicant.conf)
> Restarted RPi
> I can see RPi-AP broadcasting on my phone and PC - BUT cannot connect
"The error is probably related to dnsmasq not working correctly. try sudo systemctl status dnsmasq for any error messages."
only error was:
"no severs found in /run/dnsmasq/resolv.conf, will retry
"read /etc/hosts - 5 addresses
"Started dnsmasq - A lightweight DHCP and caching DNS servver"
It says "active (running)"
Any suggestions?
Thanks,
Roman
It looks like dnsmasq is running ok, Those remarks are normal.
and if you are seeing the AP SSID then hostapd is working.
It's a bit strange that you where able to connect which suggest the setup is fine. So it it is a bit odd that you can't now.
Connection issues are usually because the IP address has been updated in dnsmasq but not in /usr/bin/autohotspotN so there is a missmatch.
Hostapd config has been altered and introduced an error, password shorter than 8 characters, missing or invalid country code.
/etc/network/interfaces contains config
/etc/dhcpcd.conf contains old Access Point config from other guides.
this should only need nohook wpa_supplicant
for this setup.
Other devices such as eth0, can have config but there shouldn't be anything starting with
interface wlan0
and additional config underneath (this is usually at the bottom of the file)
As you have used the installer and option 1 all these issues will be the installers files except /etc/dhcpcd.conf which only makes changes. So can you just double check there is no reference to interface wlan0
if there is then put a # infront of each line.
Connecting and disconnection the Ethernet will not cause any issues as that is handled separately by the Pi and will not stop the AP from working.
You can try getting your phone or laptop to forget the network. Then try connecting again using the password in /etc/hostapd/hostapd.conf. 1234567890 by default.
The only recent change that could be related is to remove an older setting from hostapd.
in /etc/hostapd/hostapd.conf ther is a line
wpa_pairwise=CCMP
try changing it to
wpa_pairwise=CCMP TKIP
and try again.
Otherwise with a screen ssh through eth0:
edit your ssid to myssidoff
run /usr/bin/autohotspotN
see if it creates a AP or shows any errors it doesn't resolve.
Then again try connecting to the AP.
if still an issue check
sudo systemctl status hostapd
Are you using PiOS Buster or Bullseye?
let me know if this helps. You can contact me via email admin at this site, and we can discuss further if this dosn't help.
Have you been able to solve the issue. If not you can email me to look into it.
Cheers! Have a great one!
Usually if the connection fails to authenticate that would point to an issue with the /etc/dnsmasq.conf entries such as the ip range not in the same subnet as the entries in /etc/dhcpcd.conf but as you are using the installer I wouldn't expect it to be that.
I am not able to reproduce that issue on my setup.
you can see if there is any issue with dnsmasq with sudo systemctl status dnsmasq. It should say "Active: active (running)" near the top of the output.
It can be caused by other network setup on the Pi also being configured for ip address 192.168.50.#
you can check with ip -a
and see if no other ip address start the same.
If the wlan0 ip address starts with 169.254 then there has been an internal issue and no ip could be created for wlan0. Most likely dnsmasq.conf again.
/etc/dhcpcd.conf has the entry "nohook wpa_supplicant"
that should be there but if it is not the pi will also try to connect to your router so will cause the connection issue.
Have you tried to connect with more than one wifi device?
Let me know if any of this helps, otherwise I will look into it further.
It doesn't sound like you have done anything wrong.
Raspi-config should have set the country in /etc/wpa_supplicant/wpa_supplicant.conf as
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US
Then when you installed option 1 it takes the two digits at the end of the country line (US) and adds them to
/etc/hostapd/hostapd.conf
country_code=US
You won't be able to update the wifi country while the Access Point is active because it shuts down wpa_supplicant.
So you need to be in wifi network mode for wpa_supplicant to be active again.
If you manually check both the files above are correct and the country is in upper case it should work on the next reboot.
I have used raspi-config and changed my wifi country and installed option 1 and wasn't able to reproduce the issue.
Was your wpa_supplicant.conf file created in windows and put in the boot folder when you created the SD image?
What I like to achieve is a standalone hotspot where I can connect my laptop or phone to and observe my MotionEye camera's.
motionEye is a web-based frontend for motion.
Have you used option 3 from the installer. If you have used it with and without internet, i am guessing you have tried options 1 and 2, These only create an access point when your wifi router is off or you are away from it whne the Pi is started. Option 3 is a permanent access point and will always broadcast the ssid.
Looking at Motion eye I presume you are using PiOS Buster rather than PiOS Bullseye. Im currently updating the access point to work with Buster. They will still create a SSID but currently any connected devices can't connect to a network or Internet through eth0. Though the Pi itself can. Buster is fully working.
With option 3. Once your laptop or phone is connected to the access point you can enter http://192.168.50.10:8765 in a webbrowser to see the motion eye webpage.
if you would like to use a hostname such as "motion" instead of the ip address, so you enter http://motion:8765 instead
then add the line
192.168.50.10 motion
to /etc/hosts
If this didn't help then can you confirm which option you have used and if you are using Bullseye or Buster.
Also check
sudo systemctl status hostapd
and see if there are any errors shown.
With the new RPI zero 2W at 25 frames/sec and 1280x720, there is no noticeable delay. at 1920x1080 < 0.5 sec
Glad it working for you now.
It shouldn't take a couple of minutes, it should be within 30 second of powering it.
I have tested my Zero W 2 with option 3 (Permanent Access point) from both a battery and mains. I use a Wifi analyser on my phone which showed the SSiD available within 30 seconds.
That being said, just generally with any of my Pi's even when they are connected to my router over wifi the Hostname or IP doesn't always show quickly on my network. On occasions I have to do a network scan from my phone or PC before they show up. But I put this down to a weak Pi signal from it's location, using a battery or unknown interference. This is not consistent and it can all work fine for months.
The permanent access point starts as soon as the network is ready.
The Autohotspots (option 1 & 2) wait for the Pi to fully boot so they can take 10-20 seconds longer but you shouldn't need to wait for minutes.
You can try a different channel in /etc/hostapd/hostapd.conf
also check your boot up times and see if there is something else slowing things down.
sudo systemd-analyze critical-chain
sudo systemd-analyze time
sudo systemd-analyze blame
I have boot times in PiOS Buster of 22-26 seconds with the access point active.
Do you get the same result at different times of the day and in different locations?
Yes that can be done. Static ip's can be set in /etc/dnsmasq.conf for the mac address or the hostname of the device connecting to the access point.
add the line below where ##:##:##:##:##:## is your notebooks wifi mac address
dhcp-host=##:##:##:##:##:##,10.0.0.100
make sure the ip is in the range set in the line
dhcp-range=10.0.0.50,10.0.0.150,12h
if your notebook had a hostname of MyNoteBook then you can also use
dhcp-host=MyNoteBook,10.0.0.100
Next time the access point is created this will be used.
Thank you so much for this script.
I'm using it for a ps3netsrv and the option 3 works well for my case.
The PS3 is connected to the LAN (eth0) and I can access the permanent hotspot from my laptop or my arcade bartop.
The problem is that the eth0 ip changes everytime I restart my ps3, and so I have to change the settings of the PS3 (and Webman MOD + Multiman) everytime.
I've tried adding these lines to the /etc/dhcpcd.conf:
interface eth0
static ip_address=192.168.50.11/24
static routers=192.168.50.10
static domain_name_servers=1.1.1.1
and the ps3 got this IP, but somehow it cannot connect to the library anymore.
I'm missing something?
How should I modify the script, to have a static IP with option 3 (Permanent HOTSPOT)?
Thank you so much again :)
No problem, im glad you find it useful.
I'm not familiar with your setup but the issue will be to do with using the 192.168.50 ip.
The Wifi Hotspot is using the 192.168.50.# ip's. eth0 will be on a different network as the Pi is essentially dealing with two separate networks.
The eth0 ip should be based on whatever is issuing the IP address to the Pi over eth0, whether this is a router or a direct connection with the PS3.
For my setup the Pi would be connected to my router via eth0. The router is on network 192.168.0.1. So any static IP setup in dhcpcd.conf for eth0 should start with 192.168.0
If your PS3 is issuing and ip address to the PI then make sure that the Pi's eth0 static IP is in the same network ###.##.##
I have not configured a direct lan connection between two devices but if that is the setup then again make sure both devices are on the same network and not using 192.168.50.
What you entered in dhcpcd.conf is correct, it just needs to be a separate ip range to the Wifi Hotspot.
Sorry I can't be more specific but hopefully that helps you.
So, power up pi. It pops up a hotspot, then connect to it. SSH in, then I want to be able to connect it to a wifi router. I am using a zero, so want a way to connect it to a router when it's not connected without having to do the net sup file.
I tried going in and using raspi config, but it doesn't work because the link is active.
If you have used the installer script on this page then that has the features to do that.
just cd to the Autohptspot folder and then sudo ./autohostpot.sh
If the router you want to connect to is new to your Pi then choose option 5
This will allow you to pick a nearby routers from a list and enter the password. This won't work if the router needs a Username and Password such a public wifi.
Once the router is setup then choose option 6. This will force the Access Point to stop and the Pi will connect to a known router in range.
Option 6 also allows you to disconnect from a router and create an access point even if you are still in range of a router.
Presuming the schools firewall is not blocking your access. Check if you can ping the Pi's wifi using it's ip address
If you don't know the Pi's wlan0 ip address, I doubt if you will find it doing a network scan as there will be too many devices on the school network. So without a screen or some way to display the IP on the Pi you will find that difficult to work out.
Try changing the host name from raspberrypi as there may be others with the same host name on the network so it will have connection issues. Either change the Hostname in "Raspberry Pi Configuration" to something more unique. This can also be done in /etc/hosts
sudo nano /etc/hosts
127.0.0.1 raspberrypi
The hostname isn't always available on a network or doesn't always show up so the ip address is the only way if the pi is visible to other devices on the network.
There are guides online that show you how to get the Pi's led to flash and count out the Pi's ip address if that helps.
The Accesspoint (Option 2) did not work any longer.
FIX (The code for germany was set incorrect!):
sudo nano /etc/hostapd/hostapd.conf -> country_code = DE
Thanks for letting ,me know.
I tested it by changing the "Set WLAN Country" to "DE Germany" in the "Raspberry Pi configuration". On using the Autohotspot installer it correctly used DE for hostapd.conf
It gets the country code from /etc/wpa_supplicant/wpa_supplicant.conf which is where "Set WLAN Country" updates it to.
Do you know if yours wpa_supplicant.conf file was created manually or was the country added with the configuration settings?
The internet is available when you connect a Network cable to the Pi via the Ethernet port which is connected to an internet connected router.
You can add a 4G Mobile network card to USB and change the reference to eth0 in the AutohotspotN script to whatever device name they use.
You can not use a second WiFi usb adaptor (wlan1) for internet for the autohotspotN script as it won't be able to switch between access point and network connection any longer.
You can use wlan1 Wifi that is connected to a Internet connection with the Static access point only. Change dhcpcd.conf to show:
interface wlan0
nohook wpa_supplicant
instead of
nohook wpa_supplicant
interface wlan0
That will allow wlan1 to be used to connected to the internet via a Wifi router.
Let me know if you need further info.
The internet is available when you connect a Network cable to the Pi via the Ethernet port which is connected to an internet connected router.
You can add a 4G Mobile network card to USB and change the reference to eth0 in the AutohotspotN script to whatever device name they use.
You can not use a second WiFi usb adaptor (wlan1) for internet for the autohotspotN script as it won't be able to switch between access point and network connection any longer.
You can use wlan1 Wifi that is connected to a Internet connection with the Static access point only. Change dhcpcd.conf to show:
interface wlan0
nohook wpa_supplicant
instead of
nohook wpa_supplicant
interface wlan0
That will allow wlan1 to be used to connected to the internet via a Wifi router.
Let me know if you need further info.
It depend on how you are using it. If you just want access to the Pi then connect a laptop/phone/tablet to the Pi's Wifi signal RPiHotspotN then you can use VNC desktop sharing or SSH to access the PI, there just won't be any internet.
If you need the Pi to have internet access as well then you can Tether your phone via a usb cable to the PI and the Pi can use the Mobiles internet Data. You will need to know the device name of the tether, such as usb0 and then change the entries in the /usr/bin/autohotspotN script from eth0 to usb0. This can be found on the Pi with the command ip a
Here is the part to change at the top if the script /usr/bin/autohotspotN
ethdev="eth0" #Ethernet port to use with IP tables
to
ethdev="usb0" #Ethernet port to use with IP tables
if yours is not usb0 then use what ip a shows.
The other option is to buy an addon Mobile network card for the Pi that you buy a mobile sim for. This gives the Pi direct access to mobile data. Then using the changes described above change eth0 to the device name and the Pi will use mobile data at the same time you can connect a laptop to the pi's hotspot.
Some mobile companies don't allow tethering of data so thats something to look out for.
First of all. Thank you so much for your code. This masterpiece saved me a lot work in several projects. It is just awesome.
In my current project I make a webcam to track the progress of a construction site. I use a raspberryZero with a standard picam to do this. Because there is no ethernet and no router in around 1km I use a 4G module (SIM7600G-H 4G HAT (B)) connected to the raspberry. The module is connected and everything works well. When I'm at home my raspberry is connected through the regular wifi. When I'm on the construction site the raspberry goes into the hotspot mode and I can easily connect to him and do modifications or some tests.
Now the issue:
For unknown reasons I'm not able to ssh to my web server if I'm in the hotspot mode and the connection to internet is provided via wwan0.
What I already did is, changing in /usr/bin/autohotspotN ethdev to wwan0. But it didn’t helped. Is there something else I missed or do you think it is more provider related?
Thanks in advance.
I'm doing a new LED project with my rpi. I found this script and IT IS AMAZING. Thanks a lot.
For my project, I did a webapi to configure networks, hostspot, force hotspot/wifi, etc.
I've seen many comments for this so I did a fork of my project with just the relevant stuff for network/hotspot configuration.
https://github.com/MaxThom/Autohotspot-webapi
Enjoy !
Thanks for letting us know about the webapi, that will be a useful addition.
I'm glad you like the script and thanks for the credits.
It can remember whichever mode was last set until you change it. I don't mind having to reboot if necessary to switch modes. I've tried this with AT commands into an ESP8266 chip, but don't know how to do it through an OS like Pi Linux.
It is a bit of a mine field trying to get the correct info with so many outdated guides online.
The general rule for the PIOS is if it mentions /etc/network/interfaces then don't use it.
dhcpcd is the network manager so avoid guides for dhcp. wpa_supplicant is used for connecting to your router. Though wpa_supplicant can be used for AP mode, it is more common to use a combination of hostapd and dnsmasq.
The PiOS is not able to act as a AP without additional configuration and then it is usually the case you will have a it as a permeant AP. Which is why I wrote the script to be able to switch between the two. By design it will only go to an AP if you are not in range of known network.
Option 6 for the Installer script on this page will allow the autohotspot scripts to be switched between AP and STA on command but this was written more for testing the setup than having it as a feature. A secondary script is used for option 6 which works alongside the autohotspot scripts.
You can reconfigure the autohotspot scripts to a AP ip address of your choice. This is done in two places.
/usr/bin/aoutohotspotN (option 1) or /usr/bin/autohotspot (option 2)
change the ip address to one of your choice here:
echo "Creating Hotspot"
ip link set dev "$wifidev" down
ip a add 192.168.50.5/24 brd + dev "$wifidev"
then in /etc/dnsmasq.conf
change the dhcpcd-range to the same ip range.
so for 192.168.4.1
you want
echo "Creating Hotspot"
ip link set dev "$wifidev" down
ip a add 192.168.4.1/24 brd + dev "$wifidev"
and dnsmasq.conf
dhcp-range=192.168.4.150,192.168.4.200,12h
Connected devices will be given an ip in this range. You can make the range from 2 to 255 but not necessary.
If you haven't already, have a look at the full autohotspot guides on the home page.
You could probably modify the autohotspot scripts for your personal use and add a log as to the last current mode which it can check and boot to that.
First of all, thx for the script! Really appreciate the effort you've put into it!
I do have a question concerning option #3:
Is there a specific reason why you chose to disable network access when the ethernet cable gets disconnected?
I was wondering if it would be possible to keep network access to the RasPi, even when the ethernet cable gets disconnected (for some reaseon) or the internet access of the connected ethernet cable goes down.
I simulated this event and it seems the devices connected to the permanent hotspot are not able to communicate anymore with the RasPi?
Best regards,
Domi
You are welcome.
The permanent hotspot is setup so that it works regardless of any ethernet connection. The wifi device connected to the hotspot can communicate with the Pi and each other with no Ethernet connected. When it is connected, and presuming it goes to the net, they will all get internet access.
Could you give me more details about what you are experiencing please so I can see if I can reproduce it.
Thanks
If it has worked once then MS EOL is not and issue. if the format of wpa_supplicant.conf was wrong it would never work. The script does deal with standard MS EOL stuff.
When the Pi scans for wifi it only does for a short time so only the strongest signals will show up. So if there are too many signals then that may be an issue.
run the script manually a few times and look for the signals listed as
SSID: \x00\x00 ......
if it doesn't show then the script won't try to connect to it and stay as an access point.
If it does detect it,
If the Pi hasn't received an Ip address from the router within 20 seconds it will jump back to the access point. You can increase this and see if it helps.
in /usr/bin/autohotspot or /usr/bin/autohotspotN look for
ChkWifiUp()
{
echo "Checking WiFi connection ok"
sleep 20 #give time for connection to be completed to router
and change sleep 20 to the number of seconds you want to try. 20 should be enough though.
The simplest option would be to not have it hidden but that is probably out of your control.
The option installed was the number 2 (hotspot without internet), any idea? Thanks!
I presume you are connected to the Pizero via SSH when you use option 6?
The Pi will be disconnecting from your router and creating the hotspot so you will loose the network connection to the Pi at that point and the SSH session ends.
You need to connect to the Wifi Hotspot (RPiHotspot) and then use ssh pi@10.0.0.5 to reconnect via ssh.
Then the opposite will happen if you use option 6 again. The Pi will deactivate the hotspot and reconnect to your router so you will loose ssh then as well.
This is how it works as you are moving between two separate networks.
On Android you have to switch Mobile Data off to connect via ssh. I also use Juice, Android blocks the ssh connection if Data is on. It will happily let you use VNC with data on though.
GREAT Software! Thanks again for that GREAT work!
I did have a couple of issues though. Firstly when autodetecting the wifi country (au in my case) I only get the last letter, not both. I think it may be because it is counting the newline at the end. Would it be possible to split this on the = instead? eg
IFS== read -ra cc
Thanks for the feedback, I will check that out.
How was the country entered into wpa_supplicant.conf on your setup, was it the localisation settings or manually created?
You mention being able to set it up to switch with a button or switch. Do you have any examples of that? I think I figured out how to run _a_ script from a button push, but I still haven't figured out how to automate running _this_ script. Any insights would be helpful
Im glad you find it useful.
I haven't specifically got an example but all you need to do is find a python script online for a Raspberry Pi shutdown buton.
as part of the script will be a line like this:
os.system("sudo shutdown -h now")
replace this with
os.system("sudo /usr/bin/autohotspotN")
this is for the internet version and
os.system("sudo /usr/bin/autohotspot")
for the direct version.
Then to run it use a service like the one used to start the autohotspot script in the manual setup article.
in /etc/systemd/system/
add a fill called autohotspotbutton.service
and add this code
[Unit]
Description=Autohotspot Switch Button
After=multi-user.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/autohotspotswitch.py
[Install]
WantedBy=multi-user.target
then enable it with sudo systemctl enable autohotspotbutton
now put you python button script in /usr/bin and call it autohotspotswitch.py
next make it executable with
sudo chmod +x /usr/bin/autohotspotswitch.py
After you reboot the button will be available.
The script will run but will only switch to an access point if you are away from your router. Then only reconnect to your router if you press the button in range of your router.
Many thanks
-J
thanks for the feedback.
The SSID and Password can be changed with option 7 or you can do it manually in /etc/hostapd/hostapd.conf
The ip addresses will depend on which setup you are using.
These have to be changed in two places and have to be in the same subnet.
In /etc/dnsmasq.conf the ip range for connected devices with
dhcp-range=192.168.50.150,192.168.50.200,12h
for the autohotspots in /usr/bin/autohotspot or /usr/bin/autohotspotN
look for this section
createAdHocNetwork()
{
echo "Creating Hotspot"
ip link set dev "$wifidev" down
ip a add 192.168.50.5/24 brd + dev "$wifidev"
and change the ip for the access point.
ie
dhcp-range=10.0.0.150,10.0.0.200,12h
ip a add 10.0.0.5/24 brd + dev
or
dhcp-range=192.168.99.100,192.168.99.200,12h
ip a add 192.168.99.5/24 brd + dev
For the Permanent access point change the ip address in /etc/dnsmasq.conf and /etc/dhcpcd.conf
static ip_address=192.168.50.10/24
In theory it should work, all ports are allowed. I see there are several reports online of people having connection refused on a Pi with wlan but it works fine with Lan so there main be another issue on some setups.
Sometime with the access point and VPN's you have to change the IP tables route but it looks like mumble doesn't need any of that as long as the port is available.
I can try it out, at least to get a connection. Have you used the mumble-server and client that is available through apt or from another source?
I did try a mumble server on one Pi and tried to connect from a Linux PC and got no connection but vnc and other connections are fine. I will give it another go with a couple of Pi's and see what happens. This may not be for a about a week but i will let you know.
Sorry for the delay getting back to you.
The link was not available by the time I got to look at it.
I have set up a Pi with the access point (Pi1) running the Mumble server using apt install. The access point has ip 192.168.50.5.
I then connected a second Pi (Pi2) to the Pi1 access point over wifi. This has the mumble client installed. I connected with 192.168.50.5:64738
This connected ok after the mumble-server password was entered.
I then made a wifi connection with a PC running Ubuntu (PC1) to the access point. This was also running the mumble client installed via apt.
I again connected mumble with 192.168.50.5:64738
This also connected successfully.
I was able to send messages between Pi2 and PC1 fine so it looks like it all worked over the access point without any changes.
I didn't try the audio options as the Pi's don't have that set up.
So from this it seems it works fine.
The Pi's OS are fully up to date. I hope this is useful and you are able to get setup.
Basically I want to run this hotspot and connect to the vpn and then connect to the hotspot with my Roku so I can watch tv.
But as soon as I connect the VPN I can't connect to the internet.
If I disconnect from the VPN I can connect to the internet and stream with the hotspot... just doesn't work with the vpn.
Is this something that's possible or no?
Yes the setup does work with VPN's but it seems different VPN's have slightly different settings. I have used it with OpenVPN without any changes.
What it may be is ExpressVPN is using a bridge or a custom network device to redirect traffic to the vpn other than eth0. The access point is directing the internet to eth0. If you run the command: ip a
it will list the devices, you should have , lo, wlan0, eth0
if you have a 4th device that is only available when the vpn is active then you need to change some settings from eth0 to the new device.
I don't know if you have installed the static hotspot or a autohotspot but I will presume the static one.
In file /etc/iptables-hs
change any reference to eth0 to the new device and then reboot. Then try the VPN again.
If this dosn't help can you let me know what setup you have installed and what the output to "ip a" and "route" are both with and without the vpn active.
sudo nano iptables-hs
Then I changed all of the eth0 to tun0
tun0 was the fourth device that showed up when connected to ExpressVPN
Still has the same behavior though... once I connect to the VPN I don't have internet.
The fourth device under ip a is "tun0"
The data under the route command is
Destination 0.0.0.0
Gateway 10.40.0.85
Genmask 128.0.0.0
Flags UG
Metric 0
Ref 0
Use 0
Iface tun0
That all look fine as far as I can see should work correctly. The other thing you could check is that ip forwarding is still enabled.
in /etc/sysctl.conf
look for the section below and check there is no # in front of the command as shown here.
# Uncomment the next line to enable packet forwarding for IPv4
#
net.ipv4.ip_forward=1
Let me know if that doesn't help and I will see if I can find a solution.
Ok, try just removing my ip rules as ExpressVPN may set something that means it is not working together.
ExpressVPN uses OpenVPN. It works ok with OpenVPN to a private vpn but the VPN paid services have different settings.
disable my iptables with
sudo systemctl disable hs-iptables
and reboot.
If that is not working then with the vpn active can you post the output of
sudo iptables -S
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-N xvpn
-N xvpn_dns
-N xvpn_dns_iface_exceptions
-N xvpn_dns_ip_exceptions
-N xvpn_ks
-N xvpn_ks_iface_exceptions
-N xvpn_ks_ip_exceptions
-A OUTPUT -j xvpn
-A xvpn -j xvpn_dns
-A xvpn -j xvpn_ks
-A xvpn_dns -j xvpn_dns_iface_exceptions
-A xvpn_dns -j xvpn_dns_ip_exceptions
-A xvpn_dns ! -o lo -p udp -m udp --dport 53 -j DROP
-A xvpn_dns_ip_exceptions -d 10.75.0.1/32 -p udp -m udp --dport 53 -j ACCEPT
-A xvpn_ks -j xvpn_ks_iface_exceptions
-A xvpn_ks -j xvpn_ks_ip_exceptions
-A xvpn_ks -p udp -m udp --dport 67:68 -j ACCEPT
-A xvpn_ks ! -o lo -j DROP
-A xvpn_ks_iface_exceptions -o tun0 -j ACCEPT
-A xvpn_ks_ip_exceptions -d 10.0.0.0/8 -j ACCEPT
-A xvpn_ks_ip_exceptions -d 172.16.0.0/12 -j ACCEPT
-A xvpn_ks_ip_exceptions -d 192.168.0.0/16 -j ACCEPT
-A xvpn_ks_ip_exceptions -d 169.254.0.0/16 -j ACCEPT
-A xvpn_ks_ip_exceptions -d 224.0.0.0/24 -j ACCEPT
-A xvpn_ks_ip_exceptions -d 45.131.192.89/32 -j ACCEPT
I would need to try a paid for VPN on the setup to know what to change. I know it works with some other vpn service that have been used and OpenVPN out of the box. I would expect it to work when the hs iptables are disabled. Sorry i can't help further.
Oh the ExpressVPN has a 30-day trial period if you want to try... If not I guess I'll cancel my 30 day trial :)
I would be interesting to know what is different. I did see they had a pay up front trial rather than a try before you buy trial. If I get chance over the weekend I will take a look into it further and try it out. I will let you know if I have any luck.
Just to let you know, time hasn't been on my side lately but I setup ExpressVPN today and will let you know if I find a solution
I have tried ExpressVPN with the static access point and the /etc/iptables-hs file changed from eth0 to tun0.
This has worked fine.
Setup: Pi4 Buster, Static Access Point from the Installer on this page. /etc/iptables-hs modified so eth0 is tun0 in all three references.
eth0 connected to home router via cable, wlan0 as access point 198.162.50.10. Tablet connected to wifi access point. ExpressVPN running on Pi.
Pi and Tablet use VPN for net access while eth0 connected.
Searching for "my ip" online. Both the tablet and the pi report an ip starting with 85 while my PC connected to my internet provider reports an ip starting with 31. So it works for me with just a change to the IP tables from eth0 to tun0.
I have also tried it changing protocol between udp and tcp of which it worked for both so that's not an issue.
When you start expressvpn it says if the vpn drops it will block internet traffic. use 'expressvpn preferences set network_lock off' I don't know if that is worth a try.
Let me know if you have any progress, I will keep my account open for a week or so in case we need to try anything else.
Really nice autohotspot scripts & code for the Pi APs !!
Hi there I spent quite a bit of time trying to get my wireguard VPN working with the internet.I installed autohotspot & kept getting "connected" but "no internet connection".
After much searching I came across the solution which does work, this requires a little knowledge of wireguard config files .
For info ,my wireguard network has all peers on 192.168.2.x.
Replace AllowedIPs 0.0.0.0./0 , the default,which forces all traffic through the wireguard tunnel, with 192.168.2.0/24 . That way only wireguard traffic goes through the tunnel to other wireguard peers (192.168.2.x) & internet traffic (which will be anything but 192.168.2.x) will go directly to the internet not via the tunnel.
My wg0.conf file :
[Interface]
Address = 192.168.2.22/24
PrivateKey = ***********************
ListenPort = 49150
[Peer]
#piwip
PublicKey = ************************
Endpoint = ------------
AllowedIPs = 192.168.2.0/24
PersistentKeepalive = 20
I find wireguard light & efficient and runs on all Pi Os's.
I hope this helps Pi users using RaspiOS ,a hotspot & wireguard VPN
Thank you very much for wireguard VPN settings. I'm sure that will be useful.
This installer is set to only work on Raspberry PI OS (Raspbian) specifically. As Linux uses different network managers I can't guarantee it will work on other setup as it required dhcpcd.
I see Orange Pi has Debian as a listed OS. If that version is using dhcpcd as the network manger instead of dhcp or other network manager then the script will most likely work. The file /etc/network/interfaces must not be used with this as it will conflict. Lots of older guides online will use this file for network config.
you can check with sudo systemctl status dhcpcd
if it returns with Active: active (running) then it probably work if you follow the manual guides.
I would be interested to know if you do try it.
I will look at other OS at a future point and see what needs be modified.
When the hotspot is active are you able to use ssh or VNC to access the Pi? Just to confirm that side is working ok.
Do you have a VPN setup that is using a device such as tun0 to route traffic through then LAN connection? if so your default route may be incorrect.
When the hotspot is active enter route into a terminal
There should be a destination "Default" for "Iface" eth0
This has been tested with openvpn and it works without any changes but not all VPN's are the same.
Can you give me more detail on your setup please, what Pi it is, if you are using a USB wifi adapter, which OS are you using?
The hotspot is only setup for 2.4Ghz connections so I presume you are having issues switching between 5GHZ & 2.4GHZ to your router? When the Pi connects to the router is using standard the wifi setup as your default Wifi settings. As long as your Wifi country is set in Raspi-config or the desktop preferences/Raspbery Pi Config it should be not different than without the autohotspot setup.
Could you give me more details on how you are switching between the two wifi speeds please, and I will look into it further.
route returns:
Kernel IP routing table
Destination Gateway Genmask Flags Metric ect all with nothing in columns.
No USB wifi adapter - using internal network wifi chip
Current configuration:
Raspberry PI 4 8GB USB Boot from 512GB 3D NVMeM.2 2280 SSD in TDBT Case
OS is:
-------------------
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
------------------
Tried with 2.4GHz wifi only. Still does same:
No VNC connection works - no sh either
Wifi RPiHotspot is available and can connect
VPC connection does not connect
Windows machine does not get IP Address from PI, but even hard coding to 192.168.50.10 does not connect with DNS and Gateway set to 192.168.50.5
When on normal Wifi on PI, auto connects to 5GHz and 2.4GHz with no issues.
If changing between 5G and 2.4G, requires a reboot - which I don't like.
Wifi country is set to US and works fine.
I attempted the installation first with complete manual steps and everything worked the same. Have tried this on 2 different boot cards with same results. Both from scratch, made headless, then loaded only the Hotspot - 1 manually, 1 with scripts. Get same results. My initial concerns were:
1. can't switch between 2.4 and 5 without a reboot
2. client connection to hotspot gets no address
3. client hard coded IP still no connection through VNC Viewer
4. network throughput on wireless is at 10% of wired 36 vs. 360 regardless of 2.4 or 5 connection.
Bad PI? Weird Network issues?
About run the gambit on what I can think of....
2020-05-27-raspios-buster-full-armhf.zip
The first thing I noticed was I could switch between 2.4GHz and 5GHz wireless with no issues.
To answer questions in order.
1. Hotspot active - VNC or ssh work
No. Client does not get compatible IP but even when hard coded, unable to VNC or ssh to PI
2. No VPN installed
3. route command returns no default device
4. PI setup:
PI 4 8GB booted from TDBT case w/ 512GB NVMe Gen3x4 SSD
raspi-config set to US/English
WLan - US
Interfacing Options - Camera, SSH, VNC
5. Attempted different methods to switch between wifi speeds
Console click select
Script run sudo to replace wpa_supplicant.conf with either 5GHz or 2.4GHz settings
Also changed priority so started on 2.4GHz as default based on your suggestions.
Overall Project Plan is a bit grandiose at this point to go into here, but testing multiple platforms to see where pieces can work together. One key piece here is requirement to maintain network connection and failover to hotspot or other network connection capability if network/internet unavailable. The lack of high speed wireless connection may kill this as
Finding the wired/wireless connections interesting as it appears both are 'active' on the base when Ethernet is plugged in.
ifconfig show both eth0 and wlan0 connected with 2 different addresses on base configuration - which would be good. Obviously 2 different network chips/services.
All input would be appreciated....
Thanks for the update.
If VNC and SSH are not working then either Hostapd is not working or the autohotspot script has not run.
The IP is set in the autohotspotN script so if that isn't available then it also suggest the above.
It does seem odd that you are having the same issue with multiple installs.
The installer checks various things are installed ok but can you do some manual checks.
run the autohotspot script manually sudo /usr/bin/autohotspotN
this should tell you its connected to a network.
then change rename your routers ssid in /etc/wpa_supplicant/wpa_supplicant.conf to an unknown ssid so your router is not found.
and run the autohotspotN script again.
You will get feedback as it does the switch.
If no errors then check hostapd is running
sudo systemctl status hostapd, it should say
Active: active (running) in the response.
Let me know what response you get.
for route you should get a default when you are connected to your router and the hotspot but we will deal with the above first.
There will be a separate ip for wifi and eth0 in both setups so you will be able to ssh through eth0 while wifi plays up.
Nothing else in your setup looks to like it would be an issue.
you are welcome to email admin at this site.
An no you are not spamming me I generally answer in the evenings :)
Thanks!
Getting a better understanding of why. So, unless I have a wired connection, there will be no internet even with 2 Wireless adapters. I'll need to work on that as can only use wireless for my project.
Client connection did get assigned correct IP so was able to connect through wireless and get to internet with Ethernet plugged in.
One caveat to this - the second USB WiFi adapter was no longer available on the menu bar, but does show in ifconfig. Can switch default Pi WiFi to any WiFi network now, but unable to associate USB WiFi to a network at all. wlan1 shows in menu pop-up as "Not Associated", but will no longer allow me to associate in menu as I was able to before loading Autohotspot. Further digging obviously required here....
I'm glad you have it all working now.
The setup is designed to get internet through an Ethernet cable for the devices connected to the wifi. So the script can detect if you are connected to a router, wifi is only available for 1 wifi device. This can be changed to wlan1 by changing some of the config but only 1 wifi device will be available.
The permanent hotspot can be reconfigured to run through two wifi devices but currently not the Autohotspot scripts.
I believe it is possible to rewrite some of the script and setup to use wlan0 and wlan1 rather than wlan0 and eth0 which is on my list of future updates but currently I have not looked at that.
If you want to know how to use wlan1 instead of wlan0 let me know but it sounds like it's not quite what you need unfortunately.
While the hotspot is active wpa_supplicant is disabled otherwise it would conflict with the hotspot and override it.
You can add a new network, ssid, with option 5. Otherwise you have to switch back to network wifi, presuming your router is in range with option 6, and wpa_supplicant will be available again.
When network is available wlan1 and other devices will be available again and disabled during the hotspot.
What you can do is change the service so it starts once the network is available which is earlier in the boot sequence. This may not be suitable for everybody but could be fine for you.
I don't know which script you are using, but I presume the direct version.
in /etc/systemd/system/autohotspot.service
change multi-user.target to network.target
[Unit]
Description=Automatically generates an internet Hotspot when a valid ssid is not in range
After=multi-user.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/autohotspot
[Install]
WantedBy=multi-user.target
to
[Unit]
Description=Automatically generates an internet Hotspot when a valid ssid is not in range
After=network.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/autohotspot
[Install]
WantedBy=network.target
Then after you reboot it should come up a bit quicker.
This is down to the OS on the SD card as I have a setup that is slower than others run on the same Pi
Let me know if you have any issues.
I changed the IP to be 10.0.0.254, modified the dhcp range, SSID and password. I need to add a second IP static IP address to the wifi of 10.0.0.1. How can this be done?
Thank you
You can set a static IP for when it is connected to your router by adding the ip address to /etc/dhcpcd.conf
interface wlan0
static ip_address=10.0.0.1/24
For the access point, wlan0 in dhcpcd.conf is disabled, so those settings will then be ignored. wlan0 control is moved to /etc/dnsmasq.conf and the autohotspot script. I don't believe you can set a second IP address for the access point. If this is what you are after can you give me more detail of what you are trying to set up please.
I want to add a secondary IP to the interface. Similar to how you can add multiple IPs to eth0 like:
ip address add 192.168.86.200/24 dev eth0
These are for IoT devices. When activated for the first time they look for instructions from IP 10.0.0.1 port xxxx.
That's not something I have looked at before but can be done. In the /usr/bin/autohotspot script where you changed the ip address, add the new IP to the line underneath.
createAdHocNetwork()
{
echo "Creating Hotspot"
ip link set dev "$wifidev" down
ip a add 10.0.0.254/24 brd + dev "$wifidev"
ip a add 10.0.0.1/24 dev "$wifidev"
ip link set dev "$wifidev" up
dhcpcd -k "$wifidev" >/dev/null 2>&1
systemctl start dnsmasq
systemctl start hostapd
}
This will make both IP's available for the access point.
You will not be able to use option 6 on the installer to force the hotspot as that option gets the ip from the first ip line of the autohotspot script.
It will work fine when the pi is booted out of the range of your router.
alternately when your in range of your router, change the ssid in /etc/wpa_supplicant/wpa_supplicant.conf from network={
ssid="mySSID1"
to network={
ssid="mySSID1-off"
and reboot or run sudo /usr/bin/autohotspot
You're welcome, Thanks for the feedback. I'm glad you have found it useful.
myipeth="192.168.2.52"
myiphot="192.168.52.1/24"
wifidev="wlan1"
ethdev="eth0"
myeth0=$(ifconfig eth0 | grep inet | tr -s " " | cut -d " " -f 3)
if [ "$myeth0" = $myipeth ]; then
echo "eth0 connected: set hotspot"
ip link set dev "$wifidev" down
ip a add "$myiphot" brd + dev "$wifidev"
ip link set dev "$wifidev" up
dhcpcd -k "$wifidev" >/dev/null 2>&1
systemctl start dnsmasq
systemctl start hostapd
exit
else
echo "eth0 not found: coninue to autohotspot"
fi
ps: thank you for your script, it working very good
Thank you for sharing your modification.
You're welcome, Thanks for the feedback, i'm glad it's useful to you.
The intention of the script is to install and setup the access point and autohotspot scripts guides found on this site. An alternative option to working through the guide with a few extra features for testing and changing basic settings. It is not intended as a script you would use regularly.
I wrote the script for my own use as I don't want a permanent access point but would like one when im out just to access the Pi.
Using a cron timer it is able to switch between network and access point as it moves in out of range of a router.
Option 6 to force the switch back and forth between access point and Network. The script can't do it automatically as it will always check if the router is range, so never go to a hotspot. So this is the only way to force the access point at home.
You say:
"So it needs to be able to create a network or scan for one to enter as the default network, it can't have them open a text file manually and try to enter settings for a previously known network."
I'm not clear on what you mean here.
If it finds no know wifi network it will create an access point. If you are in a location where there is a wifi network you want to use, you can use option 5, select the wifi ssid in the list and add the password. Then use option 6 to connect to the new network.
The future option that will be added is when it is in Access Point mode it will serve a webpage that these settings can be changed in.
If you email me more details of what the issue is I can tell you if it is possible and what needs changing.
The Autohotspots for option 1 & 2 wouldn't work with an existing Access Point as the some of the access point setting are needed in the script. If you need a specific ip address setup then the dhcpc-range in dnsmasq needs to be changed along with the IP address in the autohotspot/N script.
You also can't set access point settings in dhcpcd.conf as they won't be used only network settings can be set there.
It really depends on what you are trying to achieve.
It depends on what you have setup and which mode it is in. If you have the Autohotspot setup and connected to your router via WiFi then it should work fine. If the autohotspot is in Hotspot mode with an ethernet connection or you are using the static hotspot then as far as I know VPN needs additional routing for Devices connected to the hotspot. The Pi should itself be using the VPN just not connected devices.
It is possible, if this is your issue, but I don't have VPN access to see what is required.
A wlan0 to Wlan1 setup can only be done on the Permanent Hotspot (option 3) as the Autohotspots (option 1 & 2) shutdown the network wifi to work. This will make wlan1 unavailable to connect to your router.
For the Permanant Hotspot only:
in /etc/dhcpcd.conf replace all the lines under RaspberryConnect with
denyinterface wlan0
interface wlan0
static ip_address=192.168.50.10/24
nohook wpa_supplicant wlan0
This will allow wlan1 to be used alongside the permanent hotspot.
then in /etc/iptables-hs
replace the eth0 entries with wlan1
It looks like wicd is a network manager which won't work with the autohotspot scripts either as they work with dhcpcd only. I don't know if it will work with the permanent hotspot though.
I plan to add wlan1 support for the permanent hotspot and also see if the autohotspots can be adapted to do that as well at a later date.
I think this is accomplished mainly through /etc/iptables-hs
currently:
iptables -t nat -A POSTROUTING -o wlan1 -j MASQUERADE
iptables -A FORWARD -i wlan1 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i wlan0 -o wlan1 -j ACCEPT
should this be changed to:
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -t nat -A POSTROUTING -o wlan1 -j MASQUERADE
iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT
iptables -A FORWARD -i wlan1 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i wlan0 -o wlan1 -j ACCEPT
ssh pi@192.168.50.10
code uses 196.168.50.5
DAEMON_CONF="/etc/hostapd/hostapd.config"
should be:
DAEMON_CONF="/etc/hostapd/hostapd.conf"
Thanks for pointing those out. The /default/hostapd file is not required in Buster so didn't show up. I presume you are using Stretch. That's fixed now.
I found the VNC line was 50.10 instead of 50.5 on option1 guide, so I presume that's what you mean. The others look fine. Thanks.
that's correct for option 3. The static Hotspot is 50.10. The Auto with net is 50.5 and the auto direct is 0.5.
It's so I can tell them apart when using them and when people ask questions :)
You're welcome, Thanks
Thanks I see it is back in the zip file again, the versions on my PC seem to be correct. The hostapd file is not used in Buster or Bullseye it is just needed for older OS's so it shouldn't be causing much of an issue now but I will update it once I check my source folders.
The config folder on github has the correct hostapd version and checksum file. The link is in the Requirements section. You can copy that over your config folder to get it working.