Java 使用 Wifi Direct 将 Android 应用程序连接到 PC

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18473022/
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-12 01:55:40  来源:igfitidea点击:

Using Wifi Direct to connect an Android App to PC

javaandroidintelwifi-direct

提问by u009988

I am developing an android app which needs to communicate with a PC and exchange real time data.

我正在开发一个需要与 PC 通信并交换实时数据的 android 应用程序。

I am trying to use Wifi Direct to do so (http://developer.android.com/guide/topics/connectivity/wifip2p.html). While it is easy to transfer data between two android devices using this technology, I am not sure how I can do the same between an android device and a PC. From what I researched, I found out that the PC needs the 'Intel My Wifi Dashboard' and 'Intel Pro Wireless Tools software' products to be able to use WiFi Direct.

我正在尝试使用 Wifi Direct 这样做(http://developer.android.com/guide/topics/connectivity/wifip2p.html)。虽然使用这种技术在两个安卓设备之间传输数据很容易,但我不确定如何在安卓设备和 PC 之间做同样的事情。根据我的研究,我发现 PC 需要“Intel My Wifi Dashboard”和“Intel Pro Wireless Tools 软件”产品才能使用 WiFi Direct。

My question is: Is it possible to code an interface or en quivalent Wifi Direct API that can work for PC which can replace these Intel software products so that the PC doesn't have to depend on the installation of these products and my app can directly communicate with PC?

我的问题是:是否可以编写可用于 PC 的接口或等效的 Wifi Direct API,它可以替代这些 Intel 软件产品,以便 PC 不必依赖于这些产品的安装,我的应用程序可以直接与PC通信?

回答by Android BABA

I have tried file sharing and other media sharing through Intel WIFI Direct technology to ANDROID WIFI Direct. But it doesn't work as per my experience. It shows devices connected with WIFI Direct and file sharing not supported :) funny but sad !

我已经尝试通过 Intel WIFI Direct 技术将文件共享和其他媒体共享到 ANDROID WIFI Direct。但根据我的经验,它不起作用。它显示连接到 WIFI Direct 的设备和不支持文件共享:) 有趣但悲伤!

So my advice would be, first explore whether you can at least connect and do some operations on ANDROID PHONES with Intel software installed on PC. Try with different devices. Don't forget to turn off your firewall on android as well as PC !

所以我的建议是,首先看看你是否至少可以在 PC 上安装了英特尔软件的 ANDROID PHONES 上连接并执行一些操作。尝试使用不同的设备。不要忘记在 android 和 PC 上关闭防火墙!

If your experiment works, then dig deeper to find about API's. This technology is still in its nascent stage. GOOD LUCK :)

如果您的实验有效,则深入挖掘以了解 API。这项技术仍处于起步阶段。祝你好运 :)

回答by Android BABA

https://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&DwnldID=21165, you can force download this version of Intel WiFI Dashboard.

https://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&DwnldID=21165,您可以强制下载此版本的 Intel WiFI Dashboard。

Point -> this is not the one which enables WiFi Direct on PC. You need drivers that come with 'Intel Pro Wireless Tools software'. Once that is installed you should directly install Intel WiFi Direct (WiDi)

Point -> 这不是在 PC 上启用 WiFi Direct 的那个。您需要“Intel Pro Wireless Tools 软件”附带的驱动程序。安装后,您应该直接安装 Intel WiFi Direct (WiDi)

Question -> Which WIFI Adapter are you using ? Right now not all the adapters support WiFi Direct API's. If you are trying to reuse intel API's then you will have to find right adapters. Also what do you mean by real time data ? Do you want to exchange photos/videos/files ? Or you want to Mirror your screen/video steaming real time ? Please do reply, even I am interested in this field :)

问题 -> 您使用的是哪个 WIFI 适配器?目前并非所有适配器都支持 WiFi Direct API。如果您尝试重用英特尔 API,则必须找到合适的适配器。另外你说的实时数据是什么意思?您想交换照片/视频/文件吗?或者您想实时镜像您的屏幕/视频?请回复,即使我对这个领域感兴趣:)

https://downloadcenter.intel.com(Select below options from dropdown) Product family ==> Wireless Networking Product line ==> Wireless Technologies Product name ==> Intel? Wireless Display (Intel? WiDi)

https://downloadcenter.intel.com(从下拉列表中选择以下选项)产品系列 ==> 无线网络产品线 ==> 无线技术产品名称 ==> 英特尔?无线显示(英特尔?WiDi)

回答by user3071433

if you are looking to write an app to do this, I would start off at the wifi alliance and pick up the whitepaper detailing the spec... here is a link. https://www.wi-fi.org/knowledge-center/published-specificationshttp://www.wi-fi.org/discover-and-learn/wi-fi-direct<<

如果您想编写一个应用程序来做到这一点,我会从 wifi 联盟开始,然后拿起详细说明规范的白皮书......这里是一个链接。 https://www.wi-fi.org/knowledge-center/published-specifications http://www.wi-fi.org/discover-and-learn/wi-fi-direct<<