nopnop2002 / esp-idf-mirf

nRF24L01 Driver for esp-idf
MIT License
59 stars 10 forks source link

Transmission keeps failing #6

Closed ThynkLabs closed 7 months ago

ThynkLabs commented 2 years ago

image

I am trying to use Peer to Peer Example on two modules, one with transmitter config and other with receiver config. However, the transmit does not seem to happen. Please help.

nopnop2002 commented 2 years ago

Incorrect TX_ADDR on the transmit side.

The TX_ADDR on the transmit side must match the RX_ADDR on the receive side.

nrf24l01_sender nrf24l01_receiver

DarshanDodal commented 2 years ago

Hii, Thanks for quick reply. I changed the address, the receiver is now receiving the data, but at the transmission side there is still a failure message.

Also, I tried the multi receive example at the receiver side with peer to peer code at transmission side, that does not seem to work. Are there any specific changes that I need to make?

nopnop2002 commented 2 years ago

Try this example on both the sender and receiver sides using two modules.

https://github.com/nopnop2002/esp-idf-mirf/tree/master/Peer-to-peer

DarshanDodal commented 2 years ago

Peer to peer code is working, but the transmission side code still logs error but the receiver gets data.

nopnop2002 commented 2 years ago

Are you using advanced settings?

In normal radio environment, you don't need to use advanced settings when using 2MBps.

I want to know your all settings.


When used at long distances, lowering the RF data rate stabilizes it. When changing the RF data rate, the sender and receiver must have the same value. When using 250KBps, it takes time to PAYLOAD sending and ACK PACKET receiving, so it is necessary to increase the automatic retransmission delay.

ThynkLabs commented 2 years ago

I am using it in normal conditions. Here are my settings.

Settings at Tx Side:

image

Settings at Rx Side:

image

nopnop2002 commented 2 years ago

I don't know why. Try swapping the sending module and the receiving module.

Be sure to turn off the power once.

DarshanDodal commented 2 years ago

Tried everything. I guess the transmitter is not receiving an ACK after transmission.

Btw, I want to use the Multi Receiver code at receiver side. So is it possible to use the peer to peer code at tx side?

nopnop2002 commented 2 years ago

Tried everything. I guess the transmitter is not receiving an ACK after transmission.

I think so.

Btw, I want to use the Multi Receiver code at receiver side. So is it possible to use the peer to peer code at tx side?

Multi-receive uses the following receiving addresses. 1RECV 2RECV 3RECV 4RECV 5RECV

The sender must send to this address.

DarshanDodal commented 2 years ago

Multi-receive uses the following receiving addresses. 1RECV 2RECV 3RECV 4RECV 5RECV

The sender must send to this address.

Yes. I tried changing the address in Tx accordingly. That does not seem to work.

nopnop2002 commented 2 years ago

On the transmit side only, try powering the nRF24L01 with an external power supply.

I use the AMS1117 to convert the board's 5V output to 3.3V and feed it to the nRF24L01. ExternalPowerSoure


I have several nRF24L01 modules. One of them always causes a transmission error. It's probably a hardware problem.

nopnop2002 commented 2 years ago

Multi-receive uses the following receiving addresses. 1RECV 2RECV 3RECV 4RECV 5RECV

It is necessary to match not only the address but also the payload size to be sent and received.

https://github.com/nopnop2002/esp-idf-mirf/blob/master/Multiple-Receive/main/main.c#L19

Added sender example to here. https://github.com/nopnop2002/esp-idf-mirf/tree/master/Multiple-Receive

ThynkLabs commented 2 years ago

Thanks a lot for making changes. However, I am still not able to make the Multi Receiver example work. image

nopnop2002 commented 2 years ago

I changed the component.

Logs the failure reason when a send fails.

If "Status register timeout", it may be a hardware issue

nrf24l01-bad-modue

ThynkLabs commented 2 years ago

I tried the example. This is what it logs.

ss temp (2)

nopnop2002 commented 2 years ago

The transmitter did not receive an ACK after sending.

Also

Recipient does not return ACK after receiving

I don't know which one, but there is no doubt that it is abnormal.

It is difficult to pursue further.

ThynkLabs commented 2 years ago

Is it working on your hardware?

nopnop2002 commented 2 years ago

mirf-sender

ThynkLabs commented 2 years ago

I checked the modules closely, on one module NRF24L01+ is used, and a chinese clone Si24R1 is used on another module. I am not sure if that is causing the issue.

nopnop2002 commented 2 years ago

About Si24R1

https://forum.arduino.cc/t/si24r1-vs-nrf24l01-working-distance-difference/313158/2