Arduino IDE 1.8.5
Arduino Board Wifi MKR 1010
Windows 7 / 64 bit
I try to rebuild the project "Telegram Bot with Arduino MKR WiFi 1010" by AppsByDavideV
(you can find it on hackster.io).
Unfortunately I can not get it run, because my board does not connect to my WIFI network:
1.) Attempting to connect to WPA SSID: X XXXXXX
no success.
2.) WIFI is WPA2, as commonly used and there is a space within the SSID name,
but I have also tried a network w/o a space in the SSID name.
3.) SSID and PASSWORD are correctly entered in the code (I checked it often!) -
enclosed by double quotes.
4.) When I run the WifiNINA / ScanNetworks example, all visible networks are shown
5.) When I run the WifiNINA / ConnectWithWPA example, it attempts to connect,
but no success.
6.) When I upload any sketch I get the error messages "SAM-BA operation failed" and "An error occured while uploading the sketch" and "Verify successful" at the same time and the program seems to work.
7.) status = WiFi.begin(ssid, password);
returns 1, sometimes 6 for a moment, sometimes 4.
8.) It connects sometimes, when I restart the Wifi.
Yes, there were spaces and underlines in the SSID and password, but I removed special characters without any improvement.
SSIDs tested are 6 to 12 characters long and passwords are 8 to 9 characters long.
Furthermore I have tried an external power supply and 3x 470uF capacitors - no change.
My WORKAROUND so far is:
WiFi.disconnect(); // WORKAROUND!!!!!!!!
status = WiFi.begin(ssid, password);
Now the board connects to WiFi at the second try,
but after some time (half an hour to hour) the orange LED next to the USB port starts flashing (why?)
and an overnight test failed due to lost connection.
The Arduino MKR WiFi 1010 does not seem to be mature and we, the developers, are the more or less voluntarily beta testers.
There is also a great cavity of documentation so far (just a schema pdf, no placeplan).
The orange LED is the charge / battery light.
It has the same behaviour on some other MKR boards where it will flash after a period.
That issue is nothing to be concerned about and when in use with a LiPo its behaviour changes to indicate charge status etc.
which does basically work,
but some of the bot routines seem to wait forever or get stuck, when connection is lost and I do not want to dig into the library's code.
If you reboot your wireless source, it has the same effect. WiFi.status() doesn't obtain a real time connection status, which means you can't detect when it's offline. It's the same for the localip. I don't think the drivers (ublox firmware) are fully functional with WiFiNINA. Short of building a timer and periodically connecting back, I'm not sure what to do without realtime status.
Because if I use Serial.println(WiFi.Status) after I turn off the AP, the status never detects it dropped connection. In loop, if it drops connection, I want it to attempt to reconnect back on a timer (until the wifi source comes back online).
while (true) {
Serial.println(WiFi.status());
delay(1000);
}
After turning off the WAP I see 3 ("connected") for some more seconds and thereafter 6 ("disconnected").
So WiFi.status() works, it is just somewhat delayed.
I just got a MKr 1010 and I am trying to connect it to my network. It keep returns me '1' after WiFi.begin. I tried even the WiFi.disconnect() before begin, but it worked just few times. Now it gives me just WL_NO_SSID_AVAIL.