Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

How to obtain devices for Search lists in WPF

Rank

Total Posts: 8

Joined 2015-09-28

PM

Hi,
We have a client inerested in implementing a control for Heart Rate device and we are assessing contract the support for developers of ANT+, but we need know if it is possible obtain a lists of devices found and obtain the device number id for setChannelID in WPF.
The sample ANT_NetDll_Demo It has not implemented this option, and we have not found a sample for it
There are some sample, document or link to implement this?
Thanks.      
Rank

Total Posts: 8

Joined 2015-09-28

PM

Don't any update thread? The client is asking me urgently a solution and if we can't use the solution thisisant we have to chooser other as polar ( http://developer.polar.com/wiki/Bluetooth ) that have a documentation more accurate.      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Hi,
Sorry the website has undergone some migration work so I lost track of some threads here.

Are you only needing to receive data from 1 strap or from more than 1?

Yes, you may use extended device numbers to capture the channel ID from multiple ANT+ HR straps. You may use either continuous scanning mode, or a background scanning channel to receive the Channel ID from any number of straps, and then pass that channel ID for opening a slave channel. This is detailed in several application notes.

ANT AN Device Pairing
ANT AN ANT Channel Search and Background Scanning Channel
ANT AN RSSI Extended Information
ANT Message Protocol and Usage

There are also several ANT+ Members which provide products for this type of use case which may be useful. One of them kindly presented at the most recent ANT+ Symposium Conference on the advantages of ANT+ in tracking heart rate data in a group/gym environment, and also published a white paper discussing the issue:
ANT+ Symposium 2015: Think Differently, Rick Gibbs, NPE
COLLECTING USER PERFORMANCE DATA IN A GROUP ENVIRONMENT

For your actual coding, you will want to use the C# library in the ANT Windows Library Package.
As well there's an app note discussing how you can get started:
ANT AN Getting Started with ANT PC Development

For example code, I would look at the ANT+ RSSI Demo, which implements the type of listing you are looking for.

Hopefully that's enough for you to get started with smile.

Cheers      
Rank

Total Posts: 8

Joined 2015-09-28

PM

Hi, thanks for you answer.
I need receive data from more than one strap.
I have a problem with the ANT+ RSSI Demo and me device. Give me an error: "Not a CC257X module".
My device is a Heart Rate Monitor of B'TWIN: https://www.thisisant.com/directory/heartwear-ant-cardio-belt/
¿Could not be this device compatible with RSSI and search devices?
     
Rank

Total Posts: 8

Joined 2015-09-28

PM

Any answer?
For more information, our usb for connect with B'TWIN Heart Rate Monitor is this: https://www.thisisant.com/developer/components/antusb-m
And not found with ANT+ RSSI Demo, isn't compatibility?      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

The USB-m does not support RSSI, but the demo is still a good source for how to show device numbers. You can make a quick edit to the source code to allow the app to connect to other USB sticks such as the USB-m (although the RSSI will not work properly).

In the "MainForm.cs" file, comment out this line:

if (!capabilities.FS)
    throw new 
ANT_Exception("Not a CC257X module"); 
     
Rank

Total Posts: 8

Joined 2015-09-28

PM

Thanks for you answer, i got obtain device list!
But the ANT_NET.dll that is in ANT_RSSI_Demo obtain a error of capabilities or baudRate. I replaced the ANT_NET.dll by ANT_Managed_Library of ANT Windows Library Package and the error disapear.
Also I had add ANTLIB_CONFIG_0x6E to ANTMessageID and decrease MaxThreshold to -128. With this the RSSI Demo found!

Cheers.      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Glad to hear you got it working! Thanks for reporting the issues you had to solve smile

Cheers