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.

Service Changed characteristic Indication.

Hi Champs:

I am development the OAD function now.

After I update the new CC2540 firmware which has new GATT service, then iphone App (IOS 6.1) can't find the new GATT service.

I think that CC2540 must send the "Service Changed characteristic Indication" to iphone for iphone to re-discovery the service, is it right?

How do I send the "Service Changed characteristic Indication" after the OAD is complete ?

Many thanks!!

BR.

Peter.

  • Hi,

    You could try to issue

    extern bStatus_t GAPBondMgr_ServiceChangeInd( uint16 connectionHandle, uint8 setParam ); line 294 of gapbondmgr.h
    with GAPBondMgr_ServiceChangeInd(0xFFFF, TRUE); to update the bond database before you reboot into the new image.

    If they are not bonded, you can try to call (a while after connection established in the new image)

    extern bStatus_t GATTServApp_SendServiceChangedInd( uint16 connHandle, uint8 taskId ); line 593 of gattservapp.h
    with the active connection handle and a taskID that should get a OSAL GATT Message about whether or not the indication was sent successfully.

    Note that if the iOS device has not yet had time to enable the indication, the command will fail, so you will have to wait until this has happened. 

    Best regards,
    Aslak 

  • Hi, Peter,

    I met this issue before. In the Image A, I didn't add the GATTServApp service by calling:

     GATTServApp_AddService( GATT_ALL_SERVICES );    // GATT attributes

    But I added the GATTServApp service in image B. Then after OAD image B via image A, I have to turn off the iOS bluetooth and turn on it again to let it show the change services in image B. But when I invalid image B to run image A, iOS can show the changed service in image A.

    Then I add the GATTServApp service by calling

     GATTServApp_AddService( GATT_ALL_SERVICES );    // GATT attributes

    in image A, the issue was resolved.

    Best regards,

    Guohui.