Arduino Forum

Using Arduino => Networking, Protocols, and Devices => Topic started by: cpixip on Mar 09, 2011, 02:45 pm

Title: Poor Man's 2.4 GHz Scanner
Post by: cpixip on Mar 09, 2011, 02:45 pm
This little weekend project is a 2.4 GHz Scanner which can be used to
display interference signals in WLAN applications. It only requires
an Arduino, a common nRF24L01p-breakout board and software.

RF-activity is piped through the Arduino's serial interface and displayed
in a kind of waterfall display on any terminal application. The amplitude
in the different channels are displayed with the help of a simple
ASCII-greyscale mapping. Here's an example of what can be expected.

(http://www.pixelcircus.com/arduino/Bluetooth-Interference.png)

The picture shows the output of the scanner, displaying the interference
of a switched on BlueTooth-Device with a Channel-10 WLAN device, on the
Arduino-Terminal (colors were added just for clarity).

The scanner also shows interference from microwave ovens or wireless
surveilance cameras.

As the nFR24L01 only has a single bit for indicating RF-reception and the
output was desired to be readable on a simple terminal device, a few tricks
were necessary to create a decent display of the 2.4 GHz band. However, even
the  shifting of the carrier of a WLAN spot can clearly be seen in the waterfall
display.

As commom nFR24L01 libraries do not interface well with SPI-lib of the current
Arduino IDE (22), I wrote the necessary interface from scratch. Some timing is
pushing the limit of the device(s), as I wanted to scan as fast as possible, but
they are working reliably with my setup.

Basically, the setup is very simple. The nRF24L01p is a SPI-device, and you
have to run cables from the Arduino-specific pins to the nRF24L01p-breakout
board. Specifically, the connections are


SS       : Arduino Pin 10   -> Breakout Board CSN
MOSI     : Arduino Pin 11   -> Breakout Board MOSI
MISO     : Arduino Pin 12   -> Breakout Board MISO
SCK      : Arduino Pin 13    -> Breakout Board SCK


Furthermore, do not forget to connect the CE line which is required to drive
the nRF24L01 to RX and also triggers the RF power reading. It is defined in
the program as Arduino Pin 9:


CE       : Arduino Pin 9      -> Breakout Board CE


Here's an image of my actual setup, using a Boarduino instead of an orginal
Arduino.

(http://www.pixelcircus.com/arduino/DSC09806c.jpg)

Finally, here's the Arduino code:
Code: [Select]

#include <SPI.h>

// Poor Man's Wireless 2.4GHz Scanner
//
// uses an nRF24L01p connected to an Arduino
//
// Cables are:
//     SS       -> 10
//     MOSI     -> 11
//     MISO     -> 12
//     SCK      -> 13
//
// and CE       ->  9
//
// created March 2011 by Rolf Henkel
//

#define CE  9

// Array to hold Channel data
#define CHANNELS  64
int channel[CHANNELS];

// greyscale mapping
int  line;
char grey[] = " .:-=+*aRW";

// nRF24L01P registers we need
#define _NRF24_CONFIG      0x00
#define _NRF24_EN_AA       0x01
#define _NRF24_RF_CH       0x05
#define _NRF24_RF_SETUP    0x06
#define _NRF24_RPD         0x09

// get the value of a nRF24L01p register
byte getRegister(byte r)
{
 byte c;
 
 PORTB &=~_BV(2);
 c = SPI.transfer(r&0x1F);
 c = SPI.transfer(0);  
 PORTB |= _BV(2);

 return(c);
}

// set the value of a nRF24L01p register
void setRegister(byte r, byte v)
{
 PORTB &=~_BV(2);
 SPI.transfer((r&0x1F)|0x20);
 SPI.transfer(v);
 PORTB |= _BV(2);
}
 
// power up the nRF24L01p chip
void powerUp(void)
{
 setRegister(_NRF24_CONFIG,getRegister(_NRF24_CONFIG)|0x02);
 delayMicroseconds(130);
}

// switch nRF24L01p off
void powerDown(void)
{
 setRegister(_NRF24_CONFIG,getRegister(_NRF24_CONFIG)&~0x02);
}

// enable RX
void enable(void)
{
   PORTB |= _BV(1);
}

// disable RX
void disable(void)
{
   PORTB &=~_BV(1);
}

// setup RX-Mode of nRF24L01p
void setRX(void)
{
 setRegister(_NRF24_CONFIG,getRegister(_NRF24_CONFIG)|0x01);
 enable();
 // this is slightly shorter than
 // the recommended delay of 130 usec
 // - but it works for me and speeds things up a little...
 delayMicroseconds(100);
}

// scanning all channels in the 2.4GHz band
void scanChannels(void)
{
 disable();
 for( int j=0 ; j<200  ; j++)
 {
   for( int i=0 ; i<CHANNELS ; i++)
   {
     // select a new channel
     setRegister(_NRF24_RF_CH,(128*i)/CHANNELS);
     
     // switch on RX
     setRX();
     
     // wait enough for RX-things to settle
     delayMicroseconds(40);
     
     // this is actually the point where the RPD-flag
     // is set, when CE goes low
     disable();
     
     // read out RPD flag; set to 1 if
     // received power > -64dBm
     if( getRegister(_NRF24_RPD)>0 )   channel[i]++;
   }
 }
}

// outputs channel data as a simple grey map
void outputChannels(void)
{
 int norm = 0;
 
 // find the maximal count in channel array
 for( int i=0 ; i<CHANNELS ; i++)
   if( channel[i]>norm ) norm = channel[i];
   
 // now output the data
 Serial.print('|');
 for( int i=0 ; i<CHANNELS ; i++)
 {
   int pos;
   
   // calculate grey value position
   if( norm!=0 ) pos = (channel[i]*10)/norm;
   else          pos = 0;
   
   // boost low values
   if( pos==0 && channel[i]>0 ) pos++;
   
   // clamp large values
   if( pos>9 ) pos = 9;
 
   // print it out
   Serial.print(grey[pos]);
   channel[i] = 0;
 }
 
 // indicate overall power
 Serial.print("| ");
 Serial.println(norm);
}

// give a visual reference between WLAN-channels and displayed data
void printChannels(void)
{
 // output approximate positions of WLAN-channels
 Serial.println(">      1 2  3 4  5  6 7 8  9 10 11 12 13  14                     <");
}

void setup()
{
 Serial.begin(57600);
 
 Serial.println("Starting Poor Man's Wireless 2.4GHz Scanner ...");
 Serial.println();

 // Channel Layout
 // 0         1         2         3         4         5         6
 // 0123456789012345678901234567890123456789012345678901234567890123
 //       1 2  3 4  5  6 7 8  9 10 11 12 13  14                     |
 //
 Serial.println("Channel Layout");
 printChannels();
 
 // Setup SPI
 SPI.begin();
 SPI.setDataMode(SPI_MODE0);
 SPI.setClockDivider(SPI_CLOCK_DIV2);
 SPI.setBitOrder(MSBFIRST);
 
 // Activate Chip Enable
 pinMode(CE,OUTPUT);
 disable();
 
 // now start receiver
 powerUp();
 
 // switch off Shockburst
 setRegister(_NRF24_EN_AA,0x0);
 
 // make sure RF-section is set properly
 // - just write default value...
 setRegister(_NRF24_RF_SETUP,0x0F);
 
 // reset line counter
 line = 0;
}

void loop()
{
 // do the scan
 scanChannels();
 
 // output the result
 outputChannels();
 
 // output WLAN-channel reference every 12th line
 if( line++>12 )
 {
   printChannels();
   line = 0;
 }
}



... have fun.
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: forest on May 14, 2011, 08:50 pm
VERY helpful tool, thanks!  :)
works out of the box.
i used it for debugging my initial nRF24L01+ setup (wasn't sure if the other transceiver was sending) and found it very helpful for quickly judging antenna quality (having one arduino sending garbage and the other running your program)
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: TerryKing on May 23, 2011, 12:10 pm
Hi,
NICE! Got it working in 5 mins with some jumpers..

Having my Nokia N78 scan for and run on my nearby WiFi network gave me a lot of activity.

With the phone 5 cm from the transceiver antenna I saw lots of wideband low-intensity dots.

Question: Can / should your communications routines be used instead of those in the Playground examples??  How might they be used for point-to-point data transmission?

Thanks!

Regards, Terry King

terry@yourduino.com
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: cpixip on May 23, 2011, 08:14 pm
Hi Terry, Forest - thanks for your nice feedback.

Acutally, the MIRF-lib available in the playground has been updated in the meantime to use the SPI-lib build into the Arduino 22 IDE. I think the playground library would benefit from some nice and simple examples, making the great features of the nRF24L01+ more accessible to  everybody.

Personally, I did not have yet the time to expand my own lib to a state were it would be useful. And due to time restraints, it will take me some additional months until I will be able to finish this one. I will post it here in the forum as soon as I have something workable.

However, there is another nRF24L01+/Arduino library available on the net which features a slightly different design and interface and which might be interesting for people using the Arduino/nRF24L01+ combination. It can be found here: http://maniacbug.github.com/RF24/index.html (http://maniacbug.github.com/RF24/index.html).

Furthermore, there is also a nice nRF24L01-library design for the mbed-platform at http://mbed.org/cookbook/nRF24L01-wireless-transceiver (http://mbed.org/cookbook/nRF24L01-wireless-transceiver), also with a slightly different approach, which could easily be adapted for the Arduino.

Currently, only the mbed-lib does feature direct access to important parameters of the Enhanced-Shockburst mode, which is in my point of view the most convenient and important feature of these chips. Another nice property of a full lib would probably be a simple, automatic packaging mechanism, making oneself somewhat more independent from the maximum 32 byte packet size of the  nRF24L01+ ... - I am thinking along these lines, but did not yet come up with a good implementation idea here.

Terry: you posted in another thread that you are researching the possibilities of an enhanced nRF24L01+ with power amplifiers and/or low-noise receivers. I'd love to hear about your results!

Best, cpixip

Title: Re: Poor Man's 2.4 GHz Scanner
Post by: TerryKing on May 23, 2011, 08:55 pm
@cpixip thanks a lot for your work on this stuff; it's given me a leg up.

I have 2 of the "1000 meters distance NRF24L01 + PA + LNA wireless module" (As translated from the Chinese...) coming; we know Mr. Tang who runs this TaoBao (Chinese Ebay) shop.

Take a look here:  http://item.taobao.com/item.htm?id=9107958905&frm= (http://item.taobao.com/item.htm?id=9107958905&frm=)  (Chinese) , but use Google Translate or run Google Chrome.

I like the idea that we have a transceiver that has 3 levels of price and performance with exact same software!

I THINK the prices will be something like $5 - plain nRF24L01 with PCB antenna  ,  $12 with Power Amplifier +15 dBm - sma RF connector, $18 with Power Amp and Low-Noise receiver preamp,  Antenna for last 2 about $1.50   

But I want to get good working Arduino examples before I start selling these to the newbies and having people be unhappy...

I should have them in about a week....

Title: Re: Poor Man's 2.4 GHz Scanner
Post by: maniacbug on May 24, 2011, 05:59 am

However, there is another nRF24L01+/Arduino library available on the net which features a slightly different design and interface and which might be interesting for people using the Arduino/nRF24L01+ combination. It can be found here: http://maniacbug.github.com/RF24/index.html (http://maniacbug.github.com/RF24/index.html).


By the way, I am actively developing this library.  Feel free to IM if there's anything you need on it.  The goal is to completely cover the chip's entire usage.  I'm getting there.
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: TerryKing on May 24, 2011, 06:48 am
Hi James/Maniac!

Glad to hear that!  I'm reading thru your ping-pong examples now and will try to get that running soon.

I'd like to talk about what a good set of examples for newbies would be, and how that all might progress. 

I'm working on documenting a lot of Arduino stuff to make it approachable. Example: http://arduino-info.wikispaces.com/Nrf24L01-Poor+Man%27s+2.4+GHz+Scanner (http://arduino-info.wikispaces.com/Nrf24L01-Poor+Man%27s+2.4+GHz+Scanner)

I'd like to get a couple of examples based on your work working and documented. 

One might be a "control of the remote device's LEDs and Motors", with feedback??

One might be "Transmit remote sensor data to base" ??

What do you think would be good examples, and how might a user-friendly set of functionality be exposed for new users??

Thanks for your good work on this; your code is very well done...

Regards, Terry
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: maniacbug on May 24, 2011, 07:19 am
Thanks!

These are all great ideas.  It is helpful to hear some of these ideas for what would help new people.  My own usage of the library has grown rather monstrous and complex, so I'm kind of losing perspective.  

The problem is, as the usefulness increases so does the complexity, and then inversely goes the approachability.

My full-blown usage is a multi-hop mesh network with sensor nodes reporting readings back to a base unit that logs to a MySQL database.  But, uh, good luck to new users figuring that all out.

I have this notion of writing a higher-level library that sits atop the RF24 library, and manages the mesh network details.  That might make the complex stuff more approachable.

I'll try working up some examples based on your suggestions, though.  If you think of more details on how a user might actually do something with those parts, do feel free to expound.
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: TerryKing on May 24, 2011, 07:56 am
Hi, Wow, cool applications.. That should be really extensible with long-range radios.. like over a campus.

There are two levels of users to support. I am doing a workshop with guys here at the King Abdullah University of Science and Technology who are Supercomputer admins, Algorithm researchers, Unix/SQL weenies, BioDatabase guys etc.  Then I have 9th graders.  I think there can be a higher level API with the lower levels exposed so a user can learn and do more complex things. 

So let's think about it a bit and try to figure out the appropriate levels...

Thanks for your work and your willingness!
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: mattcf on May 25, 2011, 07:01 am
This works great.  (wondering the first thing I was going to build with these things.)

I made sure that all WiFi, Bluetooth, and (anything  around 2.4Ghz) was off. 
(I only got a few minor blips from some random device.)
Then I turned on the microwave.
On all chanels, I got very heavy interfierence.

So you can also put this as a microwave detector.

Awesome project.
[/shadow]
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: maniacbug on May 26, 2011, 06:17 am
Hey, sorry for hijacking the thread, above.  I posted a new thread http://arduino.cc/forum/index.php/topic,62222.0.html for RF24, so as to keep this one on-topic.
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: cpixip on Jun 01, 2011, 09:24 pm
Thanks for all the nice feedback!

Just a short note I forgot to mention in the intial post: the above listed scanner program switches off the Enhanced Shockburst feature of the nRF24L01+. As all libs available currently for nRF24L01+ do not initialize this feature of the chip correctly on start-up, you need to power down your circuit once before uploading and using another program/lib in order to reset the nRF24L01+. Otherwise programs which use the Enhanced Shockburst feature (basically all libs available for the nRF24L01+ do this) won't run.

The reason is that a simple reset (as happening for example when uploading new programs with the Arduino IDE) won't reset the nRF24L01+ to it's factory setting. However, simply unconnecting the power-supply and/or USB for a few seconds will do the trick.

Have fun! - cpixip
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: Kaouthia on Jun 01, 2011, 09:35 pm

new people

Hey, That's me! :)

I just got a pair of transceivers in the mail this morning from an eBay seller in China ($12.80 for 2 with free shipping).  Don't need them yet, but figured that at that price they're be worth getting to play around with at some point, so will be keeping an eye on this thread (and Maniac's newly created one). :)

Thanks for all the hard work guys.
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: maniacbug on Jun 02, 2011, 05:01 am

As all libs available currently for nRF24L01+ do not initialize this feature of the chip correctly on start-up, you need to power down your circuit once before uploading and using another program/lib in order to reset the nRF24L01+.


Yes, indeed.  I suppose this could be stated more broadly.  The available libs do not reset the chip registers to the factory state on startup.  If you want the factory state, you have to power cycle.  Not sure this is "incorrect".
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: cpixip on Jun 02, 2011, 09:44 am
Hi maniacbug -


...  I suppose this could be stated more broadly.  The available libs do not reset the chip registers to the factory state on startup.  If you want the factory state, you have to power cycle.  Not sure this is "incorrect".


... - as we are doing this for a hobby, it's probably ok. Just need to remember that only a power cycle gets your device in a properly defined state.

On the other hand, from a design point of view, any lib (for any device, not just the nRF24L01+) which only works if the device is in a certain state on start-up will fail under some circumstances.

Clearly something you want to avoid if that device is mission-critical ... ;)

A lib which does not a full initialization will probably also fail in an application featuring a watchdog function - as this won't "reset" external chips properly when a restart is occuring. So it maybe a good idea to mention this fact for other users of a lib.

My code of the 2.4 GHz scanner above does of course violate this as well - it does assume that the nRF24L01+ is in the factory reset state when it starts. For a hobby project, I think this is ok. You just need to be aware that a simple reset won't get the nRF24L01+ back into a working state for other libraries/programs... :)

Best, cpixip.
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: jengil on Jan 24, 2014, 01:12 am
Hey thanks for making such a great tool - When i try to run this code i see a Series of M or Rs across the channels with no color - I really was unsure how to interpret it or if it is working correctly.  Any help would be appreciated if this code still works on the current Arduino platform.  Thanks again
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: cpixip on Jan 27, 2014, 05:23 pm
Thanks for your comments. The colors were added in the inital example just for marking the different 2.4GHz component seen. Of course there are no colors available in the terminal prg of the Arduino IDE.

The amount of power in each channel is displayed in ASCII grey scale. This is an old technique from the time when lineprinters were the primary output of mainframe computers. Have a try on your favorite search engine to find out more (here's one link which came up http://paulbourke.net/dataformats/asciiart/ (http://paulbourke.net/dataformats/asciiart/)).

There is no reason why the code should not work with current Arduinos as the code uses only standards. I have however no way of testing the UNO or newer devices - I do not own any of these.

In case you have doubts, try any of the newer RF24-libraries. Most of them feature a scanner example based on my old code. These libraries are pretty much up-to-date.

In any case - have fun!
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: RonH1212 on Mar 09, 2014, 09:27 pm
The Poor Man's 2.4 GHz Scanner work great on my UNO, but it will not work on the Mega2560.
I changed the following in the program #define CE 53

Where do I make the changes for CSN 48,  MOSI 51, MISO 50,  SCK 52    ?
Any help would be great
Ron
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: assadollahi on Jun 08, 2014, 09:35 pm
really great work and very inspiring. i'm thinking about using wifi signals for indoor positioning.
as i understand, your design is not actually a wifi transmitter but really more like a listener and
is not able to communicate via standard wifi.
i could imagine that this is actually a bonus since probably the power consumption is less compared
to a fully fledged wifi connector such as sparkfun's wifly.

do you have any thoughts / tips /caveat about using your setup for indoor positioning? for example,
the network activity (if that correlates with the power on different bands, i don't know) should certainly
not be used, but actually the network strenght of the different routers around.
also, we possibly would need to find out about temporary signals and stationary signals (wifii routers
are pretty stationary and continous, bluetooth may move or be off, microwaves don't move but are
on and off at unpredictable times).

finally: would it make sense to use two such scanners on either end of the bot so that one could have
a "stereo" view on the singals? or are these wave lengths / the sample rate of the device not suitable?
sorry, i'm a newbie on all of this, but to use wifi signals as a reference for sensor fusing is really tempting.
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: findftp on Jun 16, 2014, 11:20 pm
Hello,

Very nice scanner! I really would like to use it.
I want to use the nrf24L01 in combination with a 2.4Ghz camera and want to see the free zone to set the channel.
I have two breakout board which both do not seem to work with the code.
I hooked them up on an Arduino mini pro and an Arduino uno to see if that was the problem.
I'm sorry for the long paste, but they both show something like:
(look at the end of the output, it finally produces something, but it is very little)
What am I doing wrong?


Starting Poor Man's Wireless 2.4GHz Scanner ...

Channel Layout
>      1 2  3 4  5  6 7 8  9 10 11 12 13  14                     <
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
>      1 2  3 4  5  6 7 8  9 10 11 12 13  14                     <
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
>      1 2  3 4  5  6 7 8  9 10 11 12 13  14                     <
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
>      1 2  3 4  5  6 7 8  9 10 11 12 13  14                     <
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
>      1 2  3 4  5  6 7 8  9 10 11 12 13  14                     <
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
>      1 2  3 4  5  6 7 8  9 10 11 12 13  14                     <
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|  *****-W*                                                      | 3
>      1 2  3 4  5  6 7 8  9 10 11 12 13  14                     <
|              ::::WW+++::    :+++:++++                          | 4
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
>      1 2  3 4  5  6 7 8  9 10 11 12 13  14                     <
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
|                                                                | 0
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: cpixip on Oct 31, 2014, 11:58 am
- the nrf24 might not working properly. You might check this by creating some 2.4GHz traffic close to the nrf24. Put it in close vincinity of your WLAN (make sure it's on ;). Putting the nrf24 in the vincinity of a microwave (but don't put it into the microwave!!!) and switching that on for a few seconds should give you also a strong signal.
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: cpixip on Oct 31, 2014, 12:02 pm
do you have any thoughts / tips /caveat about using your setup for indoor positioning?
this is not a very precise 2.4GHz scanner as the nrf24 delivers only a single bit, "signal strength above threshold" (or not). You won't be able to use it for such a purpose. Other chips have a better output of reception strength, you might google around for these. This tiny hack is just good to spot channels of low activity, nothing more... :smiley-cool:
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: rayshobby on Dec 31, 2014, 05:37 am
Here is a blog post about implementing the poor man's 2.4G scanner using the RFToy:
http://weatherhelge.wordpress.com/2014/12/31/2-4ghz-scanner-using-rftoy/
 (http://weatherhelge.wordpress.com/2014/12/31/2-4ghz-scanner-using-rftoy/)the built-in OLED screen that comes with the RFToy is quite handy for display.
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: Divyeshpro on May 27, 2015, 05:42 pm
Hello Guys,

I still did not understand how this grey scale waterfall display works. I mean what does the numbers beside each line represent on the display?  Can some one give quick explanation of code?

its kind of urgent as I am using this test in my project.

Thanks....
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: mactsk on Dec 10, 2015, 11:35 pm
Hi what is the meaning of the numbers on the right side? at first it seems the strength of the signal, but i am unsure.
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: Jardal on Sep 28, 2016, 01:50 am
Here is clone with LCD1602a:
http://blog.riyas.org/2014/06/a-simple-24ghz-spectrum-analyser-arduino-lcd-shield.html

And here is code for communication density analysis. It is possible to show live spectrum (SW_MODE = 0), but packets are very short and for exploration of communication density is needed statical display rather with data collection over some time.

-64dB threshold is good for this case. Just place device for some time (half hour or so) near powered-off wifi-AP to check communication density at AP place. Then leave device (for half hour or so) at place from where you will connect to AP (AP still powered off). From both diagrams you can explore free channels right for your AP. If your AP is within one room, then you can make only one measurement.

Used Arduino Pro Micro 3.3V/8MHz, NRF module powered from Arduino VCC, Arduino and LCD1602a(5V) powered from RAW (3.7V Li-ion battery LIR2032 + TP4056 charger module hacked to 30mA charge current). Power consumption about 20mA (without backlight).

Compiler: Arduino 1.6.7
Code: [Select]

 /* A simple 2.4GHZ spectrum analyser with nrf24l01,character lcd and an arduino
  * 
  * http://blog.riyas.org/2014/06/a-simple-24ghz-spectrum-analyser-arduino-lcd-shield.html
  *
  * Connect the nrf module to the spi pins (10,11,12,13)  and A1 (for CE) and an lcd to pin 8,9,4,5,6,7
  */

/*
 *  exact wifi channells map to 16 bars: (0), 1...13, (hole), 14
 */
 
 #include <SPI.h> 
 #include <LiquidCrystal.h> 
 // The LCD is conected to pins RS-8, EN-9, D4-4, D5-5, D6-6, D7-7, RW-GND, VO-GND 
 LiquidCrystal lcd(8, 9, 4, 5, 6, 7); 
 byte minibars[8][8]; 
 //credits to Poor Man's Wireless 2.4GHz Scanner 
 // credits to all others 
 // uses an nRF24L01p connected to an Arduino 
 //   
 // Cables are: 
 //   CS    -> 10 
 //   MOSI   -> 11 
 //   MISO   -> 12 
 //   SCK   -> 13 
 // and CE    -> A1 
 // 
 // Modified from original code: March 2011 by Rolf Henkel 
 // 
 #define CE A1 
 // Array to hold Channel data 
 #define CHANNELS 94 
 int channel[CHANNELS]; 
 // nRF24L01P registers we need 
 #define _NRF24_CONFIG   0x00 
 #define _NRF24_EN_AA    0x01 
 #define _NRF24_RF_CH    0x05 
 #define _NRF24_RF_SETUP  0x06 
 #define _NRF24_RPD     0x09 
 //SoftSPI<SOFT_SPI_MISO_PIN, SOFT_SPI_MOSI_PIN, SOFT_SPI_SCK_PIN, SPI_MODE> spi; 
 
byte CH_LEVEL[16]; 

byte scan_time = 255;  // minimum 130 for system + 40 for AGC - sensitivity to packet density (cca 250us per packet)

byte SW_MODE = 1; // 0 = live wifi scanner   1 = spectrum occupy
byte SCAN_COUNT = 32; // No of scans per one display - sensitivity to density
                      // SCAN_COUNT * 5 (MHz in ordinary channel) <256
byte DISP_ZOOM = 1;  // ZOOM level 0=1, 1=2, 2=4, 3=8, 4=16, 5=32 ...
                     // full "strength" to 15 levels, but some saturation wanted

void LCDdemo(){   // Built the characters for bars. 
  for (byte j=0; j<=7; j++)   
  { 
   for (byte i=0; i<=7; i++) 
   { 
    if (i<=j) 
    { minibars[j][7-i] = B01110;}   
    else 
    { minibars[j][7-i] = 0;} 
   } 
  }   
  for (byte i=0; i<=7;i++) 
  { 
   lcd.createChar(i, minibars[i]); 
  } 
  lcd.begin(16, 2);     
  for (byte j=0; j<=7;j++) 
  { 
   lcd.setCursor(j, 0); 
   lcd.write(j); 
   lcd.setCursor(j, 1); 
   lcd.write(7);   
  } 
}


byte getRegister(byte r)   // get the value of a nRF24L01p register 
 { 
  byte c; 
  PORTB &=~_BV(2); //D10 
  //PORTC &=~_BV(1); //analogue 1 as SS 
  c = SPI.transfer(r&0x1F); 
  c = SPI.transfer(0);   
  PORTB |= _BV(2); 
  //PORTC |= _BV(1); //analogue 1 as SS 
  return(c); 
 } 
 

void setRegister(byte r, byte v)   // set the value of a nRF24L01p register 
 { 
  PORTB &=~_BV(2); 
  //PORTC &=~_BV(1); 
  SPI.transfer((r&0x1F)|0x20); 
  SPI.transfer(v); 
  PORTB |= _BV(2); 
  //PORTC |= _BV(1); 
 } 

 
void powerUp(void)  // power up the nRF24L01p chip 
 {setRegister(_NRF24_CONFIG,getRegister(_NRF24_CONFIG)|0x02); 
  delayMicroseconds(130); 
 } 
 
void powerDown(void){setRegister(_NRF24_CONFIG,getRegister(_NRF24_CONFIG)&~0x02); }    // switch nRF24L01p off 
void enable(void){  PORTC |= _BV(1);}    // enable RX   
void disable(void){PORTC &=~_BV(1);}     // disable RX 

void setRX(void)   // setup RX-Mode of nRF24L01p 
{ setRegister(_NRF24_CONFIG,getRegister(_NRF24_CONFIG)|0x01); 
  enable(); 
  delayMicroseconds(scan_time);    // the recommended delay of 130 usec 



void scanChannels(void)   // scanning all channels in the 2.4GHz band 
{ disable(); 
  for( byte j=0 ; j<= SCAN_COUNT ; j++)
   {for( byte i=0 ; i<CHANNELS ; i++) 
    {
    setRegister(_NRF24_RF_CH,i);  // select a new channel 
    setRX();  // switch on RX 
    disable();        // this is actually the point where the RPD-flag   is set, when CE goes low 
    if( getRegister(_NRF24_RPD)>0 )  channel[i]++;    // read out RPD flag; set to 1 if  received power > -64dBm 
   } 
  } 
 } 

  /*      https://upload.wikimedia.org/wikipedia/commons/thumb/8/84/NonOverlappingChannels2.4GHzWLAN-en.svg/720px-NonOverlappingChannels2.4GHzWLAN-en.svg.png
    WIFI MHz  NRF-CH  od-do
    -   2401     1    1-8
    1   2412    12    9-14
    2   2417    17    15-19
    3   2422    22    20-24
    4   2427    27    25-29
    5   2432    32    30-34
    6   2437    37    35-39
    7   2442    42    40-44
    8   2447    47    45-49
    9   2452    52    50-54
    10  2457    57    55-59
    11  2462    62    60-64
    12  2467    67    65-69
    13  2472    72    70-74
    --  2477    77    75-79
    14  2484    84    80-94

    802.11b - 20MHz (22MHz), ch. 1,6,11,14 - end 2.494 GHz
          g/n       16,25MHz (20MHz)   1,5,9,13 - end 2.4835 GHz
          n         33,75MHz (40MHz)    3,11  - end 2.4835 GHz
   */

void outputChannels(void) 

  feedChannel(0, 1, 8);
  feedChannel(1, 9, 14);
  feedChannel(2, 15, 19);
  feedChannel(3, 20, 24);
  feedChannel(4, 25, 29);
  feedChannel(5, 30, 34);
  feedChannel(6, 35, 39);
  feedChannel(7, 40, 44);
  feedChannel(8, 45, 49);
  feedChannel(9, 50, 54);
  feedChannel(10, 55, 59);
  feedChannel(11, 60, 64);
  feedChannel(12, 65, 69);
  feedChannel(13, 70, 74);
  feedChannel(14, 75, 79);
  feedChannel(15, 80, 94);


void feedChannel(byte CH_wifi, byte CH_low, byte CH_high) 
 { 
  byte strength = 0; 
  for( byte i=CH_low ; i<=CH_high ; i++){ 
   strength = strength + channel[i]; 
   if(CH_LEVEL[CH_wifi] < strength) CH_LEVEL[CH_wifi] = strength;
   if (SW_MODE == 0) {plot_minibars(CH_wifi, strength);}
   else              {plot_minibars(CH_wifi, CH_LEVEL[CH_wifi]);}
   channel[i] = 0;
  }



 void plot_minibars(byte location, byte strngth) 
 { 
  byte str_disp = strngth >> DISP_ZOOM; //ZOOM
  if (str_disp>15) 
  { 
   lcd.setCursor(location, 1); 
   lcd.write(7); 
   lcd.setCursor(location, 0); 
   lcd.write(7); 
  } 
  else if (str_disp>7) 
  { 
   lcd.setCursor(location, 1); 
   lcd.write(7); 
   lcd.setCursor(location, 0); 
   lcd.write(str_disp-8);   
  } 
  else 
  { 
   lcd.setCursor(location, 1); 
   lcd.write(str_disp); 
   lcd.setCursor(location, 0); 
   lcd.write(32);   
  } 
 } 




//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

void setup() 
 { 
  LCDdemo();
 
  // Setup SPI 
  SPI.begin(); 
  SPI.setDataMode(SPI_MODE0); 
  SPI.setClockDivider(SPI_CLOCK_DIV2); 
  SPI.setBitOrder(MSBFIRST); 

  pinMode(CE,OUTPUT);    // Activate Chip Enable 
  disable(); 
  powerUp();    // now start receiver 
  setRegister(_NRF24_EN_AA,0x0);    // switch off Shockburst 
  // make sure RF-section is set properly   
  // - just write default value...   
  setRegister(_NRF24_RF_SETUP,0x0F);   


void loop()   
 {   
  scanChannels();   
  outputChannels();   
 } 

Title: Re: Poor Man's 2.4 GHz Scanner
Post by: clbiggs99 on Oct 28, 2016, 02:00 pm
I keep getting the following error on the next to last "}"; the end of the "if" statement at the very end;
stray '\302' in program; \302 maps to a period; but there isn't one anywhere near this section. Any suggestions?
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: arduinorotto on Dec 18, 2016, 05:26 pm
I've portetd this to the SE8R01. This more or less nRF24L01(+)-compatible chip has in its RPD register not a simple flag, it has values for the dBm!

Code: [Select]

#include <SPI.h>

//  
//    CE       -> 9         -> PORTB 1  

//    used an configured by arduinos SPI-lib
//    SS       -> 10        -> PORTB 2   CSN on the SE8R01. SPI SlaveSelect/ChipSelect
//    MOSI     -> 11         SPI
//    MISO     -> 12         SPI
//    SCK      -> 13         SPI

//    IRQ   ->  not needed -> not used


#define CE  9
#define CS 10

#define CHANNELS  126      // number of channels
int8_t channel[CHANNELS];  // Array to hold Channel data

// nRF24L01P registers we need. are the same on the SE8R01
#define _NRF24_CONFIG      0x00  
#define _NRF24_EN_AA       0x01  
#define _NRF24_RF_CH       0x05  
#define _NRF24_RF_SETUP    0x06  
#define _NRF24_RPD         0x09  


byte getRegister(byte r) { // get the value of a register
  byte c;

 //digitalWrite(10,LOW);         //too slow
 PORTB &=~_BV(2); //pin 10 = SS  //faster
 c = SPI.transfer(r & 0x1F);     // only lower 5 Bit are relevant
 c = SPI.transfer(0);
 
 //digitalWrite(10,HIGH);       // too slow
 PORTB |= _BV(2);

 return c;
}


void setRegister(byte r, byte v) { // set the value of a register
 

 PORTB &=~_BV(2);  //digitalWrite(CS,LOW);
 SPI.transfer((r&0x1F)|0x20);
 SPI.transfer(v);
 PORTB |= _BV(2);  //digitalWrite(CS,HIGH);
}


void powerUp(void) {  // power up the  chip
 setRegister(_NRF24_CONFIG,getRegister(_NRF24_CONFIG)|0x02);
 delayMicroseconds(130);     // works. iirc in the datasheet the value must be higher
}

// switch SE8R01 off
void powerDown(void){
 setRegister(_NRF24_CONFIG,getRegister(_NRF24_CONFIG)&~0x02);
}

// enable RX
void enable(void){
   PORTB |= _BV(1);    // Pin 9 = CE HIGH  digitalWrite(CE,HIGH);
  
  
}

// disable RX
void disable(void){
   PORTB &=~_BV(1);   // Pin 9 = CE  LOW
   //digitalWrite(CE,LOW);
}

// setup RX-Mode of SE8R01
void setRX(void){
 setRegister(_NRF24_CONFIG,getRegister(_NRF24_CONFIG)|0x01);
 enable();
 // this is slightly shorter than
 // the recommended delay of 130 usec
 // - but it works for me and speeds things up a little...
 //delayMicroseconds(100);  
 delayMicroseconds(210);     // datasheet says 210
}


void scanChannels(void){
 disable();
 setRX();  // once called is enough we put it here outside the for loop
 
 
   for( int i=0 ; i<CHANNELS ; i++)   {  
     // select a new channel
     setRegister(_NRF24_RF_CH,i);

     // switch on RX
     //setRX();  unnecessary see call outside the for-loop above

     // wait enough for RX-things to settle
     //delayMicroseconds(40);  // we do not need this its in setRX()
     delayMicroseconds(20);    // but probably a good idea after chanel switching for the pll
                               // I dont know whats a good value here try yourself
                               // if you see a lot of the same values above the whole channel line you may need
                               // a higher delay

     // this is actually the point where the RPD-flag
     // is set, when CE goes low
     //disable();  //afaik for SE8R01 unnecessary -> yes

     // SE8R01 has signed value for dBm we save it
     channel[i] = getRegister(_NRF24_RPD);  // *-1 damit der Wert positiv werid ist bei der ausgabe dann platzsparender
   }
}



void outputChannels(void) {
  for ( uint8_t i=0; i<CHANNELS; i++) {

    // Some mapping for better reading in the terminal window
    // use a small font ( < 10pixel)  and disable autoscrolling
    if(channel[i] < -90) {
      Serial.print("   ");
    }
    else if (channel[i] >= -90 && channel[i] < -80 ) {
      Serial.print("1");
    }
    else if (channel[i] >= -80 && channel[i] < -70 ) {
      Serial.print("2");
    }
    else if (channel[i] >= -70&& channel[i] < -60  ) {
      Serial.print("3");
    }
    else if (channel[i] >= -60 && channel[i] < -50 ) {
      Serial.print("4");
    }
    Serial.print(" ");
  }
  Serial.println();
}



void setup(){
 Serial.begin(57600);

 // Setup SPI
 SPI.begin();
 SPI.setDataMode(SPI_MODE0);
 SPI.setClockDivider(SPI_CLOCK_DIV2);
 SPI.setBitOrder(MSBFIRST);

 pinMode(CE,OUTPUT);  // Activate Chip Enable
 pinMode(CS,OUTPUT);  // probaly set by the SPI-lib but we do it again
 
 disable();
 powerUp(); // now start receiver
 delay(110); // SE8R01 datasheet: 100ms wait after power on reset


 setRegister(_NRF24_EN_AA,0x0); // switch off Shockburst

 // make sure RF-section is set properly
 // - just write default value...
 //setRegister(_NRF24_RF_SETUP,0x0F); // SE8R01 has other Registerlayout -> other value here
 setRegister(_NRF24_RF_SETUP,0x08);

 // reset line counter
 line = 0;
}



void loop(){
 scanChannels();
 outputChannels();
 
 delay(300);


}
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: MustacheMtn on Feb 24, 2017, 05:27 pm
Thank you for this. It worked out of the box perfectly.
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: jjosealonso on Feb 26, 2017, 11:58 pm
Hi guys, I was reasing and I though...

Since 2.4ghz is the same freq than BT BLE, Would be possible to read beacons (iBeacon or eddystone) from there without too many issues?
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: amdkt7 on Jan 06, 2018, 10:51 pm
I'm not seeing anything that I understand, the output after the details output looks like this:
000000000000000011111111111111112222222222222222333333333333333344444444444444445555555555555555666666666666666677777777777777
0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd
000000000000000000000000000000000000000000000000000012233332431000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000022232344442000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000123223445420000000000000000000000000000000000000000000000000000000000000000

I'm using the latest library from TMRh20 2014, as near as I can tell. Arduino IDE 1.8.5.

It's not matching the sample output displayed earlier in the thread, and I see nothing that indicates channel numbers.

My goal is to find a low traffic channel to use, of course. Thanks
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: liuzengqiang on Jan 31, 2018, 08:00 am
Same here :)

I just fired up my nRF24 module for the first time since I got them some years ago. From what I gathered in the code, the first and second row simply indicates that there are 126 columns, representing 126 nRF24 channels (I guess). Then the rest of the rows are signal strength received in each channel. From your data, signal is strong around channels 0x40 to 0x4A and no signal in other channels.
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: amdkt7 on Jan 31, 2018, 02:06 pm
That output is too hard to read! I have experimented with the code and used it to test single channels. I found that it could barely detect a radio within four feet. I have since abandoned the simple modules and moved all the way to the shielded modules with amplifiers, so revisiting the scanner sketch would be a good idea. I'm sure I could create an easier to understand output.

Thanks for your reply.
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: liuzengqiang on Jan 31, 2018, 05:08 pm
You need a wider screen size to contain all 126 characters in one line. Then it would be easy to understand. Yeah, I bet the PCB trace antenna is too weak for any realistic situation. I have two modules that have SMA connectors. I attached 2.4GHz WiFi antennas to the modules. There's quite a lot of chatter that my module picked up. The module with the library seems to be able to do half-duplex communication fine. You have to have a way to decide who's talking and who's listening, like using walkie-talkie, I imagine. I'm interested in finding radios that are full-duplex with actual device addresses so the sender can receive from multiple sources while sending simultaneously, so I can do point-to-multi-point with one receiver and multiple senders, like using zigbees but only cheaper, much cheaper ;)
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: amdkt7 on Feb 16, 2018, 09:12 pm
Just now saw this, Yahoo keeps deciding what is spam for me, and I keep finding stuff I missed in there.

A wider screen makes sense. I tend to boost the font size up so that I can see and that probably messed it up for me.

I still have not revisited the scanner app, busy with other parts of my project. I do have a transmitter out in the yard sending in the temperature and the humidity every four seconds reliably. Those $1 cheapies are not good enough for that.

Title: Re: Poor Man's 2.4 GHz Scanner
Post by: liuzengqiang on Feb 28, 2018, 05:19 pm
I have some modules with external antenna and amplifier. They work alright. I didn't test their ranges. I also have the cheap ones. They tend to have very limited ranges. More tests are needed.
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: amdkt7 on Feb 28, 2018, 07:41 pm
Yeah, the cheap on board antenna's are very limited in range. Maybe a good antenna mod would be workable, but the amplifier helps a lot too. I have not fully tested the range of ones that I have settled on, it has the shield. I can go anywhere on my property while the receiver is in the house, and that is good enough for me. I'm using the lowest power setting. You need a strong power supply to keep stable power for higher power settings. It's not easy, and the cheap switchmode wall warts can be tough to get to work in that situation.
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: cepics on Sep 25, 2018, 09:05 pm
Hi, I'm quite confuse reading the output....
I did the test, moving the poor men's scanner in my office, searching for a free channel for my project

this is the output:

Code: [Select]
Starting Poor Man's Wireless 2.4GHz Scanner ...

Channel LayStarting Poor Man's Wireless 2.4GHz Scanner ...

Channel Layout
>      1 2  3 4  5  6 7 8  9 10 11 12 13  14                     <
|    .                    RWW        .   .                       | 7
|   :        ::          RWRR*                                   | 5
| . .        aW*  .      ====.            .                      | 10
| .       .  -            +Wa           ..                       | 13
| :::  : :     :  :       Wa            :                        | 4
|    . ..  .             :RWW.       . ..                        | 11
| :          +: :        WW++            ::                      | 4
| . .        ..: .       WRRR            .                       | 8
|         ..   ...       :W-+-:     ..   .                       | 14
| .    .. .....::.  .....=WWWWR       . .                        | 19
|     ...    .:-..       -WR*a+      ..                          | 9
| .           .:-.      .WWWW.      .                            | 8
|   ..      ...  ..      :.=W:      .    .                       | 7
|       :       W        :a:           : +                       | 4
>      1 2  3 4  5  6 7 8  9 10 11 12 13  14                     <
|     .-        W .       --+                                    | 6
|  .   .     ...W         ::          . .                        | 11
|   .       . ..W.   .    ..                                     | 22
|             ..W .                                              | 20
|               W .                                              | 15
|            ...W                                                | 20
|             ..W                                                | 30
|               W .                                              | 24
|             :.W ..                                             | 31
|              -W...                                             | 24
|           .-.:W.:: .                                           | 19
|          ..==-W ..                                             | 36
|              .W...                                             | 35
|        ..... .W.......    ...  .....                           | 26
>      1 2  3 4  5  6 7 8  9 10 11 12 13  14                     <
|       .. .....W...    ..... .......                            | 44
|              .W...                                             | 51
|             ..W ..                                             | 50
|           ...-W:..                                             | 60
|            ..:W...                                             | 56
|             ..W...                                             | 57
|            ...W ..                                             | 58
|               W...                                             | 51
|               W...    .. ..                                    | 39
|            -..W --     .... .                                  | 26
|         .... :W......   ... .. . .                             | 43
|       .....  -W...... ...............                          | 34
|   .   . ... .-W:....................                           | 28
|       .....:==W.......  .............                          | 40
>      1 2  3 4  5  6 7 8  9 10 11 12 13  14                     <
|       .. ...=+W .         ..         .                         | 29
|            .-=W...        ...                                  | 33
|    ....... ...W...                                             | 35
|             ..W.:.                                             | 19
|        .. ....W -:                                             | 22
|           ....W....   ..........   .                           | 38
|       ........W...    .. .   ..    ..                          | 39
|       .. ..=+*W....   .....   ....                             | 55
|       .. ..-+=W.+- .. ..... .......                            | 18
|       .....::-W...... ..............                           | 48
|       ......::W.....................                           | 46
|       ........W...... ..............                           | 46
|       .....-:+W-....... .............                          | 56
|         ...==+W..:..... .............                          | 35
>      1 2  3 4  5  6 7 8  9 10 11 12 13  14                     <
|            ...W.     .. .. ..   .                              | 49
|            ...W.::....     ... ..   .                          | 27
|            ...W.         .                                     | 24
|        ..   . W--...             .   .                         | 13
|            .. :        -W=..      .    .                       | 11
|           . . *   .    .+W*-  ..      .                        | 6
|             ..W  .      :.             .                       | 11
|           .-==W..                                              | 30
|           ....W...                                             | 41
|           -+*aW-                                               | 101
|          .:*aaW:                                               | 61
|          .=***W-..                                             | 60
|          .-++*W=..                                             | 91
|         ..:=++W-.                                              | 72
>      1 2  3 4  5  6 7 8  9 10 11 12 13  14                     <
|..   ..  ..-::-W-..                                            .| 54
|.        ..:--+W+..                                             | 67
|           :::aW+..                                             | 53
|          .:==WW*..                                             | 50
|          .:--*Wa..                                             | 48
|         ..--:+W+..                                             | 59
|         ...::-W..                                              | 44
|         ...:::W...                                             | 57
|         .:::--W-.                                              | 50
|         .-=+==W-:.                                             | 48
|         ..:---W:..                                             | 46
|         .:----W...                                             | 40
|         ...=--W: .                                             | 51
|    .    :+aRaRWR+.                                             | 110
>      1 2  3 4  5  6 7 8  9 10 11 12 13  14                     <
|         ..-==RWa..                                             | 78
|         .-aRRWa+.   . .                                        | 101
|         .:=++RWR-.                                             | 94
|          :=+:+W*.                                              | 77
|          ...:*W+..                                             | 63
|            .=aW*..                                             | 68
|            ++RW+.                                              | 80
|           .*+RW+.                                              | 86
|           .+*WW=..                                             | 85
|           .+aRW-..              ..                             | 76
|      ....-=WRaR-.....     .                                    | 70
|         ...R+-W=.                                              | 66
|         .-+Ra*W+.                                              | 77
|         .:RWR=W=...     ....                                   | 80
>      1 2  3 4  5  6 7 8  9 10 11 12 13  14                     <


in my project, I'm using the "RF24.h" library

which channel have I to set in myRadio.setChannel() argument?

tnk a lot
Title: Re: Poor Man's 2.4 GHz Scanner
Post by: srza on Jun 19, 2019, 04:48 pm
Sorry for this basic question but can someone suggest a "terminal application" that I could use to view this please?
I'm generally not that familiar with using my terminal.
I'm looking at the Arduino IDE serial monitor and it looks like its cascading lines of somethings but all in one big line which I cant seem to change with the "new line" box. In any case I get the feeling I'm not supposed to be using the serial monitor .
Any help much appreciated.. I'm trying to make a rudimentary Wifi scanner to demonstrate something,

Thanks for this code too!