{
  "id": "carglglz/mpy-wpa_supplicant",
  "name": "mpy-wpa_supplicant",
  "prettyName": "mpy-wpa_supplicant",
  "description": "MicroPython wpa-supplicant",
  "version": "",
  "author": "carglglz",
  "license": "MIT",
  "tags": [],
  "status": "VALID",
  "official": false,
  "source": "https://github.com/carglglz/mpy-wpa_supplicant",
  "updatedAt": "2025-06-28T07:00:09.878Z",
  "page": "https://checkmim.com/packages/carglglz+mpy-wpa_supplicant",
  "createdAt": "2025-05-27T04:28:42.956Z",
  "submittedBy": "oliverr",
  "install": {
    "mpremote": "mpremote mip install github:carglglz/mpy-wpa_supplicant",
    "mip": "import mip; mip.install(\"github:carglglz/mpy-wpa_supplicant\")"
  },
  "readme": "## mpy-wpa_supplicant\n\nMicroPython module to connect to the nearest known Wifi AP.\n\n\n### Install\n\nInstall using `mip` e.g. in device REPL\n\n```\n>>> import mip\n>>> mip.install(\"github:Carglglz/mpy-wpa_supplicant\")\n```\n\nAdd a `wpa_supplicant.config` file with `SSID:PASSWORD` of known Wifi APs, e.g.\n\n```\n{\n    \"Wifi-FooAlice\":\"lH6AFqYWE8Ppwfg8cdeVug\",\n\n    \"Wifi-BarBob\":\"I_EnivRDJ2h34CANnEI1Hw\",\n\n    \"Wifi-GuestRoom\":\"TXyvzOdXae_nsufOLcJWyw\",\n\n}\n```\n\n### Usage\n\nTo connect add to `main.py`\n\n```py\nfrom wpa_supplicant import setup_network\n\n\nif setup_network():\n    # Now device is connected\n    # Set time with ntptime\n\nelse:\n    # Device is not connected\n    # Start its own AP\n\n```\n\nOptions for `setup_network(timeout=10, hostname=NAME, notify=True)`:\n\n- `timeout`: In seconds to wait for connection [default: `10`]\n\n- `hostname`: Hostname of the device, [default: `sys.platform-unique_id`, e.g. `esp32-7c9ebd3d9df4`]\n\n- `notify`: To print connection status and ifconfig info [default: `True`] \n"
}