-
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
Should the scanner example be more promiscuous? #852
Comments
Agreed. I hadn't considered using all the pipes simultaneously; that should definitely provide a better snapshot. One hurtle I noticed was making sure the RX FIFO was flushed after the RPD is asserted. If not, the RPD will remain true despite whether or not there was a new signal detected for the latest RX session. |
I think the addresses should be something that resembles the preamble. This is why I only thought to use 2 pipes in the pyRF24 scanner example. |
Did not realize that.
I was thinking more along the lines of random noise, but I really wasn't sure what to use for the addresses. I think that's a pretty good idea. |
I got the address idea from the reverse engineering readings posted in #798. You should be able capture the most noise by
Last time I ran the pyRF24 scanner example to read the ambient noise (for only 3 seconds), it was very efficient (lots of repeated "data" was output). |
I've been playing with the Linux C++ scanner example, and I think part of the problem is with using
I don't think this I also had to hike the delay to 130 us and read the RPD flag before and after calling radio.startListening()
delayMicroseconds(130);
bool founSignal = radio.testRPD(); // somehow more accurate on Linux
radio.stopListening();
if (foundSignal || radio.testRPD()) {
++values[i];
radio.flush_rx(); // discard packets of noise
} |
Nice! It does seem to pick up more signals, more consistently with your modified code. Wish I had more time to play around with this, but it looks like you have it under control. |
I've been playing around with the addresses (in the pyrf24 scanner), and I got improved responses from using radio.open_rx_pipe(0, b"\x55\x55")
radio.open_rx_pipe(1, b"\xAA\xAA")
radio.open_rx_pipe(2, b"\xA0\xAA")
radio.open_rx_pipe(3, b"\x0A\xAA")
radio.open_rx_pipe(4, b"\xA5\xAA")
radio.open_rx_pipe(5, b"\x5A\xAA") Its just a guessing game because we're really trying to predict the most common first 2 bytes in the ambient noise (based on the limits of the radio's address config), but I figured I'd share. |
I started looking at revising the CirPy lib's scanner example, and now I'm getting crazy responsiveness when using
I tried using the same addresses and algorithm in the C++ revised scanner examples here (on the promiscuous-scanner branch), but the results were only slightly better when I added a 1ms delay between
While thtis is more accurate, it may be too promiscuous. We could start offering calculation options (like averaging detected signals with the number of spectrum passes) for better user comprehension. |
Hehe, yeah that is pretty busy looking. I was just thinking about these scanner examples and finishing them up. |
According to my RF explorer, most of the noise doesn't go over -70 dBm, but it shows the same amount of noise. I'll try it tomorrow night (when everyone is asleep) and see if there's less noise. There are various ways to clean it up for readability. My first idea was to take 5 samples for a channel as it traverses the spectrum and add the averaged result to the array of signal counts. Another way is to take a number (say 16) of samples and overwrite the array of signal counts, but this might look more sporadic to the user. |
I just had a power out. So, I tried the RF explorer set to -90 dBm, and there was significantly less noise. I'm pretty sure the only noise I was picking up (which varied around -90/-95 dBm) was my wifi router (which is on an IPS - battery enabled power strip). I couldn't verify with the scanner example because while examining the RF explorer readout, the power came back on. Instantly, all that noise (lower than -70 dBm) came back. Imagine the snooping I could do if using the nRF52840 with the ESB protocol... |
* adjust scanner examples as discussed in #852 * add new curses python scanner * replace scanner.py w/ curses implementation * update pico scanner example * update arduino scanner * introducing an Arduino scannerGraphic example - supports 2 types of displays (& optional Serial debugginng) 1. SPI display (uses same bus as radio) is tested with an ST7789 (https://www.adafruit.com/product/4383) 2. I2C display is tested with SSd1306 (https://www.adafruit.com/product/326) Use defines to toggle debugging and EITHER (not both) of the displays. * [Arduino scanner] ensure radio is not stuck with CONT_WAVE flag asserted after MCU reset --------- Co-authored-by: TMRh20 <tmrh20@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
I have been playing around with the scanner examples lately, and its hard to tell if this makes a difference, but technically, shouldn't the radio be using a configuration like the following?
Essentially, I think we should configure it to use only 2 bytes for the address and then configure some broad radio addresses like 00 that will pick up anything.
I'm not really sure if it makes a big difference, but theoretically it should pick up more signals with the radio configured this way, no?
The text was updated successfully, but these errors were encountered: