Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

WiFiManager_NINA_Lite-->RP2040_WiFiNINA Example does not work #15

Closed
iKK001 opened this issue Sep 6, 2021 · 11 comments
Closed

WiFiManager_NINA_Lite-->RP2040_WiFiNINA Example does not work #15

iKK001 opened this issue Sep 6, 2021 · 11 comments

Comments

@iKK001
Copy link

iKK001 commented Sep 6, 2021

I bought another Arduino Nano RP2040 Connect board.

I installed the Arduino Mbed OS Nano Boards (v2.4.1) and I installed the library WiFiManager_NINA_Lite (v1.4.0)

Then running the default Example WiFiManager_NINA_Lite-->RP2040_WiFiNINA

But at start, the following error occurs:

Starting RP2040_WiFiNINA on MBED NANO_RP2040_CONNECT
WiFiManager_NINA_Lite v1.4.0
[WN] Hostname=RP2040-Master-Controller
LittleFS size (KB) = 64
LittleFS Mount Fail
Formatting... 

Any idea why an out-of-the-box Nano RP2040 Connect board would bring this error ?

What do I have to do to make the default Example work ?

@khoih-prog
Copy link
Owner

Hi,

I'm so sorry to see you getting new problem. I currently have no idea of what's happening with your new board because I have no issue with my current Nano_RP2040_Connect and can't duplicate the issue.

I suggest you try these 2 basic examples in LittleFS_Mbed_RP2040 library, which this library is based on :

  1. LittleFS_Counting
  2. LittleFS_Test

Please modify the code to have better debugging as follows

#define _LFS_LOGLEVEL_          4

then post the debug terminal so that I can spot anything abnormal.

I'm afraid that this is the board manufacturing issue similar to this [FACTORY SOLDER BUG] Nano Connect RP2040 Bad Solder for USB Mini Connector - possibly more?

Good Luck and be patient exploring,

@khoih-prog
Copy link
Owner

I've tested again and again my board here and be sure the issue is not caused by the ArduinoCore-mbed v2.4.1, the LittleFS_Mbed_RP2040 v1.0.1 or WiFiManager_NINA_Lite v1.4.0.

Be sure to check if you're using the same core /library version

LittleFS_Test on Nano RP2040 Connect

Start LittleFS_Test on Nano RP2040 Connect
LittleFS_Mbed_RP2040 v1.0.1
[LFS] LittleFS size (KB) = 64
[LFS] LittleFS Mount OK
====================================================
Writing file: /littlefs/hello1.txt => Open OK
* Writing OK
====================================================
Reading file: /littlefs/hello1.txt => Open OK
Hello from Nano RP2040 Connect

LittleFS_Counting on Nano RP2040 Connect

Start LittleFS_Counting on Nano RP2040 Connect
LittleFS_Mbed_RP2040 v1.0.1
[LFS] LittleFS size (KB) = 64
[LFS] LittleFS Mount OK
Times have been run = 1
 => Open to write OK

RP2040_WiFiNINA on MBED NANO_RP2040_CONNECT

After reformat => start over
Starting RP2040_WiFiNINA on MBED NANO_RP2040_CONNECT
WiFiManager_NINA_Lite v1.4.0
[WN] Hostname=RP2040-Master-Controller
LittleFS size (KB) = 64
LittleFS Mount OK
Loading DRD file failed
Flag read = 0x0
No doubleResetDetected
Saving DOUBLERESETDETECTOR_FLAG to DRD file : 0xd0d01234
Saving DRD file OK
SetFlag write = 0xd0d01234
[WN] bg: isForcedConfigPortal = false
[WN] bg:Stay forever in CP:No ConfigDat
[WN] clearForcedCP
[WN] SaveCPFile 
[WN] OK
[WN] SaveBkUpCPFile 
[WN] OK
[WN] SSID=WIFININA_51F485,PW=MyWIFININA_51F485
[WN] IP=192.168.4.1,CH=4
F
Your stored Credentials :
Blynk Server1 = account.duckdns.org
Token1 = token1
Blynk Server2 = account.ddns.net
Token2 = token2
Port = 8080
MQTT Server = mqtt.duckdns.org
Stop doubleResetDetecting
Saving to DRD file : 0xd0d04321
Saving DRD file OK
LittleFS Flag read = 0xd0d04321
ClearFlag write = 0xd0d04321

Run normally
Starting RP2040_WiFiNINA on MBED NANO_RP2040_CONNECT
WiFiManager_NINA_Lite v1.4.0
[WN] Hostname=RP2040-Master-Controller
LittleFS size (KB) = 64
LittleFS Mount OK
LittleFS Flag read = 0xd0d04321
Flag read = 0xd0d04321
No doubleResetDetected
Saving DOUBLERESETDETECTOR_FLAG to DRD file : 0xd0d01234
Saving DRD file OK
SetFlag write = 0xd0d01234
[WN] CCSum=0x113d,RCSum=0x113d
[WN] CrCCsum=0x1480,CrRCsum=0x1480
[WN] Valid Stored Dynamic Data
[WN] ======= Start Stored Config Data =======
[WN] Hdr=WIFININA,SSID=HueNet1,PW=12345678
[WN] SSID1=HueNet,PW1=12345678
[WN] BName=Nano_RP2040
[WN] i=0,id=sv1,data=Blynk_server1
[WN] i=1,id=tk1,data=token1
[WN] i=2,id=sv2,data=Blynk_server2
[WN] i=3,id=tk2,data=token2
[WN] i=4,id=prt,data=8080
[WN] i=5,id=mqt,data=mqtt_server
[WN] con2WF:SSID=HueNet1,PW=12345678
[WN] con2WF:OK
[WN] IP=192.168.2.111
[WN] SSID=HueNet1,RSSI=-13
[WN] IP=192.168.2.111
[WN] b:WOK
H
Your stored Credentials :
Blynk Server1 = Blynk_server1
Token1 = token1
Blynk Server2 = Blynk_server2
Token2 = token2
Port = 8080
MQTT Server = mqtt_server
Stop doubleResetDetecting
Saving to DRD file : 0xd0d04321
Saving DRD file OK
LittleFS Flag read = 0xd0d04321
ClearFlag write = 0xd0d04321
HHH

@iKK001
Copy link
Author

iKK001 commented Sep 7, 2021

Thank you for your effort.

First of all, having installed the Arduino Mbed OS Nano Boards (v2.4.1), then your library LittleFS_Mbed_RP2040 library, I find the LittleFS Examples under INCOMPATIBLE !!!!

As the official Arduino Install instructions for the Arduino Nano RP2040 Connect board suggests, I do NOT install the Arduino Mbed OS RP2040 boards (they are for Raspi's) but rather as the install instructions say, I install the Arduino Mbed OS Nano Boards (v2.4.1).

And I think that is the main problem here that you base your LittleFS (and potentially also your WiFiManager_NINA_Lite) library to another board-type.

Can you please make your trial with the Arduino Nano RP2040 Connect board (not the Arduino Mbed OS RP2040) and tell me if it still works or not ???

Thank you.

Here three screenshots showing what libraries I exactly installed. They are incompatible !

Screenshot 2021-09-07 at 08 49 00

Screenshot 2021-09-07 at 08 54 47

Screenshot 2021-09-07 at 09 02 04

You can see, the Example LittleFS is INCOMPATBIBLE !

Screenshot 2021-09-07 at 09 04 05

I use the newest Arduino IDE (hourly build from yesterday) - but also the official release Arduino IDE 1.8.16 does not work.

Please, for your tests, make sure you also update the IDE.

Screenshot 2021-09-07 at 09 06 20

Again, with a brand new Arduino Nano RP2040 Connect board out-of-the-box and with the libraries installed as shown above, I run the Example WiFiManager_NINA_Lite-->RP2040_WIFININA

(and I tried with 5 out-of-the-box new boards, they all show the same Error)

And I get the following Error:

Starting RP2040_WiFiNINA on MBED NANO_RP2040_CONNECT
WiFiManager_NINA_Lite v1.4.0
[WN] Hostname=RP2040-Master-Controller
LittleFS size (KB) = 64
LittleFS Mount Fail
Formatting... 

Screenshot 2021-09-07 at 09 10 45

The selected Board is the Arduino Mbed OS Nano Boards-->Arduino Nano RP2040 Connect
(as the official Arduino install instructions for this board type suggest)

Screenshot 2021-09-07 at 09 12 20

@iKK001
Copy link
Author

iKK001 commented Sep 7, 2021

Moreover, I found out that a board that I purchased 2 month ago works fine. But I received 8 boards that all are completely faulty as they seem to have a different Flash-memory Chip on them. I am completely clueless what is going on. This is just so frustrating. The old board works - the same SW on the new boards does not..

Old board (works):

works

New board (does not work):

doesNotWork

I mean, look at the ugly quality the official Arduino Store sells. One chip is even abrased not so see its origin possibly.

I am trying to return the faulty 8 boards. This is so bad.

@iKK001
Copy link
Author

iKK001 commented Sep 7, 2021

Thank you for updating the LittleFS library - I saw that there is an update today.

Now the LittleFS library is compatible with the Arduino Mbed OS Nano Boards (v2.4.1) as well.

In addition, I installed the newest Firmware on my newly purchased boards. I installed version NINA firmware (1.4.8) Arduino Nano RP2040 Connect .

But unfortunately, running the...

... default Example --> LittleFS_Mbed_RP2040 --> LittleFS_Counting

still lead to the exact same Error on these new RP2040 Connect boards:

Start LittleFS_Counting on Nano RP2040 Connect
LittleFS_Mbed_RP2040 v1.0.2
[LFS] LittleFS size (KB) = 64
[LFS] LittleFS Mount Fail
[LFS] Formatting... 

or respectively,
...default Example --> LittleFS_Mbed_RP2040 --> LittleFS_Test

again, lead to the exact same Error on these new RP2040 Connect boards:

Start LittleFS_Test on Nano RP2040 Connect
LittleFS_Mbed_RP2040 v1.0.2
[LFS] LittleFS size (KB) = 64
[LFS] LittleFS Mount Fail
[LFS] Formatting... 

So same behaviour !

I contacted support from Arduino to ask about a return of my newly purchased boards.

Or do you see anything related to your libraries ?

@khoih-prog
Copy link
Owner

khoih-prog commented Sep 7, 2021

Now the LittleFS library is compatible with the Arduino Mbed OS Nano Boards (v2.4.1) as well.
In addition, I installed the newest Firmware on my newly purchased boards. I installed version NINA firmware (1.4.8) Arduino Nano RP2040 Connect .
But unfortunately, running the...
... default Example --> LittleFS_Mbed_RP2040 --> LittleFS_Counting
still lead to the exact same Error on these new RP2040 Connect boards:

The new release is just a cosmetic change to remove the complaint as well the INCOMPATBIBLE ! warning. I don't expect it behaves anything different for your new board

So we can narrow down the current issue only happens to the so-called new boards, but I'm sorry I currently have no such a board to test, verify and investigate to know what's going wrong. I also don't know now if I order another new board, I can get the same new boards or not.

Hopefully this issue happens only to some batches of the boards, or the boards you got are counterfeit ones, just by the unprofessional looks of those boards (colour, parts, ugliness, non-gold-plated, what-else, etc.).

I contacted support from Arduino to ask about a return of my newly purchased boards.

IMHO, this is the correct way to do, but it's also beneficial to post an issue on the ArduinoCore-mbed core issue, so that it can be solved finally after the root cause found. I'm afraid with my time, knowledge, equipments, info I have, I can't do anything to help.

It's also good if you can keep 1 new board to test later.


Or do you see anything related to your libraries ?

I really don't know now as I don't have that kind of new board to test and investigate.


Keep us posted,

Good Luck,

@khoih-prog
Copy link
Owner

Can you please make your trial with the Arduino Nano RP2040 Connect board (not the Arduino Mbed OS RP2040) and tell me if it still works or not ???

I'm using the exactly-the-same Nano RP2040 Connect old board, using mbed_nano core v2.4.1, as you can see in the terminal output. And thanks to it's the same old board (ordered very early, directly from Arduino), it's working perfectly as you have experienced.

Starting RP2040_WiFiNINA on MBED NANO_RP2040_CONNECT

I believe this issue is wide-spreading now as more people experiencing the same problem, such as just reported here

@iKK001
Copy link
Author

iKK001 commented Sep 7, 2021

Yep, I saw - the bug-report on the Arduino Forum is also from me ;)

Arduino official store tells me that these two libraries are not official Arduino libraries but 3rd party. And that they cannot help me. And that I should go with the WiFiNINA official library.

But I really appreciate your work and I need a library that does Access-Points (potentially captive portal). And I am sure there must be a solution to this problem.

I am pretty sure the manufacturing process at Arduino did exchange a component (my suggestion is the Flash-memory) and this lead to the issue with your libraries.

If more people have the same issue - maybe it is time that you connect with Arduino as well to ask about the changes in Hardware that lead to the faulty behaviour of your libraries.

@khoih-prog
Copy link
Owner

khoih-prog commented Sep 7, 2021

Arduino official store tells me that these two libraries are not official Arduino libraries but 3rd party. And that they cannot help me. And that I should go with the WiFiNINA official library.

You can verify and try the WiFiNINA_Generic and see it's working the same way as orignal WiFiNINA library.

The issue here is the Flash, and we don't know what is the exactly the culprit.

Anyway, I'm closing the issue now as this is not proven that the bug of this library. I will continue investigating and reopen when the time comes.

If more people have the same issue - maybe it is time that you connect with Arduino as well to ask about the changes in Hardware that lead to the faulty behaviour of your libraries.

I don't think I'll do this as it's the responsibility of the manufacturers to investigate when they're selling batches having incompatibility and different functionalities from other batches.

Good Luck

@iKK001
Copy link
Author

iKK001 commented Sep 9, 2021

As @pennam found out, the problem can be solved by going back to the mbed-core version 2.3.1 (instead of 2.4.1).

@khoih-prog
Copy link
Owner

khoih-prog commented Sep 9, 2021

Good news.

So something introduced in the latest core created the incompatibility of the new batches' flash.
This issue has been isolated and sure can be fixed very soon. Happy this is so far not a bug of this library.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants