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

Send packets of data from my beacon

Hi! I want to send the temperature data that I get from the beacon sensor not one by one but in packets for example of 100 samples. I have followed this tutorial devzone.nordicsemi.com/.../ to create the service and everything else that is needed to send the data. Can someone help me to modify that code in order to send data in packets? Thanks in advance.

Parents
  • If you want to send more than 4 bytes, you need to modify the maximum length of the characteristic value, Step 2.H, Set characteristic length. If you want yo to send the data in notifications, this can be set up to 20 bytes.

    Then you just collect samples and call our_termperature_characteristic_update()/sd_ble_gatts_hvx() when you have the number of samples you want, max 20 bytes.

Reply
  • If you want to send more than 4 bytes, you need to modify the maximum length of the characteristic value, Step 2.H, Set characteristic length. If you want yo to send the data in notifications, this can be set up to 20 bytes.

    Then you just collect samples and call our_termperature_characteristic_update()/sd_ble_gatts_hvx() when you have the number of samples you want, max 20 bytes.

Children
Related