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:
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:
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.
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