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
  • Hi Jan,

    Please specify what's the different between your debug and release versions ?

    Handle ID = 13 = 0x0D is the service changed indication, so it's normal that the phone write to that characteristic.

    Procedure is the indication on how the link is encrypted, look for pm_conn_sec_procedure_t you will find it.

    And yes, bonding was done automatically, I'm not sure why, could be that your device has HID characteristic. Or if you connect using Bluetooth setting , the phone will automatically bond.

    Please try to find a way to debug with the release version, simply add some printf shouldn't cause the change in the behaviour of the handle id to be set.

Reply
  • Hi Jan,

    Please specify what's the different between your debug and release versions ?

    Handle ID = 13 = 0x0D is the service changed indication, so it's normal that the phone write to that characteristic.

    Procedure is the indication on how the link is encrypted, look for pm_conn_sec_procedure_t you will find it.

    And yes, bonding was done automatically, I'm not sure why, could be that your device has HID characteristic. Or if you connect using Bluetooth setting , the phone will automatically bond.

    Please try to find a way to debug with the release version, simply add some printf shouldn't cause the change in the behaviour of the handle id to be set.

Children
No Data
Related