I recently posted about using the nRF24L01 module to scan for channels in the 2.4GHz range. That will let you know what channels are in use, however, since the nRF24L01 does not have the embedded network stack, we can’t determine other things like what the ESP8266 module can. (Have you checked out the Espressif.com ESP8266 forum? There is a wealth of information there.)
If you are interested in seeing what Access Points are ‘invading’ your space, here is a sketch to list them (runs every 10 seconds):
// From earl@microcontrollerelectronics.com int seconds = 0; void setup() { cli(); TCCR1A = 0; TCCR1B = 0; TIMSK1 |= (1 << TOIE1); TCNT1=0x0BDC; TCCR1B |= (1 << CS12); sei(); pinMode(8,OUTPUT); pinMode(9,OUTPUT); digitalWrite(8,HIGH); digitalWrite(9,HIGH); Serial.begin(115200); Serial1.begin(115200); // Serial.println("AT+CWMODE=3"); } ISR(TIMER1_OVF_vect) { ++seconds; if ((seconds % 10) == 0) Serial1.println("AT+CWLAP"); if (seconds == 60) seconds = 0; } void loop() { if (Serial1.available()) { int inByte = Serial1.read(); Serial.write(inByte); } if (Serial.available()) { int inByte = Serial.read(); Serial1.write(inByte); } }
It is basically a modified version of the MultiserialMega sketch in Examples->Communication. Note: It only works on Arduinos with multiple serial ports (like the Mega or Leonardo). Also, the ESP8266 has to be in AP (Access Point) mode for this to work (i.e. you may need to uncomment the line which has the “AT+CWMODE=3” command). The wiring for the Arduino <==> ESP8266 is the same as I document in this post.
Recent Comments