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

possible reasons for EVENT_RX_FAIL?

Hello, we have an application that involves 3 devices that comunicate over ANT. One central device beeing slave to the two other devices. All channels are configured with a period of ~40ms. We use an extra, dedicated channel from every device to a laptop to monitor events that are reported by the ant stack (also with a channelperiod of ~40ms). Currently I see 22,035 EVENT_RX events and 1,799 EVENT_RX_FAIL in the central device which leads to 29 RX_FAIL_GO_TO_SEARCH events.

I know that my question is very general, but what could cause this RX_FAILs? And what exactly is an EVENT_RX_FAIL? As far as I'm understand it, a slave found it's master, synchronized on the master but fails later to receive data from the master, right?

In addition we see the problems that it takes sometimes up to several minutes for one of the masters to get connected to the central device. In our test cenario, we power on all devices at the same time, so there is not really a first device connecting to the central device and a second device connecting to the central device.

It seems to work, if we have only one master and one slave in the system (not an option as we plan to have even more than 3 devices in a system). And it seemed to work when we moved the software for one device from the nordic hardware to a laptop.

It seems to depend on the environment. Here in my office, I can see RX_FAIL events, but they seldomly result in a RX_FAIL_GO_TO_SEARCH. (The observations described above where made at my customers office).

Any idea, pointers recommendations, tipps or comments? Every pointer is highly welcome.

kind regards, Torsten

  • You are correct about EVENT_RX_FAIL, it is generated when the slave misses a packet. This can happen if the signal strength is too low, if it's too much noise, or if the antenna is bad.

    Edit: It depends on the environment, or on how much noise you have in the environment. Other BLE, ANT or Wi-Fi will create noise, in addtion to other sources. You will almost always have some packet loss, you need to figure out how much your application can tolerate. And in which environments it is going to be utilized.

    If it takes to long to before the slave finds the master I would look into "ANT Channel Search and Background Scanning Channel" app note, found here. This questions may alse be helpful.

    Frequency Agility may also be worth looking into, ANT has an app note on that as well, "ANT Frequency Agility", found on the page linked to above.

    If packet loss is important, I recommend you to test with different setups, and see if you can find any significant sources of noise. Test different parts of you system in a noise free environment, or as close to noise free as possible, to remove variation. Then you can test in a noisy environment, and determine the packet loss is acceptable.

  • One of the masters? Do you mean the second master that connects to the slave?

    Are you having 1 extra channel from each device to report to the computer? Could you try to only have one slave reporting? Or maybe you could count internally, get the value over UART or using the debugger.

    Do you get less EVENT_RX_FAIL events if you only have one master and one slave?

    Please edit your question to include the information.

  • Hallo Petter, thank your for the input. The devices where located quite close to each other and we tried original nordic eval boards to make sure, that the antenna isn't the problem.

Related