Giter Club home page Giter Club logo

khoih-prog / wifimanager_generic_lite Goto Github PK

View Code? Open in Web Editor NEW
8.0 3.0 3.0 6.44 MB

"Library to configure MultiWiFi/Credentials at runtime for Teensy, SAM DUE, SAMD21, SAMD51, STM32F/L/H/G/WB/MP1, nRF52, RP2040-based (Nano RP2040 Connect, RASPBERRY_PI_PICO), AmebaD RTL8720DN, etc. boards, using Generic WiFi (WiFiNINA, WiFi101, ESP8266-AT, ESP32-AT, etc.) modules/shields. You can also specify DHCP HostName, static AP and STA IP. Use much less memory compared to full-fledge WiFiManager. Config Portal will be auto-adjusted to match the number of dynamic custom parameters. Optional default Credentials to be autoloaded into Config Portal to use or change instead of manually input. Credentials are saved in LittleFS/InternalFS, (emulated-)EEPROM, FlashStorage_SAMD, FlashStorage_STM32, FlashStorage_RTL8720 or DueFlashStorage. New powerful-yet-simple-to-use feature to enable adding dynamic custom parameters from sketch and input using the same Config Portal. DoubleDetectDetector as well as Virtual Switches feature permits entering Config Portal as requested. Now using WiFiMulti_Generic library

License: MIT License

C++ 68.76% C 30.99% Shell 0.25%
lightweight teensy stm32 ublox wifi-manager wifi-credentials nrf52 samd21 samd51 config-portal

wifimanager_generic_lite's People

Contributors

khoih-prog avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

wifimanager_generic_lite's Issues

Access Point connected but Browser unable to show HTML page - why ?

Not sure what I am sitll doing wrong:

I try to get the Access Point working with the WiFiManager_Generic_Lite libarary.

I am using the Adafruit Feather M0 Board.

First I set the pins correctly for this particular board (i.e. in setup() { WiFi.setPins(8, 7, 4, 2); //...}

Second, I set USE_DYNAMIC_PARAMETERS = false (since I do not need dynamic parameters, or do I ?)

Then, after compiling, downloading and starting-up the SAMD_WIFI code, I can see Access Point "WIFI_GENERIC_XXXXXX". Moreover, on my mobile phone, I can connect to the Access Point by entering the Password "MyWIFI_GENERIC_XXXXXX". So far so good.

But then going to my browser on the mobile phone and entering http://192.168.4.1 does not do anything

Two questions:

  1. Why does http://192.168.4.1 not bring up the HTML Mask where I can finally enter the SSID and PW of my Home Network ??

  2. Where exactly in the Code can I change the Access Point Password (from "MyWIFI_GENERIC_XXXXXX" to something else) ??

How to use WiFiManager_Generic_Lite for the Adafruit Feather M0 Board ?

I would like to get WiFiManager_Generic_Lite running on an Adafruit Feather M0 Board.

I tried to follow your installation and patching instructions. But I can't get it to work with this Feather M0.

Here are a couple of questions :

a) Installing the WiFiManager_Generic_Lite library inside Arduino IDE leads to error: no protocol
(I assume I have to "Install WiFiManager_Generic_Lite only" - then it works) - but I am not sure if there are still missing libraries...)

b) it is unclear which Arduino Libraries need to be installed next to WiFiManager_Generic_Lite for my Adafruit Feather M0 Board?

Screenshot 2021-07-03 at 16 55 43

c) And the third question: Having this Adafruit Feather M0 Board in hand, which Example Code out of the list shown in the blow screenshot will work ?

Screenshot 2021-07-03 at 16 52 47

d) Or are there any more libraries or Patches that need to be carrried out for this Adafruit Feather M0 Board ? If yes, what are the necessary steps ?

Config Panel does not proceed

Hello,

I am using a Teensy 4.0 with a ESP32 module. Currently i have a hangup on...

Start Teensy_WiFi on TEENSY 4.0 with WiFiNINA using WiFiNINA_Generic Library
WiFiMulti_Generic v1.1.1
WiFiManager_Generic_Lite v1.8.0
[WG] Hostname=Teensy-Master-Controller


EEPROM size = 1080, start = 0
Flag read = 0xD0D01234
doubleResetDetected
ClearFlag write = 0xD0D04321
[WG] Double Reset Detected
[WG] InitEEPROM,sz=1080
[WG] EEPROMsz:1024
[WG] CCSum=0x11d0,RCSum=0x11d0
[WG] ======= Start Stored Config Data =======
[WG] Hdr=WIFI_GENERIC,SSID=SSID1,PW=password1
[WG] SSID1=SSID2,PW1=password2
[WG] BName=SAMD-Control
[WG] bg: isForcedConfigPortal = false
[WG] bg:Stay forever in CP:DRD/MRD

It does not proceed after this and i cant figure out why. Its detecting the module but not going any farther. (Im using the Teensy example with minor adjustments.)

Best,
W

Using the WifiNINA manager has the same results.

Starting Teensy_WiFiNINA on TEENSY 4.0
WiFiMulti_Generic v1.1.1
WiFiManager_NINA_Lite v1.7.1
[WN] Hostname=Teensy-Master-Controller

EEPROM size = 1080, start = 0
Flag read = 0xD0D01234
doubleResetDetected
ClearFlag write = 0xD0D04321
[WN] Double Reset Detected
[WN] InitEEPROM,sz=1080
[WN] EEPROMsz:512
[WN] CCSum=0x11ed,RCSum=0x11ed
[WN] ======= Start Stored Config Data =======
[WN] Hdr=WIFININA,SSID=SSID1,PW=password1
[WN] SSID1=SSID2,PW1=password2
[WN] BName=Teensy-Control
[WN] bg: isForcedConfigPortal = false
[WN] bg:Stay forever in CP:DRD/MRD

MKR1000 Example : Config portal will not come up.

Describe the bug

Using example code for MKR1000 the config portal will not come up.

Steps to Reproduce

Load example MKR1000_WiFi101 sketch and run.
Connect to Wifi AP
Run curl with -v and point to 192.168.4.1 to see web portal.
There is a connection but it is immediately closed before config portal shows up.

Expected behavior

Config portal is displayed allowing you to set up wifi access.

Actual behavior

Config portal is never displayed.

Screenshots

** This is run when it failed with debugging level 4 enabled

Connect to serial port /dev/cu.usbmodem1444101 at 115200

Start MKR1000_WiFi101 on Unknown SAMD21 board with WINC1500 using WiFi101 Library
WiFiManager_Generic_Lite v1.6.0
[WG] Set CustomsStyle to : <style>div,input{padding:5px;font-size:1em;}input{width:95%;}body{text-align: center;}button{background-color:blue;color:white;line-height:2.4rem;font-size:1.2rem;width:100%;}fieldset{border-radius:0.3rem;margin:0px;}</style>
[WG] Set CustomsHeadElement to : <style>html{filter: invert(10%);}</style>
[WG] Set CORS Header to : Your Access-Control-Allow-Origin
[WG] Hostname=SAMD-Master-Controller
Flag read = 0xffffffff
No doubleResetDetected
SetFlag write = 0xd0d01234
[WG] CCSum=0xe11e,RCSum=0xffffffff
[WG] ChkCrR:pdata=����������������������������������,len=34
[WG] ChkCrR:pdata=����������������������������������,len=34
[WG] ChkCrR:pdata=����������������������������������,len=34
[WG] ChkCrR:pdata=����������������������������������,len=34
[WG] ChkCrR:pdata=������,len=6
[WG] ChkCrR:pdata=����������������������������������,len=34
[WG] ChkCrR:CrCCsum=0xaf50,CrRCsum=0xffffffff
[WG] InitCfgFile,sz=236
[WG] g:myMenuItems[0]=blank
[WG] g:myMenuItems[1]=blank
[WG] g:myMenuItems[2]=blank
[WG] g:myMenuItems[3]=blank
[WG] g:myMenuItems[4]=blank
[WG] g:myMenuItems[5]=blank
[WG] SaveEEPROM,Sz=1024,DataSz=0,WCSum=0xdb3
[WG] pdata=blank,len=34
[WG] pdata=blank,len=34
[WG] pdata=blank,len=34
[WG] pdata=blank,len=34
[WG] pdata=blank,len=6
[WG] pdata=blank,len=34
[WG] CrCCSum=0xc30
[WG] bg: isForcedConfigPortal = false
[WG] bg:Stay forever in CP:No ConfigDat
[WG] SSID=NIXIESHIELDFORARDUINO,PW=(**removed password**)
[WG] IP=192.168.4.1,CH=11
[WG] s:configTimeout = 0
C
Your stored Credentials :
Blynk Server1 = blank
Token1 = blank
Blynk Server2 = blank
Token2 = blank
Port = blank
MQTT Server = blank
Stop doubleResetDetecting
ClearFlag write = 0xd0d04321
[WG] serverSendHeaders:WM_HTTP_CACHE_CONTROL:Cache-Control=no-cache, no-store, must-revalidate
[WG] serverSendHeaders:WM_HTTP_CORS:Access-Control-Allow-Origin : Your Access-Control-Allow-Origin
[WG] serverSendHeaders:WM_HTTP_PRAGMA:Pragma : no-cache
[WG] serverSendHeaders:WM_HTTP_EXPIRES:Expires : -1
[WG] h:HTML page size:2101
[WG] h:HTML=<!DOCTYPE html><html><head><title>SAMD_WM_Lite</title><style>div,input{padding:5px;font-size:1em;}input{width:95%;}body{text-align: center;}button{background-color:blue;color:white;line-height:2.4rem;font-size:1.2rem;width:100%;}fieldset{border-radius:0.3rem;margin:0px;}</style><style>html{filter: invert(10%);}</style></head><div style='text-align:left;display:inline-block;min-width:260px;'><fieldset><div><label>*WiFi SSID</label><div><input value='' id='id'></div></div><div><label>*PWD (8+ chars)</label><input value='' id='pw'><div></div></div><div><label>*WiFi SSID1</label><div><input value='' id='id1'></div></div><div><label>*PWD1 (8+ chars)</label><input value='' id='pw1'><div></div></div></fieldset><fieldset><div><label>Board Name</label><input value='' id='nm'><div></div></div></fieldset><fieldset><div><label>Blynk Server1</label><input value='blank'id='sv1'><div></div></div><div><label>Token1</label><input value='blank'id='tk1'><div></div></div><div><label>Blynk Server2</label><input value='blank'id='sv2'><div></div></div><div><label>Token2</label><input value='blank'id='tk2'><div></div></div><div><label>Port</label><input value='blank'id='prt'><div></div></div><div><label>MQTT Server</label><input value='blank'id='mqt'><div></div></div></fieldset><button onclick="sv()">Save</button></div><script id="jsbin-javascript">function udVal(key,val){var request=new XMLHttpRequest();var url='/?key='+key+'&value='+encodeURIComponent(val);request.open('GET',url,false);request.send(null);}function sv(){udVal('id',document.getElementById('id').value);udVal('pw',document.getElementById('pw').value);udVal('id1',document.getElementById('id1').value);udVal('pw1',document.getElementById('pw1').value);udVal('nm',document.getElementById('nm').value);udVal('sv1',document.getElementById('sv1').value);udVal('tk1',document.getElementById('tk1').value);udVal('sv2',document.getElementById('sv2').value);udVal('tk2',document.getElementById('tk2').value);udVal('prt',document.getElementById('prt').value);udVal('mqt',document.getElementById('mqt').value);alert('Updated');}</script></html>

Information

Arduino IDE version: 1.8.13
MKR1000 Hardware (just purchased) updated to latest WIFI firmware (19.6.1)
Using Eclipse IDE with Sloeber Arduino Env
Running on MacOS

Additional context

I turned on debugging and played around with the different parameters. I have found that when I turn off

USE_DYNAMIC_PARAMETERS
and
SCAN_WIFI_NETWORKS

The config portal then works.

I will do more debugging after work and see if I can isolate it any further.

The test I did took the stock example with almost no changes running on a MKR 1000 with the LATEST wifi firmware.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.