I bought this board as it was a genuine Arduino board with Wifi. I cannot get the simple connect to WIFI to work from the getting started. I have tried other sample programs and have run into the same issue. 8266 boards have worked fine.
Here is the errors:
Arduino: 1.8.15 Hourly Build 2021/05/31 10:34 (Mac OS X), Board: "Arduino MKR WiFi 1010"
/Users/georgeshafer_1/Documents/Arduino/libraries/WiFiNINA/src/WiFi 2.cpp: In member function 'int WiFiClass::begin(const char*)':
/Users/georgeshafer_1/Documents/Arduino/libraries/WiFiNINA/src/WiFi 2.cpp:47:21: error: 'WL_MAX_ATTEMPT_CONNECTION' was not declared in this scope
uint8_t attempts = WL_MAX_ATTEMPT_CONNECTION;
^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/georgeshafer_1/Documents/Arduino/libraries/WiFiNINA/src/WiFi 2.cpp:47:21: note: suggested alternative: 'WL_DELAY_START_CONNECTION'
uint8_t attempts = WL_MAX_ATTEMPT_CONNECTION;
^~~~~~~~~~~~~~~~~~~~~~~~~
WL_DELAY_START_CONNECTION
/Users/georgeshafer_1/Documents/Arduino/libraries/WiFiNINA/src/WiFi 2.cpp: In member function 'int WiFiClass::begin(const char*, uint8_t, const char*)':
/Users/georgeshafer_1/Documents/Arduino/libraries/WiFiNINA/src/WiFi 2.cpp:67:21: error: 'WL_MAX_ATTEMPT_CONNECTION' was not declared in this scope
uint8_t attempts = WL_MAX_ATTEMPT_CONNECTION;
^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/georgeshafer_1/Documents/Arduino/libraries/WiFiNINA/src/WiFi 2.cpp:67:21: note: suggested alternative: 'WL_DELAY_START_CONNECTION'
uint8_t attempts = WL_MAX_ATTEMPT_CONNECTION;
^~~~~~~~~~~~~~~~~~~~~~~~~
WL_DELAY_START_CONNECTION
/Users/georgeshafer_1/Documents/Arduino/libraries/WiFiNINA/src/WiFi 2.cpp: In member function 'int WiFiClass::begin(const char*, const char*)':
/Users/georgeshafer_1/Documents/Arduino/libraries/WiFiNINA/src/WiFi 2.cpp:86:21: error: 'WL_MAX_ATTEMPT_CONNECTION' was not declared in this scope
uint8_t attempts = WL_MAX_ATTEMPT_CONNECTION;
^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/georgeshafer_1/Documents/Arduino/libraries/WiFiNINA/src/WiFi 2.cpp:86:21: note: suggested alternative: 'WL_DELAY_START_CONNECTION'
uint8_t attempts = WL_MAX_ATTEMPT_CONNECTION;
^~~~~~~~~~~~~~~~~~~~~~~~~
WL_DELAY_START_CONNECTION
/Users/georgeshafer_1/Documents/Arduino/libraries/WiFiNINA/src/WiFi 2.cpp: In member function 'uint8_t WiFiClass::beginAP(const char*, uint8_t)':
/Users/georgeshafer_1/Documents/Arduino/libraries/WiFiNINA/src/WiFi 2.cpp:111:21: error: 'WL_MAX_ATTEMPT_CONNECTION' was not declared in this scope
uint8_t attempts = WL_MAX_ATTEMPT_CONNECTION;
^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/georgeshafer_1/Documents/Arduino/libraries/WiFiNINA/src/WiFi 2.cpp:111:21: note: suggested alternative: 'WL_DELAY_START_CONNECTION'
uint8_t attempts = WL_MAX_ATTEMPT_CONNECTION;
^~~~~~~~~~~~~~~~~~~~~~~~~
WL_DELAY_START_CONNECTION
/Users/georgeshafer_1/Documents/Arduino/libraries/WiFiNINA/src/WiFi 2.cpp: In member function 'uint8_t WiFiClass::beginAP(const char*, const char*, uint8_t)':
/Users/georgeshafer_1/Documents/Arduino/libraries/WiFiNINA/src/WiFi 2.cpp:136:21: error: 'WL_MAX_ATTEMPT_CONNECTION' was not declared in this scope
uint8_t attempts = WL_MAX_ATTEMPT_CONNECTION;
^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/georgeshafer_1/Documents/Arduino/libraries/WiFiNINA/src/WiFi 2.cpp:136:21: note: suggested alternative: 'WL_DELAY_START_CONNECTION'
uint8_t attempts = WL_MAX_ATTEMPT_CONNECTION;
^~~~~~~~~~~~~~~~~~~~~~~~~
WL_DELAY_START_CONNECTION
exit status 1
Error compiling for board Arduino MKR WiFi 1010.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Here is the code:
#include <WiFiNINA.h>
char ssid[] = "mySSID"; // your network SSID (name)
char pass[] = "myPassword"; // your network password (use for WPA, or use as key for WEP)
int status = WL_IDLE_STATUS; // the Wifi radio's status
void setup() {
//Initialize serial and wait for port to open:
Serial.begin(9600);
while (!Serial);
// attempt to connect to Wifi network:
while (status != WL_CONNECTED) {
Serial.print("Attempting to connect to network: ");
Serial.println(ssid);
// Connect to WPA/WPA2 network:
status = WiFi.begin(ssid, pass);
// wait 10 seconds for connection:
delay(10000);
}
// you're connected now, so print out the data:
Serial.println("You're connected to the network");
Serial.println("----------------------------------------");
printData();
Serial.println("----------------------------------------");
}
void loop() {
// check the network connection once every 10 seconds:
delay(10000);
printData();
Serial.println("----------------------------------------");
}
void printData() {
Serial.println("Board Information:");
// print your board's IP address:
IPAddress ip = WiFi.localIP();
Serial.print("IP Address: ");
Serial.println(ip);
Serial.println();
Serial.println("Network Information:");
Serial.print("SSID: ");
Serial.println(WiFi.SSID());
// print the received signal strength:
long rssi = WiFi.RSSI();
Serial.print("signal strength (RSSI):");
Serial.println(rssi);
byte encryption = WiFi.encryptionType();
Serial.print("Encryption Type:");
Serial.println(encryption, HEX);
Serial.println();
}