SparkFun Forums 

Where electronics enthusiasts find answers.

All things pertaining to wireless and RF links
By gdev
#87105
ssnyde wrote:I can't seem to compile due to this error
foo2.c:157: warning: integer constant is too large for ‘long’ type
I wouldn't worry about foo*.c. They're just test programs that discover ANT network keys. Only network keys that comply with a certain algorithm are accepted by the set network key operation so I was curious as to how it is done. I've found about 400 of them and they seem to be constrained to a mask value and probably some bit count operations. Anyway, foo*.c need two USB keys to transmit and receive and also stress test the library. It sounds like unsigned long long isn't 64 bits on your laptop. Is it a 32 bit system and your desktop is 64 bit?

I take it the program works on your desktop?
By smysnk
#87185
Hmm, yeah I was seeing the ctrl-c, not sending problem before. I haven't don't any work on the ant recently but I will look into sending some type of reset at the start will fix things.

edit: Nevermind, I am sending reset here..

ant.c 64: ANT_send(1+1, MESG_SYSTEM_RESET_ID, 0x00);
By smohit@hotmail.com
#87442
Hi guys, kind of stuck in a dilema here.

would any of you guys know if a heart rate monitor with ANT transmission can transmit data to 2 ant receivers simultaneously? or only one at a time
By smysnk
#87475
The garmin HRM can do this, and probably the same with the suunto
By smohit@hotmail.com
#87480
i see, basically i wanted to have a heartrate strap that transmits data to 2 devices

1) something thats always on the person to store the data for the last 24 hours..

2) a pc connection to keep a monitor of the data aswell...


any ideas or if i could use any products i.e. sunito belt with our own ANT modules? or are we restricted to use their own ANT reciever and software?
By gdev
#88137
smohit@hotmail.com wrote:i see, basically i wanted to have a heartrate strap that transmits data to 2 devices

1) something thats always on the person to store the data for the last 24 hours..

2) a pc connection to keep a monitor of the data aswell...


any ideas or if i could use any products i.e. sunito belt with our own ANT modules? or are we restricted to use their own ANT reciever and software?
The Suunto ANT receiver (PC Pod) only receives from Suunto devices. It has a fixed network key. The garmin ANT stick can receive from any ANT device including the Suunto. Presumably you've looked at the Suunto memory belt? I'm not sure if it can store 24 hours of data or not though.
By billtodd
#88855
I was looking at the data sheet and noticed that to get a baud rate of 9600 one would three BR pins (BR1, BR2, and BR3). This board only has BR1 and BR2, can it not be configured to a 9600 baud rate?
#93348
Hi
I wrote a basic code to interface with ANT board. I am using Suunto HRM strap.

I took Suunto settings from other code availalbe on this forum. here is what i did in initialization

ANT_ResetSystem();
delay(20);
ANT_RequestMessage(MESG_CAPABILITIES_ID);
delay(100);
ANT_AssignChannel();
delay(20);
ANT_SetChannelId();
delay(20);
ANT_SetNetworkKey();
delay(20);
ANT_SetChannelSearchTimeout();
delay(20);
ANT_SetChannelPeriod();
delay(20);
ANT_SetChannelRFFreq();
delay(20);
ANT_OpenChannel();
delay(20);



Here is the ONLY response I am getting back in terminal window..
  • RX: [sync]..0x3..0x40..0x0..0x54..0x28..0x9B
    RX: msg received
    ID: MESG_RESPONSE_EVENT_ID
    Response Handler SConfig Done
    RX: [sync]..0x3..0x40..0x0..0x54..0x28..0x9B
    RX: msg received
    ID: MESG_RESPONSE_EVENT_ID
    Response Handler Size:
    Channel Num:0
    Message ID:54
    [unknown]
    Message Code:28

    RX: [sync]..0x3..0x40..0x0..0x42..0x0..0xA5
    RX: msg received
    ID: MESG_RESPONSE_EVENT_ID
    Response Handler Size:
    Channel Num:0
    Message ID:42
    [MESG_ASSIGN_CHANNEL_ID]
    Message Code:0

    RX: [sync]..0x3..0x40..0x0..0x51..0x0..0xB6
    RX: msg received
    ID: MESG_RESPONSE_EVENT_ID
    Response Handler Size:
    Channel Num:0
    Message ID:51
    [MESG_CHANNEL_ID_ID]
    Message Code:0

    RX: [sync]..0x3..0x40..0xD..0xB9..0x28..0x7B
    RX: msg received
    ID: MESG_RESPONSE_EVENT_ID
    Response Handler Size:
    Channel Num:D
    Message ID:B9
    [unknown]
    Message Code:28

    RX: [sync]..0x3..0x40..0x0..0x44..0x0..0xA3
    RX: msg received
    ID: MESG_RESPONSE_EVENT_ID
    Response Handler Size:
    Channel Num:0
    Message ID:44
    [MESG_CHANNEL_SEARCH_TIMEOUT_ID]
    Message Code:0

    RX: [sync]..0x3..0x40..0x0..0x43..0x0..0xA4
    RX: msg received
    ID: MESG_RESPONSE_EVENT_ID
    Response Handler Size:
    Channel Num:0
    Message ID:43
    [MESG_CHANNEL_MESG_PERIOD_ID]
    Message Code:0

    RX: [sync]..0x3..0x40..0x0..0x45..0x0..0xA2
    RX: msg received
    ID: MESG_RESPONSE_EVENT_ID
    Response Handler Size:
    Channel Num:0
    Message ID:45
    [MESG_CHANNEL_RADIO_FREQ_ID]
    Message Code:0

    RX: [sync]..0x3..0x40..0x0..0x4B..0x0..0xAC
    RX: msg received
    ID: MESG_RESPONSE_EVENT_ID
    Response Handler Size:
    Channel Num:0
    Message ID:4B
    [MESG_OPEN_CHANNEL_ID]
    Message Code:0

    RX: [sync]..0x3..0x40..0x0..0x1..0x1..0xE7
    RX: msg received
    ID: MESG_RESPONSE_EVENT_ID
    Response Handler Size:
    Channel Num:0
    Message ID:1
    [unknown]
    Message Code:1
I am not receiving any other message other than above! No burst mode data which has HR info.
Any comments/suggestions on how to proceed.

Thanks[/code][/list]
#93387
Aspire wrote:
  • Code: Select all
    RX: [sync]..0x3..0x40..0xD..0xB9..0x28..0x7B
    RX: msg received
    ID: MESG_RESPONSE_EVENT_ID
    Response Handler Size:
    Channel Num:D
    Message ID:B9
    [unknown]
    Message Code:28
     
    
It looks like your SetNetworkKey message was incorrectly formatted.

Orin.
#95487
Has anyone run this on a Mac? It compiles fine, but doesn't show any output. I have the nordic's vcc & ground connected to 3 volts that I'm getting from a L317 (because I read that 5v was too much), and the TX, RX, and RTS connected to 3 of the pins from my USB-FTDI cable. However, the program just seems to hang.

Ultimately, I'd love to get this talking to an Arduino, but one step at a time, right?

Any suggestions? Is it the cable, the OS, the board, the software, or the user? :wink:
#98393
Hi!

I'm new to this forum and to ANT and I'm trying to establish a connection between the Nordic USB Stick and the Garmin HRM, but I just can't manage to do that. Can I actually use the ANT commands like ANT_OpenChannel() from the ANT.dll or do I have write an own routine to realize the ANT message protocol? I already opened up a new topic on that with a detailed explanation of my problem: viewtopic.php?f=13&t=21214.

Can someone please help me and tell me to how to do it or maybe send me a program which is really working. I found a lot of stuff on the internet which is not really helpful.

Thanks.
#100702
I am also a newbie here trying to develop a Windows app to read real-time data from a Garmin HR monitor. I have a Garmin ANT USB stick and a Garmin HRM. I have found some code that uses functions in ANT_DLL.dll to communicate with the USB stick. (It only works if I first run, then kill Garmin's "ANT Agent.exe".) So far, I have been able to initialize, set the event callback function, and call ANT_RequestMessage to generate a few callbacks. I think I need to create a broadcast channel in which the HRM is the master and the USB stick is the slave. I assume that, if I can do that, I would get event callbacks from the USB stick with the HR data.

Am I on the right track here? Can anyone point me to a decent source for documentation on how to do this? )So far, I have not even found anything on how to interpret the data that is set by the event callback.)
#100800
I just got this working. It took me a while to figure out that I need to actually be wearing the HRM for it to connect and send data.

Now I need to figure out how to interpret the data. Can anyone help me out here?

Thanks.
#101229
I only use the last two bytes.

Byte 6 is a sequence number, if it's changed you have a new reading.
byte 7 is heart rate. I am not sure what filtering has already been aplied but I just take this as is.

I think bytes 4-5 are some sort of timestamp for the actual beat time so you can compare them from different records to get a time between beats.

Ifor
#110040
I just bought this HR strap:

http://www.amazon.com/gp/product/B00..._ya_os_product

and this USB stick:

http://www.amazon.com/Garmin-010-109...7&sr=8-1-spell



Do you guys mind posting a windows version that works?


I have been trying different stuff.. including something I found on the ANT+ website, some demo called ANTFS.. that at least detects the USB Drive (or claims to do so) but it never seems to "connect" to the HR strap




I guess I can return the stuff I already bought and buy something else?... just need a basic HRM and a USB stick to read the values "live/in real time" to my computer. I tried the code posted here on OSX but it seems that to access USB directly is a pain :(...

Ideally I would like to get this working on OSX and Windows but windows is the main priority.


I found this other good thread here but it is now "locked".. Garmin needs to get their stuff together.