Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

ANT+ Plugin crashes

Rank

Total Posts: 13

Joined 0

PM

When I try to connect to my PowerTap by requesting access to the Bike Power PCC the Plugin crashes when the device is within range.

I use the following command to request access (device number = 0, proximity = 0):

AntPlusBikePowerPcc.requestAccess(mContext, (int)mDeviceNumberPOWER, Constants.SEARCH_PROXIMITY_THRESHOLD, iPluginAccessResultReceiver, iDeviceStateChangeReceiver);


I got the following error log:

09-19 17:34:36.984 E/AndroidRuntime(8181): FATAL EXCEPTION: AntChannelExecutorWorker
09-19 17:34:36.984 E/AndroidRuntime(8181): java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
09-19 17:34:36.984 E/AndroidRuntime(8181): at android.os.Handler.<init>(Handler.java:121)
09-19 17:34:36.984 E/AndroidRuntime(8181): at com.dsi.ant.plugins.antplus.bikepower.BikePowerDevice.getPageList(BikePowerDevice.java:101)
09-19 17:34:36.984 E/AndroidRuntime(8181): at com.dsi.ant.plugins.antplus.common.devices.AntPluginAntPlusReceiver.initPageIndex(AntPluginAntPlusReceiver.java:63)
09-19 17:34:36.984 E/AndroidRuntime(8181): at com.dsi.ant.plugins.antplus.common.devices.AntPluginAntPlusReceiver.getEventList(AntPluginAntPlusReceiver.java:49)
09-19 17:34:36.984 E/AndroidRuntime(8181): at com.dsi.ant.plugins.antplus.common.devices.AntPluginDevice.<init>(AntPluginDevice.java:56)
09-19 17:34:36.984 E/AndroidRuntime(8181): at com.dsi.ant.plugins.antplus.common.devices.AntPluginAntDevice.<init>(AntPluginAntDevice.java:50)
09-19 17:34:36.984 E/AndroidRuntime(8181): at com.dsi.ant.plugins.antplus.common.devices.AntPluginAntPlusReceiver.<init>(AntPluginAntPlusReceiver.java:37)
09-19 17:34:36.984 E/AndroidRuntime(8181): at com.dsi.ant.plugins.antplus.bikepower.BikePowerDevice.<init>(BikePowerDevice.java:72)
09-19 17:34:36.984 E/AndroidRuntime(8181): at com.dsi.ant.plugins.antplus.bikepower.BikePowerService.createNewDeviceFromSearchResults(BikePowerService.java:35)
09-19 17:34:36.984 E/AndroidRuntime(8181): at com.dsi.ant.plugins.antplus.common.AntPluginService$9.onSearchResult(AntPluginService.java:1186)
09-19 17:34:36.984 E/AndroidRuntime(8181): at com.dsi.ant.plugins.antplus.utility.search.AbstractSearchControllerTask.reportResult(AbstractSearchControllerTask.java:93)
09-19 17:34:36.984 E/AndroidRuntime(8181): at com.dsi.ant.plugins.antplus.utility.search.SingleSearchControllerTask.doWork(SingleSearchControllerTask.java:127)
09-19 17:34:36.984 E/AndroidRuntime(8181): at com.dsi.ant.plugins.antplus.utility.executor.AntChannelTask.doWorkInternal(AntChannelTask.java:582)
09-19 17:34:36.984 E/AndroidRuntime(8181): at com.dsi.ant.plugins.antplus.utility.executor.AntChannelExecutor$2.run(AntChannelExecutor.java:158)
09-19 17:34:36.984 E/AndroidRuntime(8181): at java.lang.Thread.run(Thread.java:856)
09-19 17:34:41.563 E/AntPluginPcc(8144): BBD20000: ConnectionDied: OnServiceDisconnected fired
09-19 17:34:41.563 E/AntPluginPcc(8144): BBD20000: ConnectionDied: OnServiceDisconnected fired
09-19 17:34:41.563 E/AntPluginPcc(8144): BBD20000: requestAccess failed
09-19 17:34:41.573 E/AntPluginPcc(8144): BBD20000: requestAccess failed

Any idea what is going wrong? My heart rate and speed / cadence sensors are working quite well.

Thanks a lot in advance.      
RankRankRankRank

Total Posts: 313

Joined 2011-09-12

PM

We are aware of this issue and are working on a fix. It should be released next week. Thanks for your report!      

Signature

Dynastream Developer

Rank

Total Posts: 23

Joined 2013-02-06

PM

I also get a similar message using a Stages power meter. I am able to connect using the UI method :
public void requestAccess(Activity userActivity,
Context bindToContext,
boolean skipPreferredSearch,
int searchProximityThreshold,
AntPluginPcc.IPluginAccessResultReceiver<AntPlusBikePowerPcc> resultReceiver,
AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
but I'd prefer to use the non-UI method to connect when the device is already paired. Looks like all messages can be received with the method above.

Also, has my post about a faulty response from the non-UI requestAccess method for Bike Speed & Cadence been verified?
Tom      
RankRankRankRank

Total Posts: 313

Joined 2011-09-12

PM

Yes the non-ui bug fix is coming this week.

As for the S&C issue, let me double check something and I will reply in that thread.      

Signature

Dynastream Developer

RankRankRankRank

Total Posts: 313

Joined 2011-09-12

PM

By the way, for anyone seeing this now, the bike power async is fixed in the plugins released October 2013 on the play store      

Signature

Dynastream Developer

Rank

Total Posts: 23

Joined 2013-02-06

PM

Yes, verified the new plug-in version 2.2.0 requestAccess method works on Stages and PowerTap G3.