在Android和PC之间创建Wifi对等连接 [英] Creating a Wifi peer to peer connection between Android and PC

查看:242
本文介绍了在Android和PC之间创建Wifi对等连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个关于Android操作系统(4.x及更高版本)的p2p功能的问题。我有一个PC程序,利用Boost C ++库,可以作为服务器或客户端。现在我有一个Android应用程序有一个服务器使用Java套接字。这个程序需要一个访问点来相互连接。

I have a question about the p2p functionality of Android OS (4.x and higher). I have a PC program that makes use of the Boost C++ library that can function as a server or as a client. Now i have a Android app that has a server using Java sockets. This program need a accesspoint to connect to each other.

我正在寻找一种方法来连接Android服务器和没有访问点的PC客户端程序。看了一下我发现Android有一个p2p库。
Android P2P
阅读它只能连接两个Android设备彼此,我的问题是,如果是可以使用这个库使用wifi p2p连接Android设备到电脑?还是有其他可能性?欢迎所有建议!

I'm looking for a way to connect the Android server and the PC client program without a accesspoint. After looking around i found out that Android has a p2p library. Android P2P As a read it you can only connect two Android devices with each other, my question is if it is possible to use this library to connect the Android device to the PC using wifi p2p? Or if there is a other possiblity? All suggestions are welcome!

推荐答案

Roy,看看这个: http://en.wikipedia.org/wiki/Wi-Fi_Direct
WiFi P2P现在称为WiFi Direct,确实可以连接两个设备,只要一个设备支持它。所以Android设备在P2P模式和PC没有任何特殊的配置应该工作正常。然而,PC可以(可能)一次仅连接到一个接入点,从Android设备是接入点的角度来看,它将不得不从其通常的接入点断开以连接到Android设备。

Roy, have a look at this: http://en.wikipedia.org/wiki/Wi-Fi_Direct WiFi P2P is now called WiFi Direct, and it is indeed possible to connect two devices as long as one of the devices supports it. So Android device in P2P mode and a PC without any special configuraiton should work fine. However, the PC can (probably) only connect to one access point at a time, from its perspective the Android device is the access point, it would have to disconnect from its usual access point to connect to the Android device.

还可以查看SoftAP。

Also check out SoftAP.

这篇关于在Android和PC之间创建Wifi对等连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆