Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Bind ANT Radio service in combined ANT/ANT+ application

Rank

Total Posts: 3

Joined 2014-03-25

PM

I have an "old style" ANT mobile android application which reads temperature and pressure data from a hardware sensor. The application binds the ANT radio service via AntInterface.initService. Now I want to add an ANT+ heartrate sensor based on the ANT+ heartrate profile. I integrated the new code according to the AntPlusPluginSampler code.
Unfortunately AntPlusHeartRatePcc.requestAccess results in the following error message: "The ANT radio service is in use. Free it so another application can use it." Freeing the ANT radio service displays either heartrate or temperature/pressure data but not both.
My question is: How does a combined ANT/ANT+ application bind the ANT radio service correctly?

Thanks for your help.      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Unfortunately the old API takes possession of the whole chip which blocks other apps from binding to the ANT Radio Service. The ANT+ Plugins are build upon a new ANT Channel API which allows ANT channels to be shared individually with other apps, so multiple apps may bind to the ARS and ANT+ Plugins and share ANT Channels as they come available.

For your application to work you must update your old style application to use the new ANT Channel API which you may find on the Downloads Page, which will then allow you to mix and match the ANT/ANT+ API's.

     
Rank

Total Posts: 3

Joined 2014-03-25

PM

Thank you Harrsion.
You mean the new ANT SDK version C.B3.
Correct?

Regards,
Udo      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

That is correct.

Best regards,
Harrison      
Rank

Total Posts: 3

Joined 2014-03-25

PM

Thank you, Harrison.

I had to rewrite the ANT part, because of a very old ANT API.
But now ANT and ANT+ share the ANT radio service perfectly.

Best regards,
Udo      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Glad to hear it's working for you smile

Best regards,
Harrison