This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Sensors (UART nrf52832) disconnects randomly from Android Application (bluetooth service crash)

Hello, we are facing an issue by connecting several sensors (UART nrf52832) to an Android Application ( Android Nougat 7.0) and we are facing disconnections (this happens randomly) with the sensors by the bluetooth service crashes and goes down, killing the connection.
We have tested several approaches (removing gatt operations (write and reads) and only receive notifications), however the issue continues to happen. Could someone help me with this issue?

I've attached one log where the issue happens

02-26 10:48:55.328 4446-6027/pt.mobilesword W/BluetoothGatt: onCharacteristicRead() - Device=D2:C7:90:31:E2:XX handle=26 Status=0
02-26 10:48:55.602 4446-4459/pt.mobilesword W/BluetoothGatt: onCharacteristicRead() - Device=E4:54:32:ab:44:XX handle=26 Status=0
02-26 10:49:55.341 4446-4459/pt.mobilesword W/BluetoothGatt: onCharacteristicRead() - Device=D2:C7:90:31:E2:XX handle=26 Status=0
02-26 10:49:55.627 4446-6027/pt.mobilesword W/BluetoothGatt: onCharacteristicRead() - Device=E4:54:32:ab:44:XX handle=26 Status=0
02-26 10:50:06.254 3204-3293/? D/BluetoothAdapterService: getAdapterService() - returning com.android.bluetooth.btservice.AdapterService@57a0d3c
02-26 10:50:06.266 3204-3293/? D/BluetoothDataManager: Call QmBigDataModule API additionally
02-26 10:50:06.267 3204-3293/? E/BluetoothDataManager: getUartErrorInfo NONE
02-26 10:50:06.267 3204-3293/? E/BluetoothDataManager: “LO_MFN”:“29",“LO_LMP”:“8",“LO_SUB”:“602",“LO_FWV”:“Rome Ver. 0x149",“ERROR_REASON”:“3",“UART”:“NONE”
02-26 10:50:06.267 3204-3293/? E/BluetoothDataManager: Failed to call QmBigDataModule API
02-26 10:50:06.279 3204-3596/? I/bt_vendor: stop_hci_filter: hci_filter has been stopped already
bt-vendor : get_bt_soc_type
qcom.bluetooth.soc set to rome
02-26 10:50:06.382 3204-3596/? I/bt_vendor: stop_hci_filter: hci_filter has been stopped already
bt-vendor : get_bt_soc_type
qcom.bluetooth.soc set to rome
02-26 10:50:06.427 3247-3247/? D/A2dpProfile: Bluetooth service disconnected
02-26 10:50:06.428 3247-3247/? D/BluetoothSap: Proxy object disconnected
02-26 10:50:06.428 2830-2894/? E/BluetoothManagerService: MESSAGE_BLUETOOTH_SERVICE_DISCONNECTED: 1
02-26 10:50:06.428 2830-3127/? I/ActivityManager: Process com.android.bluetooth (pid 3204) has died(50,802)
02-26 10:50:06.429 3247-3247/? D/SapProfile: Bluetooth service disconnected
02-26 10:50:06.429 2830-3127/? W/ActivityManager: Scheduling restart of crashed service com.android.bluetooth/.btservice.AdapterService in 1000ms
02-26 10:50:06.429 3247-3247/? D/BluetoothPan: BluetoothPAN Proxy object disconnected
02-26 10:50:06.429 3247-3247/? D/PanProfile: Bluetooth service disconnected
02-26 10:50:06.429 2830-3127/? W/ActivityManager: Scheduling restart of crashed service com.android.bluetooth/.map.BluetoothMapService in 11000ms
02-26 10:50:06.429 3247-3247/? D/BluetoothMap: Proxy object disconnected
02-26 10:50:06.429 3247-3247/? D/MapProfile: Bluetooth service disconnected
02-26 10:50:06.430 3247-3247/? D/BluetoothPbap: Proxy object disconnected
02-26 10:50:06.430 3247-3247/? D/PbapServerProfile: Bluetooth service disconnected
02-26 10:50:06.430 3247-3247/? D/BluetoothInputDevice: Proxy object disconnected
02-26 10:50:06.430 3247-3247/? D/HidProfile: Bluetooth service disconnected
02-26 10:50:06.430 3247-3247/? D/HeadsetProfile: Bluetooth service disconnect

Parents
  • Hello,

    Do you have any logs from your nRF application? 

    What sort of HW are you testing on? Is it a DK or a custom board? If it is a custom board, what is your LFCLOCK settings?

    If you get the disconnect event in the nRF application, can you please check the disconnect reason?

    I don't know what SDK version you use, but in SDK15.2.0 you can see the reason in ble_evt_handler() in main.c, through the ble_evt_t->evt.gap_evt.disconnected.reason;

    If you don't get the disconnected event, you are probably caught in the error_handler. If you enable logging, and define DEBUG in your preprocessor defines, you should see a pointer to the error in the log.

    Best regards,

    Edvin

  • Hi, the event when the service crashes detected by the sensor is 

    BLE_HCI_CONNECTION_TIMEOUT, do you have any idea about that may help?

Reply Children
Related