Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

High Frequency Packet Transmission

Rank

Total Posts: 3

Joined 0

PM

Let me ask my question about ANT+.

I'm trying to send data in 32Hz, but most of the data is received with "RX failure". Strangely, sometimes it succeeds and there is no problem when I'm sending the one-shot packet.

My testing environment is nRF24AP2 (master) and nRF24AP1 USB ANT stick (slave/ANTWareII). I'm using CH-ID 0x00, Net-ID 0x00 (public), DevType 0x00 and sending as broadcast packet in HRM format.

I suppose the Channel Period is the parameter which determine the frequency, and I've set the value as 0x0400 (32Hz) on both master and slave side.

Can someone help me?

Thanks in advance.      
Avatar
Rank

Total Posts: 19

Joined 2012-05-08

PM

Hello TAK,

We can definitely help you figure this out. A little extra information will be useful though.

Can you attach your ANTware II log (including configuration)?      
Rank

Total Posts: 3

Joined 0

PM

Thanks laprairie,

I've attached the log file (master:128Hz/slave:64Hz). Can you guess the reason from this? [file name=log.txt size=279573]http://www.thisisant.com/images/fbfiles/files/log.txt[/file]      
Avatar
Rank

Total Posts: 19

Joined 2012-05-08

PM

My first question is what is your master's channel period? Your first post says its at 32Hz, and your second says 128. Your slave is set up at 64Hz (as seen in the log).

If your master is transmitting at 32Hz, a lot of RX Fails are to be expected, naturally.

The master's configuration would really help complete the puzzle for us here.

If your AP2 is a USB device, the ANTware log would be great. Otherwise the configuration code would be useful.      
Rank

Total Posts: 3

Joined 0

PM

Sorry for made you confused. First time I posted my setting was 32Hz, but after that we tried several settings and the log was taken when we were using 128Hz/Master and 64Hz/Slave as you observed.

And my AP2 is controlled by micro-computer so has no logging capability X-(

The configuration of master is:
TxType 0x10, NetID 0, DevID 1, DevType 0x00, Freq 0x39, Period 0x80

The configuration of slave is:
TxType 0x00, NetID 0, DevID 0, DevType 0x00, Freq 0x39, Period 0x40

Could you see anything wrong? [file name=log.zip size=46106]http://www.thisisant.com/images/fbfiles/files/log.zip[/file]      
Avatar
Rank

Total Posts: 19

Joined 2012-05-08

PM

Hi TAK,

At this point being able to read the configuration code that your micro is using to configure your master would be of the most help. If we can see the actual code used to set this up then we can check for proper endian-ness and other properties that may be a factor.

A couple thoughts in the meantime:

- Does your master have more than one channel open? If so, and each channel is at a higher transmit period, they may be colliding.

- I would reccommend not using 0x00 for the Device type for a master, as this forces your slave to also use 0x00. When a slave uses 0x00 it acts as a wildcard and will accept any device's messages that match the other parameters. (see the protocol and usage manual for a full explanation)      
Avatar
Rank

Total Posts: 19

Joined 2012-05-08

PM

I just noticed that your period assignments in the last post are suspect.

Keep in mind that ANT configures message period by using counts, not frequency. To assign a period of 128Hz, the value 0x0100 (256) should be used.

This is because:

256/32768 = 0.0078125

1/0.0078125 = 128 Hz

Please double check your period assignment on your master (being mindful of little-endianness)      
Rank

Total Posts: 3

Joined 0

PM

This problem was solved.

The point was the master's Device Type as you mentioned.

After setting the Device Type from 0x00 to 0x78 (HRM), then the most packets become recognized correctly (around 93% under 64Hz condition).

Thanks laprairie, for your kind comments really helped me! smile      
Avatar
Rank

Total Posts: 19

Joined 2012-05-08

PM

Hi TAK,

Excellent, I'm glad that this is working for you!

Happy ANT-ing!

-laprairie