简体   繁体   中英

RFComm connection blocks WiFi

I have this code:

theSocket = theDevice.createInsecureRfcommSocketToServiceRecord(SPP_UUID);
theSocket.connect();

which works fine, except for one thing (at least on the LG L40 Android 4.4.2, had similar problems, though not as clear, on the LG E430), as soon as the theSocket.connect() call finished, the complete WiFi is gone (I run a ping on the ADB shell and it stops as soon as that call is done).

Updates

  • Changing the RFComm socket to a normal, paired one, makes no difference.
  • Changing to HID mode will block the WiFi as soon as data arrives.
  • Starting in "safe mode" has no effect, problem is still there.

Is there anything I could change to make sure the Wifi-Bluetooth interference is minimised?

There were known bugs with Android 4.2.x that caused the Wi-Fi to drop out when attempting to use Bluetooth simultaneously, especially with the Nexus 4. This post discusses the issue:

https://code.google.com/p/android/issues/detail?id=41631

Whether the issues discussed above are occurring for similar reasons or are more related to hardware issues with the Nexus 4 remains unclear. I do know that Android introduced a new Bluetooth stack in the 4.2 release, so this could be a potential source of problems.

Have you tried updating your device to Android 5.0 or higher in order to see if this fixes the issue? That would be my recommendation.

UPDATE

Reading further in the link provided above it seems as if this problem extended to multiple devices (Nexus 4, 5, 7, Galaxy S4, Galaxy Tab 5 just to name a few) and multiple Android releases (problems were still reported as late as 4.4.4). With this in mind I think the clearest path to fixing the issue, as mentioned above, is to try and upgrade to Lollipop

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM