Copyright © https://mongoose-os.com

Mongoose OS Forum

frame

[Library] Provision WiFi - Test, copy, and verify WiFi credentials

tripflextripflex Orlando, FL

Hey guys, just released my first library for Mongoose OS (hope to have more soon), which i've called "Provision WiFi" as that's exactly what it does, helps with the initial device WiFi provisioning by testing the settings (ssid/pass/etc) and copying them to wifi.sta (if enabled), as well as a few other features I added in there that I thought would be helpful for the community.

  • MJS Support
  • Test WiFi settings on device boot (when provision.wifi.boot.enable is set true)
  • Testing on boot delay in seconds from provision.wifi.boot.delay when existing STA is connected (test is immediate when no existing STA connected)
  • Fail test after total connection attempts (provision.wifi.attempts) and timeout provision.wifi.timeout (in seconds)
  • Reconnects to existing station (if one was connected) after testing, when provision.wifi.reconnect is true (default: true)
  • Test STA values are stored separate from WiFi Library STA values (in provision.wifi.sta - matches wifi lib structure)
  • Automatically copy test STA values to wifi.sta after succesful connection test, when provision.wifi.success.copy is true (default: true)
  • Reboot device on successful connection test provision.wifi.success.reboot when true (default: false)
  • Reboot device on failed connection test provision.wifi.fail.reboot when true (default: false)
  • Clear test STA values on success test provision.wifi.success.clear, or fail provision.wifi.fail.clear, when true (default: false)

I <3 open source, and to show my appreciation for Cesanta switching to the Apache 2.0, I am also releasing this library under Apache 2.0 as well!

Source: https://github.com/tripflex/mos-lib-provision-wifi

I've been working on a complimenting RPC library for this as well (once I can figure out how to do it correctly) that I hope to release soon as well.

Let me know if this does or does not work for you guys, make sure and read the README for details on the library

Even if you may not use this library, if you're familiar with C and/or Mongoose OS, please be so kind as to open an issue on the repo with a code review (I support constructive criticism)
https://github.com/tripflex/mos-lib-provision-wifi/issues/new?title=[CodeReview]

Comments

Sign In or Register to comment.