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
  • Hi again!

    Ok, I finally got the system to send ACK messages from the slave to the master. Have some questions now:

    1. When a channel is open from the slave, it starts searching for a master until it finds it or until it times out. While the slave is searching, which event is triggered? EVENT_RX? The thing is that I don't get any ANT events in slave when I start a channel and I don't have any master connected. Any events at all.

    2. When a channel is open from the master, what does it do? Does it trigger EVENT_TX at every channel period? Even if we don't fill the payload with information (using sd_ant_xxx_message_tx...)?

    3. I don't know why this is happening, but if I open a channel from the slave, start sending ACK messages to the master, and after a while, try to close the channel (with a button press, for example), the microprocessor resets itself, and the event EVENT_CHANNEL_CLOSED never triggers (this situation drives to HardFault). Why is that? To close the channel sucessfully without this happening, I have to first allow the slave to finish sending the data that is pending in the stack(i.e. wait for EVENT_TRANSFER_TX_COMPLETED), and then, close the channel. What is happening? (Myabe this question is related? devzone.nordicsemi.com/.../)

    The reason I want to close the channel is to change the channel ID and reopen.

    Thanks again for the help!

Reply
  • Hi again!

    Ok, I finally got the system to send ACK messages from the slave to the master. Have some questions now:

    1. When a channel is open from the slave, it starts searching for a master until it finds it or until it times out. While the slave is searching, which event is triggered? EVENT_RX? The thing is that I don't get any ANT events in slave when I start a channel and I don't have any master connected. Any events at all.

    2. When a channel is open from the master, what does it do? Does it trigger EVENT_TX at every channel period? Even if we don't fill the payload with information (using sd_ant_xxx_message_tx...)?

    3. I don't know why this is happening, but if I open a channel from the slave, start sending ACK messages to the master, and after a while, try to close the channel (with a button press, for example), the microprocessor resets itself, and the event EVENT_CHANNEL_CLOSED never triggers (this situation drives to HardFault). Why is that? To close the channel sucessfully without this happening, I have to first allow the slave to finish sending the data that is pending in the stack(i.e. wait for EVENT_TRANSFER_TX_COMPLETED), and then, close the channel. What is happening? (Myabe this question is related? devzone.nordicsemi.com/.../)

    The reason I want to close the channel is to change the channel ID and reopen.

    Thanks again for the help!

Children
No Data
Related