Behavior when losing wifi

I remember reading in the documentation that if at some point the RaspberryPi cannot connect to the Wi-Fi, it starts in hotspot mode.

This is very annoying to me since if I restart it it is still in hotspot mode.

Could you change this behavior?
It is better the way cell phones use, connect to any known network first.

Comments

  • It will connect to known networks one it sees them. It will start with last network anyway and only go to hotspot mode if the active network is not reachable. You can also disable going to hotspot mode but should only do that if you have a display to select a network on the touch screen.

    I find it quite annoying if the server switches networks when it knows several in range. I want it to be connected with one where I know the ip. So the normal case is to always connect to same network. That is a point where I know several optinions will exist and maybe we will add switch for this. Put it on my ideas list.
  • edited April 2021
    What happens to me is the following:

    The light goes out. Then the light comes back.
    The RaspberryPi start quickly, my router still does not start the Wi-Fi networks, so they go into hotspot mode.

    If I restart the RaspberryPi they don't try to reconnect to wifi, they just go to hotspot mode.

    - I want it to be connected with one where I know the ip. -
    That shouldn't be a problem if you configure the routers correctly. You must generate a single network in your home and not a network within another. Wired connections must go between LAN ports and not LAN to WAN.

    On the router that has the DHCP server enabled, you configure static IP for the device.

    Only leave one DHCP server per network.

  • So you switch on the router and the pi the same time? That explains the behaviour when router wifi is not up then it will switch back. You can test setting server to never enable ap, then it does not switch to ap mode and will use the wifi as soon as it is visible. Worst that can happen is that you need to connect via ethernet to repair settings.

    With lastest pi image you can also supply wpa_supplicant.conf in /boot and it will always use that config and disable wifi selection through server completely. In server you can only see what you are connected to then. That way you can also provide multiple networks to select from automatically.
  • Repetier said:
    So you switch on the router and the pi the same time?
    In the third world, power outages are common.

    After each power outage, I must connect via Wi-Fi to the Raspberry AP and select the Wi-Fi network again.

    The normal behavior should always be to give priority to the selected Wi-Fi network and if it cannot find it, generate the AP.

    What I notice that happens is that if only once it does not find the network, it automatically generates the AP and does not try to connect to the local wifi again. Not even restarting the Raspberry.





  • I will check that. It should only stop trying if the wifi is available and connection does not work due to wrong password. That is hard to balance - how often do we need to try etc. and how much delay until to go back to ap. But you are right that wifi not present should not cause permanent disabling a network until explicit connect.
Sign In or Register to comment.