Error on example "demo_esp32_socket.py"

Hello,

I am rather new on the spendid Maixduino and try ro run the example “demo_esp32_socket.py”. On the device is installed the recent firmware version 5. During the run on MaixPyIDE the following error messages are produced:

1
1
ESP32_SPI firmware version: 1.2.2
(‘192.168.178.48’, ‘255.255.255.0’, ‘192.168.178.1’)
True
124

Traceback (most recent call last):
File “”, line 59, in
OSError: [Errno 5] EIO
MicroPython v0.5.0-12-g284ce83 on 2019-12-31; Sipeed_M1 with kendryte-k210
Type “help()” for more information.

The error occurs on the instruction:
data = sock.recv(4096)

How can I solve this problem?

Many thanks for your hints and best regards
Walter

hi, you need read the readme.md first:

Use ESP32 as WiFi module

  • Download latest firmware of esp32 here
  • Upload firmware to ESP32 by esptool or other burn tools, e.g.
pip install esptool
esptool.py --chip esp32 --port /dev/ttyUSB1 erase_flash
esptool.py --chip esp32 --port /dev/ttyUSB1 --baud 1500000 write_flash -z 0x0000 maixduino_esp32_firmware_v1.4.0.bin
  • Then try demo

Hello Zepan,
Many Thanks for your quick reply. I istalled the new ESP firmware, but got the following error message:

1
ESP32_SPI firmware version: 1.4.0
(‘192.168.178.48’, ‘255.255.255.0’, ‘192.168.178.1’)
True
124
Traceback (most recent call last):
File “”, line 59, in
OSError: [Errno 5] EIO

MicroPython v0.5.0-12-g284ce83 on 2019-12-31; Sipeed_M1 with kendryte-k210
Type “help()” for more information.

Occurred at the same instruction: data = sock.recv(4096)

Any hint?

Many thanks and best regards
Walter

I can ping the target site in 180 mS with:
print(“ping dl.sipped.com:”, nic.ping(“dl.sipeed.com”), “ms”)

I have the same problem. I have Maix Go and the wifi is with Esp8285. Ping to dl.sipeed.com is 212ms. Lets print on my terminal:
1
b’AT+UART_CUR=921600,8,1,0,0\r\r\n\r\nOK\r\n’
b’AT\r\r\n\r\nOK\r\n’
[MaixPy] esp8285_nic_connect | get nic
(‘192.168.1.100’, ‘255.255.255.0’, ‘192.168.1.1’, ‘0’, ‘0’, ‘00:21:27:d4:b2:4c’, ‘House1’)
[MaixPy] parse_ipv4_addr | It is not string IP format:dl.sipeed.com
124
rcv len: 0

Hello Zepan,
I met the same problem with “data=sock.recv(4096)”
Any hint?
Thank you very much.