Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Sync byte question

RankRankRankRank

Total Posts: 523

Joined 2012-11-15

PM

Hi to everybody.
I'm new in ANT.

I have a question about sync byte.
I'm working in ubuntu 10.04 with USBANTDevBoard(CP2102 USB-Serial)

In documentation Interfacing_with_ANT_General_Purpose_Chipsets_and_Modules.pdf in pages 12 and 13 explain the sync byte.
0xA4 -> Message ANT -> Host
0xA5 -> Message Host -> ANT

If I don't understand wrong.
When I send a command to ANT device I need to use 0xA5 Sync byte and the ANT device will answer me with 0x4A sync byte.

I try this commands:

Case A:
[O] Output Message ->
Sy ln ID D1 Ck
A5 01 4A 00 EE
// delay of 500 ms
[0] Output Message ->
Sy ln ID D1 D2 D3 D4 D5 D6 D7 D8 D9 Ck
A5 09 46 00 B9 A5 21 FB BD 72 C3 45 65

The ANT device doesn't answer nothing !


Case b:
[O] Output Message ->
Sy ln ID D1 Ck
A4 01 4A 00 EF
// delay of 500 ms
[O] Output Message ->
Sy ln ID D1 D2 D3 D4 D5 D6 D7 D8 D9 Ck
A4 09 46 00 B9 A5 21 FB BD 72 C3 45 64
Input Message ->
Sy ln ID D1 D2 D3 Ck
A4 03 40 00 46 00 A1

The ANT device answers that the "Network_key" is set OK.

I don't understand why when I use the 0xA4 to send message to ANT device I had an answer and when I use the 0xA5 I don't have an answer ?

What I'm doing wrong ? :S

Thanks

Miquel Soler i Mir      
RankRankRank

Total Posts: 55

Joined 2008-10-24

PM

The USB serial works in asynchronous communication mode. In asynchronous serial communication, the SYNC byte will always be 0xA4.

In synchronous serial communication the SYNC byte will be either 0xA4 or 0xA5, depending on the communication direction.Please refer the diagram from the interfacing document (attached also). [img size=490]http://www.thisisant.com/images/fbfiles/images/Sync_diagram.png[/img]