Turn wifi on/off with a physical switch


#1

I run the DIY Outernet receiver with a battery pack and it would be nice if there was a script or something running that would detect a button press via GPIO and have it enable and disable wifi to save on power when I’m just passively receiving data. I don’t need a hotspot for 90% of the time it is running and it seems like a waste of power.

Basically, add code to detect a button press and tell people which GPIO on the C.H.I.P. to use for a wifi on/off switch. Or allow it to be configured by the user.


#2

You could write that yourself as a userscript and when it turns out to be worthwhile you could
ask for it to be included.


#3

@pe1chl any suggestions on where to start? I have the exact same need, but don’t even know where to start writing the code or how to install it


#4

Hardware button would be nice.

Also strikes me that the chip has bluetooth 4.0 built in which would be lower power. https://forum.pine64.org/showthread.php?tid=1392

So you could maybe access via bluetooth, switch on wifi? Switch off wifi when done?