how to fix: OSError: [Errno 71] Protocol error

nobbynobby
Posts: 5
Joined: Thu May 02, 2019 8:12 pm

how to fix: OSError: [Errno 71] Protocol error

Postby nobbynobby » Mon May 27, 2019 3:24 pm

Hello,

I am trying to flash my first code to the ESP32 and i am getting the following output:

Code: Select all

Arduino: 1.8.9 (Linux), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 115200, None"



Sketch uses 200212 bytes (15%) of program storage space. Maximum is 1310720 bytes.

Global variables use 13500 bytes (4%) of dynamic memory, leaving 314180 bytes for local variables. Maximum is 327680 bytes.

esptool.py v2.6

Serial port /dev/ttyUSB0

Traceback (most recent call last):

File "/run/media/artur/3259cd15-d82f-455c-b644-c19ef74786f9/ArduinoIDE/arduino-1.8.9/hardware/espressif /esp32/tools/esptool/esptool.py", line 2959, in <module>

_main()

File "/run/media/artur/3259cd15-d82f-455c-b644-c19ef74786f9/ArduinoIDE/arduino-1.8.9/hardware/espressif /esp32/tools/esptool/esptool.py", line 2952, in _main

main()

File "/run/media/artur/3259cd15-d82f-455c-b644-c19ef74786f9/ArduinoIDE/arduino-1.8.9/hardware/espressif /esp32/tools/esptool/esptool.py", line 2652, in main

esp = chip_class(each_port, initial_baud, args.trace)

File "/run/media/artur/3259cd15-d82f-455c-b644-c19ef74786f9/ArduinoIDE/arduino-1.8.9/hardware/espressif /esp32/tools/esptool/esptool.py", line 222, in __init__

self._port = serial.serial_for_url(port)

File "/usr/lib/python3.7/site-packages/serial/__init__.py", line 88, in serial_for_url

instance.open()

File "/usr/lib/python3.7/site-packages/serial/serialposix.py", line 288, in open

self._update_rts_state()

File "/usr/lib/python3.7/site-packages/serial/serialposix.py", line 627, in _update_rts_state

fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_RTS_str)

OSError: [Errno 71] Protocol error

OSError: [Errno 71] Protocol error
i have a 1uF capacity between EN and GND (also tried 4.7uF). I have an external 5V power supply connected to 5V and GND. I am working from withing the Arduino IDE on my manjaro system. The code i am trying to put on the ESP is the following:

Code: Select all

void setup() {
  // put your setup code here, to run once:
  delay(1000);
  Serial.begin(115200);
}

void loop() {
  // put your main code here, to run repeatedly:
  Serial.println("is nich wahr!");
  delay(1000);
}
My linux user account is part of the 'uucp' group.

I have tried 4 different usb cables. They all don't work (the 'connect ____....._____' time out) except for one cable which most of the time gives me the Errno 71.

My board is the one on the left:

https://www.instagram.com/p/Buz7vyonfHl ... okvma6pnq2

I choose the dev kit board from the arduino ide drop down menu.

How do i fix this?

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: how to fix: OSError: [Errno 71] Protocol error

Postby ESP_Angus » Tue May 28, 2019 2:02 am

Hi nobbynobby,

Looks like you're doing everything correctly. The errno 71 "protocol error" usually means something went wrong at the USB link.

You can try looking in the kernel log (dmesg or "journalctl -k") to see if there are any USB-related kernel errors at the same time flashing failed.
I have an external 5V power supply connected to 5V and GND
You could try removing this and see if flashing works when powered from just USB (external power supply usually helps but may be injecting noise or trying to back-power the USB host port.)

You mentioned swapping USB cables but you could also try swapping USB ports, or using an external powered hub to connect to the ESP32.

It's also very possible the development board you have is faulty in some way.

nobbynobby
Posts: 5
Joined: Thu May 02, 2019 8:12 pm

Re: how to fix: OSError: [Errno 71] Protocol error

Postby nobbynobby » Wed May 29, 2019 8:21 am

Wow thank you for the tip with the dmesg and the journal. I got some interesting output and i don;t really know what it means but i think i am getting closer to the problem. Here is the output, can you help me interpret it?

dmsg:

Code: Select all

[ 4103.995601] usb 1-1: new full-speed USB device number 7 using xhci_hcd
[ 4104.168425] usb 1-1: New USB device found, idVendor=10c4, idProduct=ea60, bcdDevice= 1.00
[ 4104.168434] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4104.168439] usb 1-1: Product: CP2102 USB to UART Bridge Controller
[ 4104.168445] usb 1-1: Manufacturer: Silicon Labs
[ 4104.168449] usb 1-1: SerialNumber: 0001
[ 4104.170587] cp210x 1-1:1.0: cp210x converter detected
[ 4104.170715] cp210x 1-1:1.0: failed to get vendor val 0x370b size 1: -71
[ 4104.170726] cp210x 1-1:1.0: querying part number failed
[ 4104.170897] cp210x ttyUSB0: failed get req 0x4 size 2 status: -71
[ 4104.170925] cp210x: probe of ttyUSB0 failed with error -71

journal:

Code: Select all

Mai 29 10:18:45 spectre kernel: usb 1-1: new full-speed USB device number 7 using xhci_hcd
Mai 29 10:18:45 spectre kernel: usb 1-1: New USB device found, idVendor=10c4, idProduct=ea60,>
Mai 29 10:18:45 spectre kernel: usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumb>
Mai 29 10:18:45 spectre kernel: usb 1-1: Product: CP2102 USB to UART Bridge Controller
Mai 29 10:18:45 spectre kernel: usb 1-1: Manufacturer: Silicon Labs
Mai 29 10:18:45 spectre kernel: usb 1-1: SerialNumber: 0001
Mai 29 10:18:45 spectre kernel: cp210x 1-1:1.0: cp210x converter detected
Mai 29 10:18:45 spectre kernel: cp210x 1-1:1.0: failed to get vendor val 0x370b size 1: -71
Mai 29 10:18:45 spectre kernel: cp210x 1-1:1.0: querying part number failed
Mai 29 10:18:45 spectre kernel: cp210x ttyUSB0: failed get req 0x4 size 2 status: -71
Mai 29 10:18:45 spectre kernel: cp210x: probe of ttyUSB0 failed with error -71


nobbynobby
Posts: 5
Joined: Thu May 02, 2019 8:12 pm

Re: how to fix: OSError: [Errno 71] Protocol error

Postby nobbynobby » Wed May 29, 2019 10:38 am

Thank you for your answer.

Sorry if this is obvious but i don't know how i enable this patch. Do i need to download it via git or something? I am at the limit of my understandings and would like to learn more but i really know what i am supposed to do.

Who is online

Users browsing this forum: No registered users and 141 guests