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: OTA which advertisement characteristic to send OTA message to?

Part Number: CC2541

I have few things I am confused about:

1. I uploaded BIM, image A and B to the board what happens if both advertise to the same characteristic will the MCU perform image A commands or image B commands? or does IAR automatically handle it when I change my workspace to CC2541-OAD-ImgA

2.  "OAD Manager shall write to the Image Identify characteristic of the OAD Target." what is the image identify characteristic? should it be the version number like 0x0002? or something else?

3. Which characteristic to load the 16-byte block images to? F000FFC0-0451-4000-B000-00000000000 or 0000FFF0-000-1000-8000-00805F9B34FB?

I think F000FFC0-0451-4000-B000-00000000000 was generated by image A because it is the only service with 2 characteristics. If this is the case should I upload to UUID F000FFC1-... or F000FFC2-...?  One is OAD Image Identify and the other is OAD Image Block Transfer, so which is which?

Please do not give me a link to the OADKit file and tell me to use it as a reference, the project does not compile and I do not know swift.

  • The OAD Characteristics are defined in oad.h:

    #define OAD_SERVICE_UUID 0xFFC0
    #define OAD_IMG_IDENTIFY_UUID 0xFFC1
    #define OAD_IMG_BLOCK_UUID 0xFFC2

    & oad_target.c:
    // OAD Service UUID
    static CONST uint8 oadServUUID[ATT_UUID_SIZE] =
    {
    TI_BASE_UUID_128( OAD_SERVICE_UUID )
    };

    static CONST uint8 oadCharUUID[OAD_CHAR_CNT][ATT_UUID_SIZE] =
    {
    // OAD Image Identify UUID
    TI_BASE_UUID_128( OAD_IMG_IDENTIFY_UUID ),

    // OAD Image Block Request/Response UUID
    TI_BASE_UUID_128( OAD_IMG_BLOCK_UUID )
    };

    (Taken from SensorTag project in BLE 1.4.2.2).

    The attribute handle will vary based on your GATT dbase, so you need to perform proper characteristic discover as noted in the OAD guide.

    Best wishes
  • Thank you for your help. On the OAD PDF file it says "If the OAD Target determines that the image available for OAD is better than its own, the OAD Target will initiate the OAD process by notifying the Image Block Transfer characteristic to the OAD Manager. ". How does it determine that it is better?

    1. How does it determine that it is better?

    2. What message exactly should the OAD Manager send to Image Identify? It says "The message data will be the image header of the image that is available for OAD"  so is it going to be a 16 byte message?

    typedef struct {
    uint16 crc0;
    uint16 crc1;
    uint16 ver;
    uint16 len;
    uint8 uid[4];
    uint8 res[4];
    } img_hdr_t;

    3. How do I check if the notification? In the document, it says "The OAD Target will initiate the OAD process by notifying the Image Block Transfer characteristic to the OAD Manager".

    4. How can I set the CRC value "the 2-byte CRC matches the 2-byte CRC shadow, then the image is commissioned to run immediately." but it also says that CRC shadow must be 0xFFFF and crc0 cannot be 0x0000 or 0xFFFF.