Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Me again - Slave will not pair with master after dropping connection

Rank

Total Posts: 7

Joined 2014-10-13

PM

I have my application running very well, for the most part. I have an issue that occurs when I go out of range or shut the android application down for more than 10 seconds or so. I am trying to figure out how to allow it to pair back up when I come back in range or when I restart the application. Restarting ANT in software is my last resort, I was hoping there was a way to do this with interrupts from receiving a USART byte from the ANT module.      
Avatar
RankRankRankRank

Total Posts: 149

Joined 2014-04-02

PM

You can keep the connection open when your app is sent to the background by creating it from within an Android Service rather than your Activity.

Searching for a sensor will use much more power than keeping a connection open to a device that is in range. When you go out of range for too long, the connection will drop. You will have to tell ANT when you want it to try searching again. I'm not sure what interrupt you were expecting, but ANT doesn't know anything about the sensor as it isn't connected/tracking it any more.      

Signature

blackramlabs.com