Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

RequestAccess Speed/Cadence sensor

Rank

Total Posts: 13

Joined 0

PM

I've got the following problem. I connect successfully to a speed sensor with deviceNumber 0 and false for the boolean isSpdCadCombinedSensor via the following requestAccess method:

public static PccReleaseHandle<AntPlusBikeSpeedDistancePcc> requestAccess(Context bindToContext,
int antDeviceNumber,
int searchProximityThreshold,
boolean isSpdCadCombinedSensor, AntPluginPcc.IPluginAccessResultReceiver<AntPlusBikeSpeedDistancePcc> resultReceiver,
AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)


After this I want to connect to a (seperate) cadence sensor as well. Also with the same type of request for the cadence sensor and deviceNumber 0. Then I got as a response "ALREADY_SUBSCRIBED". Why?

When I'm change the deviceNumber to the deviceNumber of my device it will connect. When I first connect to a cadence sensor and then to a speed sensor I got the same result for the speed sensor.

At the same time I can connect without any problem to a power and heartrate sensor by using the same type of requestAccess methods and deviceNumber 0.      
RankRankRankRank

Total Posts: 313

Joined 2011-09-12

PM

Can you reproduce this on the current version of the ANT+ Plugins live on the Play Store? We fixed some issues with S&C sensors in recent updates.      

Signature

Dynastream Developer

Rank

Total Posts: 13

Joined 0

PM

I tried it again but still have the same issue. I have version 3.6 of the ANT+ Plugin Service installed.

(I apologize for my late reply)      
RankRankRankRank

Total Posts: 313

Joined 2011-09-12

PM

I see what is happening here, in that version of request access when you use a 0 wildcard device number it matches the first thing it finds, which happens to be the device that is already connected. I will put it on the ToDo list as something to fix.

Regardless, I would advise using the MultiDeviceSearch whenever you need to search for devices. It will avoid this error.      

Signature

Dynastream Developer