I'm using a fresh install of esp8266-1m-20210418-v1.15.bin on a ESP-01 with 1MB flash and I'm having some issues opening sockets to some websites.
Here's the basic code:
Code: Select all
def socket_connect(hostname):
addr = socket.getaddrinfo(hostname, 443)[0][-1]
s = socket.socket()
s.connect(addr)
s = ussl.wrap_socket(s, server_hostname=hostname)
s.close()
return True
Code: Select all
>>> socket_connect('www.google.com')
True
>>> socket_connect('www.yahoo.com')
True
>>> socket_connect('micropython.org')
True
Here's the first error:
Code: Select all
>>> socket_connect('www.nytimes.com')
TLS buffer overflow, record size: 5176 (+5)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 26, in socket_connect
OSError: (-257, 'RECORD_OVERFLOW')
Here is the second error:
Code: Select all
>>> socket_connect('www.wikimedia.org')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 26, in socket_connect
OSError: -40
Thanks!
Julien