Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

message code not define

Rank

Total Posts: 5

Joined 2012-07-31

PM

hi,

I got a message code return from ap2 module like below
3 40 0 46 a9 a1

and the flow is set the network key after a reset command.

I cannot figure out the message code 'a9' meaning.

pls. help...      
Rank

Total Posts: 5

Joined 2012-07-31

PM

Hi,

I config the network key and it return the message is
03,40,00,46,A9,00,
After look at the message code, I cannot find the code 'A9'.

What does this code mean?
How can I get more message code?

Rgds.      
RankRankRank

Total Posts: 55

Joined 2008-10-24

PM

How did you sent the network key command to the AP2? It seems the response message does not match the ANT message structure.
If you can send a time diagram on your serial interface would be more helpful.      
Rank

Total Posts: 5

Joined 2012-07-31

PM

Follow the code list on "ANT+ Embedded Reference Designs" antplus_bps_rx
but change to use the async communication.

I set the "reset" command, and after it return "RESPONSE_NO_ERROR" then set the network key.

I'll post the time diagram if possible      
Rank

Total Posts: 5

Joined 2012-07-31

PM

hi,

the time diagram is post as attached. [img size=800]http://www.thisisant.com/images/fbfiles/images/Ap2_0821_.png[/img]      
Rank

Total Posts: 5

Joined 2012-07-31

PM

finally,

I found the problem is sent from code for the command timeout.
When command timeout it sent a fake message and the code 'a9' means EVENT_COMMAND_TIMEOUT.

so my problem now become why? and should I repeat the command if timeout happen?      
RankRankRank

Total Posts: 55

Joined 2008-10-24

PM

The message code of A9 means " MESG_SEARIL_ERROR_ID".

Could you please check if your command have anyone of following problems:
1. The network key was not correct?
2. The check sum of the command was not correct?
3. The size of the command message was too large?

The summary of ANT message code can be find in page 84 of the document of "ANT Message Protocol and Usage".      
Rank

Total Posts: 5

Joined 2012-07-31

PM

yep.

It works fine after trace and fine tune the code.

tks. a lot