-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scanner program not working on RPi 3B+ #713
Comments
Actually all examples confirm the wiring is established by using if (!radio.begin()) {
Serial.println("radio hardware not responding!");
while (1) {} // hold in infinite loop
} Excluding syntax formatting changes 1 year ago, the scanner.cpp file hasn't been updated since this commit (4 years ago). Also, the scanner.ino Arduino example is from the original library by ManiacBug, and it has only been updated a for posterity since (hence it is located in a folder called "old_backups"). I do see a commit that alters the Arduino scanner.ino example to use the newer constant carrier wave functions, but I don't see similar alteration to the linux scanner.cpp example. The scanner program relies on basic RF hardware test functions
Not really sure what you mean here. Could you post the output from running scanner on Arduino and RPi? Please also include the distance between the nodes running the scanner program (with some relation to proximity of WiFi/Bluetooth devices). |
@2bndy5 I'm not saying you should do it, but maybe a newer Scanner sketch would still be a nice addition amongst the examples? E.g. with optional TFT support like on this video: https://www.youtube.com/watch?v=kapd3wM9hsg |
@Avamander If I were to write a new scanner example,
Nonetheless, I shy away from no challenge... |
Thanks for looking into this. here is the out put RPi3B+
Arduino Nano
|
@OldSurferDude Are both the RPi and Arduino in the same relative location? The output is strange, but I don't know where to even begin because the code for both examples (Linux and Arduino) is identical (aside from the optional Carrier wave output on the Arduino example). My first guess is the port of @Avamander I've been giving it more thought... Instead of a TFT display, we could use a python program (using the cross-platform freindly |
I think I found the problemThe examples only check the RPD bit (bit 0 of register 9) after exiting RX mode. I got the scanner example working on my RPi4 by checking the RPD bit (with According to the plus variant datasheet in section 6.4
and noted in the description of register 9:
According to the non-plus variant datasheet in section 6.1.4
and in Appendix E:
ConclusionI think the RPD/CD bit behaves differently based on what variant of the nRF24 module is being used. I need a non-plus variant to verify that the CD bit can be checked before exiting RX mode. If this cannot be detirmined, then proper modification of the scanner examples should probably employ the |
@2bndy5 You gave me hope so I tried putting stoplistining() after if (radio.testCarrier()) ++values[i]; with no joy. I changed the delay from 128 to 256 and tested stoplistining() after and before, still no joy. :( |
Damn. Really thought that was it. The same technique worked in my CircuitPython library. Back to square one then... |
@OldSurferDude I also noticed that the Linux scanner.cpp example was using a c'tor declaration that only worked with the BCM driver. Could you try cd RF24
git fetch
git checkout test-scanner
./configure --driver=SPIDEV
make
sudo make install
cd examples_linux/extra
make
./scanner I changed the output of |
@2bndy5 I'm not very experienced with the in's-and-out's of github. When I executed the command: Suggestions? |
that's ok. what your error is say is you have made changes that have not been stashed/commited to the RF24 repo (this repo). But you won't be able to commit them directly to the master branch (not even I can do that). option 1 (a little more involved)git stash save "my changes" then you can switch branches with git checkout test-scanner After switching back to master (or whatever branch you stashed your changes on), you can restore your changes using git stash pop option 2 (the easy way out)git clone the RF24 repo into a new folder cd ~
git clone https:/nRF24/RF24.git new-RF24
cd new-RF24
git checkout test-scanner and continue to re-install using the SPIDEV driver with my fixes to the scanner.cpp./configure --driver=SPIDEV
make
sudo make install
cd examples_linux/extra
make
./scanner The fact that you were able to run the scanner.cpp on the master branch tells me that your library install of RF24 was configured to use the BCM driver. (you can see the driver options in by running ./configure --help |
I like the dashes instead of 0's. Alas, no joy. Still, the RF24Mesh_Example on the Nano with RF24Mesh_Example_Master on the RPi3B+ is working like a champ! (albeit, with some packets being lost, but that's another issue with collisions) If you're curious, my project is a solar powered temperature/humidity/soil moisture station + monitor hours of usable sun. Projects like this seem to crop up spontaneously when one is retired. ;) |
😃 I'm such a sucker for puns. I tried pitching a project like that to my college robotics club, but those millennials were too interested in buzzwords like "AI Robot". They also turned down a robotic bartender (!?); I can't relate to kids anymore. |
@TMRh20 can you confirm this is still a problem with your RPi3 (when you get the time of course)? I modified the scanner example for Linux in the test-scanner branch (seemed to be written for the BCM238x driver only). I'm really just looking for a second opinion because I hit a dead end on my first attempt to resolve this, and I don't own a RPi3(B+). |
Scanner works fine on my RPI 3 B.
… On Mar 19, 2021, at 5:23 AM, Brendan ***@***.***> wrote:
@TMRh20 can you confirm this is still a problem with your RPi3 (when you get the time of course)? I modified the scanner example for Linux in the test-scanner branch (seemed to be written for the BCM238x driver only).
I'm really just looking for a second opinion because I hit a dead end on my first attempt to resolve this, and I don't own a RPi3(B+).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Thinking more about this it could be that the device just isn’t picking up anything. The output of the nano is pretty sparse.
… On Mar 19, 2021, at 5:23 AM, Brendan ***@***.***> wrote:
@TMRh20 can you confirm this is still a problem with your RPi3 (when you get the time of course)? I modified the scanner example for Linux in the test-scanner branch (seemed to be written for the BCM238x driver only).
I'm really just looking for a second opinion because I hit a dead end on my first attempt to resolve this, and I don't own a RPi3(B+).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Thanks. I was suspecting that it was something specific to @OldSurferDude setup. |
Unfortunate for the discussion here, but fortunate for me, my project is working very well and I don't dare "fix" it. I did a lot of thrashing that probably left artifacts, both beneficial and malignant. Part of my project will detail everything that I did to create it. To do that documentation, I'll have to start with a NOOB Pi3B+ and confirm that scanner works on it, I have every confidence that it will. Then I will have to confirm all of my code works, too, which is a project in and of itself. ;) |
Having issues with ACK not working correctly? Please see common issues.
Describe the bug
A clear and concise description of what the bug is.
The scanner example compiles and runs on the RPi fine, but the output is 0 with random rare 1. The scanner program for the arduino runs as expected.
Please include:
Additional context
Add any other context about the problem here.
The process to test is
2.in a terminal, move to folder
I use scanner to ensure my wiring is correct. When I got a bad result:
The hardware was good.
I ran GettingStarted on two Nano's with success
In a similar fashion to how I tried to run scanner, I ran GettingStarted on the RPi3b+ and one Nano with success.
From this I conclude that there is a problem with scanner.
Scanner is not important other than to confirm that the wiring is correct. An unsophisticated diagnostic program that does this function would be OK, read and write a register?
This is low priority
The text was updated successfully, but these errors were encountered: