Skip to main content

WiFi Manager for ESP32 running MicroPython

Project description

WiFiManager (MicroPython – ESP32)

Smart Wi-Fi manager for ESP32 using MicroPython. Auto-connect, scan, JSON storage, and AP fallback.

Requirements

  • ESP32 board
  • MicroPython (v1.20 or later preferred)
  • Storage space for the configuration file (wifi.json)

Installation

pip install esp32-wifimanager

Installation (via Thonny)

  • Copy the entire wifiManager/ folder to the ESP32
  • (Optional) Create a wifi.json file in the root directory
  • The library is ready to use ✅

Settings file (wifi.json)

{
  "networks": [
    { "ssid": "Home", "password": "12345678" },
    { "ssid": "Office", "password": "87654321" }
  ]
}

How it Works

  • Scan nearby networks
  • Compare available networks with saved networks
  • Select the network with the strongest signal
  • Attempt to connect automatically
  • If this fails → Turn on the Access Point

Quick use

from wifiManager import WiFiManager

wifi = WiFiManager(debug=True)

Automatic connection Start STA if faild --> AP

print(wifi.connect())

Start AP

print(wifi._ap())

Check is connecting

print(wifi.is_connected())

Check status

print(wifi.status())

Stop AP and STA

print(wifi.stop_all())

Stop STA

print(wifi.stop_sta())

Stop AP

print(wifi.stop_ap())

Add Wi-Fi network

print(wifi.add_network("MyWiFi", "11223344"))

Delete one network

print(wifi.remove_network("Office"))

Delete all networks

print(wifi.clear_networks())

Checking nearby networks

print(wifi.scanner.scan())

Show saved networks

print(wifi.storage.load_networks())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

esp32_wifimanager-1.0.2.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

esp32_wifimanager-1.0.2-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file esp32_wifimanager-1.0.2.tar.gz.

File metadata

  • Download URL: esp32_wifimanager-1.0.2.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for esp32_wifimanager-1.0.2.tar.gz
Algorithm Hash digest
SHA256 24f394c80369852cd6612cc864c98fc212f1aabd6a1ab9e9c3fa890d540685a4
MD5 bbd6735a7ca50b04acf8617aed9e84a4
BLAKE2b-256 b30bb313ab4ec602182b5450fe73e7ec9ea5e3113828993ed05bf121fd57aadd

See more details on using hashes here.

File details

Details for the file esp32_wifimanager-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for esp32_wifimanager-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 88186938bf36c1f4c2d51825c3487d32c64755bf4cba8b3fa4bac2f3b8d00de8
MD5 2d20a215f5eb01616a6756d84c21a84d
BLAKE2b-256 0c24cfb7ebfeaafdf74744ba07ec1906da4adc971c4db06aab83a37c01019025

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page