This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2541 Response "DISCONNECTED" when using OAD at smartphone

We try to implement APK for OAD automatically. When smartphone connected to device, there are two kind of error happened.

1. Response "BluetoothProfile.STATE_DISCONNECTED" to smartphone if connected at begin (sniffer log)

2. Response "BluetoothProfile.STATE_DISCONNECTED" to smartphone when transfer  (sniffer log)

  • Hi Ian,

    Can you provide some more details, such as which APK you are using (TI reference or custom), logs, etc.? Also, which BLE Stack version are you using?

    Best wishes
  • Thanks for your reply.

    We use "SensorTagAndroidAppSource-1_1_0-windows-installer.zip" from TI reference.
    I don't understand what "BLE Stack version" means, but our codebase is "BLE-CC254x-1.4.0"
    When we start to OAD, the log display "LeService busy" before fail, and then "onConnectionStateChange".
    If we want to improve stability, how should we do??

    =======================Log start======================
    03-03 13:54:26.685: D/BLEService(4011): onCharacteristicWrite
    03-03 13:54:26.695: D/SettingActivity(4011): action: ti.android.ble.common.EXTRA_DATA
    03-03 13:54:26.695: D/SettingActivity(4011): action: ti.android.ble.common.EXTRA_DATA
    03-03 13:54:26.715: D/BluetoothGatt(4011): writeCharacteristic() - uuid: f000ffc2-0451-4000-b000-000000000000
    03-03 13:54:26.715: D/BtGatt.GattService(23230): writeCharacteristic() - address=5C:31:3E:48:42:D0
    03-03 13:54:26.715: D/BtGatt.btif(23230): btif_gattc_write_char
    03-03 13:54:26.715: D/BtGatt.btif(23230): btgattc_handle_event: Event 1015
    03-03 13:54:26.715: D/BtGatt.btif(23230): btif_gattc_upstreams_evt: Event 4
    03-03 13:54:26.715: D/BtGatt.GattService(23230): onWriteCharacteristic() - address=5C:31:3E:48:42:D0, status=0
    03-03 13:54:26.715: D/BluetoothGatt(4011): onCharacteristicWrite() - Device=5C:31:3E:48:42:D0 UUID=f000ffc2-0451-4000-b000-000000000000 Status=0
    03-03 13:54:26.715: D/BLEService(4011): onCharacteristicWrite
    03-03 13:54:26.725: D/BluetoothGatt(4011): writeCharacteristic() - uuid: f000ffc2-0451-4000-b000-000000000000
    03-03 13:54:26.725: D/BtGatt.GattService(23230): writeCharacteristic() - address=5C:31:3E:48:42:D0
    03-03 13:54:26.725: D/BtGatt.btif(23230): btif_gattc_write_char
    03-03 13:54:26.725: D/BtGatt.btif(23230): btgattc_handle_event: Event 1015
    03-03 13:54:26.725: E/GKI_LINUX(23230): ##### ERROR : GKI_exception: GKI_exception(): Task State Table
    03-03 13:54:26.725: E/GKI_LINUX(23230): #####
    03-03 13:54:26.725: E/GKI_LINUX(23230): ##### ERROR : GKI_exception: TASK ID [0] task name [BTU] state [1]
    03-03 13:54:26.725: E/GKI_LINUX(23230): #####
    03-03 13:54:26.725: E/GKI_LINUX(23230): ##### ERROR : GKI_exception: TASK ID [1] task name [BTIF] state [1]
    03-03 13:54:26.725: E/GKI_LINUX(23230): #####
    03-03 13:54:26.725: E/GKI_LINUX(23230): ##### ERROR : GKI_exception: TASK ID [2] task name [A2DP-MEDIA] state [1]
    03-03 13:54:26.725: E/GKI_LINUX(23230): #####
    03-03 13:54:26.725: E/GKI_LINUX(23230): ##### ERROR : GKI_exception: GKI_exception 65524 getbuf: out of buffers#####
    03-03 13:54:26.725: E/GKI_LINUX(23230): ##### ERROR : GKI_exception:
    03-03 13:54:26.725: E/GKI_LINUX(23230): ********************************************************************
    03-03 13:54:26.725: E/GKI_LINUX(23230): #####
    03-03 13:54:26.725: E/GKI_LINUX(23230): ##### ERROR : GKI_exception: * GKI_exception(): 65524 getbuf: out of buffers
    03-03 13:54:26.725: E/GKI_LINUX(23230): #####
    03-03 13:54:26.725: E/GKI_LINUX(23230): ##### ERROR : GKI_exception: ********************************************************************
    03-03 13:54:26.725: E/GKI_LINUX(23230): #####
    03-03 13:54:26.725: E/BtGatt.btif(23230): ### ASSERT : external/bluetooth/bluedroid/main/../btif/src/btif_gatt_client.c line 526 Context transfer failed! (3) ###
    03-03 13:54:26.725: D/SettingActivity(4011): action: ti.android.ble.common.EXTRA_DATA
    03-03 13:54:26.745: W/BLEService(4011): LeService busy
    03-03 13:54:26.765: W/BLEService(4011): LeService busy
    03-03 13:54:26.785: W/BLEService(4011): LeService busy
    03-03 13:54:26.805: W/BLEService(4011): LeService busy
    03-03 13:54:26.835: W/BLEService(4011): LeService busy
    03-03 13:54:26.855: W/BLEService(4011): LeService busy
    03-03 13:54:26.865: W/BLEService(4011): LeService busy
    03-03 13:54:26.895: W/BLEService(4011): LeService busy
    03-03 13:54:26.905: W/BLEService(4011): LeService busy
    03-03 13:54:26.925: W/BLEService(4011): LeService busy
    03-03 13:54:26.945: W/BLEService(4011): LeService busy
    03-03 13:54:26.975: W/BLEService(4011): LeService busy
    03-03 13:54:26.995: W/BLEService(4011): LeService busy
    03-03 13:54:27.015: W/BLEService(4011): LeService busy
    03-03 13:54:27.025: W/BLEService(4011): LeService busy
    03-03 13:54:27.055: W/BLEService(4011): LeService busy
    03-03 13:54:27.075: W/BLEService(4011): LeService busy
    03-03 13:54:27.085: W/BLEService(4011): LeService busy
    03-03 13:54:27.105: W/BLEService(4011): LeService busy
    03-03 13:54:27.125: W/BLEService(4011): LeService busy
    03-03 13:54:27.145: W/BLEService(4011): LeService busy
    03-03 13:54:27.175: W/BLEService(4011): LeService busy
    03-03 13:54:27.195: W/BLEService(4011): LeService busy
    03-03 13:54:27.215: W/BLEService(4011): LeService busy
    03-03 13:54:27.225: W/BLEService(4011): LeService busy
    03-03 13:54:27.235: E/bt-btm(23230): btm_sec_disconnected - Clearing Pending flag
    03-03 13:54:27.235: W/bt-l2cap(23230): L2CA_SetDesireRole() new:x0, disallow_switch:0
    03-03 13:54:27.235: W/bt-l2cap(23230): L2CA_SetDesireRole() new:x0, disallow_switch:0
    03-03 13:54:27.235: W/bt-btif(23230): bta_dm_act no entry for connected service cbs
    03-03 13:54:27.255: W/BLEService(4011): LeService busy
    03-03 13:54:27.265: D/BluetoothPbapService(23230): action: android.bluetooth.device.action.ACL_DISCONNECTED
    03-03 13:54:27.265: W/BLEService(4011): LeService busy
    03-03 13:54:27.265: D/FactorStorage(1408): setCpuTemperature: 38
    03-03 13:54:27.265: D/FactorStorage(1408): setBatteryCurrent: -140426
    03-03 13:54:27.265: I/BrightnessStatusRecordP(1408): PowerConsumption() BrightnessBass=38
    03-03 13:54:27.265: I/BrightnessStatusRecordP(1408): PowerConsumption() mBConsumptionBase = 0.08888888888888889 BNConsumption = 0.10261111111111111
    03-03 13:54:27.265: D/FactorStorage(1408): setBrightnessLevel: 0.10261111111111111
    03-03 13:54:27.275: D/BtGatt.btif(23230): btif_gattc_upstreams_evt: Event 5
    03-03 13:54:27.275: D/BtGatt.GattService(23230): onDisconnected() - clientIf=5, connId=5, address=5C:31:3E:48:42:D0
    03-03 13:54:27.275: D/BluetoothGatt(4011): onClientConnectionState() - status=0 clientIf=5 device=5C:31:3E:48:42:D0
    03-03 13:54:27.275: D/BLEService(4011): onConnectionStateChange
    03-03 13:54:27.275: D/HomeOn(4011): Show notify with disconnect
    =======================Log end======================

    Regards,
    Ian
  • Hi JXS,

    Does Bluetooth® Low Energy Forum could add attachment??
    I want to upload sniffer log for you.
    OR Could you share your mail address?

    Regards,
    Ian
  • Hi Ian,

    By pressing "Use rich formatting" you are allowed to upload files.

    .:svend
  • Hi JXS,

    sniffer log is at attachment.

    "M511_fail.cfa" is about first error.

    "In810_fail2.cfa" is about second error.

    Thanks for your help.My Capture Files.zip

  • Hi svendbt,

    Thanks a lot!!

    Regards,
    Ian
  • Hi JXS,

    The sniffer log is at attachment,

    In attachment, "IN810 Capture Files.zip" means the OAD fail log with smartphone and "LSO Capture Files.zip" means the OAD success log with smartphone .

    We use our APK for OAD, and compare with difference device(TI KD and our device) and source code(TI original code and our code) setting below.

    Our APP VS TI DK:

    -          Check TI original code “SimpleBLEPeripheral” included OAD function based on TI DK.

    -          Check our application code included OAD function based on TI DK.

     Our APP VS Our Device:

    -          Check TI original code “SimpleBLEPeripheral” included OAD function based on Our Device (Near).

    -          Check Our application code included OAD function based on Our Device (Near).

    Could you give me some hint for this problem?

    many thanks!!

    IN810 Capture Files.zipLSO Capture Files.zip