This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Best service choise for packet exchange between 2 nRF51822

Hello,

I have 2 nRF51822 with S130. One is central, the other is device.

I want to exchange custom data between these 2 devices after connection. What is service best choise ? (i want datagrams like UDP but with acknowledgement).

Can both sides initiate a transfert ?

  • You use GATT to transfer data. The peripheral ("device") is usually a GATT server and the central is usally a GATT client.

    Both can initate a transfer, and all transfers are acked in the link layer. The client can transfer data to the server by writing to it. The client can also read data on the server.

    The server can transfer data by sending notifications and indications to the client.

  • Thank you for the response. I imagined that you must use services on GATT (like NUS) but you say that it's not mandatory and i can use raw GATT, right ?

  • I'm sorry, I wasn't sure what kind of services you were talking about. The GATT server needs to have services and characteristics to be able to transfer data. If you have a custom service you should use a 128-bit UUID for it, just like the NUS service is doing. I'm not sure what you mean by what service is the best choice, you just make one, with characteristics that suits your requirements.

Related