RaspberryConnect / AutoHotspot-Installer

For the RaspberryPi computers. Allows switching between a Raspberry Pi Access Point and Wifi Network connection without a reboot.
GNU General Public License v3.0
67 stars 24 forks source link

Wifi doesn't seem to work anymore when using option 1 #10

Open madmagic007 opened 1 year ago

madmagic007 commented 1 year ago

Pi4B 8Gb, raspi os lite 64 bit.

Ran the installer, chose option 1. When connected to LAN and no wifi in range, the hotspot works just fine. When no LAN cable is connected and the wifi thats defined in wpa_supplicant.conf is in range, i cant access the pi anymore.

The ip address assigned in our network to the pi is 192.168.1.144, using arp -a on windows, i can see that that address still exists, but it seems to refuse any connection, such as ssh or anything else. Even pinging it, it manages to reach the host, but refuses any connection. If i run the installer and choose the uninstall option, after a reboot everything works fine again. I tried using 192.168.50.5, but this doesn't even exist in the network.

Am i just doing something wrong or misunderstanding what option 1 actually is?

RaspberryConnect commented 1 year ago

Hi

Option one & two check if there is a know wifi network in range during boot up. By default it won't switch if back to the network wifi from an access point after bootup, or create an access point once the wifi network connection is lost.

The LAN setup is unchanged so that can be unplugged and reconnected as required and will be assigned an ip by your network. The Wifi status will only change after boot up if the script is rerun. sudo /usr/bin/autohotspotN for option 1.

On my website raspberryconnect.com there are the manual guides for the option 1, 2 & 3. There is a bit about a cron timer. If you set up a cron timer on the Pi to run the script once a minute it will swap between an access point and your network wifi as an when it goes in and out of range.

192.168.50.5 will only exist when the access point is running and your wifi device is connected to its WiFi network RPiHotspot. It is not visible from a LAN devices unless your router is configured to forward to the 192.168.50 network otherwise the Pi has to be reconfigured as a Bridge, which is not a feature of this setup.

A device connected to the access point can access a device on your lan network though.

Hope this help

madmagic007 commented 1 year ago

So it was me misunderstanding what option 1 means.

Its safe to assume that for the use case i had it in mind, it will always have the wifi network in range, or be connected to WLAN without the wifi network in range. So i think i could get away with only having to check once during boot? I unfortunately have 0 experience or knowledge with any linux scripting but i will give this a try, thank you.