Shortcut / button / command for WLAN hotspot/tethering on/off

  • Hello all, our WLAN unfortunately does not cover our terrace so well, so I would like to make it easy for my wife to activate/deactivate a hotspot/tethering via Raspberry PI 4 with LE 10 (and Metropolis Skin).

    In the skin I have the possibility to create buttons with individual commands, what would a command look like to activate/deactivate thethering? Or how would it look like, if you solve it via PC, e.g. via Putty, batch file or Web Interface? Or can you think of other solutions, maybe via Android?

  • You can run commands via connmanctl, e.g. "connmanctl tether wifi on" (and off) which is easier than dbus commands. Note that if you drive the feature from connmanctl the GUI on/off switches will not reflect the status correctly (but you prob. don't care about that).

  • This works fine with Putty - with Plink (in Putty's program folder) as a batch file:

    Code: wifi-on.bat
    start C:\Path\plink.exe -ssh [email protected] -pw password connmanctl tether wifi on

    As skin button with RunScript(/storage/.config/wifi-on.py) I didn't make it yet

    Code: wifi-on.py
    import os
    os.system('ssh [email protected] connmanctl tether wifi on')

    From PC over network the file works after password request, but not from Kodi.