I want to add a UUID characteristic(property: read write).Can you tell me nrf52840 how to handle a read request?
I want to add a UUID characteristic(property: read write).Can you tell me nrf52840 how to handle a read request?
On the server side, you don't need to do anything when receiving a read request, it will be handled automatically by the SoftDevice. See the message sequence chart here.
Check out this message sequence chart to see how to handle a read on the client side.
Best regards,
Simon
hi,simon. Thanks for your help.I have some question on sample code(ble_app_blinky),according to the source code,LED characteristic has been set to both read and write property.I can find a "BLE EVENT" when application(nRF Connect) write data to nrf52840.but there is no event happens when application read data.
This is the intended behaviour. The SoftDevice doesn't send any BLE events to the application. As seen in the illustration below, there is no arrows between APP (application) and SD (SoftDevice).
Best regards,
Simon
Hi,Simon.If I want to get this behaviour in application.How should I do?
I would strongly recommend you to go through the Bluetooth low energy Characteristics, a beginner's tutorial. This tutorial covers how to add characteristics to your application and provides the necessary theory around it.
If you have any questions regarding the tutorial, please ask and I will assist you.
Best regards,
Simon
Thanks.I will go through the Bluetooth low energy Characteristics, a beginner's tutorial.
Thanks.I will go through the Bluetooth low energy Characteristics, a beginner's tutorial.