Application using bluetooth SPP profile not working after update from Android 4.2 to Android 4.3

We can confirm the Bluetooth disconnect after 6 seconds when communicating from our Nexus 4 app to an external Bluetooth ECG (medical device) after upgrading from Android 4.2 to 4.3. This happens specifically during an ECG measurement with lots of inbound data (from ECG to the Android app) but no outbound data. “Normal” Bluetooth communication with some inbound and outbound data from time to time does not seem to be affected.

After 6 seconds we see the same adb log messages reported by JJM

dm_pm_timer expires
dm_pm_timer expires 0
proc dm_pm_timer expires
btm_sec_disconnected - Clearing Pending flag

This timer expiry on the Android side triggers something (closing output stream because no outbound data?) on the external Bluetooth ECG which in turn sends an ECG specific command we receive on the input stream that we never receive on the Nexus 4 with Android 4.2.

Changing the Android app implementation to occasionally send an arbitrary “keep alive” command to the ECG solves the problem. The timer expiry does not appear in the adb logs anymore and the ECG measurement now behaves the same as with Android 4.2.

Thanks to JJM for the hints.

Leave a Comment