wifip2p

ServerSocket.getLocalSocketAddress() returning empty

筅森魡賤 提交于 2020-06-16 17:27:07
问题 I'm trying to create a local server with Wi-Fi P2P between an Android phone and a Raspberry Pi, with the Android as the host. I have been able to successfully establish a P2P connection using wpa_cli on the Pi, but now I am trying to use a C client socket to connect to the phone and transfer data. However, the line Log.d("Socket waiting", serverSocket.getLocalSocketAddress().toString()); spits out D/Socket waiting: ::/:::8888 . It doesn't seem to have an address at all, so how am I supposed

ServerSocket.getLocalSocketAddress() returning empty

二次信任 提交于 2020-06-16 17:26:09
问题 I'm trying to create a local server with Wi-Fi P2P between an Android phone and a Raspberry Pi, with the Android as the host. I have been able to successfully establish a P2P connection using wpa_cli on the Pi, but now I am trying to use a C client socket to connect to the phone and transfer data. However, the line Log.d("Socket waiting", serverSocket.getLocalSocketAddress().toString()); spits out D/Socket waiting: ::/:::8888 . It doesn't seem to have an address at all, so how am I supposed

inconsistency in getting WifiP2pInfo in WiFiDirect

不想你离开。 提交于 2020-01-14 05:17:14
问题 i am creating an application based on WifiDirect in android but the issue that i am facing inconsistency in getting wifi p2p connection info. i am checking whether wifi direct is on or not , it shows its true but still sometimes i am getting connection info and sometimes not and thats the reason why i am not getting groupOwnerAddress . one more thing is that i get networkInfo.isConnected() to false and that time only i am not able to get the WifiP2pInfo . sometimes it works sometimes it doesn

Is it possible to connect two or more WiFi Direct groups?

一世执手 提交于 2020-01-11 03:32:11
问题 I am currently experimenting with WiFi-Direct (WiFiP2p) for a project I'm working on and wanted to know if one can create bridge between groups, thus joining them together? Based upon the white paper released by the WiFi Alliance, it should be possible (though "The P2P Specification does not describe the mechanism for this capability – implementation is specific to the vendor"). I have looked through the internet and have found some answers (this, this, etc.) but I feel that none are

App crash while sending data over a socket using WifiP2p connection

北慕城南 提交于 2020-01-06 06:54:30
问题 App crashes while sending data over a socket using wifi p2p connection I am testing a simple chat application between HTC_Desire_10 pro (running Android 6.0) and OPPO A83 (running Android 7.1.1). I have the same app running on the two devices. The app first turns wifi on, then starts discovering peers on a users click event. The user can choose the device they want to connect to from a dynamically generated peer list. The two devices are able to connect successfully. I am able to send a text

Android O issues with WiFi Peer Discovery

China☆狼群 提交于 2020-01-01 10:06:22
问题 I am developing an Android Application that employs WiFi (Direct) for service discovery and P2P peer discovery/connection. My development enviromment is as follows:- Android Studio 3.0 Beta 4 Build #AI-171.4304935, built on August 29, 2017 JRE: 1.8.0_152-release-915-b01 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Mac OS X 10.11.6 My Gradle build:- apply plugin: 'com.android.application' apply plugin: 'realm-android' android { compileSdkVersion 26 buildToolsVersion "26.0.1"

Android O issues with WiFi Peer Discovery

ぐ巨炮叔叔 提交于 2020-01-01 10:06:11
问题 I am developing an Android Application that employs WiFi (Direct) for service discovery and P2P peer discovery/connection. My development enviromment is as follows:- Android Studio 3.0 Beta 4 Build #AI-171.4304935, built on August 29, 2017 JRE: 1.8.0_152-release-915-b01 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Mac OS X 10.11.6 My Gradle build:- apply plugin: 'com.android.application' apply plugin: 'realm-android' android { compileSdkVersion 26 buildToolsVersion "26.0.1"

WiFi Direct device connection with other Android devices

眉间皱痕 提交于 2019-12-30 11:31:15
问题 Can I connect a WiFi Direct enabled device to any other device which doesn't have WiFi Direct feature but supports WiFi hotspot connection? Does WiFi direct uses specialized hardware to be present on both devices? Will network discovery work in such cases? 回答1: It is possible. Code taken from a talk I gave at Droidcon UK 2013. You need to call the createGroup(WifiP2pManager.Channel c, WifiP2pManager.ActionListener listener) method of the WifiP2pManager class. This will create a Wi-Fi Direct

Is multicasting possible with Wi-Fi Direct?

此生再无相见时 提交于 2019-12-30 04:50:08
问题 I'm a bit confused about the new Wi-Fi Direct feature in Android ICS. Is it possible to create a P2P group with multiple devices, and send multicast packets from a source peer to the other peers? Unfortunately, I don't have any devices that are Wi-Fi Direct enabled, so I can only browse the examples that I find online. In these examples, I could only find peers establishing 1-on-1 connections. So, is multicasting possible? 回答1: Is it possible to create a p2p group with multiple devices ?

Wi-Fi Direct and “normal” Wi-Fi - Different MAC?

随声附和 提交于 2019-12-30 04:40:12
问题 I'm currently trying to connect two phones which know each other's MAC address via Wi-Fi Direct, and stumbled upon the following problem: The MAC address, which I receive from WifiManager wifiMan = (WifiManager) this .getSystemService(Context.WIFI_SERVICE); WifiInfo wifiInf = wifiMan.getConnectionInfo(); MAC_ADDRESS = wifiInf.getMacAddress(); is slightly different than the one I receive from the WifiP2pManager when discovering and requesting peers. Example: a0:xx:xx:... turns into a2:xx:xx...