Hi,
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.
Any idea?
Thanks
Hi,
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.
Any idea?
Thanks
Try using the built in example titled "ConnectWithWPA" found under File\Examples\WiFiNINA. It works out of the gate. On the arduino_secrets.h tab just place in your SSID and password. <-- That's assuming your using WPA.
I tried and it doesn't work. My router says that the Arduino is connected to it...
@tat - I'm not sure how to help you. Maybe one of the senior guys will chime in. I am a senior network engineer, so that side I understand completely. Post your code you're using (without password and SSID)?
Is the basic WPA connecting example
/*
This example connects to an unencrypted Wifi network.
Then it prints the MAC address of the Wifi module,
the IP address obtained, and other network details.
created 13 July 2010
by dlf (Metodo2 srl)
modified 31 May 2012
by Tom Igoe
*/
#include <SPI.h>
#include <WiFiNINA.h>
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
char ssid[] = SECRET_SSID; // your network SSID (name)
char pass[] = SECRET_PASS; // 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) {
; // wait for serial port to connect. Needed for native USB port only
}
// check for the WiFi module:
if (WiFi.status() == WL_NO_MODULE) {
Serial.println("Communication with WiFi module failed!");
// don't continue
while (true);
}
String fv = WiFi.firmwareVersion();
if (fv != "1.0.0") {
Serial.println("Please upgrade the firmware");
}
// attempt to connect to Wifi network:
while (status != WL_CONNECTED) {
Serial.print("Attempting to connect to WPA SSID: ");
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.print("You're connected to the network");
printCurrentNet();
printWifiData();
}
void loop() {
// check the network connection once every 10 seconds:
delay(10000);
printCurrentNet();
}
void printWifiData() {
// print your WiFi shield's IP address:
IPAddress ip = WiFi.localIP();
Serial.print("IP Address: ");
Serial.println(ip);
Serial.println(ip);
// print your MAC address:
byte mac[6];
WiFi.macAddress(mac);
Serial.print("MAC address: ");
Serial.print(mac[5], HEX);
Serial.print(":");
Serial.print(mac[4], HEX);
Serial.print(":");
Serial.print(mac[3], HEX);
Serial.print(":");
Serial.print(mac[2], HEX);
Serial.print(":");
Serial.print(mac[1], HEX);
Serial.print(":");
Serial.println(mac[0], HEX);
}
void printCurrentNet() {
// print the SSID of the network you're attached to:
Serial.print("SSID: ");
Serial.println(WiFi.SSID());
// print the MAC address of the router you're attached to:
byte bssid[6];
WiFi.BSSID(bssid);
Serial.print("BSSID: ");
Serial.print(bssid[5], HEX);
Serial.print(":");
Serial.print(bssid[4], HEX);
Serial.print(":");
Serial.print(bssid[3], HEX);
Serial.print(":");
Serial.print(bssid[2], HEX);
Serial.print(":");
Serial.print(bssid[1], HEX);
Serial.print(":");
Serial.println(bssid[0], HEX);
// print the received signal strength:
long rssi = WiFi.RSSI();
Serial.print("signal strength (RSSI):");
Serial.println(rssi);
// print the encryption type:
byte encryption = WiFi.encryptionType();
Serial.print("Encryption Type:");
Serial.println(encryption, HEX);
Serial.println();
}
The thing is that it works on my phone hotspot...
Ah - If it works on your hotspot but your router/ap, then reboot your router (and or AP) as it could just be arp caching glitch etc. Also make sure DHCP is turned on somewhere on your network. Also - make certain your wireless configuration in your AP (or wireless router) is set to accept regular WPA/WP2.
The MKR1010 doesn't support WPA2 Enterprise encryption (so you can't use that level).
I tried after reboot, but it has the same problem... It is on WPA2
I have the same issue. my router shows the MKR1010 is connected and has good signal strength but i can not ping it from my laptop.
The sketch keeps returning status as 1. I used the basic example available in the IDE. Anyone have any insights ? I have a MKR1000 that doesn’t exhibit the same behavior.
Have you tried to update to the latest firmware from Firmware Update 1.1.0 - available now (with source code) - MKRWIFI1010 - Arduino Forum