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

BLE Driver Unable to write to a characteristic

Hi ,

I am unable to write to discover all services and write to a characteristic too.

On discovering services:

Discovering primary services

Received service discovery response

UUID: 0xA100, start handle: 0x000C, end handle: 0x0015

Discovering characteristics

Received characteristic discovery response, characteristics count: 3

Handle: 0x000D, UUID: 0xA101

Handle: 0x0010, UUID: 0xA102

Handle: 0x0012, UUID: 0x2A38

Discovering descriptors

Received descriptor discovery response, descriptor count: 5

Handle: 0x000D, UUID: 0x2803

Handle: 0x000E, UUID: 0xA101

Handle: 0x000F, UUID: 0x2902

Handle: 0x0010, UUID: 0x2803

Handle: 0x0011, UUID: 0xA102

it is missing a fourth service with UUID 0xA103 and I actually want to write the characteristic with UUID 0xA102. I have tried to write to the handle 0x011(15) using the code given here by Stian.

devzone.nordicsemi.com/.../

Could someone let me know where I am going wrong please? I am just not able to discover the fourth service or write to the characteristic 0xA102 with handle 0x0011

Thanks and Regards, Neil

Parents
  • You haven't discovered all the characteristics. The service discovery shows handles all the way up to 0x0015. You've only discovered up to 0x0011. You need to do another discover descriptors starting at 0x0012 until you've exhausted the service. The payload for the underlying ATT find information request is of max size MTU-2, which is 21 bytes, which is 5 {Handle,value} pairs.

  • Hi rk

    Thanks for your response

    I had issued a second char discovery but that did not work

    For the writing to a characteristic part, I have written to the correct handle which is 11 in this scenario but It still doesnt write properly

    I m able to write to a descriptor but not to a characteristic , I m confused why

    Could you please help?

    Thanks and Regards Neil

Reply
  • Hi rk

    Thanks for your response

    I had issued a second char discovery but that did not work

    For the writing to a characteristic part, I have written to the correct handle which is 11 in this scenario but It still doesnt write properly

    I m able to write to a descriptor but not to a characteristic , I m confused why

    Could you please help?

    Thanks and Regards Neil

Children
No Data
Related