Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wifi problem in ESP32 Board #7440

Closed
1 task done
suryanshRoy opened this issue Nov 7, 2022 · 6 comments
Closed
1 task done

Wifi problem in ESP32 Board #7440

suryanshRoy opened this issue Nov 7, 2022 · 6 comments
Labels
Status: Awaiting triage Issue is waiting for triage

Comments

@suryanshRoy
Copy link

suryanshRoy commented Nov 7, 2022

Board

Esp32 Dev Module

Device Description

Esp32 Dev module , chip is cp2102

Hardware Configuration

No

Version

v2.0.3

IDE Name

Arduino IDE

Operating System

Windows 10

Flash frequency

80mhz

PSRAM enabled

no

Upload speed

115200

Description

In the first Time my board gets connected to the WiFi and after 10 to 20 second the Board gets disconnected to the WiFi and unable to reconnect to the WiFi until I press the EN button in my board
and it print some error in the Serial Monitor whenever it gets disconnected from the WiFi.
Please help

Sketch

case ARDUINO_EVENT_WIFI_STA_DISCONNECTED:
      digitalWrite(wifiLed, false);
      break;
      case WIFI_PROV_STA_CONNECTING:
      {
      Serial.println("\nDisconnected. Connecting to the AP again... ");
      delay(20000);
      }
      break;
    case ARDUINO_EVENT_WIFI_STA_CONNECTED:
      Serial.printf("\nConnected to Wi-Fi!\n");
      digitalWrite(wifiLed, true);
      break;

Debug Message

E (621984) TRANSPORT_BASE: poll_read select error 113, errno = Software caused connection abort, fd = 48
E (621986) MQTT_CLIENT: Poll read error: 119, aborting connection
E (643762) esp-tls: couldn't get hostname for :a1p72mufdu6064-ats.iot.us-east-1.amazonaws.com: getaddrinfo() returns 202, addrinfo=0x0
E (643762) esp-tls: Failed to open new connection
E (643767) TRANSPORT_BASE: Failed to open a new connection
E (643772) MQTT_CLIENT: Error transport connect
E (643776) esp_mqtt_glue: MQTT_EVENT_ERROR

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@suryanshRoy suryanshRoy added the Status: Awaiting triage Issue is waiting for triage label Nov 7, 2022
@me-no-dev
Copy link
Member

Please update to 2.0.5, enable Core Debug to level Verbose (in the board menu) and try again. Then post the logs so we can see what is the WiFi doing. The logs you provided are from MQTT

@mrengineer7777
Copy link
Collaborator

I recommend turning on Verbose debugging as me-no-dev suggested.

May be resolved by #7344.

@suryanshRoy
Copy link
Author

suryanshRoy commented Nov 8, 2022

I did as me-no-dev said but I maked this code for ESP RAINMAKER and now it is unable to connect with the WiFi in ESP RAINMAKER and now in verbose it printing something like this :-

[    23][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 0 - WIFI_READY
[   188][I][WiFiProv.cpp:142] beginProvision(): Starting AP using BLE. service_name : ESP, pop : ESP RAIN MAKER
[   188][V][WiFiGeneric.cpp:440] _arduino_event_cb(): Provisioning Initialized!
[   350][V][WiFiGeneric.cpp:283] _arduino_event_cb(): STA Started
[   336][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 33 - PROV_INIT
[   363][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 2 - STA_START
[   785][V][WiFiGeneric.cpp:446] _arduino_event_cb(): Provisioning Start!
[   785][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 35 - PROV_START
[183372][V][WiFiGeneric.cpp:317] _arduino_event_cb(): SCAN Done: ID: 128, Status: 0, Results: 1
[183372][D][WiFiGeneric.cpp:852] _eventCallback(): Arduino Event: 1 - SCAN_DONE

So there is nothing by doing this if ESP RAINMAKER Is not Connecting to the WiFi

@me-no-dev
Copy link
Member

Log shows only that provisioning started, but not that it completed, so it could not even start connecting to any WiFi. Maybe you need to give a bit more details on what you are doing, code you are running and so on.

@SuGlider
Copy link
Collaborator

SuGlider commented Nov 9, 2022

Adding @sanketwadekar . I think he can help too.

@mrengineer7777
Copy link
Collaborator

  1. IR issue should be unrelated to WiFi. That's up to you to solve. If debug printing causes it to work then you have a timing issue.
  2. When you say "restart the Wi-Fi" do you mean restarted your router? The upcoming 2.0.6 release includes WiFi Should Reconnect For Most Reasons #7344, which may resolve that issue.

If you're looking for fellow developers to help with your code, I recommend sharing it on a GitHub repository. Obviously remove passwords, private keys, etc. No guarantees we'll fix your project though. We all have our own projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Awaiting triage Issue is waiting for triage
Projects
None yet
Development

No branches or pull requests

4 participants