简体   繁体   English

设备连接到WiFi接口时无法识别WiFi Direct对等

[英]Cant identify WiFi Direct peer when device is connected to a WiFi Interface

I am working on WiFi Direct in android Jelly bean 4.1 with samsung(google) nexus device. 我正在使用三星(google)Nexus设备在android Jelly bean 4.1中使用WiFi Direct。 I am able to discover the peer and connect with it when I am purely on wifi direct and when the devices are not connected to any other external interfaces. 当我完全使用wifi Direct且设备未连接到任何其他外部接口时,我能够发现对等方并与其连接。

But as a test I connected both devices to my Router, then started wifi direct on one device and created a group. 但是作为测试,我将两个设备都连接到路由器,然后直接在一个设备上启动wifi并创建了一个组。 After that I started next device and when I call discover peers its a success. 之后,我启动了下一个设备,当我打电话给发现对等方时,它成功了。

Immedialtely I call requestPeers and its returning an empty list of peers. 我立即调用requestPeers,并返回一个对等方的空列表。 But the same is working when both devices are not connected to any other interface. 但是,当两个设备都未连接到任何其他接口时,这同样有效。

How can I do this properly? 如何正确执行此操作? Thanks 谢谢

Why do you want to connect to a router in addition to your two devices? 为什么除了两个设备外还想连接到路由器?

My devices require that I disable regular WiFi when using WiFiDirect which leads me to believe they cannot be used at the same time. 我的设备要求我在使用WiFiDirect时禁用常规WiFi,这使我认为它们不能同时使用。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM