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

Custom service Characteristic write wrong handle on Samsung

Hi

We have problems with Samsung tablets and phones at the moment.

We have an application with two custom services, Secure DFU Service and some standard SIG services, i.e. Battery Service and Device information Service. We are using nRF52832 with SDK14.

The problem is with custom services. We are not able to write values to a custom service characteristics. When I debug, the write event seems to reach the event handler for the custom service, but the event seems to contain the wrong handle (evt.gatts_evt.params.write.handle). The handle seems to be for the CCCD in another characteristics in the same service, instead of the value handle. Data (characteristic value) and everything else seems to be correct.

There is no problem with the SIG services, i.e. we can upload new firmware with Secure DFU.

This is only a problem with some Samsung tablets and -phones we have tested. With Apple ipad, there is no problem.

We are using nRF Connect for testing.

Is this a known problem, and if so, is there a way around?

Regards, Jan

Parents
  • Have you made sure NRF_SDH_BLE_SERVICE_CHANGED set = 1 in your application (both the old and new) ?

    I also suspect attribute table was cached on the phone. You may want to restart the phone to make sure it would erase cache. But you mentioned that nRF Connect app running on the phone show the correct att table ? If you add a log to UART to print p_evt_write->handle , when you try to write to the characteristic from NRFConnect, which handle ID you would receive ? and how would it compare to the correct handle ID ?

Reply
  • Have you made sure NRF_SDH_BLE_SERVICE_CHANGED set = 1 in your application (both the old and new) ?

    I also suspect attribute table was cached on the phone. You may want to restart the phone to make sure it would erase cache. But you mentioned that nRF Connect app running on the phone show the correct att table ? If you add a log to UART to print p_evt_write->handle , when you try to write to the characteristic from NRFConnect, which handle ID you would receive ? and how would it compare to the correct handle ID ?

Children
No Data
Related