Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Ant RESET in ANTPlusDemo example

RankRankRankRank

Total Posts: 524

Joined 2012-11-15

PM

Hi, I am developing an application to connect to the ANT Radio Service of my mobile phone using ANTPlusDemo app as a guide.

I wanted to open directly the channels instead of passing through the PENDING_OPEN state waiting for the reset, but it didn't work. Why is it necessary to reset the system for opening the channels?

Thank you in advanced.      
Avatar
RankRank

Total Posts: 39

Joined 2011-06-29

PM

The PENDING_OPEN flag in AntPlusDemo is just a way for us to ensure that the radio is in a known state when we start. If you just claimed the radio it will have already reset but just to be double sure AntPlusDemo does a reset and waits for the response (01-6F-20) to tell it to start.

It is a good practice to reset the ANT chip if you just got control of it, but you could also open channels without a reset.

What I do when I write ANT programs is to change a state variable to "initializing" and then reset the chip. When I get the response (reset intent) and my state is "initializing" I start assigning and opening channels, then change state to "initialized" or "running".