escaner

Escáner de redes Wi-Fi con NodeMCU Esp8266

Escanear redes wifi y mostrarlas en el monitor serie.

Configuración del escáner

Para escanear redes lo primero que hacemos es abrimos el IDE Arduino e incluimos la biblioteca ESP8266WiFi. Esta es la que nos permitirá incluir en nuestro código todo lo relacionado a la red.

Pasamos al void setup e iniciamos el monitor serie en 9600, esto es lo que me dice el Node en su parte trasera.

Escáner

Debemos saber que el node tiene 3 configuraciones Modo estación (STA) que significa que la Wi-Fi transfiere contenido a dos rutas de datos, Modo de punto de acceso (AP) este proyecta una señal Wi-Fi en un área designada y ambas a la vez (STA+AP). Como queremos escanear redes Wi-Fi lo vamos a configurar en modo estación (STA).

Introducción al código

En el void loop primero mostramos un letrero en el monitor serie que diga que el proceso de escaneo está empezando. Guardamos en una variable la cantidad de redes que el Node está detectando y mostramos en otro letrero que el escáner ha finalizado.

Hay que pensar que existen dos posibilidades la primera que no encuentre redes y otra que si la encuentre. Es decir que la lógica seria si ‘n’ (que es nuestra variable) que es la cantidad de redes es igual a ‘0’ mostramos un letrero que diga ‘No se encontraron redes’. En el caso de encontrarlas voy a mostrar en el monitor serie la cantidad que encontré.

Ahora con estas redes hacemos un arreglo donde mostremos de cada red su posición, su nombre, la intensidad de la señal y si tiene contraseña. Así tenemos un escáner de redes Wi-Fi con un Node. Para comprobar pueden hacer con el móvil una zona de cobertura inalámbrica y si la detecta es que funciona correctamente.

#include "ESP8266WiFi.h" 	//biblioteca Wi-Fi
void setup() {
  // put your setup code here, to run once:
Serial.begin(9600); 	//Inicializar el monitor serie

WiFi.mode(WIFI_STA);  		//Configurar el Node en modo STA
WiFi.disconnect();
}
void loop() {
  // put your main code here, to run repeatedly:
Serial.println("Escaneando...");		//Letrero de escaneando
int n = WiFi.scanNetworks();		//Guardar cantidad de redes en variable n
Serial.println("Escaner terminado");	//Letrero de escáner terminado

//Si n es igual a 0 muestra que no se encontraron redes
if(n == 0){	
Serial.println("No se encontraron redes Wi-Fi"); 
}

//Si encuentra redes va a mostrar la cantidad
else{
    Serial.print(n);
  Serial.println("Redes encontradas");

//Arreglo que me va a dar los datos de la Red
  for(int i=0;i<n;++i){
    Serial.print(i+1);
    Serial.print(": ");
    Serial.print(WiFi.SSID(i));
    Serial.print(" (");
    Serial.print(WiFi.RSSI(i));
    Serial.print(") ");
    Serial.println((WiFi.encryptionType(i) == ENC_TYPE_NONE) ? " " : "*");
    delay(10000);
  }
}
}

Para leer el artículo anterior: https://ciber-tips.com/sensor-de-aguadht-con-node/

Descarga el IDE Arduino: https://www.arduino.cc/en/main/software

2 comentarios en “Escáner de redes Wi-Fi con NodeMCU Esp8266”

  1. JHON MAIRO FLOREZ

    cordial saludo buenas tardes.
    Actualmente soy estudiante de ingeniería de telecomunicaciones 3er semestre, y estoy utilizando el WiFiscan con el esp8266 de la placa wemos d1 mini pro, me gustaría saber si es posible después del escaneo de redes capturar esos datos en variables y como sería eso posible hacerlo.
    muchas gracias.

  2. Getting the dumbbells up and into place for many actions is
    more demanding than the train itself. Sadly, that is one movement sample you’ll have the ability to’t
    do with a dumbbell. Nonetheless, if yow will discover an overhead
    bar or a low tree department to hold from, bang out some pull-ups, and it’s taken care of.
    If you aspire to have the right hourglass shape,
    you’ve come to the right place.
    The dumbbell thruster is likely certainly one of
    the best complete physique workout routines in the sport.
    The motion is pretty easy, however it is undoubtedly not simple, particularly in case you are using an affordable weight load.
    Being that it is a single leg, single arm unilateral movement, additionally it is going to significantly involve
    core and again power for stability and posture. Athletes usually favor dumbbell workout routines over machines as they’ll replicate sport-specific actions
    more accurately. They also know that they may develop a extra balanced physique
    and structure if most of their routine employs free weight exercises.
    The different benefit dumbbell workouts have over machines is that they
    fit round your physique so the movement could be performed accurately.
    Though resistance machines may be adjusted, such as the
    seat peak for example, the motion sample continues to be largely ruled by how the machine is built.

    Lateral raises assist you to effectively target your triceps and shoulders and are a lighter-weight exercise that you can attempt with
    a low weight even when you’re simply beginning in the health club.

    Glutes, quadriceps, hamstrings, back, triceps, and shoulders are
    all used when performing a dumbbell thruster, aiding upper and decrease body strength.
    Light weights are all you have to effectively activate smaller muscle teams (mainly these in the higher body, e.g., the
    shoulders or core). Perhaps you’re bored of your traditional crunches and body weight
    planks. If that wasn’t enough, dumbbells are extremely beginner-friendly.

    You can even skip the explosive leap at the finish and
    somewhat just squat up to a standing place.
    As such, this exercise goes to work the legs,
    glutes, entrance delts, and serratus anterior, in addition to the upper chest to a level.

    Now you know the strikes, it is about time you added them into your exercises.
    Do Not sweat, we have you covered with our collection that target
    all objectives and each body part. Explore Hydrow’s library of 5,000+ rowing, circuit coaching,
    yoga, Pilates, and mobility exercises.
    With this dumbbell back exercise, you relaxation the burden on the floor between reps, which supplies
    your grip and decrease again a brief relaxation. The humble dumbbell
    is amongst the most versatile training instruments.

    You can use dumbbells to coach for muscle dimension, strength, or endurance, and they’re nice for circuit training and high-intensity interval coaching.
    Put Together to maximise your strength with our exclusive
    13-week strength coaching program. The major thing to learn about your forearm muscles is that they help your arms move up and down and rotate.

    “Typically the hardest factor is just getting began,” says Geoff Tripp, CSCS, licensed private trainer
    and head of fitness science at Trainiac. But learning the tried-and-true fundamentals may help you build confidence, in addition to strength and muscle.
    Jacked Gorilla was founded in 2013, and began publishing bodybuilding supplement
    reviews, and famous workout routines. It wasn’t acquired by Rich Gorilla Limited till
    2019, and since then both our range of content and our viewers have grown considerably.

    With full isolation of each biceps, the spider curl
    is amongst the greatest bicep workouts to construct bigger, stronger arms.
    Slowly elevate the dumbbells until your arms are totally prolonged,
    or the dumbbells contact one another. Hold for a brief spell, then decrease them down to the starting place.
    Bend your knees slightly to take away the stress out of your again. With your chest out
    and your arms along your sides, maintain a dumbbell on all sides to get into the starting position.

    References:

    chicks on steroids; https://gitea.ontoast.uk/,

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

Top arrow