khoih-prog / WiFiManager_Generic_Lite

"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
MIT License
9 stars 3 forks source link

How to use WiFiManager_Generic_Lite for the Adafruit Feather M0 Board ? #1

Closed iKK001 closed 3 years ago

iKK001 commented 3 years ago

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 ?

iKK001 commented 3 years ago

I advanced a tiny wee bit:

The following libraries are needed on the Adafruit Feather M0 Board:

WiFiManager_Generic_Lite WiFiWebServer Functional-Vlpp DoubleResetDetector_Generic FlashStorage_SAMD WiFi101

With those libraries, the default Code will compile and the download to the Adafruid Feather M0 Board works.

However, now I do not see the Access Point.

What is still wrong ??

iKK001 commented 3 years ago

Finally, using the Adafruit Feather M0, you must take care of the differnt pinout :

Please set the pins as follows - and by doing so everything works !!!!!

void setup()
{
  // This is the only line of code that is Feather M0 WINC1500
  // specific, the rest is the same as for the WiFi101
  WiFi.setPins(8, 7, 4, 2);

  // ... the rest of whatever was there...
}
khoih-prog commented 3 years ago

Hi @iKK001

Glad you found out the correct way to use.

I'm late in letting you know you have to use the correct pin settings for the board.

Selection_832

Your experience will definitely help other users.

Cheers,

iKK001 commented 3 years ago

Dear Khoih, the Adafruit Feather M0 still does not work with your WiFiManager_Generic_Lite (WiFi1010) library - and I am quite desperate about it.

I did buy the more modern board "Adafruit Nano RP2040 Connect" and then your library works just fine.

But I had to realize that my existing sleep-mode and interrupt code does not 1:1 work for the RP2040. Or in other words, I have too much code that only works for my Feather M0 and not for the RP2040.

Therefore, I am extremely desperate to get your WiFiManger_Generic_Lite library up'N'running also for the Feather M0.

Again, it all works until the moment where I type in 192.168.4.1 : My browser then shows nothing at all. (i.e. with the RP2040 it worked).

Is there any way you can find some time to investigate what the Feather M0 is doing differently ? It must be a very small thing I am sure - but I do not have the experience to understand your code just yet.

Thank you very much for any help on this.

khoih-prog commented 3 years ago

You can try either

  1. Nano-33-IoT, which is SAMD21-based board, using the same WiFiNINA_Generic library, and you can use the same interrupt / sleep code
  2. Have a look at the https://github.com/khoih-prog/RPI_PICO_TimerInterrupt or MBED_RPI_PICO_TimerInterrupt if you'd like to use the TimerInterrupt
  3. The issue for M0 is deep inside either the board design (wiring, pin-outs, etc.) or the WiFi101 library. I reach my limit to be able to solve it without the physical board. I also don't like to spend time on the not-polular out-of-date board.
    I suggest you can post on Adafruit Supported Products & Projects forum to ask for help

Sorry and good luck.

iKK001 commented 3 years ago

Thank you very much for the ideas.

I am not interested in a TimerInterrupt but rather how to put the RP2040 Connect in DEEP SLEEP and how it can be waken up by a hardware pin interrupt. I already asked in the Arduino Forum but no answers yet. Maybe you have an idea ?

Since battery power is very critical I'd like to have the RP2040 Connect board in sleep-mode until a hardware pin is pulled low. The Feather M0 can do that without problems. However, for the RP2040 Connect there is no library yet that I've found to do that.

Isn't the RP2040 Connect also a SAMD21 based board and should be able to work with the same interrupt / sleep mode libraries ?? It is hard to understand why the Arduino Low Power Library does not work (https://github.com/arduino-libraries/ArduinoLowPower) - or its dependent RTCZero library as well (https://github.com/arduino-libraries/RTCZero). Do you have an idea ?

Therefore I am not sure if the Nano-33-IoT you suggest is any better. Especially since this board is not mentioned in the Arduino Low Power Library (or RTCZero) as well. So I don't think it is worth buying another board and hoping to eventually get it in DEEP SLEEP...

Did you ever put an RP2040 Connect in SLEEP Mode ?

And in general - if you are open for a customer-feedback : As a user struggling with it since days, I think you should take out the Adadruit Feather M0 (possibly also the Feather M0 Express) completely out of your WiFiManager_Generic_Lite library documentation. Due to the fact that it simply does not work out of the box.

What is the difference between WiFiNINA_Generic_Lite library and WiFiNINA_Generic library ? Does the first one use the second one for all non-WiFi101 boards ? This is something you also could describe a bit better in your documentation maybe since very unclear to first use users like me. Thanks

I appreciate your answers very much. Thank you very much.

rahulrana-XOM commented 2 years ago

@iKK001 Did you manage to get the library working for the Adafruit Feather M0?

iKK001 commented 2 years ago

nope - unfortunately not. I contacted the library owner. But there is not much support for this board from his side.