1

I am developing an application using WiFi Direct on Android platform.

Now, I can establish the connection and send messages through socket between two devices. But the WiFi Direct connection seems unstable. Because after several minutes the connection is closed automatically(the two devices are not out of WiFi direct range), and I don't know why.

I have searched for several hours but without luck. Most questions or articles are about how to use WiFi Direct.

So I am eager to know under what condition the WiFi Direct connection would closed or, what can cause the connection break down, or how to make WiFi Direct connection stable? Thanks.

Alvis
  • 109
  • 3
  • 13

1 Answers1

4

I am currently working on an App that uses WiFi Direct for a great amount of time and I never experienced having the WiFi Direct connections unexpectedly close. I am using Samsung S3 and S4 for testing. However, here's some things to look out for:

1- Co-Channel Interference (CCI) in the Network: If you are testing somewhere that is in or near a dense network then CCI might affect the WiFi Direct connection established. So try making the WiFi Direct operate on the 5 GHz band where there is less Interference. In order to customize the WiFi Direct Channel, refer to my answer in this question Customized channel wifi direct . Samsung WiFi Chipset is Dual band so you can simultaneously operate on 2 frequency bands. You can have the connection with the AP on the 2.4 GHz and the WiFi Direct Connection on the 5 GHz band.

2- Power Saving Mode: Make sure the Power Saving Mode is OFF since the OS might try to weaken the WiFi Direct connection signal strength which will lead to interrupting the connection.

3- Operating System Version: From my experience, dealing with different phones when establishing WiFi Direct connections, I noticed that it is best to have the phones operate in the same OS Version. For instance, the WiFi Direct throughput between S4-S4 that run the same OS version is greater than the throughput between 2 S4s with different OS or between S3-S4. Additionally, connecting S3 and Nexus 5 often (90% of the time) does not work.

So I would recommend to first test the App between 2 Samsung phones running the same OS. Make sure Power Saving Mode is OFF and they are fully charged. If that didn't improve the connection, try modifying the WiFi Direct operating channel.

Hope this helps, let me know if you have any questions.

Community
  • 1
  • 1
Ziad Halabi
  • 964
  • 11
  • 31
  • Thanks for your answer and I am sorry for my late reply. **Co-Channel Interference** This is a good suggestion but I am testing in company, and devices can not be rooted. **Power Saving Mode** Yes, I haven't noticed this condition before, WiFi-Direct connection is usually closed by system because of Power Saving Mode. **Operating System Version** We have no devices to test and in our real situation, the devices would not run same OS. Thanks again, @Ziad Halabi – Alvis Apr 14 '15 at 02:24