2 months, 2 weeks ago.
Can I have the nrf52-dk acting as BLE Server and client simultaneously?
I would to know if the nrf52-dk could run as BLE Server and Client GATT in the same code.
For example, It starts acting as Server with a advertaising, waiting for a characterictic to be written and when this occurs to switch to Client role, scanning to look for other Server GATT node.?
2 months ago.
Using the same board as a GATT Server and GATT Client simultaneously is possible, but I am sorry we don't have an example to show this capability.
Basically, you need to declare two BLE service objects and setup the event functions, callback functions, and scan for the first connection. After the first connection established, which means in the connection complete event, do advertising for the second connection, both connections can be maintained well.
And for usage of GATT Server and client, you can refer to our documentation here.
Or, you can look into our example LED Blinker/LED
They are basic GATT examples and they can be extended easily.
Please feel free to ask me any questions!
Desmond, team Mbed
To post an answer, please log in.