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

Bluetooth write problem

I started with the blu_app_template on a 52840. I have advertising working. I can see that from an iOS app. I can also see the details of the service. I see the characteristic on the iOS side. I am having a problem with writing data on the characteristic from an iOS app. I am hoping for a push in the right direction to debug this issue. The write comes to the device but the the handle is incorrect for the characteristic that was published. Same as the example code: p_ble_evt->evt.gatts_evt.params.write.handle will have the value 0x0d while the handle for the characteristic is 0x10, i.e. p_our_service->char_handles.value_handle. Any hints on what I might have done wrong or where I should look?

Thanks in advance.

Parents
  • Both the value seems to be incorrect and the handle is incorrect. I get the handle 0x0d but I would have expected it to be 0x10. I can see this on the iOS side. If I change the properties to/from write/ write with response, I can see those effects on the iOS side. I also only have one writable value. I think I may see an issue now. I am calling sd_ble_uuid_vs_add twice with the same base uuid, once for the service and once for the characteristic. Could that be the root of this issue?

Reply
  • Both the value seems to be incorrect and the handle is incorrect. I get the handle 0x0d but I would have expected it to be 0x10. I can see this on the iOS side. If I change the properties to/from write/ write with response, I can see those effects on the iOS side. I also only have one writable value. I think I may see an issue now. I am calling sd_ble_uuid_vs_add twice with the same base uuid, once for the service and once for the characteristic. Could that be the root of this issue?

Children
No Data
Related