简体   繁体   English

如何通过WiFi直接将一台Android手机连接到多台其他Android手机,并且每台手机都在单独的频道上?

[英]How can I connect one Android phone to multiple other Android phones, using WiFi direct, with each on a separate channel?

It does not look like there is an API to do this within the app, so let us assume the phone is rooted. 在应用程序中似乎没有API可以执行此操作,因此让我们假设手机已植根。 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. wpa_supplicant.conf文件似乎能够处理我所需要的。 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. 可以在其中包含一个名为p2p_oper_channel的参数,可以将其设置为p2p_oper_channel /,而在运行wpa_supplicant时,只要将其强制设为该参数即可。

I also found the p2p_connect command, which takes as a parameter the frequency of the channel. 我还发现了p2p_connect命令,该命令将通道的频率作为参数。

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. 目前,我拥有的所有应用程序都是使用ADK构建的,并且支持使用多播直接使用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? 谁能告诉我我如何使用以上2点中的每一项来设置一部Android手机(主机),以便通过WiFi Direct将消息传递给其他人(从机),而每部手机都通过不同的通道连接到主机? (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? 此外,是否有可能使用同一WiFi芯片通过不同设备打开多个连接,每个设备在不同的通道上?

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. 为了更改设备的Wifi Direct的频道,您需要执行以下操作:1-拔出手机2-下载任何文件管理器应用:例如ES File Explorer 3-在ES File Explorer上,转到Tools,然后打开Root Explorer并单击它,然后挂载RW 4-。使用ES File Explorer,转到Device-> Data-> Misc-> Wifi-> p2p_supplicant.conf并将p2p_oper_channel更改为所需的任何通道。 5- Turn OFF the Wifi of your phone then turn it ON in order for the change to take place. 5-关闭手机的Wifi,然后再将其打开以进行更改。

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. 您应该注意,为了使Wifi直接通道成为您设置的通道,当wifi直接连接开始时,电话不需要连接到任何接入点。 Also, usually when phone A connects to phone B via wifi direct, the connection is operating on phone B's channel. 同样,通常当电话A通过wifi直接连接到电话B时,该连接正在电话B的频道上进行。

Hope this helps 希望这可以帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用Wifi Direct在两部Android手机之间传输文件到Android手机的下载目录而不是程序包目录 - How to Transfer files between two Android phones using Wifi Direct to Download directory of Android phone and not to Package directory 如果我通过WiFi-Direct连接2个android设备-一个可以与另一个共享它的Internet连接吗? - If I connect 2 android devices via WiFi-Direct - can one share its Internet connection with the other? 我可以在Android中通过WiFi连接多部电话吗 - Can i connect multiple phone via WiFi in android 如何使用wifi直接将套接字与android连接 - How to connect a socket with android using wifi direct Windows Phone 8和Android可以通过Wifi Direct连接吗? - Can Windows Phone 8 and Android connect over Wifi Direct? 如何连接两部Android手机? - How can I connect two android phones? 我可以通过WIFI-Direct在Android和IOS之间进行连接吗? - Can i connect between Android and IOS By WIFI-Direct? 使用Wifi Direct将Android应用程序连接到PC - Using Wifi Direct to connect an Android App to PC 我可以使用二维码通过 WiFi Direct 连接 2 个 android 设备吗 - Can I connect 2 android devices via WiFi Direct using QR Codes 我无法使用 wifi 将手机与 android studio 连接来测试我的应用程序 - I can't connect my phone with android studio using wifi to test my app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM