Skip to content

Disable Hotspot to get default RPI Scan for Wifi UI #22

@x20011

Description

@x20011

Hello,

Firstly I must say thank you for this fantastic project. This is exactly what I've been looking for all this time!

I installed my hotspot with the autohotspot-setup.sh script and it works great in mode 1.

Since scanning for new wifi networks in the terminal and via the script is quite tedious, I've been trying for hours to write a script that disables the hotspot and reconfigures the Raspberry so that I get the normal wifi UI view in the taskbar again.

So I now have two different cases here:

1: Raspberry boots up and there is a known Wifi in range
-Raspberry connects to the known Wifi and the normal Wifi GUI view with all Wifis in range is displayed.
-Using ForceSwitch.sh I can now switch the hotspot on and off if necessary and the RPI connects to the known Wifi including the GUI view.
Case 1 works great

2: Raspberry boots up and there is no known Wifi in range.
-AutoHotspot recognises no known Wifi within range and starts the hotspot
-Using my second KillHotspot script, the hotspot should now be switched off and the Raspberry should try to log into a known wifi. If there is no known wifi in range, the usual Raspberry Pi UI wifi view should also be displayed in the taskbar, where a mouse click on the WLAN / LAN symbol displays all available wifi networks within range. The Hospot should stay off until ForceSwitch.sh is used again.

I have now created / copied these two scripts for testing.
For case 1, ForceSwitch.sh works as expected.
For case 2, since ForceSwitch.sh only restarts autohotspot.service, i made a second script KillHotspot.sh for testing. This switches off the hotspot, but the RPI does not switch to the Wifi UI view thus I get the available networks in the range displayed.
Is there a trick how I can get the normal Wifi view back even if there is no known Wifi in range? It would be great if i can combine both scripts into just one "Switch Wifi <> Hotspot" Script.

ForceSwitch.txt
KillHotspot.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions