Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Blood Pressure cuff on Android

RankRankRankRank

Total Posts: 523

Joined 2012-11-15

PM

Hi

I am trying to connect to a Blood Pressure (BPM) monitor that supports ANT+ (ANT_FS) from an android device. Currently I am not able to see the connect beacon from the BPM. I am trying to use the ANDROID sample downloaded from this site and modify it.

After reset I receive this message
Rx:[01][6F][20]

after that I receive the following messages
//unknown - message
[03][40][00][74][00]

Assign Channel - response
[03][40][00][42][00]

Set Channel ID
[03][40][00][51][00]

Messaging period
[03][40][00][43][00]

Channel Freq
[03][40][00][45][00]

Search Timeout
[03][40][00][44][00]

Low priority channel search timeout
[03][40][00][63][00]

Set Proximity Search threshold
[03][40][00][71][00]

Open Channel
[03][40][00][4B][00]

//unknown - message
[03][40][00][74][00]

I am stuck at this point. If anybody could help me figure the next step I would greatly appreciate the help.      
Avatar
RankRankRankRank

Total Posts: 213

Joined 2011-05-02

PM

Hello,

Please ensure that your channel parameters are correct to communicate with the BPM. You will also need to make sure that the channel uses the ANT+ network key.

Note that the network key command is not available on the Android API. Network keys are pre-configured on the available network numbers. You will need to assign the ANT+ network to your search channel in order to see the beacon. Refer to the documentation accompanying the API for more information on that.

For more support regarding ANT+ BPM's, I suggest posting in the ANT+ forums. In order to post in the ANT+ forums, it is necessary to become an ANT+ adopter if you are not already. Becoming an adopter is free of charge.

Cheers,

Kassandra      
RankRankRankRank

Total Posts: 523

Joined 2012-11-15

PM

Hi Kassandra

Thanks for the prompt reply.

From the document I understand that 1 is the network number for ANT_PLUS network and 2 is the network number for ANT_FS. I tried both and what I get is the following packet

[03][40][00][01][01

when the BP monitor goes into pairing mode. Is this the beacon?
I am trying to parse this message and know what this means.

these are the parameters for my antChannelSetup

byte networkNumber = 1; ANT + network key
short deviceNumber = 0;
byte deviceType = 0x12; //ANT + blood pressure device
byte TransmissionType = 0x00; // Pairing search
short period = 8192; //Data shall be received at a rate of 4Hz
byte freq = 57; // 2457Mhz (ANT+ frequency)
byte channel = 0;
byte proxThreshold = 7;

I will try the adopter zone as well.

Thanks again for the help.

-aarockiam      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

A detailed description of the format of ANT messages is available in the "ANT Message Protocol and Usage" document


This document will show you how to decode messages like the above.
http://www.thisisant.com/pages/developer-zone/ant-protocol-and-usage      
Avatar
RankRank

Total Posts: 39

Joined 2011-06-29

PM

Could you please show me your code or the changes you made to the sample code (AntPlusDemo?). If I understand you correctly: You have the app opening a BPM channel, but no data (broadcast messages) arriving.
I would also suggest using AntWare to see if you can receive the BPM messages.

-Maurits

PS: the 0x74 is an Android specific message that handles event buffering (See the Android API doc for more information)      
Rank

Total Posts: 13

Joined 0

PM

Now I have crossed this stage Thanks to the great help from thisisant.com forum moderators.

I am seeing the beacon from the BPM device. But when I try to link to it I am getting an exception in two of the four channel types.

on the other two channel types I dont see the beacon at all.

This question thread is continuing in the adopter zone forum as well.

A heart felt thanks for your great assistance.

- Albert

here is the channel setup code. values for the arguments are
network number is 1, channel number is 0x03, deviceNumber is 0, deviceType is 18 (0x12) for BPM devices, txType = 0, channelPeriod is 8192, radioFreq = 57, proxSearch = 7.
----------------------------------------------------------
private boolean antChannelSetup(byte networkNumber, byte channelNumber, short deviceNumber, byte deviceType,
byte txType, short channelPeriod, byte radioFreq, byte proxSearch){
boolean channelOpen = false;
try{
sAntReceiver.ANTAssignChannel(channelNumber, AntDefine.PARAMETER_RX_NOT_TX, networkNumber); // Assign as slave channel on selected network (0 = public, 1 = ANT+, 2 = ANTFS)
sAntReceiver.ANTSetChannelId(channelNumber, deviceNumber, deviceType, txType);
sAntReceiver.ANTSetChannelRFFreq(channelNumber, radioFreq);
sAntReceiver.ANTSetChannelPeriod(channelNumber, channelPeriod);
sAntReceiver.ANTSetChannelSearchTimeout(channelNumber, (byte)0); // Disable high priority search
sAntReceiver.ANTSetLowPriorityChannelSearchTimeout(channelNumber,(byte) 12); // Set search timeout to 30 seconds (low priority search)
if(deviceNumber == WILDCARD){
sAntReceiver.ANTSetProximitySearch(channelNumber, proxSearch); // Configure proximity search, if using wild card search
}
sAntReceiver.ANTOpenChannel(channelNumber);
channelOpen = true;
}
catch(AntInterfaceException aie){
aie.printStackTrace();
}
return channelOpen;
}      
RankRankRankRank

Total Posts: 523

Joined 2012-11-15

PM

heyy frnds

i have the same problem. i am able to connect to BPM Monitor but unable to get the data, I have receiving the same message, when connection is established in between the android phone and bpm machine, after decoding the message it show "0 BPM".

Thanks in advance, please help me about my this issue.      
Avatar
RankRankRankRank

Total Posts: 296

Joined 0

PM

You could first try to use the ANT-FS PC Host application to establish a communication with the BPM. All you need is an ANT USB stick. The app can log send/receive traffic, that'll make it easy for you to understand the protocol.      
Avatar
Rank

Total Posts: 6

Joined 0

PM

What have vou do too see the beacon? I`ve a smartlab walk+ here and I don't get the beacon.... I gues its the same problem.