Frequent BLE Disable - Android Marshmar +

Problem: Bluetooth connection between Android app (GATT client) and two TI boards (CC2640R2F, GATT server) is unstable. When android app connect to two boards, the bluetooth connection state of the two boards quickly switches between connected and disconnected states. As a result, the service discovery process is affected and sometimes no GATT indications are detected (the GATT service is just empty). The problem only occurs with Android devices running Marshmallow (6.0+) and above. This issue also occurs in other third party apps available on the play store like BLE scanner, touch tag and nrf connecting to these Android devices.

Fixes taken on Android side: The following fixes have been attempted on the Android side, but have not been successful. a time delay (up to 2000ms) was set between the successful connection event and the gatt.discoverServices () request. Have separate device.gattConnect (...) methods for devices below and above marshmallow (6.0). Devices above marshmallow require the TRANSPORT parameter. Switch the connection between the GATT servers to ensure that only one server is connected at a time. Created separate Gatt callbacks for the two servers and separate threads for all operations that took place between the two servers. The only fix that was successful was connecting only one server to the client. To connect another server, the application must be reopened. If another device is connected at the same time, the problem still occurs.

Data Collected: The bluetooth squelch logs were collected from android side and attached. The file 'btsnoop_hci_success.log deals with successful BLE connection between android device (samsung galaxy s7 edge) running Marshmallow (6.0.1) and only one server (purifier). The file 'btsnoop_hci_fail.log' refers to the problematic BLE connection between the same Android device and two servers (sensor and purifier).

+3


source to share





All Articles