Choose Wifi Direct Channel / Frequency Band in Android SDK?

天涯浪子 提交于 2019-12-21 19:50:19

问题


I've been looking over the Android Wifi direct APIs and I can't seem to find out if it is possible to change the frequency/channel Wifi direct uses to communicate? (channels 1, 6, or 11 for example)

Does anybody know if this is possible with the developer API? If not, does anybody know if there is some third party library that could possibly require root access to accomplish this?

Thanks in advance for any help you can provide.


回答1:


In order to change the channel of the Wifi Direct of your device you need to do the following: 1- Root your phone 2- Download any File manager App: Such as ES File Explorer 3- On ES File Explorer, go to Tools, then turn ON the 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 the p2p_oper_channel to whatever channel you want. 5- Turn OFF the Wifi of your phone then turn it ON in order for the change to take place.

You should note that in order for the Wifi direct channel to be the one you did set, the phone needs not to be connected to any Access point when the wifi direct connection starts. Also, usually when phone A connects to phone B via wifi direct, the connection is operating on phone B's channel.

In order to implement an App to do this dynamically, you can let the App execute a process that will modify the file by issuing a command.

Hope this helps



来源:https://stackoverflow.com/questions/26374358/choose-wifi-direct-channel-frequency-band-in-android-sdk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!