anvo / rf24-bcm-java

Java wrapper for the nRF24L01 library
9 stars 5 forks source link

Application hangs when doing rf24.begin() #2

Open magx2 opened 7 years ago

magx2 commented 7 years ago

I'm using your code with my RPi 3 (OS: Raspian) and I got problem when running this code:

rf24 = new RF24((short) 22, (short) 8, 32);
rf24.setPayloadSize((short) 128);
rf24.begin();
rf24.setRetries((short) 15, (short) 15);
rf24.startListening();

I'm not sure what is the problem, but I can suspect that wiring RPi <---> RF24 is done badly.

Here you have GPIO for RPi3 Here

Here for RF24, that I'm using:

here

Wiring:

RPi pin name RPi pin # RF24 pin name
3.3 DC power 01 VCC
Ground 06 GND
GPIO25 22 CE
GPIO14 8 CSN
GPIO11 (SPI_CLK) 23 SCK
GPIO19 (SPI_MOSI) 19 MOSI
GPIO09 (SPI_MISO) 21 MISO

Could you validate my this? Also I'm using librf24bcmjava.so compiled by you. Does it will work on RPi3?

Fischline commented 7 years ago

Hi, I was also playing arround with the example and I have the same problem. Are their any solutions yet?

magx2 commented 7 years ago

Try this https://github.com/magx2/rf24-java-jni

Fischline commented 7 years ago

Thank you!

Gereon99 commented 4 years ago

I know this is old, but are there any suggestions on how to proceed when you get that error? Did you @Fischline use @magx2 's library successfuly?

I found out that the reason the program hangs after/while doing RF24.begin() is due to an endless while loop in the bcm2835.c file (at least for me) which also causes the CPU to rise to 100%. Maybe we could get this fixed?

magx2 commented 4 years ago

Did you tried my library?