Select Wifi Direct Channel / Frequency Band in Android SDK?

I have been looking through the Android Wifi direct APIs and I cannot figure out if it is possible to change the frequency / channel to directly use Wifi to communicate? (e.g. channels 1, 6 or 11)

Does anyone know if this is possible with the developer API? If not, does anyone know if there is some third party library that might require root access for this?

Thanks in advance for any help you can provide.

+3


source to share


1 answer


To change the Wifi Direct channel of your device, you need to do the following: 1- Root phone. 2. Download any File Manager application. For example ES File Explorer. 3. In ES File Explorer go to Tools, then enable root explorer and click on it, then mount RW 4. Using ES File Explorer, go to Device → Data → Misc → Wifi → p2p_supplicant.conf and change p2p_oper_channel to whatever channel Do you want to. 5- Turn off your phone's wifi, then turn it on for the changes to take place.

It should be noted that for the direct Wifi link to be the one you set up, the phone does not have to connect to any hotspot when the direct Wi-Fi connection starts. Also, usually when phone A connects to phone B via Wi-Fi directly, the connection works over the channel of phone B.



To implement an application to do this dynamically, you can let App run a process that will modify the file by issuing a command.

Hope it helps

+1


source







All Articles