Greetings,
I am using the SPS profile between two DA14580 devices. When they connect I want the remote device to look at the name of the device that initiated the connection. It seems like a simple enough thing but I just cant figure out where to start. From what I can see the device name UUID is always 0x2A00 and at least for these devices the attribute handle seems to always be 3 for the device name. What would be the simplest way to read a specific characteristic just after a connection is made?
Device:
Hi,
In this case, where you are in control of both ends of the link, using the GATT handle for read/write is a good solution, and the device name is as you state "filed" under handle 0x0003 in the DSPS implementation (and pretty much any other Dialog sample application).
This function will result in a read command being issued to the peer device:
The peer will respond, and you need to have a taskhandler defined in order to react when the response arrives (in app_task_handlers.h)
An then in your application, receive the response and parse the data (I am simply printing it to the debug port in this example):
I hope this helps you move forward.