Error while installing ESP32 library

Hi i am getting this error while trying yo install the esp32 libraries

Downloading packages
arduino:dfu-util@0.11.0-arduino5
esp32:esp-rv32@2302
esp32:esp-x32@2302
esp32:esp-xs2@2302
esp32:esp-xs3@2302
esp32:esp32-arduino-libs@idf-release_v5.1-632e0c2a
esp32:esptool_py@4.6
esp32:mklittlefs@3.0.0-gnu12-dc7f933
esp32:mkspiffs@0.2.3
esp32:openocd-esp32@v0.12.0-esp32-20240821
esp32:riscv32-esp-elf-gdb@12.1_20231023
esp32:xtensa-esp-elf-gdb@12.1_20231023
Failed to install platform: 'esp32:esp32:3.0.7'.
Error: 2 UNKNOWN: read tcp 10.21.16.26:65291->185.199.111.133:443: wsarecv: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

Welcome to the forum

It sounds like you are trying to install the ESP32 board files not library files ?

What URL have you got in the Additional Boards Manager of the IDE ?

i got it to work but now i am getting this error when trying to connect to WIFI this is the code that i used to test my WIFI connection

#include <WiFi.h>

const char* ssid = "The Social Guest"; // SSID of the open Wi-Fi network

void setup() {
  Serial.begin(115200);
  delay(1000);
  Serial.println("Starting Wi-Fi connection...");

  // Start Wi-Fi in station mode
  WiFi.mode(WIFI_STA);

  // Disconnect from any previous connection
  WiFi.disconnect(true);
  delay(1000);

  // Attempt to connect to the open network
  WiFi.begin(ssid);

  int attempts = 0;
  while (WiFi.status() != WL_CONNECTED && attempts < 20) {
    delay(1000);
    Serial.print(".");
    attempts++;
  }

  // Check connection status
  if (WiFi.status() == WL_CONNECTED) {
    Serial.println("\nConnected to Wi-Fi!");
    Serial.print("IP Address: ");
    Serial.println(WiFi.localIP());
  } else {
    Serial.println("\nFailed to connect to Wi-Fi.");
    Serial.print("Error Code: ");
    Serial.println(WiFi.status());
  }
}

void loop() {
  // Monitor Wi-Fi connection
  if (WiFi.status() != WL_CONNECTED) {
    Serial.println("Disconnected from Wi-Fi. Attempting reconnection...");
    WiFi.disconnect();
    WiFi.begin(ssid);
    delay(5000); // Retry delay
  } else {
    Serial.println("Wi-Fi connection stable.");
    delay(10000); // Check every 10 seconds
  }
}

and this is the error that i am getting

E (2410) wifi_init_default: netstack cb reg failed with 12308
....................
Failed to connect to Wi-Fi.
Error Code: 1
Disconnected from Wi-Fi. Attempting reconnection...
E (23433) wifi:sta is connecting, return error
Disconnected from Wi-Fi. Attempting reconnection...
E (28434) wifi:sta is connecting, return error

Hi @hayusoof. Does the Wi-Fi access point with SSID "The Social Guest" use the 5 GHz band or the 2.4 GHz band?

5 ghz

OK, that is the cause of the problem. The ESP32 can only connect to 2.4 GHz access points.

Look around in the settings of your Wi-Fi router or hotspot to see if there is an option for creating a 2.4 GHz band access point. If you can't find a way to do that, you can add a reply here on the forum thread with details about the hardware of your access point and the forum helpers might be able to provide guidance for how to make it use the 2.4 GHz band.

so my current problem is that i live in a community and am not sure if there is anyway of getting access to my router/access point i have put in a request with maintenance to see if this can be sorted out but i will have to see what they say

Do you have a mobile phone? If so, you can configure it to product a Wi-Fi hotspot. You can connect the ESP32 board to that hotspot. It can then use your phone's data plan to access the Internet through the hotspot.

You will of course have the same problem as before if your phone produces a 5 GHz access point. If so, you should be able to configure the phone to produce a 2.4 GHz access point instead.

my plan if i cannot gain access to a 2.4ghz network is to use the 5ghz network with my laptop to create a 2.4ghz network that is hopefully constantly running

So I have been able to get it to connect, but the only way that it has connected to the Wi-Fi has been through a brute force method where I set the code so that it keeps restarting after it fails to connect to the Wi-Fi. My network is a 2.5/5 GHz network so in theory it should connect what happens is that it does not detect the network first few times and then time to connect little detect the network and connect. Is there any way to solve this or do I have to keep using a brute force method

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