problem with nrf24l01+ on crazyflie sending with ack_payload

Post here to get support
Post Reply
markiv
Beginner
Posts: 5
Joined: Tue Jul 23, 2013 5:37 pm

problem with nrf24l01+ on crazyflie sending with ack_payload

Post by markiv » Fri Oct 25, 2013 10:56 pm

Hi,
Im trying to understand communication between crazyradio and crazyflie. To make it simple, i am trying to get nrf24l01+ on crazyflie (client) to talk to another nrf24l01+ (communicating with an STM32 discovery board). The code on crazyflie side is setup with crazyflie being PRX (with ACK_PAYLOAD enabled). The other is configured as PTX.
It is working with ACK enabled (without payload). However when ACK_PAYLOAD is enabled (through feature and dynamic payload registers), the PTX does not receive RX payload (TX_DS and RX_DR flags are not set) even though PRX is sending the payload (TX_DS on PRX is set). I am not sure if this is a good place to post this, but can you provide some pointers. I have tried to follow the settings on the datasheet. Please let me know if i have missed out some information here. Thanks!
PTX config:
1) TX_ADDRESS = {0xE7,0xE7,0xE7,0xE7,0xE7}
2) RX_ADDR_P0 = {0xE7,0xE7,0xE7,0xE7,0xE7}
3) Enable Pipe0, Auto acknowledge
4) SETUP_RETR: 500us, 10 retransmit
5) RF_SETUP: 250 kbps (have tried with 1 mbps and 2 mbps without success as well)
6) FEATURE: enable ack payload, dynamic payload
7) DYNPD: enable dynamic payload pipe 0
8) CONFIG: 0x0e (disable all interrupts on IRQ, power up PTX, 2 bit CRC)

PRX config on crazyflie:
same as PTX except
RX_PW_0: number of bytes sent by PTX.
CONFIG: 0x0f (disable all interrupts on IRQ, power up PRX, 2 bit CRC)


Scheme:
PTX-------->send payload-----> AIR-------> receive payload(Crazyflie PRX)
receive payload with ACK<---AIR<---- Send ACK (with payload)



arnaud
Bitcraze
Posts: 2134
Joined: Tue Feb 06, 2007 12:36 pm

Re: problem with nrf24l01+ on crazyflie sending with ack_pay

Post by arnaud » Tue Oct 29, 2013 7:36 pm

Hi,

I have not checked in details but what you are doing look like what is done in the radio dongle.

You can try to replicate the configuration that is done in the Crazyradio dongle, it contains the same radio hardware as the nrf24L01+: https://bitbucket.org/bitcraze/crazyrad ... ult#cl-101

This should work with an unmodified Crazyflie firmware and the copter will send some ack payload back when you send many NULL packets to it (packets containing only the byte 0xFF). This can at least permit to debug the PTX side.

If you re-wrote the copter side you can check that you are loading the ack payload using the right spi command as in https://bitbucket.org/bitcraze/crazyfli ... ult#cl-243

markiv
Beginner
Posts: 5
Joined: Tue Jul 23, 2013 5:37 pm

Re: problem with nrf24l01+ on crazyflie sending with ack_pay

Post by markiv » Wed Oct 30, 2013 4:32 pm

Thank you. I will check this.

Post Reply