Android Question WiFi-Direct and WiFi Protocols

bocker77

Active Member
Licensed User
Longtime User
My program uses the WiFi-Direct protocol to communicate between a Samsung tablet and an LG phone. I was intending to use Samsung's Screen Mirroring to a TV to splash the tablet's screen to it. When testing after the mirroring completes it forces a disconnect from the connection between the tablet and phone. Samsung support indicates that Screen Mirroring does not use the WiFi-Direct protocol but regular WiFi. So for some reason this happens. Before I start mucking with my code I am wondering with this setup what would be the preferred communication protocol to use between the tablet and phone if any. I would imagine my choices would be Bluetooth which I believe slows everything down or regular WiFi.

Thanks in advance,
Greg
 

Didier9

Well-Known Member
Licensed User
Longtime User
Bluetooth has a lot less bandwidth than WiFi, so it depends on how much data you are trying to transfer.

I do not use WiFi Direct, but I communicate between a phone/tablet and an embedded device that can be configured as its own access point, or to communicate through the WiFi router, so what I am about to say applies to these configurations. I guess that WiFi Direct is probably equivalent to communicating with a device setup as its own access point since there is no other traffic going between the two.

For short packets where latency is important (I use both Bluetooth and WiFi for functions like real time remote control), I have found Bluetooth to be about as good as WiFi, with the advantage that there is no packet fragmentation in Bluetooth (or if there is, I have not seen it). WiFi is unlikely to fragment short packets but it does happen, depending on traffic.

With all the WiFi traffic going on in the background on every modern device, you never have a clear channel, so if you are looking at very short latency, WiFi can have a lot of variability.
 
Upvote 0

bocker77

Active Member
Licensed User
Longtime User
Thanks Didier9 I will look into using Bluetooth since it looks easier to implement but when I was testing my programs and was using a Bluetooth speaker with the tablet it interfered with the speed between the tablet and phone. I hope I don't run into the same issue after I convert over. Even though Samsung support indicated that their Screen Mirroring didn't use WiFi Direct I have found otherwise on one of their pages on the internet. So I guess I will find out soon.
 
Upvote 0
Top