4 Replies Latest reply on Feb 12, 2015 2:18 AM by mhahn

    Edison - turn off wifi without configure_edison --setup and reboot

    eco_bach

      I know you can use configure_edison --setup to define username-pw as well as wifi, but is there an easier command to simply switch the wifi on and off without rebooting?

       

      Even if I go thru configure_edison --setup and enter No at the Wifi prompt, after rebooting it seems that my wifi is still activated. ie entering ifconfig I can clearly see wlan0 with an IP.

       

        • 1. Re: Edison - turn off wifi without configure_edison --setup and reboot
          DiegoV_Intel

          Hi eco_bach,

           

          I was thinking in using ifconfig wlan0 down, but it seems that it doesn't work in Edison. However I was able to turn off WiFi using another way.

           

          To turn off WiFi I killed the wpa_supplicant process. In order to know the PID of the process that you have to kill, use the following command:

          ps | grep /usr/sbin/wpa_supplicant
          
          

           

          To kill the process use the following command:

          kill <PID>
          
          

           

          If you run the ifconfig command you shouldn't see the wlan0 interface, and the WiFi connection should be off. To turn on again the WiFi connection you have to run the following command:

          configure_edison --disableOneTimeSetup
          
          

           

          This command will restart the wlan0 interface. You can run again the ifconfig command the check it.

           

          Let me know if this works for you.

           

          Regards,

          Diego.

          • 2. Re: Edison - turn off wifi without configure_edison --setup and reboot
            eco_bach

            Thanks Diego.

            I discovered another way, simply enable connman then enter the connman command line connmanctl, then simply disable wifi.

            The only issue I have is not being able to gracefullu exit connman and keep my session. When I do CTRl-C it exist but the console freezes up forcing me to rebot.

            • 3. Re: Edison - turn off wifi without configure_edison --setup and reboot
              intel_dan

              What happens if you just type 'connmanctl disable wifi'  instead of entering connmanctl's 'interactive' mode? does the console still freeze?

              • 4. Re: Edison - turn off wifi without configure_edison --setup and reboot
                mhahn

                eco_bach wrote:

                 

                Thanks Diego.

                I discovered another way, simply enable connman then enter the connman command line connmanctl, then simply disable wifi.

                The only issue I have is not being able to gracefullu exit connman and keep my session. When I do CTRl-C it exist but the console freezes up forcing me to rebot.

                Does "quit" work?

                Did you try connman on latest image? I haven't actually tested but I think I saw that this issue had been fixed. If not, using bash as default shell fixes the issue - at least I have been using bash on Edison for quite some time and haven't seen the issue even with ww42 image