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

ETIMEDOUT on Metro M4 AirLift Lite #203

Open
sam-k0 opened this issue Aug 7, 2024 · 4 comments
Open

ETIMEDOUT on Metro M4 AirLift Lite #203

sam-k0 opened this issue Aug 7, 2024 · 4 comments

Comments

@sam-k0
Copy link

sam-k0 commented Aug 7, 2024

Hello adafruit community,
I am following the guide on how to connect / request here:
https://learn.adafruit.com/adafruit-metro-m4-express-airlift-wifi/internet-connect-2
I am using CircuitPython Version 9.1.1 and the onboard ESP has firmware ver. 1.2.2

And it works fine, connects to my wifi, gets an ip address, can ping google etc. but times out with this error when trying to execute below source code:

  File "code.py", line 76, in <module>
  File "adafruit_requests.py", line 701, in get
  File "adafruit_requests.py", line 647, in request
  File "adafruit_esp32spi/adafruit_esp32spi_socketpool.py", line 140, in recv
  File "adafruit_esp32spi/adafruit_esp32spi_socketpool.py", line 185, in recv_into
OSError: [Errno 116] ETIMEDOUT

Relevant source:

print("Fetching text from", TEXT_URL)
r = requests.get(TEXT_URL)
print("-" * 40)
print(r.text)
print("-" * 40)
r.close()

I don't understand why it wouldn't work when it clearly can ping google and even poll adafruit for their ip address.
Any help appreciated.

@justmobilize
Copy link
Collaborator

firmware ver. 1.2.2 will have really old certs. Can you please update to the most recent version - instructions here and try again?

@dhalbert
Copy link
Contributor

dhalbert commented Aug 7, 2024

Also, did you change TEXT_URL, and if so, what is the new one?

@sam-k0
Copy link
Author

sam-k0 commented Aug 8, 2024

Also, did you change TEXT_URL, and if so, what is the new one?

Nope, no change from the tutorial, using the adafruit wifi test url. But I'm currently trying to update the esp firmware, maybe that will solve it 👍

@sam-k0
Copy link
Author

sam-k0 commented Aug 8, 2024

firmware ver. 1.2.2 will have really old certs. Can you please update to the most recent version - instructions here and try again?

I just updated the firmware to 1.7.7, and unfortunately the error (timeout) persists.
Edit:
I turned on the esp._debug and this is the output:

Ping google.com: 10 ms
Fetching text from http://wifitest.adafruit.com/testwifi/index.html
*** Get host by name
*** Get socket
Allocated socket #0
*** Socket connect mode 0
*** Open socket to bytearray(b'4\xcf\xdb\x88') 80 0
Writing: b'GET'
Writing: b' /'
Writing: b'testwifi/index.html'
Writing: b' HTTP/1.1\r\n'
Writing: b'Host'
Writing: b': '
Writing: b'wifitest.adafruit.com'
Writing: b'\r\n'
Writing: b'User-Agent'
Writing: b': '
Writing: b'Adafruit CircuitPython'
Writing: b'\r\n'
Writing: b'\r\n'
ESPSocket: 0 bytes available
ESPSocket: 0 bytes available
ESPSocket: 0 bytes available
ESPSocket: 0 bytes available
ESPSocket: 0 bytes available
...(continues with that)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants