/raspberrypi-netscan-toolkit

Wi-Fi Scanner using Raspberry Pi Pico WH and SSD1306 OLED — Scan networks in STA mode, analyze signal strength, and visualize....;)

Primary LanguagePython

Network scanner using Raspberry Pi Pico WH

The Raspberry Pi Pico WH has two wifi modes: station mode (STA) and access point(AP) mode. we will use the STA mode to detect and display available networks. Make a simple wifi scanner usinfg raspberry pi pico wh and MicroPython to scan Wi-Fi networks in station mode (STA) and display signal strength on a small SSD1306 OLED screen.


Things you need

  • Raspberry Pi Pico WH
  • SSD1306 OLED Module (Amazon link: Ds Robotics® 0.96" OLED Display)
  • Breadboard & Jumper Wires
  • Thonny IDE
  • MicroPython drivers (preloaded or installable)


Display Outputs

OLED Display Network Scan
Signal Strength
OLED Scan Result


Setting Up Thonny & Pico WH

  1. Connecting the Pico WH:
    • Press and hold BOOTSEL button on the board, connect USB to PC and launch Thonny.
  2. Files window:
    • If the files window is not there, go to View then click 'Files`.
  3. Configure the Interpreter:
    • Go to Run > Configure Interpreter.
    • Set the interpreter settings (follow image below).

Thonny Config
Interpreter Setup


Installing SSD1306 Drivers

  • Open Thonny, go to Tools > Manage packages...
  • Search and install ssd1306 module.

Package Manager
Search SSD1306

If unavailable, use the drivers i have in the files in /lib/ directory of this repository. If the display is not working or turming on, there's a complete troubleshooting guide to solve or test the display insid Thonny.


Circuit Pin Diagram

Connect your OLED to the pico as follows:

Raspberry Pi Pico WH SSD1306 OLED
VBUS (Pin 40) or 3V3 (Pin 36) VCC
GND (Pin 38) GND
GP4 (Pin 26) SDA (Data Line)
GP5 (Pin 27) SCL (Clock Line)

I have uploaded a full debug guide in the troubleshooting section if your display is not turning on.


Coding

  • Script: main.py (available in this repo)
  • Save it to the pico in /main.py directory.

Running Script

Run and verify using Thonny. If it prints "MPY: soft reboot", everything is good to go! Disconnect and power the board externally. (It should run automatically.)


Directory

-save in the following paths only:

  1. -Raspberry Pi Pico/main.py
  2. -Raspberry Pi Pico/lib/ssd1306.py

Collaboration

Maintained by PS-003R32.
You can open Issues or Pull Requests for suggestions or improvements! ;)