Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

can´t get pairing ant+ heart rate sensor on android: com.dsi.ant.sample.acquirechannels

Rank

Total Posts: 8

Joined 0

PM

i configure channel this way:

private static final int CHANNEL_PROOF_DEVICE_TYPE 0x78;
    private static final 
int CHANNEL_PROOF_TRANSMISSION_TYPE 0;
    
    private static final 
int CHANNEL_PROOF_PERIOD 8070// 1 Hz
    
private static final int CHANNEL_PROOF_FREQUENCY 57;
    



             
channelId = new ChannelId(0
                        
CHANNEL_PROOF_DEVICE_TYPECHANNEL_PROOF_TRANSMISSION_TYPE,true);
                
                try
                
{
                    mAntChannel
.setChannelEventHandler(mChannelEventCallback);
                    
                    
mAntChannel.assign(channelType);
                   
                    
mAntChannel.setChannelId(channelId);
                    
mAntChannel.setPeriod(CHANNEL_PROOF_PERIOD);
                    
mAntChannel.setRfFrequency(CHANNEL_PROOF_FREQUENCY);
                    
//mAntChannel.setPeriod(8070);
                    //mAntChannel.setRfFrequency(57);
                    
mAntChannel.open();
                    
mIsOpen true


don´t know how to configura network keys.
may be this wrong      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

Is there a particular reason you are not using the ANT+ Heart Rate plugin for development of your application? It is highly recommended to use the Plugins when creating ANT+ applications,. The plugins handle all the data decoding, which should simplify your implementation, as well as allow sharing of devices and data between multiple applications.      
Rank

Total Posts: 8

Joined 0

PM

hi.
So, that i can´t do it without the plugin library?.

I have tested plugins and yes that discover device easily.

Thanks      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

Correct, this is not supported in the ANT API. Please refer to Section 3.3.3 of the "Creating ANT Android Applications" document that is included in the ANT API for more details.

"The ANT+ network is not accessible through the standard ANT API, and it is intended that developers creating applications which talk to ANT+ devices use the ANT+ API."      
Rank

Total Posts: 8

Joined 0

PM

ok thanks.      
Rank

Total Posts: 3

Joined 2013-05-13

PM

Hi.

I have the similar problem and I need use the plugin library it's not enought, I need complete control of the ant frames.

When I set frequency 57 the Service return INVALID REQUEST.

There is any form to use Ant APi and connect to Ant+ device?