nRF24 / RF24

OSI Layer 2 driver for nRF24L01 on Arduino & Raspberry Pi/Linux Devices
https://nrf24.github.io/RF24
GNU General Public License v2.0
2.19k stars 1.01k forks source link

pyRF24 problem with RP 3 B+ #485

Closed icemanx closed 4 years ago

icemanx commented 5 years ago

Hi,

Currently I am trying to run pingpair_dyn.py on Raspberry Pi 3 B+. I compiled libraries and I am able to run gettingstarted example. However, I'd like to use Python wrapper. I'm running the code with $sudo ./pingpair_dyn.py but program stucks at radio.begin(). No errors shown in the terminal.

I am using bcm2835 drivers.

If you can guide me I'll be very glad. Thanks!

thebluetitan001 commented 5 years ago

Im having this same issue, id love to get some feedback as well

Avamander commented 5 years ago

Can you confirm SPI actually works on your rPi?

icemanx commented 5 years ago

Yes I can confirm SPI is working. I am tested the example gettingstarted.cpp between Raspberry and Arduino.

JakFourie commented 5 years ago

This fixed my issues with Raspberry Pi 3 B+ and Raspberry Pi 4 In lib_nrf24.py in function:

def begin(self, csn_pin ... after self.spidev.openadd:

self.spidev.max_speed_hz = 4000000
homoroselaps commented 4 years ago

I have the same issue right now. Have an Raspberry Pi 1 rev2 model B the cpp example works with sudo ./gettingstarted the pingpair_dyn.py example shows following output:

pyRF24/examples/pingpair_dyn/
Traceback (most recent call last):
  File "pingpair_dyn.py", line 67, in <module>
    radio.begin()
RuntimeError: unidentifiable C++ exception

Update: got it working with sudo python3 pingpair_dyn.py