View Single Post
Posts: 1,425 | Thanked: 983 times | Joined on May 2010 @ Hong Kong
#18
Originally Posted by downstormaf View Post
sorry to bother again, but I wrote every code from the installation part, still haven't done the turn off one but should i notice anything after doing that part of the code?

I'm using the WiFi Switcher (cuz I can't install Queen BeeCon from the apps manager for some strange reason), but does this work for the code?

thanks for your help again
Don't worry. I'm glad to help.

There's two ways to turn off the hotspot: 1) change the mode from ad hoc to managed 2) turn off the wifi interface. I'm not sure about the operation of the wifi switcher, but what the wifi.sh script is doing is to

When wifi is up (no matter it is in ad hoc or managed)
1) turn off the interface
2) unload related modules
3) stop the related process
4) notify the user wifi is turned off

When wifi is down
1) turn on the interface in managed mode
2) load related modules
3) start the related process
4) notify the user wifi is turned on


Therefore, when you run the script wifi.sh I provided, you may look at the screen for notification.

Also, if you're using QBE, you might notice the change in color of the icon as wifi.sh would return different exit code for different status.

Hope this helps.

Last edited by 9000; 2011-06-04 at 07:00.
 

The Following User Says Thank You to 9000 For This Useful Post: