是否可以在 iOS 设备内和启用 Wi-Fi Direct 的设备之间进行 Wi-Fi Direct 连接?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9799804/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 17:26:24  来源:igfitidea点击:

Is Wi-Fi Direct connection possible within iOS devices and among Wi-Fi Direct enabled devices?

ioswifiwifi-direct

提问by Krishnan

Is Wi-Fi Direct connection possible within iOS devices and among Wi-Fi Direct enabled devices?

是否可以在 iOS 设备内和启用 Wi-Fi Direct 的设备之间进行 Wi-Fi Direct 连接?

The objective is to enable communication between an iOS device and another device (not necessarily another iOS device. It could be Android, Mac, PC) without the presence of any controllers. (WAPs).

目标是在没有任何控制器的情况下实现 iOS 设备和另一个设备(不一定是另一个 iOS 设备。它可以是 Android、Mac、PC)之间的通信。(WAP)。

回答by doublesharp

iOS devices can connect to an ad-hoc network, and if they do so they will have full wireless network capabilities. The limitation is with creating an ad-hoc network from the device itself, which is not allowed/not possible.

iOS 设备可以连接到 ad-hoc 网络,如果这样做,它们将具有完整的无线网络功能。限制在于从设备本身创建临时网络,这是不允许/不可能的。

An alternative would be to use the GameKit/Game Center API which uses Bluetooth to create a network between iOS devices. This would obviously include the more limited range of Bluetooth vs Wifi, as well as the constraints of Apple's SDK.

另一种方法是使用 GameKit/Game Center API,它使用蓝牙在 iOS 设备之间创建网络。这显然包括蓝牙与 Wifi 的有限范围,以及 Apple SDK 的限制。

More information on Game Center in iOS 6 is available here: http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/GameKit_Guide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40008304

有关 iOS 6 中游戏中心的更多信息,请访问:http: //developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/GameKit_Guide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40008304

回答by Omid Roshan

I have been looking into this recently and from my research,(please see "Device to device communication with WiFi Direct: Overview and experimentation" by Daniel Camps-Mur,....) the WiFi Direct does NOT create ad-hoc network. It's actually creating a WiFi infrastructure network where one party takes the role of AP (soft-AP). Once this established, the network works much like a normal WiFi network. Do we agree on this?

我最近一直在研究这个问题,并根据我的研究,(请参阅 Daniel Camps-Mur 的“设备到设备与 WiFi Direct 的通信:概述和实验”,...)WiFi Direct 不会创建临时网络。它实际上是在创建一个 WiFi 基础设施网络,其中一方扮演 AP(软 AP)的角色。一旦建立,网络就像普通的 WiFi 网络一样工作。我们同意吗?

Given this is the fact, Apple iPhone should be able to connect to WiFi Direct device that is already set up as AP. I haven't check this though.

鉴于这是事实,Apple iPhone 应该能够连接到已经设置为 AP 的 WiFi Direct 设备。我还没有检查这个。

Having said this, How can you get an Android phone like Samsung Galaxy S3 or S4 to act as AP? there is nothing in the settings as far as I know. If you connect two such devices, one of them will take the role of AP. Now, iPhone will detect the established network, but when trying to connect to that, will be asked for WPA password. Good luck finding it! Cus you can't get it from the phone. I read somewhere that a file in Samsung Galaxy called WPA_Suppliciant.conf has the WPA key in it but I didn't see it there.

话虽如此,您如何才能让三星 Galaxy S3 或 S4 这样的 Android 手机充当 AP?据我所知,设置中没有任何内容。如果您连接两个这样的设备,其中一个将扮演 AP 的角色。现在,iPhone 将检测已建立的网络,但在尝试连接时,会要求输入 WPA 密码。祝你找到它!因为你不能从手机上得到它。我在某处读到三星 Galaxy 中名为 WPA_Suppliciant.conf 的文件中有 WPA 密钥,但我没有在那里看到它。

I believe if you could find WPA password, you can get the iPhone to easily connect.

我相信如果你能找到 WPA 密码,你就可以让 iPhone 轻松连接。

回答by Nikhil Pal Singh

iOS devices do not support Wi-Fi Direct functionality, they do not have WFD (Wi-Fi Direct) group creation or role negotiation (P2P Group Owner or Group Client) support. During a normal WFD connection one of the 2 devices takes role of Group Owner (Soft-AP) allowing other device to connect as a Group Client.

iOS 设备不支持 Wi-Fi Direct 功能,它们不支持 WFD(Wi-Fi Direct)组创建或角色协商(P2P 组所有者或组客户端)。在正常的 WFD 连接期间,2 个设备中的一个扮演组所有者 (Soft-AP) 的角色,允许其他设备作为组客户端连接。

iOS has support for tethering which is normally know as Personal Hotspot option in Settings. It can be used for communication between iOS and non-iOS devices. For example, Application ShareIt uses similar way to connect iOS to non-iOS devices by creating a temporary Hotspot and in the non-iOS device and promts iOS user to go to Wi-Fi screen and connect manually. This is normally recommended when a common Wi-Fi network is not present.

iOS 支持网络共享,通常在“设置”中称为“个人热点”选项。它可用于 iOS 和非 iOS 设备之间的通信。例如,Application ShareIt 使用类似的方式通过创建临时热点将 iOS 连接到非 iOS 设备,并在非 iOS 设备中提示 iOS 用户转到 Wi-Fi 屏幕并手动连接。当不存在公共 Wi-Fi 网络时,通常建议这样做。