Mkr1010 not connecting to wifi

hi can someone please help im trying to connect my mkr 1010 to the wifi and just for the moment im trying to display hello in the serial monitor but i keep on getting an endless list of it trying to connect to my wifi and im not sure why . #include <ArduinoHttpClient.h>
#include <WiFiNINA.h>
#include "arduino_secrets.h"

char ssid[] = SECRET_SSID;
char pass[] = SECRET_PASS;

char serverAddress[] = "echo.websocket.org";
int port = 80;

WiFiClient wifi;
WebSocketClient client = WebSocketClient(wifi, serverAddress,port);
int status = WL_IDLE_STATUS;
int count = 0;

void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
while( status != WL_CONNECTED){
Serial.print("Attempting to connect to Network named: ");
Serial.println(ssid);

status = WiFi.begin(ssid,pass);

}

Serial.print("SSID: ");
Serial.println(WiFi.SSID());

IPAddress ip = WiFi.localIP();
Serial.print("IP Address: ");
Serial.println(ip);

}

void loop() {
// put your main code here, to run repeatedly:
Serial.println("starting WebSocket client");
client.begin();

while(client.connected()){
Serial.print("Sending hello");
Serial.println(count);

client.beginMessage(TYPE_TEXT);
client.print("hello");
client.print(count);
client.endMessage();

count++;

int messageSiz e = client.parseMessage();

if(messageSize > 0){
  Serial.println("Received a message:");
}

}

} (edited)
[7:10 PM]
and this is my arduino_secrets.h file with my wifis name and password #define SECRET_SSID "AndroidHotspot2652"
#define SECRET_PASS "12345667"

Update your board's WiFiNINA following this guide WiFiNINA Firmware Updater and then follow this guide Connecting MKR WiFi 1010 to a Wi-Fi network, making sure that your enter your WIFI network credentials correctly.

i have done both those things multiple times and it stil does the same thing for me

Try connecting it to the cloud using the same wifi by follwing https://docs.arduino.cc/arduino-cloud/getting-started/iot-cloud-getting-started

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.