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

BLE radio notification clarification

Hi all,

I am currently developing a firmware on an nRF51422 which supports ANT communication with softdevice S210 and that lights up WS2812 LEDs (or Neopixels). To light the Neopixels, I use the code provided by Lava here In order for the LEDs to be lit correctly while communicating via ANT protocol, I need to use the ble_radio_notification_init and specify and callback where the command is sent to the LEDs.

I do not understand how this ble_radio_notification_init works. I looked at the doc in the Nordic Infocenter but I still do not get it. Does it make sure that the command is not interrupted by an ANT event? How does it work?

Thank you for your help

Parents
  • Here is my setup: I have one board with softdevice S310 with both Bluetooth and ANT. This board sends broadcast commands to another board with softdevice S210 via ANT protocol. This 2nd board decodes the command and lights the LEDs. I have 2 commands, one to update the color of a specific LED of an LED strip and another command to update the LED strip colors afterwards. When I receive the 2nd command to update the LED strip, I decode the command in an ANT Rx event and set a global Boolean variable. Now, if I check the Boolean variable in the main() and update the colors of the LEDs at that time, I get some strange behaviors in the LED strip. However, if I use the radio notification with a callback that checks the Boolean variable and update the LED strip, then everything is just fine.

Reply
  • Here is my setup: I have one board with softdevice S310 with both Bluetooth and ANT. This board sends broadcast commands to another board with softdevice S210 via ANT protocol. This 2nd board decodes the command and lights the LEDs. I have 2 commands, one to update the color of a specific LED of an LED strip and another command to update the LED strip colors afterwards. When I receive the 2nd command to update the LED strip, I decode the command in an ANT Rx event and set a global Boolean variable. Now, if I check the Boolean variable in the main() and update the colors of the LEDs at that time, I get some strange behaviors in the LED strip. However, if I use the radio notification with a callback that checks the Boolean variable and update the LED strip, then everything is just fine.

Children
No Data
Related