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.

CC2640R2F: OAD failed after modifying block size - stuck on send UUID discovery

Part Number: CC2640R2F

SDK: simplelink_cc13x2_26x2_sdk_4_40_04_04

Hardware: CC2640R2F LaunchPad

Code example: simple_peripheral_oad_off_chip

Using Btool to perform off-chip OAD for CC2640R2F, after modifying the block size in Btool from 120kB to 80kB, the first OAD can succuss but the second OAD attemption(with 80kB block size) will fail.

It was stuck on "OAD send UUID discovery", with Unknown Status Type #58.

Please find the Btool log as below. Any idea about the cause of the failure? Thanks.

[110] : <Info> - 11:56:58.054

Start OAD Download

--------------------------------------------------------------------

[111] : <Info> - 11:56:58.057

Image Service Discovery

--------------------------------------------------------------------

[112] : <Info> - 11:56:58.065

OAD Send UUID Discovery

--------------------------------------------------------------------

[113] : <Tx> - 11:56:58.053

-Type           : 0x01 (Command)

-OpCode         : 0x2016 (HCI_LEReadRemoteUsedFeatures)

-Data Length    : 0x02 (2) byte(s)

Handle         : 0x0000 (0)

Dump(Tx):

0000:01 16 20 02 00 00                               .. ...

--------------------------------------------------------------------

[114] : <Tx> - 11:56:58.076

-Type           : 0x01 (Command)

-OpCode         : 0xFD86 (GATT_DiscPrimaryServiceByUUID)

-Data Length    : 0x12 (18) byte(s)

ConnHandle     : 0x0000 (0)

Value          : 00:00:00:00:00:00:00:B0:00:40:51:04:C0:FF:00:F0

Dump(Tx):

0000:01 86 FD 12 00 00 00 00 00 00 00 00 00 B0 00 40 ...............@

0010:51 04 C0 FF 00 F0                               Q.....

--------------------------------------------------------------------

[115] : <Rx> - 11:56:58.106

-Type           : 0x04 (Event)

-EventCode      : 0x003E (HCI_LE_GenericReportEvent)

-Data Length    : 0x0C (12) bytes(s)

LE Event Code  : 0x04 (4) (HCI_LE_ReadRemoteUsedFeaturesCompleteEvent)

LE Event Code  : 0x04 (4) (HCI_LE_ReadRemoteUsedFeaturesCompleteEvent)

Status         : 0x00 (0) (SUCCESS)

ConnectionId   : 0x0000 (0)

Features       : 0x00000000000000FD (253) (

                  Encryption

                  Reject_Extended_Indication

                  Slave_Features_Exchange

                  Ping

                  Data_Packet_Length_Extension

                  Privacy

                  Extended_Scanner_Filter_Policies)

Dump(Rx):

0000:04 3E 0C 04 00 00 00 FD 00 00 00 00 00 00 00    .>.............

--------------------------------------------------------------------

[116] : <Rx> - 11:56:58.138

-Type           : 0x04 (Event)

-EventCode      : 0x00FF (HCI_LE_ExtEvent)

-Data Length    : 0x06 (6) bytes(s)

Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)

Status         : 0x17 (23) (bleTimeout)

OpCode         : 0xFD86 (GATT_DiscPrimaryServiceByUUID)

DataLength     : 0x00 (0)

Dump(Rx):

0000:04 FF 06 7F 06 17 86 FD 00                      .........

--------------------------------------------------------------------

[117] : <Tx> - 11:56:58.138

-Type           : 0x01 (Command)

-OpCode         : 0xFE11 (GAP_UpdateLinkParamReq)

-Data Length    : 0x0A (10) byte(s)

ConnHandle     : 0x0000 (0)

IntervalMin    : 0x0008 (8)

IntervalMax    : 0x0008 (8)

ConnLatency    : 0x0000 (0)

ConnTimeout    : 0x0032 (50)

Dump(Tx):

0000:01 11 FE 0A 00 00 08 00 08 00 00 00 32 00       ............2.

--------------------------------------------------------------------

[118] : <Rx> - 11:56:58.215

-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         : 0xFE11 (GAP_UpdateLinkParamReq)

DataLength     : 0x00 (0)

Dump(Rx):

0000:04 FF 06 7F 06 00 11 FE 00                      .........

--------------------------------------------------------------------

[119] : <Info> - 11:57:27.111

Device Disconnected

Handle = 0x0000

Addr Type = 0x00 (ADDRTYPE_PUBLIC)

BDAddr = F8:8A:5E:8C:BF:4F

--------------------------------------------------------------------

[120] : <Info> - 11:57:27.151

OAD - Restore Connection Settings

--------------------------------------------------------------------

[121] : <Error> - 11:57:27.181

OAD Download Not Successful

--------------------------------------------------------------------

BR,

Shuyang

  • Hi Shuyang,

    Make sure to follow the OAD Block Size Rules:
    "The distributor device must use the block size returned by ‘Get OAD Block Size RSP’ throughout the OAD process. Once the OAD process starts, the block size must not change. The OAD target device will select the block size as the largest multiple of 4B that fits into the negotiated MTU size. The acceptable range of OAD block sizes is [20, 244]."

    Make also sure to set the OAD Block size before each one of the two transfers. 

    Regards,

  • Hi Clement,

    When using Btool to set the block size, will Btool send the 'Get OAD Block Size’  request automatically or does the user need to send it manually?

    And I believe the MTU exchange should be finished when establishing the connection, so if the block size is already selected based on the MTU, what does the block size option in Btool do?

    BR,

    Shuyang

  • Hi,

    Could you please compare the log for the successful OAD to the other log? I am a bit surprised to see in your log the MTU being set to 6 and 10 Bytes. I wonder if this could cause the issue.

    Regards,

  • Hi Clement,

    I can't find in the log where the MTU being set to 6 and 10 bytes, can you point it out for me please?

    Meanwhile I will ask the customer to provide a more complete log to confirm the MTU used.

    Thanks.

    BR,

    Shuyang

  • Hi,

    I can't find in the log where the MTU being set to 6 and 10 bytes, can you point it out for me please?

    Looks like I have mixed some threads. Sorry for the confusion.

    Actually, here the issue seems to rather come from the timeout in the GATT table discovery - GATT_DiscPrimaryServiceByUUID returns a timeout  at message [116].

    Could you please:

    - check if the OAD are successful if you do not change the block size? (I mean if you manage to successfully OAD two times)

    - provide the full log for both cases - i.e. for the case with the default block size and the case for the modified block size.

    Thanks and regards,