Hello everyone, I need some help in order to figure out whether I am missing something, or I have faulty hardware.
I would like to avoid doing a very long post, listing all the things I have tried and search for (I am new to Arduino, but I've been an open source developer for +15 years, I know about doing extensive research and experiments before asking )
Hardware:
- Adruino Mega 2560
- Adruino Pro Mini
- Nrf24L01
- Nrf24L01-PA-LNA
The very first thing I tried, was to put the Nrf24L01 in the pro mini, and the more powerful PA-LNA in the Mega, and tried the nrf24_client and nrf24_server examples from the RadioHead library (https://www.engineer2you.com/2017/03/arduino-pro-mini-33v-nrf24l01.html). After trying and failing several combinations, I gave up.
Then, following Nrf24L01-2.4GHz-HowTo - ArduinoInfo I decided to give TMRh20 library a try. The provided examples were a bit more complex than RadioHead ones, but I was able to configure a sender on one side and a receiver on the other, however, absolutely no data going through...
My biggest issue is, that I only had these 2 nrf24 modules, and I am completely unable to find out if I am having issues sending, receiving, or both...
Finally, I found that the TMRh20 library has an example called "scanner", which will iterate over all possible 125 channels, and try to find a carrier on each of them. The beauty of this example is that I can test each module separatedly on their own, since not only I have a WiFi router working on channel 4 for 2.4GHz (2.427 GHz) but I also have all my neighbours with their own routers, sending on different channels as well...
Needless to say, I have the SPI pins properly connected, and the famous 10µF capacitor between the 3.3V and GND pins.
This is what I get printed in the serial console from the scanner example, when using the Nrf24L01 PA-LNA module:
18:17:46.370 ->
18:17:46.370 ->
RF24/examples/scanner/
18:17:46.403 -> STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
18:17:46.403 -> RX_ADDR_P0-1 = 0xe7e7e7e7e7 0xc2c2c2c2c2
18:17:46.403 -> RX_ADDR_P2-5 = 0xc3 0xc4 0xc5 0xc6
18:17:46.403 -> TX_ADDR = 0xe7e7e7e7e7
18:17:46.403 -> RX_PW_P0-6 = 0x00 0x00 0x00 0x00 0x00 0x00
18:17:46.403 -> EN_AA = 0x00
18:17:46.403 -> EN_RXADDR = 0x03
18:17:46.403 -> RF_CH = 0x4c
18:17:46.403 -> RF_SETUP = 0x0f
18:17:46.403 -> CONFIG = 0x0e
18:17:46.403 -> DYNPD/FEATURE = 0x00 0x00
18:17:46.436 -> Data Rate = 2MBPS
18:17:46.436 -> Model = nRF24L01+
18:17:46.436 -> CRC Length = 16 bits
18:17:46.436 -> PA Power = PA_MAX
18:17:46.436 -> 000000000000000011111111111111112222222222222222333333333333333344444444444444445555555555555555666666666666666677777777777777
18:17:46.436 -> 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd
18:17:54.600 -> 4544545443444668898766667676566768575665545567798aa876750006401000000000000000000000000000000000000000000000000000000000000000
18:18:02.796 -> 343454555445565635556564533434343433434343434545487665750003200000000000000000000000000000000000000000000000000000000000000000
18:18:10.959 -> 334343545344343434325454566656465454544343343546575454540003200000000000000000000000000000000000000000000000000000000000000000
18:18:19.121 -> 555454545434444534435543434546565554434334343434344343430004200000000000000000000000000000000000000000000000000000000000000000
18:18:27.324 -> 455565644434343432434343433434355666756464344455566443430003000000000000000000000000000000000000000000000000000000000000000000
18:18:35.487 -> 353354757766453433434343443434354443535566553434434344530005300000000000000000000000000000000000000000000000000000000000000000
And this is what I get, when using the Nrf24L01 module
18:13:40.202 ->
18:13:40.202 ->
RF24/examples/scanner/
18:13:40.235 -> STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
18:13:40.235 -> RX_ADDR_P0-1 = 0xe7e7e7e7e7 0xc2c2c2c2c2
18:13:40.235 -> RX_ADDR_P2-5 = 0xc3 0xc4 0xc5 0xc6
18:13:40.235 -> TX_ADDR = 0xe7e7e7e7e7
18:13:40.235 -> RX_PW_P0-6 = 0x00 0x00 0x00 0x00 0x00 0x00
18:13:40.235 -> EN_AA = 0x00
18:13:40.235 -> EN_RXADDR = 0x03
18:13:40.235 -> RF_CH = 0x4c
18:13:40.235 -> RF_SETUP = 0x0f
18:13:40.235 -> CONFIG = 0x0e
18:13:40.235 -> DYNPD/FEATURE = 0x00 0x00
18:13:40.268 -> Data Rate = 2MBPS
18:13:40.268 -> Model = nRF24L01+
18:13:40.268 -> CRC Length = 16 bits
18:13:40.268 -> PA Power = PA_MAX
18:13:40.268 -> 000000000000000011111111111111112222222222222222333333333333333344444444444444445555555555555555666666666666666677777777777777
18:13:40.268 -> 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd
18:13:48.431 -> 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
18:13:56.630 -> 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
18:14:04.813 -> 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
18:14:12.978 -> 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
18:14:21.142 -> 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
As can be seen with the PA-LNA module, from channel 00 until about 3f, I am getting signals, which I believe are the signals from WiFi routers.
Now, first question:
Am I assuming this correctly? is all of this data coming from WiFi routers?
Also, it is my understanding that I am able to properly read and configure the Nrf24L01 module, however there is no data being received at all... I already tried all possible combinations of PA Levels and Data rates, and still nothing... Does this mean that the module is defective?
Could it be that the Nrf24L01 and the Nrf24L01 PA-LNA have differences in how they should be used, configured, and whatnot?
Any help is greatly appreciated