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

ANT Broadcast Message through previously set up channel

Hi Nordic,

I have a star network with 3 nodes and 2 channels. I go through the whole pairing process and start sending data without problem. Now I want to, from the master, use one of these two channels to broadcast data to all nearby ANT devices, irrespective of their channel ID. I try to do this but when I try to use sd_ant_broadcast_message_tx in one of the channels, I get this error code: 401F. What does it mean? Do I have to use a new channel just to broadcast this information? It is important to say that this broadcasting will be done very very unlikely, the normal operation of the channels is to send and receive ack messages.

Thanks Nordic!

  • If you look into ant_error.h, found in \components\softdevice\s210\headers, and ant_paramters.h you can see that 0x401F is NRF_ANT_ERROR_TRANSFER_IN_PROGRESS

    Does this error make sense to you? Maybe you can edit your question and include some code that what you are doing?

  • Mmm I have no idea why the ouput is that. I still have to have clear one thing about the ANT protocol, so I can see if I am trying to do something that certainly is impossible: Can you, without knowing the channel ID of a slave (and it is not wildcarded, it is a fixed unknown number) send information to it? I assumed that the way of doing this was broadcasting, but I am not sure of it.

    What I want to do: I have a device that is paired to a master, both of them have same channel ID. Now imagine that I break that master, and want to pair another one. The main constraint here is that I would not be able to physically touch the slave (no buttons, no anything). Can I still send a message to this slave from my master, which is not paired, to tell it to reset its pairing status? Is this possible at all?

    Thanks again Peter!

    PS: After I know if it is possible or not to do such thing, then I'll review my code and then I'll post a minimal example with my approach.

    Best,

    Angel.

  • I don't quite understand. The master sets its channel ID, the slave sets the channel ID it wishes to search for. The master will just broadcast a message with certain channel ID, it is up to the slave to receive it.

    If you want the slave to receive messages from two masters you should open another channel.

    Did that answer your question?

  • The problem is the next: you have a slave that looks for a channel ID that you don't know. Is it possible to, somehow, stablish a channel with it without wildcarding the channel ID in the slave?

    Thinking about it, I think that the solution in my case is to interchange the roles of master-slave in the star network. If I set the slave in the center and two masters, as I can wildcard the one in the center whenever I want, I would be able to reset its pairing status and look for ANY two masters.

    With my current configuration this is a bit harder to achieve, apparently.

    Thanks again for the reply!

  • I still don't understand. If a slave can receive messages with a specific channel ID that it doesn't know what is? Then the answer is no. But it can receive messages from all channel IDs, you can use background scanning or continous scanning mode, Section 5.2.1.4.2 and 5.7 in the ANT Message Protocol and Usage 5.1.

Related