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

ANT+ Examples with ANT+ Peripherals

This is a really basic question, but please bear with me. This is my first time foraying beyond the world of Arduino! :)

I'm attempting to make an ANT+ bicycle power meter with the NRF52 DK. I want it to receive data from a Garmin GSC10 ANT+ bicycle speed/cadence sensor, and ultimately transmit power to a Garmin Edge 510. I've tried a couple of the ANT+ examples so far and am successfully able to see data printed to Putty via UART. I see that you can also use these examples with ANT simulation tools.

When I turn on my Garmin 510 and search for a power meter, nothing is found. Are the examples supposed to work directly with ANT+ peripherals? If so...

  • Where do I set the ANT network key? "ANTPLUS_NETWORK_NUMBER"? I have the ANT+ network key from thisisant.com. Do I need to define all of the ANT+ network keys (8 hexes), or just pick one?
  • Does it matter what I set for BPWR_CHANNEL_NUMBER?
  • Is there anything else I need to set?

Again, sorry for the super basic questions. Any help is greatly appreciated, even if it's just pointing me in the right direction.

  • Hi,

    I don't know much about ANT, actually I'm pretty much on the same page as you, but I'll try to answer. The people who know ANT at the office are currently on vacation, so you may have better luck on the ANT forums.

    Have you seen the documentation for the bike speed and cadence example?

    The channel number should likely be set to the same as the sensor operates on (I think it should be 0), each profile has its own transmission type parameter (not sure how that influences things). The ANTPLUS_NETWORK_KEY is set in components/ant/ant_key_manager/config/ant_key_manager_config.h, once set it should be compatible with ANT+ devices.

    The ANT+ receiver example in the SDK should print all the data received from a sensor over UART, and can be useful for debugging.

    By the way the forums on THISISANT is a great resource for ANT related questions.

    Best regards,

    Øyvind

  • Hi Øyvind,

    Thanks for your reply.

    It looks like I should go into components/ant/ant_key_manager/config/ant_key_manager_config.h and change the empty {0, 0, 0, 0, 0, 0, 0, 0} network key with the one I got from the ANT website.

    So if I'm able to successfully pair with my Garmin device, does that mean the power and rpm values I see printed over UART should reflect what I'm seeing on my Garmin?

    Thanks! ag

  • Awesome, worked on the first try after you pointed me to ant_key_manager_config.h! I can't believe it was so simple. I'll try the speed/cadence example next with a Garmin GSC10. After that my plan is to get speed/cadence from the GSC10 and power from button1/button2 to show up on putty/Edge 510. Cool!

  • Hello!

    If I understood correctly, you got what I'm trying to do! I'm trying to implement a bike computer, also using a nRF52 DK, and for that, I want to get information from sensors, and send this information via UART. 

    My main problem is that I use libraries provided in the SDK 16.0.0, and when I'm going to flash de nRF52 board, an error occurs. this error says that the code is trying to be allocated in a part of the memory already used by the soft device s212.

    Could you please help me and explain how you could send via UART the information gotten via ANT+???

    Thank you very much in advanced.

Related