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.

CC2651R3: Service changed indication does not trigger after a firmware update

Part Number: CC2651R3
Other Parts Discussed in Thread: SYSCONFIG

Hi,

I have added the service changed indication support following this: https://software-dl.ti.com/simplelink/esd/simplelink_cc13xx_cc26xx_sdk/6.40.00.13/exports/docs/ble5stack/ble_user_guide/html/ble-stack-5.x/gapbondmngr-cc13xx_cc26xx.html?highlight=send%20service%20change%20indications#gapbondmgr-and-service-change-indication

However, currently face the problem that the service changed indication does not take effect if the smartphone was bonded before doing a OTA update. Here are the following steps for reference.

1. flash firmware (without service changed configured) via JTAG on the CC2651R3 and advertise

2. pair and bond with a smartphone 

3. perform an OTA firmware update whereby the update image (includes change in GATT attribute table) has the service changed indication configured (essentially after every connection)

4. Try to connect using the already bonded smartphone and attempt to discover the new characteristics -------------> fails (expectation is that the service changed indication gets triggered while the connection is being established to refresh cache and later perform a service rediscovery)

Also, now if I delete the bond on the smartphone and perform a re-pair and re-bond, the service changed indication takes effect and the new characteristics are rediscovered.

What is the correlation between the service changed indication and the bonding mechanism?

PS: I also tried to trigger the GAPBondMgr_ServiceChangeInd() via serial command interface, however this also did not take effect after the OTA update.

  • I am using simplelink_cc13xx_cc26xx_sdk_6_20_00_29

  • Hi,

    Can you share what return code you see when you call GAPBondMgr_ServiceChangeInd()? It will be helpful to see what the BLE5-Stack is returning here.

    Best Regards,

    Jan

  • I am answering instead of Kaiwalya, since the forum does not work for him anymore:

    Essentially I have tested this using a serial command response and I get the following response if I implicitly invoke this API via serial

     

    • Firmware flashed via JTAG: 0x00
    • After OTA update, before deleting the bond on the smartphone: 0x00 [NO EFFECT ON SMARTPHONE REGARDING REDISCOVERY!!! ERROR]
    • After re-pairing & re-bonding, status response is 0x00: [TAKES EFFECT ON SMARTPHONE, CACHE REFRESHED AND SERVICES REDISCOVERED]
  • Hi,

    To clarify, are you saying that GAPBondMgr_ServiceChangeInd() is returning 0x00 every time?

    Best Regards,

    Jan

  • Hi Jan,

    sorry for the late response. That's what Kaiwalya tould be yes.

    May be the following information may also help:

    We have figured out that the attribute table has changed between the versions not only in areas which we obviously changed, but also at the very beginning. Since the Service Change characteristic is also moved, that might be causing our problem:

    We are currently not clear why the 00002aa6-0000-1000-8000-00805f9b34fb is once there and once not. How can we influence the presents of this characteristic? Do we need to change anything in sysconfig. Or somewhere else?

    Old version:
    Service: handle=0x0001, end_handle=0x000b, uuid=00001800-0000-1000-8000-00805f9b34fb
            Characteristic: declaration_handle=0x0002, value_handle=0x0003, uuid=00002a00-0000-1000-8000-00805f9b34fb, prop=0x0a
            Characteristic: declaration_handle=0x0004, value_handle=0x0005, uuid=00002a01-0000-1000-8000-00805f9b34fb, prop=0x0a
            Characteristic: declaration_handle=0x0006, value_handle=0x0007, uuid=00002a04-0000-1000-8000-00805f9b34fb, prop=0x02
            Characteristic: declaration_handle=0x0008, value_handle=0x0009, uuid=00002aa6-0000-1000-8000-00805f9b34fb, prop=0x02
            Characteristic: declaration_handle=0x000a, value_handle=0x000b, uuid=00002ac9-0000-1000-8000-00805f9b34fb, prop=0x02
        Service: handle=0x000c, end_handle=0x000f, uuid=00001801-0000-1000-8000-00805f9b34fb
            Characteristic: declaration_handle=0x000d, value_handle=0x000e, uuid=00002a05-0000-1000-8000-00805f9b34fb, prop=0x20
                Descriptor: handle=0x000f, uuid=00002902-0000-1000-8000-00805f9b34fb
        Service: handle=0x0010, end_handle=0x0022, uuid=0000180a-0000-1000-8000-00805f9b34fb
            Characteristic: declaration_handle=0x0011, value_handle=0x0012, uuid=00002a23-0000-1000-8000-00805f9b34fb, prop=0x02
    New Version:
    Service: handle=0x0001, end_handle=0x0009, uuid=00001800-0000-1000-8000-00805f9b34fb
            Characteristic: declaration_handle=0x0002, value_handle=0x0003, uuid=00002a00-0000-1000-8000-00805f9b34fb, prop=0x0a
            Characteristic: declaration_handle=0x0004, value_handle=0x0005, uuid=00002a01-0000-1000-8000-00805f9b34fb, prop=0x0a
            Characteristic: declaration_handle=0x0006, value_handle=0x0007, uuid=00002a04-0000-1000-8000-00805f9b34fb, prop=0x02
            Characteristic: declaration_handle=0x0008, value_handle=0x0009, uuid=00002ac9-0000-1000-8000-00805f9b34fb, prop=0x02
        Service: handle=0x000a, end_handle=0x000d, uuid=00001801-0000-1000-8000-00805f9b34fb
            Characteristic: declaration_handle=0x000b, value_handle=0x000c, uuid=00002a05-0000-1000-8000-00805f9b34fb, prop=0x20
                Descriptor: handle=0x000d, uuid=00002902-0000-1000-8000-00805f9b34fb
        Service: handle=0x000e, end_handle=0x0020, uuid=0000180a-0000-1000-8000-00805f9b34fb
            Characteristic: declaration_handle=0x000f, value_handle=0x0010, uuid=00002a23-0000-1000-8000-00805f9b34fb, prop=0x02
  • Hi,

    Thank you for the additional details. Is the OAD updating the SDK to a newer version or is it still the same SDK with a different image.

    Best Regards,

    Jan

  • SDK is not updated. Both are using 6.20. (First line in this thread is a docu link only)

  • Hi,

    Got it. Thank you for confirming. Can you outline the top-level changes between the two images? Also, when you connect to the device that has all the characteristics. Can you clarify how 00002aa6-0000-1000-8000-00805f9b34fb is identified?

    Best Regards,

    Jan