About nrf52840 want to add a 0x2901 descriptors

Hi,

Now I'm using :nRF5_SDK_17.1.0_ddde560\examples\ble_peripheral\ble_app_uart\pca10056\s140\arm5_no_packs.

And I want to add 'Characteristic User Description Descriptor' to the 'RX characteristic'.

So I added the following code,

The descriptor of 0x2901 does appear when I connect NRF52840 with my mobile phone .But you can  see 0x2900 appearing.

Now I only want 0x2901 descriptor, not 0x2900 descriptor,like this.

Can this be done?  I noticed that 0x2900 seems to be related to 'wr_aux'. If I want to add 0x2901 descriptor, do I have to add 0x2900 and cannot remove 0x2900 descriptor?

Regards,
Wei

Parents Reply Children
  • To me, it looks like the 0x2900 is required if you want to be able to write to the 0x2901 descriptor.

    It probably says somewhere in the Bluetooth specification, but I found this blog post:

    https://www.oreilly.com/library/view/getting-started-with/9781491900550/ch04.html

    As you can see, the extended properties descriptor is used to give permission to write to the used descriptor. If you want to remove 0x2900, then you need to remove your line:
    user_desc.write_access      = SEC_OPEN;

    But then, of course, you will not be able to write to the user descriptor from the central. Only read it.

    Did you take the last screenshot yourself, or does it come from another phone? The reason I ask is that I suspect that it is the OS that hides the 0x2900 descriptor. If you have the peripheral from the last screenshot availabe, can you try to connect to it using nRF Connect for Desktop -> Bluetooth Low Energy, and take a screenshot so I can see what it looks like there? Using nRF Connect for Desktop, we will be sure that the operating system will not hide any of the characteristics or descriptors. 

    Best regards,

    Edvin

  • Hello,

    Thank you for your answer. With the method you provided, I solved the problem. I jusu only need "read",So it worked. 

    Sometimes the iPhone does hide information, but another phone doesn't.

    Thank you very much for your help.

    Regards,
    Wei

Related