TransWikia.com

Raspberry Pi + NRF24L01 timeout after a period of time

Raspberry Pi Asked by Gordon on January 2, 2021

I am using a Raspberry Pi 2 with a NRF24L01 module… to communicate with several Arduinos. It is working very well … until some point… after days or weeks. Then I get only timeouts.

Not even a normal restart is fixing it. Only a complete shutdown and new system start can bring it back to life.

The software is written in Python 3 with the RF24 library.

I know this are not many informations. But I don’t know what else I could provide. It is basically working… until some random time. This is what is confusing me most. I have no idea what it could be. I couldn’t find any error notice or anything… just the timeout from the script.
And finally the Message “RF24 HARDWARE FAIL: Radio not responding, verify pin connections, wiring, etc.” shows up. But I haven’t touched anything.

Does anybody have a hot tip? Or any idea how to debug further?

One Answer

As for having a have to turn it off and on again I've had that sort of problem when the device that the Raspberry Pi is talking to is set or gets into a bogus state (for me it was a 16x2 LCD module with an PFC8574/74A backpack to provide an I2C interface).

If your problem is really that infrequent, you cannot find out why it is happening and you can detect when it has gone down - then it may be worthwhile arranging for a relay in the power supply to the NRF24L01 that can be operated by the Raspberry Pi. You will want the supply to be wired via the COMM and NC connections so that power flows to the unit when the relay is off. This means that when you detect a problem, you energise the relay for a short time to power down the unit and then de-energise the relay so the unit turns back on and then you can reinitialise it as necessary from the Raspberry Pi. This has the advantage that you only power the relay for a tiny proportion of the time.

One thing that crosses my mind about the conditions that might be causing this is that it is actually from outside of your setup. Perhaps it is a glitch in the powering or electro-magnetic interference from something else in the building? Does it happen when you switch a nearby fluorescent light on or off or a microwave or the central heating boiler lights up? Do you have long and unscreened wires between the Raspberry Pi and the NRF24L01 device? Does the power drop too much when the RPi system is loaded heavily or does your location get brown-outs? etc. etc.

Answered by SlySven on January 2, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP