Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Connecting ANT Network Processor with nrf52832

Rank

Total Posts: 10

Joined 2018-08-14

PM

Hi,

I'm trying to connect two ant devices.
The first device uses a sparkfun nrf52832 with the ANT Network Processor built from sources with S332 v1.0.2
This works quite well, I can send configuration messages to the ANT Network Processor and get the responses.

The second device is also a sparkfun nrf52832 but I am using S332 v5.0.0

My first question is, are these devices able to connect to each other? (is v5.0.0 backwards compatible with v1.0.2)

If they are compatible, why am I unable to set up a channel? When I open a channel on the slave I get a EVENT_RX followed by 7 EVENT_RX_FAIL. This happens when I try to set up a normal or encrypted channel.

Am I missing something in the configuration?

This is my configuration for the ANT Network Processor:

Assign Channel 0x42 A40342001000F5 - response A40340014200A4
A40342 sync,len,instr
00 channel number
10 master type
00 network number
F5 CS

Channel ID 0x51 A40551000001830173 - A40340015100B7
A40551 sync,len,instr
00 channel number
0001 device number
83 device type
01 transmission type
73 CS

Set Channel message period 0x43 A40343002000C4 - A40340014300A5
A40343 sync,len,instr
00 channel number
2000 period
C4 CS

Set Channel Radio Frequency 0x45 A40245004CAF - A40340014500A3
A40245 sync,len,instr
00 channel number
4C rf_freq
AF CS

Configure Advanced Burst 0x78 A405780001030000DB - A403400078009F
A40578 sync,len,instr
00 padding
01 enable
03 packet_length
0000 Others
DB CS

Set Encryption Key 0x7E A4117E0003010401050902060503050809070903CB - A40340007E0099
A4117E sync,len,instr
00 key index
03010401050902060503050809070903 Cryptokey
CB CS

Set Encryption Info 0x7F A4057F0001020304DA - A40340007F0098
A4057F sync,len,instr
00 ENCRYPTION_INFO_SET_CRYPTO_ID
01020304 CRYPTO_ID
DA CS

Config Encryption ID List 0x5A A4035A000001FC - A40340015A00BC
A4035A sync,len,instr
00 channel number
00 list size (disable)
01 listtype
FC CS

Enable Single Channel Encryption 0x7D A4047D00010001DD - A40340017D009B
A4047D sync,len,instr
00 chnr
01 Enable
00 key index
01 decimation rate
DD CS

Open Channel 0x4B A4014B00EE - A40340014B00AD (ANTNP Loops: A40340010103E4)


I pulled the configuration for my second device from the nRF5_SDK_14.2.0_17b948a\examples\ant\ant_multi_channels_encrypted\rx\ant_multi_channels_encrypted_rx.c

NRF_LOG from uart:
<debug> nrf_sdh_ant: ANT Event 0x80 Channel 0x00
<info> app: EVENT_RX ch: 0
<debug> nrf_sdh_ant: ANT Event 0x02 Channel 0x00
<warning> app: EVENT_RX_FAIL ch: 0
<debug> nrf_sdh_ant: ANT Event 0x02 Channel 0x00
<warning> app: EVENT_RX_FAIL ch: 0
<debug> nrf_sdh_ant: ANT Event 0x02 Channel 0x00
<warning> app: EVENT_RX_FAIL ch: 0
<debug> nrf_sdh_ant: ANT Event 0x02 Channel 0x00
<warning> app: EVENT_RX_FAIL ch: 0
<debug> nrf_sdh_ant: ANT Event 0x02 Channel 0x00
<warning> app: EVENT_RX_FAIL ch: 0
<debug> nrf_sdh_ant: ANT Event 0x02 Channel 0x00
<warning> app: EVENT_RX_FAIL ch: 0
<debug> nrf_sdh_ant: ANT Event 0x02 Channel 0x00
<warning> app: EVENT_RX_FAIL ch: 0
<debug> nrf_sdh_ant: ANT Event 0x08 Channel 0x00
<info> app: EVENT_RX_FAIL_GO_TO_SEARCH ch: 0
<debug> nrf_sdh_ant: ANT Event 0x39 Channel 0x00
<info> app: EVENT_ENCRYPT_NEGOTIATION_FAIL ch: 0


     
Rank

Total Posts: 10

Joined 2018-08-14

PM

The network processor side processes the period bytes little endian. This explains the missed rx events.
It is working now!