This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Temporary GATT characteristic update

Hello,

I am adding an extra characteristic (of 6 bytes) into one of the services that exist in the default beacon app. Then I try to update this characteristic using master control app, but after I disconnect the beacon and connect back to it, the value is not there anymore. I'm not sure what to do to fix this. Any help would be appreciated.

Thanks!

Parents
  • @Sarah: Which beacon example did you base on ? Usually the beacon should not have any service or characteristic, because it's a beacon, non-connectable.

    Have you make sure you have read and write permission open on the characteristic ? You should try to read the value back after you write. Also make sure the device doesn't reset after you disconnect.

  • @Sarah: If you have a look at the BLE_GAP_EVT_DISCONNECTED event in on_ble_evt() in main.c you can find that we will do a beacon_reset() after we get disconnected. It's normal because it's config mode when connected so we should reset to be back to normal mode. However, the value of your characteristic is stored on RAM. So if you don't store your characteristic value and restore it when restart in config mode, the value will be lost.

    I think this explained what you described.

Reply
  • @Sarah: If you have a look at the BLE_GAP_EVT_DISCONNECTED event in on_ble_evt() in main.c you can find that we will do a beacon_reset() after we get disconnected. It's normal because it's config mode when connected so we should reset to be back to normal mode. However, the value of your characteristic is stored on RAM. So if you don't store your characteristic value and restore it when restart in config mode, the value will be lost.

    I think this explained what you described.

Children
No Data
Related