It does not look like there is an API to do this within the app, so let us assume the phone is rooted. I don't have any experience working with rooted phones, but here's what I've come up with so far:
The wpa_supplicant.conf
file seems to be able to handle what I need. There is a parameter that can be included there, called p2p_oper_channel
, which can be set to 1/6/11/whatever that forces the channel to be that, when wpa_supplicant
is run.
I also found the p2p_connect
command, which takes as a parameter the frequency of the channel.
Currently, the application I have is all built using the ADK and supports sending/receiving a text using multicast, to several phones, using WiFi direct. But they're all on the same channel.
Can anyone tell me how I can use one/both of the above 2 points to set up one Android phone (master) to deliver a message to the others (slaves) on WiFi Direct, with each connected to the master on a different channel? (I assume we would do this using the fact that the phone is rooted but I'm not sure as I have no experience with this). I'm using multicast. The reason I want each on a channel is to minimize interference.
Furthermore, is it even possible to open several connections with different devices, each on a different channel, using the same WiFi chip?
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.
Hope this helps