LP-EM-CC2340R53: Bluetooth Timeout-Caused OAD Failure in Keynode Example: What Extra Settings/Modifications Are Needed?

Part Number: LP-EM-CC2340R53

Tool/software:

HI,TI

  I followed the documentation(https://dev.ti.com/tirex/explore/node?node=A__Afldgct56i7LcbjG6qeBYw__SIMPLELINK-ACADEMY-CC23XX__gsUPh5j__8.10.05.00    How to Add Bluetooth Low Energy (LE) Over the Air Download (OAD) to Basic Example) to integrate OAD into the TI\simplelink_lowpower_f3_sdk_9_12_00_19\examples\rtos\LP_EM_CC2340R53\ble\key_node example code.

  However, after completing the integration, I encountered an issue: whenever I use Btool to establish a Bluetooth connection and then initiate the OAD process, the Bluetooth connection disconnects due to a timeout—ultimately causing the OAD to fail.

  Could you tell me what additional modifications or configurations are needed, beyond following the steps in this document, to successfully complete the OAD?

  • Hi,

    Thank you for reaching out. Do you have access to a bluetooth sniffer? If so, then can you take a sniffer log of the disconnection? Also, do you see the timeout in an unmodified key_node example? 

    Best Regards,

    Jan

  • HI Jan

      I would like to add some additional information: After establishing a BLE connection and initiating the OAD, everything proceeds smoothly up to this point. However, an issue arises when the process reaches the User Application reset stage. Instead of automatically reconnecting to resume OAD, the Bluetooth connection drops. At the same time, the Bluetooth advertising name changes from "Key Node" to "Persistent_app". To continue and complete the OAD, I have to manually establish a Bluetooth connection with "Persistent_app".

      Below is the log snippet of the OAD error encountered when using BTOOL.

    --------------------------------------------------------------------
    [78] : <Info> - 02:50:59.177
    OAD Invalidate Image On StartReset
    --------------------------------------------------------------------
    [79] : <Tx> - 02:50:59.184
    -Type           : 0x01 (Command)
    -OpCode         : 0xFD96 (GATT_WriteLongCharValue)
    -Data Length    : 0x07 (7) byte(s)
     ConnHandle     : 0x0000 (0)
     Handle         : 0x0012 (18)
     Offset         : 0x0000 (0)
     Value          : 01
    Dump(Tx):
    0000:01 96 FD 07 00 00 12 00 00 00 01                ...........
    --------------------------------------------------------------------
    [80] : <Rx> - 02:50:59.220
    -Type           : 0x04 (Event)
    -EventCode      : 0x00FF (HCI_LE_ExtEvent)
    -Data Length    : 0x06 (6) bytes(s)
     Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)
     Status         : 0x00 (0) (SUCCESS)
     OpCode         : 0xFD96 (GATT_WriteLongCharValue)
     DataLength     : 0x00 (0)
    Dump(Rx):
    0000:04 FF 06 7F 06 00 96 FD 00                      .........
    --------------------------------------------------------------------
    [81] : <Info> - 02:50:59.582
    Waiting For Device Reset
    --------------------------------------------------------------------
    [82] : <Rx> - 02:50:59.564
    -Type           : 0x04 (Event)
    -EventCode      : 0x00FF (HCI_LE_ExtEvent)
    -Data Length    : 0x06 (6) bytes(s)
     Event          : 0x0519 (1305) (ATT_ExecuteWriteRsp)
     Status         : 0x00 (0) (SUCCESS)
     ConnHandle     : 0x0000 (0)
     PduLen         : 0x00 (0)
    Dump(Rx):
    0000:04 FF 06 19 05 00 00 00 00                      .........
    --------------------------------------------------------------------
    [83] : <Info> - 02:50:59.767
    Device Disconnected
    Handle = 0x0000
    Addr Type = 0x01 (ADDRTYPE_RANDOM)
    BDAddr = 48:8C:E1:7C:49:0E
    --------------------------------------------------------------------
    [84] : <Rx> - 02:50:59.767
    -Type           : 0x04 (Event)
    -EventCode      : 0x00FF (HCI_LE_ExtEvent)
    -Data Length    : 0x06 (6) bytes(s)
     Event          : 0x0606 (1542) (GAP_TerminateLink)
     Status         : 0x00 (0) (SUCCESS)
     ConnHandle     : 0x0000 (0)
     Reason         : 0x13 (19) (PEER_REQUESTED_TERM)
    Dump(Rx):
    0000:04 FF 06 06 06 00 00 00 13                      .........
    --------------------------------------------------------------------
    [85] : <Info> - 02:51:14.595
    Establish Connection
    --------------------------------------------------------------------
    [86] : <Tx> - 02:51:14.595
    -Type           : 0x01 (Command)
    -OpCode         : 0xFE62 (GapInit_connect)
    -Data Length    : 0x0A (10) byte(s)
     PeerAddrType   : 0x01 (1) (PEER_ADDRTYPE_RANDOM_OR_RANDOM_ID)
     PeerAddr       : 48:8C:E1:7C:49:0E
     InitiatingPhy  : 0x01 (1) (
                      INIT_PHY_1M)
     Timeout        : 0x0000 (0)
    Dump(Tx):
    0000:01 62 FE 0A 01 0E 49 7C E1 8C 48 01 00 00       .b....I|..H...
    --------------------------------------------------------------------
    [87] : <Rx> - 02:51:14.642
    -Type           : 0x04 (Event)
    -EventCode      : 0x00FF (HCI_LE_ExtEvent)
    -Data Length    : 0x06 (6) bytes(s)
     Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)
     Status         : 0x00 (0) (SUCCESS)
     OpCode         : 0xFE62 (GapInit_connect)
     DataLength     : 0x00 (0)
    Dump(Rx):
    0000:04 FF 06 7F 06 00 62 FE 00                      ......b..
    --------------------------------------------------------------------
    [88] : <Error> - 02:51:54.595
    OAD Operation Timed Out
    Operation Name = GAP_EstablishLink_OadReset
    --------------------------------------------------------------------
    [89] : <Info> - 02:51:54.595
    OAD - Restore Connection Settings
    --------------------------------------------------------------------
    [90] : <Error> - 02:51:54.595
    OAD Download Not Successful
    --------------------------------------------------------------------

  • Hi,

    Thank you for the additional details. Can you confirm if you are enabling on-chip, off,chip or dual-image OAD on your project?

    Best Regards,

    Jan

  • Hi Jan,

      I apologize for forgetting to mention this information earlier.I have integrated the on-chip project into my existing project.

  • HI Jan,

      I’ve identified the issue: changing the default Address Mode of the Keynode to Public Address enables the successful completion of OAD.

  • Hi,

    Thank you for sharing the solution! I will mark this thread as closed at this time. If you need any further assistance then feel free to open a related thread and we would be happy to help!

    Best Regards,

    Jan