This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Reverse direction: send message from slave

Hello Nordic,

I have a question: how do I send a message from a slave to a master? I want to do the same as sd_ant_acknowledge_message_tx, starting the communication from the slave. Right now I am trying with that same function but I get an error (0x4015).

Thanks for the help!

Parents
  • You can simply broadcast your packets by allowing your device to periodically transmit data packets in the air (Beacon type). However, in that case, you can only be sure that you will achieve a packet if your central is in range, but that does not give any strict timing. It might take some time for a central to find those packets. I believe the only way to make sure that your packets arrive is to do it via connection. When you connect to your peripheral, you could just enable characteristic notification and periodically send a notification to the central. That way you are guaranteed to get the message.

Reply
  • You can simply broadcast your packets by allowing your device to periodically transmit data packets in the air (Beacon type). However, in that case, you can only be sure that you will achieve a packet if your central is in range, but that does not give any strict timing. It might take some time for a central to find those packets. I believe the only way to make sure that your packets arrive is to do it via connection. When you connect to your peripheral, you could just enable characteristic notification and periodically send a notification to the central. That way you are guaranteed to get the message.

Children
No Data
Related