Giga r1 wifi won't connect to wpa2 network

My giga r1 wifi will connect to an iPhone hotspot, but not to my 2 ghz wpa2 wifi network. An Uno r4 wifi connects fine to the network using the same credentials.

Hi @acraig99 , it works for the rest of us so you must be doing something wrong - but you're not giving us much to go on in order to help. Please share the code fragment you're using to make the connection.

Steve-Below is the code fragment minus my ssid & password. It works fine connecting to iPhone hotspot. It won’t connect to my network. The same code when run on an uno r4 connects to my network.

void setup() {

  Serial.begin(115200);

while (!Serial) {

    ; // wait for Serial Monitor

  }



Serial.print("Connecting to ");

Serial.println(ssid);



  // Connect to Wi-Fi network

while (WiFi.begin(ssid, password) != WL_CONNECTED) {

delay(500);

Serial.print(".");

  }



Serial.println("\nConnected to WiFi!");



  // Get and print MAC address

  byte mac[6];

WiFi.macAddress(mac);



Serial.print("MAC Address: ");

for (int i = 0; i < 6; i++) {

if (mac[i] < 16) Serial.print("0");

Serial.print(mac[i], HEX);

if (i < 5) Serial.print(":");

  }

Serial.println();

}



void loop() {

  // Nothing else needed; MAC address is printed once after connection

}

Assuming the network isn't WPA2 Enterprise (GIGA won't work with that), try the scanNetworks example in the IDE to confirm visibility

Try the steps below:

  1. Update Wi-Fi firmware on GIGA R1 WiFi
  2. Set your hotspot to 2.4Ghz with security as WPA2/WPA3 Personal. Do not use SSID or Password that is too long and contain special characters.

Hi Dozie-

I have updated the wifi firmware as suggested. when I connect to the iPhone on the gigar1 using wifi hotspot I only see the iPhone Hotspot as an available network, When I run the same program on an UnoR4 Wifi, I see 5 networks.

I have attached the code (below) minus the said and password, used to list the networks available.


void setup() {
  Serial.begin(115200);
  while (!Serial) {
    ; // wait for Serial Monitor
  }

  Serial.print("Connecting to ");
  Serial.println(ssid);

  // Connect to Wi-Fi network
  while (WiFi.begin(ssid, password) != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }

  Serial.println("\nConnected to WiFi!");

  // Get and print MAC address
  byte mac[6];
  WiFi.macAddress(mac);

  Serial.print("MAC Address: ");
  for (int i = 0; i < 6; i++) {
    if (mac[i] < 16) Serial.print("0");
    Serial.print(mac[i], HEX);
    if (i < 5) Serial.print(":");
  }
  Serial.println();
  Serial.println();
  Serial.println("Scanning available networks...");
  listNetworks();
}

void loop() {
  // Nothing else needed; MAC address is printed once after connection
 
}
void listNetworks() {
  // scan for nearby networks:
  Serial.println("** Scan Networks **");
  int numSsid = WiFi.scanNetworks();
  if (numSsid == -1)
  {
    Serial.println("Couldn't get a WiFi connection");
    while (true);
  }

  // print the list of networks seen:
  Serial.print("number of available networks: ");
  Serial.println(numSsid);

  // print the network number and name for each network found:
  for (int thisNet = 0; thisNet < numSsid; thisNet++) {
    Serial.print(thisNet + 1);
    Serial.print(") ");
    Serial.print("Signal: ");
    Serial.print(WiFi.RSSI(thisNet));
    Serial.print(" dBm");
    Serial.print("\tChannel: ");
    Serial.print(WiFi.channel(thisNet));
    byte bssid[6];
    Serial.print("\t\tBSSID: ");
    printMacAddress(WiFi.BSSID(thisNet, bssid));
    Serial.print("\tEncryption: ");
    printEncryptionType(WiFi.encryptionType(thisNet));
    Serial.print("\t\tSSID: ");
    Serial.println(WiFi.SSID(thisNet));
    Serial.flush();
  }
  Serial.println();
}

void printEncryptionType(int thisType) {
  // read the encryption type and print out the name:
  switch (thisType) {
    case ENC_TYPE_WEP:
      Serial.print("WEP");
      break;
    case ENC_TYPE_WPA:
      Serial.print("WPA");
      break;
    case ENC_TYPE_WPA2:
      Serial.print("WPA2");
      break;
    case ENC_TYPE_NONE:
      Serial.print("None");
      break;
    case ENC_TYPE_AUTO:
      Serial.print("Auto");
      break;
    case ENC_TYPE_WPA3:
      Serial.print("WPA3");
      break;
    case ENC_TYPE_UNKNOWN:
    default:
      Serial.print("Unknown");
      break;
  }
}

void print2Digits(byte thisByte) {
  if (thisByte < 0xF) {
    Serial.print("0");
  }
  Serial.print(thisByte, HEX);
}

void printMacAddress(byte mac[]) {
  for (int i = 0; i < 6; i++) {
    if (i > 0) {
      Serial.print(":");
    }
    if (mac[i] < 16) {
      Serial.print("0");
    }
    Serial.print(mac[i], HEX);
  }
  Serial.println();
}

As a test, try adding the enc type to the begin call WiFi.begin(wifiSid, wifiPwd, ENC_TYPE_WPA2). This will skip the scan.

p.s. assume you have the antenna connected correctly

no change by adding ENC_TYPE_WPA2

hmm, what RSSI value do you get when you connect to your iPhone hotspot?

-80dbm

when I connect my Uno r4 to the iPhone I get -32dbm

Looking very much like a faulty or bad connection with the antenna. Could you post a pic of your GIGA focussed in on the antenna area?

If you wiggle the antenna side to side does it rotate nicely in its socket? If you remove it do you still get -80 RSSI to your phone?

it rotates fine in the socket. It won’t connect to the iPhone without antenna connected.

You could try another U.FL antenna (not expensive) but I'd personally do an RMA as there's clearly a problem with either the board or the antenna.

I assume an RMA is a return Authoization. How do i do that? Thanks Steve

I'd start by raising a support call using this https://www.arduino.cc/en/contact-us/ and take it from there. @Dozie may be able to offer guidance also.

Thank you!

You're most welcome, hope you get a resolution soon