Hi, I'm using a nrf52 DK with a s212 softdevice and a USB ANT. I wanted to try to implement a code that would allow me to have a bidirectional communication channel, so that for every broadcast message sent from the USB ANT to nrf52 DK, a message from nrf52 DK to ANT USB was sent in response. To do this, I loaded the "ant_broadcast rx" example into the nrf52 DK, which I modified as follows:
- I added the function void ant_message_send () (which is similar to the one in the code of the example "ant_broadcast tx", although in this case, instead, to use counter I have loaded a data consisting only of 8 bits of 1)
- in EVENT_RX I called the function ant_message send ().
- In the Antware II program, instead, I loaded the "ant_broadcast_rx_test.xml" profile and then I clicked in auto-open.
However, what happens is that the messages are sent with the frequency of 4 Hz from the USB ANT to nrf52 DK, but the received data are about half of those sent (ie each message is received after every two data that have been sent ). I also tried to change the frequency, but I can't get an equal number of TX events and RX events.
How can I solve this problem?
Cheers!