wifip2p

Alternative to discovering peers with Wifi Direct as it requires both phones running WiFi Direct discovery

廉价感情. 提交于 2019-12-01 09:21:22
I am trying to discover WiFi Direct peer to peer android devices but peers are discovered only when both phones are running WiFi Direct discovery. What I have Understood so far is, they will see each other only when they are both scanning for WiFi direct connections at the same time. This is because the way WiFi Direct works is that when phones are scanning for WiFi Direct connections, they will negotiate with the other peers for the role of Access Point or Slave device. Hence both need to call discoverPeers() to become discoverable themselves and find nearby devices. What I want in my

How change the device name in WiFi direct p2p?

六月ゝ 毕业季﹏ 提交于 2019-12-01 03:27:38
Is it possibile to change the device name of WiFi direct through the code? I've tried to: private WifiP2pDevice wDevice; wDevice.deviceName = "newName"; But, obviously it doesn't work. Any idea?! user3409573 Following code use Reflection api of Java,It is less preferrable due to lack of efficiency but Android does not provide another way so, You can use it works with charm : try { Method m = wpm.getClass().getMethod( "setDeviceName", new Class[] { WifiP2pManager.Channel.class, String.class, WifiP2pManager.ActionListener.class }); m.invoke(WifiP2pManager wifimngr,WifiP2pManager.Channel

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

时光怂恿深爱的人放手 提交于 2019-11-30 22:54:54
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 particularly conclusive. Looking at Andoid's API hasn't helped much either. The scenario I'm trying to

Is multicasting possible with Wi-Fi Direct?

雨燕双飞 提交于 2019-11-30 14:17:19
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? Is it possible to create a p2p group with multiple devices ? Based on the Industry white paper and the technical specs, yes it is possible to create a group with multiple

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

廉价感情. 提交于 2019-11-30 14:03:20
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.... Does anyone know why? I did not find any way to get the "Wi-Fi Direct MAC address", and as I thought

Wi-Fi Direct Android

痞子三分冷 提交于 2019-11-30 07:42:35
I want to transfer files between 2 devices via Wi-Fi Direct. I wanted to do the same thing as in WifiDirectDemo, but I can't transfer data from the group owner to the other device, so I tried this: each time when one of the devices clicks connect, the other device is set as the group owner, so on each connection the device who asks for connection is always the client and can send data. The problem with this is that Android always remembers the first group created and therefore its group owner. In other words, what I did only works the first time unless I go to settings and forget the group

Why is discovering peers for Android Wi-Fi Direct so unreliable?

倖福魔咒の 提交于 2019-11-30 02:30:35
I am experimenting with Android's Wi-Fi Direct (or P2P if you prefer). I thought it was working very nicely between my two phones, but I realized I am encountering issues with the WifiP2pManager.discoverPeers() and/or WifiP2pManager.requestPeers() . I have observed these results: No peers are discovered and no callbacks are fired for a good 1+ minute. I observe this through the Wi-Fi Direct portion of the Android Wi-Fi settings as well. This is odd because sometimes the discovery completes almost immediately. I have a Roku device and phone B sitting next to phone A. While all are connected to

Wi-Fi Direct Android

时间秒杀一切 提交于 2019-11-29 10:24:44
问题 I want to transfer files between 2 devices via Wi-Fi Direct. I wanted to do the same thing as in WifiDirectDemo, but I can't transfer data from the group owner to the other device, so I tried this: each time when one of the devices clicks connect, the other device is set as the group owner, so on each connection the device who asks for connection is always the client and can send data. The problem with this is that Android always remembers the first group created and therefore its group owner

Can I use Wi-Fi Direct and cellular data in an app?

旧巷老猫 提交于 2019-11-29 02:46:00
I have two+ Android devices. I would like the devices to send instructions to the other devices using Wi-Fi Direct, while at the same time being able to access the internet via their cellular data connection. It seems that using the Wi-Fi Direct interface is being treated as the primary connection, disabling the other connections, just like how Wi-Fi disables the cellular data connection. How can I programmatically allow both to operate at the same time? Currently the Wi-Fi Direct receiver is implemented according to Google's Android Developer documents. I was under the assumption that I could

Wifi P2P service discovery works intermittently

烂漫一生 提交于 2019-11-28 15:54:30
Wifi P2P service discovery is not behaving as expected. I am seeing intermittent issues where the DNSSD listeners are not called always and hence I have no clue of nearby devices running the same app. I am using the following two APIs - one to register a service to be discovered by other devices and the other to discover the nearby services running on other devices. Any idea if I am doing anything wrong here or is there some specific sequence of other android API calls that need to be made before I call these APIs to ensure that the listeners are always called whenever there is a new service