WiFi scanner with visual persistence, intended to find the idlest channel e.g. to assign to a ZigBee device

WiFiChanViz

Motivation

This tool was initially coded to help find the idlest 2.4GHz channel in order to connect a ZigBee device to HomeAssistant in ideal conditions.

Some areas can be very busy, I live in a city center where I get an average 80 devices per scan.

Pairing a ZigBee devices in such conditions can prove difficult, especially when the chosen channel is overlapped by nerby WiFi devices.

Installation

Choose one of these installation methods:

  • Download and flash the binary from the release assets.

  • [Soon] Get it from the M5Stack AppStore application (A.K.A. M5Stack-SD-Menu downloader)

  • Load this project in Arduino IDE, compile and flash

Library dependencies:

Credits:

Owner
tobozo
≡ᗤ- I'm the Bozo ෴ bit in your Bogon. DIY IoT/WoT tinkerer, JS/PHP freestack dev, C/C++ novice and tech lover
tobozo
Similar Resources

XMap is a fast network scanner designed for performing Internet-wide IPv6 & IPv4 network research scanning.

XMap is reimplemented and improved thoroughly from ZMap and is fully compatible with ZMap, armed with the "5 minutes" probing speed and novel scanning techniques. XMap is capable of scanning the 32-bits address space in under 45 minutes.

Dec 24, 2022

TCP port scanner, spews SYN packets asynchronously, scanning entire Internet in under 5 minutes.

TCP port scanner, spews SYN packets asynchronously, scanning entire Internet in under 5 minutes.

Jan 4, 2023

Rudimentary opinionated client-side lua libwayland bindings and scanner

wau This should work with Lua 5.3+. By default it builds with 5.3 instead of 5.4 because the examples depend on lgi. These aren't 1-to-1 bindings to l

Nov 19, 2022

TCP port scanner, spews SYN packets asynchronously, scanning entire Internet in under 5 minutes.

MASSCAN-NG: Mass IP port scanner This is an Internet-scale port scanner. It can scan the entire Internet in under 5 minutes, transmitting 10 million p

Jan 3, 2023

Side-channel file transfer between independent VM executed on the same physical host

Side-channel file transfer between independent VM executed on the same physical host

Inter-process or cross-VM data exchange via CPU load modulation What is this I made this PoC as a visual aid for an online discussion about M1RACLES -

Dec 28, 2022

16 Channel Current Meter to MQTT Gateway

 16 Channel Current Meter to MQTT Gateway

16 Channel Current Meter to MQTT Gateway This sketch runs on an ESP8266 and reads data from 16 Channel Current Measurement Module over RS485 Modbus an

Nov 11, 2022

Upload arbitrary data via Apple's Find My network.

Upload arbitrary data via Apple's Find My network.

Send My allows you to to upload abritrary data from devices without an internet connection by (ab)using Apple's Find My network. The data is broadcasted via Bluetooth Low Energy and forwarded by nearby Apple devices.

Jan 2, 2023

A WiFi mapping companion app for Valetudo

A WiFi mapping companion app for Valetudo

Valeronoi (Valetudo + Voronoi) is a companion for Valetudo for generating WiFi signal strength maps. It visualizes them using a Voronoi diag

Jan 8, 2023

Tuya IoTOS Embeded SDK WiFi & BLE for BK7231T

Tuya IoTOS Embedded Wi-Fi and BLE SDK for BK7231T 中文版 | English Overview Developed independently by Tuya Smart, Tuya IoTOS is the world's only IoT ope

Dec 5, 2022
Comments
  • Thanks for this brilliant idea

    Thanks for this brilliant idea

    Salut @tobozo,

    I liked the way you represented WiFi channel saturation with your WiFiChanViz app that I discovered on Twitter:

    So I challenged myself to try to remake it by myself for the ESPboy. I kept your idea of setting the height of the channels according to the number of access points occupying them. But I chose a different color scale depending on the best-observed signal quality for each channel.

    And I added the ability to browse between channels to see the list of access points broadcasting a WiFi network.

    Here is how it looks:

    wifi-analyzers

    Well, the WiFi antenna of the M5Stack is probably of better quality than the one of the Wemos D1 mini that drives the ESPboy...

    I then took a look at your code to compare our approaches. They are pretty similar, although we have a different way of calculating the luminance for the historical perspective fade:

    // --------------------------------------------------------
    // tobozo's method
    // --------------------------------------------------------
    
    // luminosity reducer, taken from Bodmer's antialiased font
    static uint16_t luminance(uint16_t color, uint8_t luminance)
    {
      // Extract rgb colours and stretch range to 0 - 255
      uint16_t r = (color & 0xF800) >> 8; r |= (r >> 5);
      uint16_t g = (color & 0x07E0) >> 3; g |= (g >> 6);
      uint16_t b = (color & 0x001F) << 3; b |= (b >> 5);
    
      b = ((b * (uint16_t)luminance + 255) >> 8) & 0x00F8;
      g = ((g * (uint16_t)luminance + 255) >> 8) & 0x00FC;
      r = ((r * (uint16_t)luminance + 255) >> 8) & 0x00F8;
    
      return (r << 8) | (g << 3) | (b >> 3);
    }
    
    // Use as a gfx replacement for tft.fillScreen(TFT_BLACK).
    // Produces a strobe effect by reducing luminosity on all non-black pixels.
    // Limitations:
    //  - 16bits colors only
    //  - Only fades to black
    //  - frame rate must be >15fps
    //  - Sluggish when the sprite has too many (>50%) non black pixels
    static void spriteFadeOut( LGFX_Sprite *sprite, uint8_t strength )
    {
      int32_t w = sprite->width();
      int32_t h = sprite->height();
      int32_t l = w*h;
      uint16_t* framebuf = (uint16_t*)sprite->getBuffer();
      for( uint32_t i=0;i<l;i++) {
        if( framebuf[i]!=TFT_BLACK ) {
          uint16_t pixcolor = (framebuf[i] >> 8) | (framebuf[i] << 8);
          pixcolor = luminance( pixcolor, strength );
          framebuf[i] = pixcolor<<8 | pixcolor>>8;
        }
      }
    }
    
    // --------------------------------------------------------
    // m1cr0lab's method
    // --------------------------------------------------------
    
    uint16_t * const fb  = (uint16_t*)fb1->getBuffer();
    uint16_t   const len = GRAPH_WIDTH * GRAPH_HEIGHT;
    uint16_t color;
    uint8_t. r, g, b;
    for (uint16_t i = 0; i < len; ++i) {
        if (fb[i]) {
            // swaps endianness
            color = fb[i] >> 8 | fb[i] << 8;
            // extracts the primary colors
            r = color >> 11;
            g = (color >> 5) & 0x3f;
            b = color & 0x1f;
            // lowers luminance
            r = r > 1 ? r - 1 : 0;
            g = g > 2 ? g - 2 : 0;
            b = b > 1 ? b - 1 : 0;
            // repacks the RGB565 color
            color = r << 11 | g << 5 | b;
            // restores endianness
            fb[i] = color << 8 | color >> 8;
        }
    }
    

    LovyanGFX library is outstanding!

    Oh, and I have to point out a slight error in your WiFiChanViz.ino code:

    for (int i = 0; i < n; ++i) {
        int32_t channel = WiFi.channel(i);
        dpc[channel]++;
    }
    

    Replace this:

    dpc[channel]++;
    

    By:

    dpc[channel - 1]++;
    

    If you are curious, you can have a look at my code.

    En tout cas, merci pour ton travail inspirant ! :wink:

    Steph

Zigbee 🐝 Router for Xiaomi DGNWG05LM and Aqara ZHWG11LM gateways.

Lumi Router (JN5169) This firmware is a replacement for the original firmware for the Zigbee chip JN5169 on Xiaomi DGNWG05LM and Aqara ZHWG11LM gatewa

Dec 8, 2022
OpenBoard is a cross-platform interactive whiteboard application intended for use in a classroom setting.

OpenBoard is an open source cross-platform interactive white board application designed primarily for use in schools. It was originally forked from Open-Sankoré, which was itself based on Uniboard.

Dec 29, 2022
A tiny example how to work with ZigBee stack using JN5169 microcontroller
A tiny example how to work with ZigBee stack using JN5169 microcontroller

Hello NXP JN5169 ZigBee World This is a tiny example how to work with ZigBee stack using JN5169 microcontroller. The example implements a smart switch

Jan 1, 2023
GCFFlasher is the tool to program the firmware of dresden elektronik's Zigbee products.

GCFFlasher 4 GCFFlasher is the tool to program the firmware of dresden elektronik's Zigbee products. Supported Hardware ConBee I ConBee II RaspBee I R

Dec 21, 2022
WslinkClient is a client intended to communicate with Wslink, which is a unique loader running as a server

WslinkClient WslinkClient is a client intended to communicate with Wslink, which is a unique loader running as a server and executing received modules

Apr 19, 2022
It is a wireless temperature, pressure and humidity sensor, supports working in Zigbee networks.
It is a wireless temperature, pressure and humidity sensor, supports working in Zigbee networks.

It is a wireless temperature, pressure and humidity sensor, supports working in Zigbee networks. (Zigbee2mqtt open source project). Built on CC2530 chip (Zigbee), two modications: Ebyte E18-MS1PA2-PCB radio module with amplifier and Ebyte E18-MS1-PCB. Powered by the most common AAA batteries.

Dec 30, 2022
Plant Watering Sensor Project for Zigbee Network
Plant Watering Sensor Project for Zigbee Network

Plant Watering Sensor Project for Zigbee Network (based on the Source Code of the DIYRUZ Flower Project).

Dec 22, 2022
This repository contains a set of InternalBlue patches for the BCM4375B1 Bluetooth controller, allowing to sniff and inject Zigbee, Mosart and Enhanced ShockBurst packets from a Samsung Galaxy S20 smartphone.

RadioSploit 1.0 - Patches This repository contains a set of InternalBlue patches for the BCM4375B1 Bluetooth controller, allowing to sniff and inject

Nov 1, 2022
This is a group project from my CPE353 course. It is done in C++ intended for use with QtCreator.

fishinggame This is a group project from my CPE353 course. It is done in C++ intended for use with QtCreator. Credit is absolutely due to my teammates

Jan 8, 2022
Tube_gateways - Information and Documentation on Tube's Zigbee Gateways
Tube_gateways - Information and Documentation on Tube's Zigbee Gateways

Tube's Zigbee Gateways Information and documentation on Tube's Zigbee Gateways. Pre-assembed hardware devices can be purchased from https://www.tubesz

Jan 2, 2023