|
|
|
Re:Unknown msg IDs 1 Year, 4 Months ago
|
|
|
Thanks for your answer,
This are the values the MCU receives from the AP2 module:
(Reset)
0xA4, 0x01, 0x6F, 0x20, 0xEA
This is the message I would expect after sending the reset command. Next I set the network key and AP2 answers:
0xA4, 0x03, 0x01, 0x46, 0x00, 0xE8
0xE8 is not the value one gets if you calculate the XOR of the previous values. This lead me to believe that the data the MCU is showing me may not be the real data the ANT is sending (it is strange because the UAT library on the MCU works perfectly when used to communicate with a PC).
I decided to see if I had the same problem using the AP3 module. I did not: the same MCU code setup the channel and opened it and the AP3 module responded correctly to every command I used to set up the channel.
This is the sequence I use to se up the channel
1) reset AP module
2) Set Channel Key
3) Assign Channel
4) Set Channel ID
5) Set RF Frequency (to 2,457 GHz)
6) Open channel
I'm currently using the AP2 module and the AP3 module @ 57600 bps
Could it be that the data rate is too high for the AP2?
Anyone got any ideas?
Thanks for any help
Bobbymk
|
|
|
|
Logged
|
|
|
|
muharram (User)
Expert Boarder
Posts: 97
|
|
Re:Unknown msg IDs 1 Year, 4 Months ago
|
Karma: 0
|
Hi,
After setting the network key, the AP2 should send the Channel Response/Event message (0x40) (refer to ANT Message Protocol and Usage document for more details:
www.thisisant.com/images/Resources/PDF/1...ol%20and%20usage.pdf).
However, the answer AP2 sends to the MCU:
0xA4, 0x03, 0x01, 0x46, 0x00, 0xE8
after you have set the network key, has one byte missing and that is the "0x40" byte. Therefore, maybe one of your pins is not connected.
What you can do is send us the schematic to have a look at and figure out what the problem is. Also, you can use the oscilloscope and check the serial lines' values.
As for the baud rate you are using; 57600 bps, it is the right baud rate for both AP2 and AT3.
|
|
|
|
Logged
|
|
|
|
|