Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

You are here: Forum Home → ANT+ Forums → ANT+ Blood Pressure → Thread

   

UA-851 w/ ANT+ SDK 2.0

Rank

Total Posts: 6

Joined 0

PM

Hi,

For connecting my Android device with an UA-851ant blood pressure monitor, around two years ago I was using the ANT sdk, which at that time had only a few examples that implemented the ANT+ profiles. It had nothing for the ant-fs / blood pressure profile so I implemented myself and it was working fine. I didn't update anything until now.

The antpluginlib looks great, but I'm not able to connect it with that UA-851ant device. Using the sample app, I can find the device and connect to it. The "Get ANT-FS Mfg ID" feature works fine, but I'm not able to download the history.
The progressbar goes like this:
- In link state: Requesting link
- In authentication state
- In authentication state: User pairing requested
and it stops saying "Authentication request rejected"

Logcat says:
AntFsHostAuthChannelSubTask(26340): BBC20200: Authentication request rejected
PluginDownloadController(26340): BBC20200: ANTFS request failed, code: FAIL_AUTHENTICATION_REJECTED
BBC20200: DownloadAll Failed to close ANTFS session.

There is no more info/logs!!!

I tried to reset the device (removing batteries), without success. My previous application also doesn't work as it's reporting "Unknown ANT Interface error" during ant configuration. I believe I would have to check a lot of docs to see what has changed since...

Has anyone experienced something similar? Is the source code of the plugin library available? I know there's only a few ant+ blood pressure devices on the market but still... What's your advice ANT+ masters?


Thank you in advance!
     
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Hi,

The logcat indicates that the BP monitor is refusing to pair to the Android device. If I recall correctly the UA-851 uses proximity pairing to do the initial pairing authentication. After that is successfully it will use passkey authentication afterwards which won't require proximity.

I would remove the batteries for at least 10 seconds, and then hold your Android device as close to the front of the BP monitor as you can and do the request access. This must be done within 10 seconds of putting the battery back in.      
Rank

Total Posts: 6

Joined 0

PM

That worked!!!
I knew I had to remove the batteries and wait for a while, but didn't know both devices had to be that close together.

Thank you very much harrison!
     
Avatar
RankRankRankRank

Total Posts: 296

Joined 0

PM

Yep, I also remember that I had to put the two VERY close together, just a few centimeters.
Which makes it a bit fiddly - and the device's manual wasn't very helpful as well.

Cheers,
OMB      
Rank

Total Posts: 6

Joined 0

PM

righttt! too bad there are no more blood pressure devices with ant+ out there =(

by the way, just two more things i'd like to confirm

- there's no way for the client to know the exact moment of when a new measurement is made. Since the blood pressure profile works by ant-fs, only the client makes requests to the BP device, am I right? I wanted to show the measurement in the smartphone as soon as its performed.

- Does the new android sdk allows to erase data from the BP device? After a few weeks the devices storage limit is reached and i'd like to automatically erase everything.


thanks guys!
ricardo
     
Avatar
RankRankRankRank

Total Posts: 296

Joined 0

PM

ricardo.lagido - 09 May 2014 03:43 AM
righttt! too bad there are no more blood pressure devices with ant+ out there =(

by the way, just two more things i'd like to confirm

- there's no way for the client to know the exact moment of when a new measurement is made. Since the blood pressure profile works by ant-fs, only the client makes requests to the BP device, am I right? I wanted to show the measurement in the smartphone as soon as its performed.

- Does the new android sdk allows to erase data from the BP device? After a few weeks the devices storage limit is reached and i'd like to automatically erase everything.


thanks guys!
ricardo

Yes, the BP device doesn't report events.
However there might be a solution for you. If I rememer right, the the ANT-FS spec says that the ANT-FS data provider (they call this server "client" for some funny reason) should only beacon, when data are available. And there's a "data available" bit in the beacon payload. Have a look in the spec, I'm not sure where that was.

Cheers,
OMB      
Rank

Total Posts: 6

Joined 0

PM

i'm afraid not. What you say is correct, I checked the spec, but i don't see that happening in my UA851ant.
I just measured myself while listening to the "client" beacons and neither before, during of after the measurement, the content of the message changed. I was specifically looking at that "data available" bit, but it remained the same.
perhaps they just didn't implement this detail. i'll keep downloading all data until a new measurement appears^^

Regarding my other question, "Does the new android sdk allows to erase data from the BP device?", do you know anything about it? Don't we have access to the sdk source? There's so little documentation on this =(


and again,
thank you very much !
     
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

The BP plugin provides a mechanism to pass new data to the app based on file timestamps pulled from the ANT-FS directory. Unfortunately not all ANT-FS implementations in the wild use the data available flag correctly, and if multiple hosts are collecting from the same client, the data available flag would block additional hosts from downloading from the device when it's reset.

The BP plugin also provides a method to do an erase and/or reset the UTC time called requestResetDataAndSetTime(bool, receiver).

Right now the documentation consists of the Plugin Sampler source code and Javadoc. If you have any suggestions on any additional collateral which you would find helpful please feel free to leave feedback.

Cheers