• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

error code: -3, reason: not connected

Q&A Forum › Category: ESP32 › error code: -3, reason: not connected
0 Vote Up Vote Down
Mezac de Lima asked 2 years ago

Hello,
About the excellent “Firebase: Control ESP32 GPIOs from Anywhere ” project from here at randomnerdtutorials.
In practice it is working correctly. The only problem is that eventually the board resets and prints the following error code: “error code: -3, reason: not connected“.

Could you guys tell me what could be causing the board to reset. (DOIT ESP32 DEVKIT V1).

8 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

Hi.
Does it print anything else before it resets? Or that’s the only message you get?
Regards,
Sara

0 Vote Up Vote Down
Mezac de Lima answered 2 years ago

Hi!
The ESP32 prints a message on reboot and another on return.
From what I understand, the board loses the wifi connection and when connecting again, it reboots.
But why does this happen?
 
Message before reboot:
” E (150682) wifi:sta is connecting, return error
[137843][E][WiFiSTA.cpp:317] begin(): connect failed! 0x3007
stream timeout, resuming…”
 
Message after reboot:
“error code: -3, reason: not connected”

0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

Hi.
From those errors, the issue seems to be a lost Wi-Fi connection.
It seems the board cannot reconnect.
Did you have connection issues with the Wi-Fi before?
Are you using a Wi-Fi repeater? 
 
Does the issue happen frequently at the same time? Or is it just random?
 
Regards,
Sara

0 Vote Up Vote Down
Mezac de Lima answered 2 years ago

Have you had problems connecting to Wi-Fi before? I did not have. It even has a 24h online camera on the same router and it has no defects. The problem also occurred on another network that I tested.
Are you using a WiFi repeater? no. Even the internet is public IP.

Does the problem occur frequently at the same time? Or is it just random? it’s random. In a one hour test following the operation of the board, the reset occurs once or twice.

0 Vote Up Vote Down
Mezac de Lima answered 2 years ago

One correction:
The two boards tested, reboot and immediately manage to reconnect with wifi.

0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

To be honest, I’m not sure what might be causing the issue.
I found a similar issue on the library github issues page, and the author mentions that it is related to the Wi-Fi network…
https://github.com/mobizt/Firebase-ESP-Client/issues/468
 
However, if the board reconnects right after restart, that’s a good workaround.
 
Regards,
Sara

0 Vote Up Vote Down
Mezac de Lima answered 2 years ago

Thank you very much for your effort to help me.
Sorry to insist, but if the board didn’t reboot it would be better for my application.
I ran some more tests and noticed that the board randomly prints error codes similar to the github link you posted. Here’s the before and after reboot.
Before reboot:
Token info: type = id token (GITKit token), status = on refreshing
Token info: type = id token (GITKit token), status = ready
Refresh token
stream timeout, resuming…
 
After reboot:
error code: -3, reason: not connected
 
At the bottom of the github page you posted there is a link to update the Firebase Client.
Today I installed the following update in VS CODE\PlatformIO: mobizt/Firebase Arduino Client Library for ESP8266 and ESP32@^4.3.8.
I’ll test with 4.3.8 and check how it works. Then post here.

0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

Ok.
Then, let me know the results.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.

      Notifications