Question on the packet ack on nRF24L01+ module

More
10 Jul 2015 04:47 #35294 by nkkim91
Hello,

I'm developing a transmitter using Arduino nano with nRF24L01+ which is targeting for my CX-30.
Merged the yd717_nrf24l01.c file in the src/protocol and nrf24l01.c file in src/protocol/spi to support only CX-30.

However, one problem I faced is the packet_ack() always returns "PKT_TIMEOUT" though I used the same setup/configuration in yd717_init() function.
When I checked the status register, it always returned 0x0E or 0x1E. bit 5 (NRF24L01_07_TX_DS) is never set in any case after sending packet.

So, wondering what is the wrong approach of me ? Would you comment on it if you have experienced the same ?

Thanks,
NamKyu

Please Log in or Create an account to join the conversation.

More
10 Jul 2015 05:16 #35296 by nkkim91
Found a link of the same issue and the comment saying the CE might be not set correctly.
However, my code set and clear the CE pin connected to a digital pin of Arduino. but, since it's for one target(CX-30), not support multimode, do I need a null function instead of setting/clearing the CE pin ?

devzone.nordicsemi.com/question/662/nrf24l01-does-not-transmit/

* protocol/spi/nrf24l01.c file

static void CE_lo()
{
#if HAS_MULTIMOD_SUPPORT
PROTOCOL_SetSwitch(NRF24L01);
#endif
}
static void CE_hi()
{
#if HAS_MULTIMOD_SUPPORT
u8 en = SPI_ProtoGetPinConfig(NRF24L01, ENABLED_PIN);
u8 csn = SPI_ProtoGetPinConfig(NRF24L01, CSN_PIN);
SPI_ConfigSwitch(en | 0x0f, en | (0x0f ^ csn));
#endif
}

* my code

static void CE_lo()
{
digitalWrite(nNRF24L01_CEPin, LOW);
}

static void CE_hi()
{
digitalWrite(nNRF24L01_CEPin, HIGH);
}

Thanks,
Alex

Please Log in or Create an account to join the conversation.

More
10 Jul 2015 05:45 #35297 by Durete
I'm not developer, but check this thread:
deviationtx.com/forum/protocol-developme...they?start=180#35188

And the articles talking about the ACK bit inverted on nRF24L01+ counterfeit modules.
I guess this could be related with your issue.

Please Log in or Create an account to join the conversation.

More
10 Jul 2015 09:12 #35302 by nkkim91
Thank you for pointing me to the links !!

I bought 20 pcs of the module through Ali and it was less than $1 in each. I guess it might be a cloned IC, not a genuine.
OK, let me check this out.

Please Log in or Create an account to join the conversation.

More
25 Sep 2015 20:29 - 25 Sep 2015 20:31 #38063 by jackwu
Hi NamKyu,
I'm so glad to see someone else having done this, and I was wondering if I could learn from your experience! I'm trying to do basically the same thing - transmitting controls to my CX-30 with the nRF24L01+ connected to an Arduino Nano clone, using the phracturedblue Bitbucket code.
How did you port the code onto the Arduino? The jd717_nrf24l01.c isn't in the format of the Arduino IDE and doesn't compile for me when I put it in there, since it doesn't have void setup and void loop functions... and it calls on a lot of headers and sub-headers which I tried to manually add each one. Is it some kind of batch project file that I can import? What am I missing?

It seems you have a lot more experience than me! Please help! Thanks so much!
Best,
Jack
Last edit: 25 Sep 2015 20:31 by jackwu.

Please Log in or Create an account to join the conversation.

Time to create page: 0.039 seconds
Powered by Kunena Forum