WSL Ubuntu & Silabs CP210x => COM Port Problem

GvTardy
Posts: 23
Joined: Tue Jan 01, 2019 3:26 pm

WSL Ubuntu & Silabs CP210x => COM Port Problem

Postby GvTardy » Tue Jan 01, 2019 3:48 pm

Hi,

being new to the ESP-IDF and Linux I hope that my question is worth asking it here.
Searching the web I was not able to find a solution:

1.) In Windows 10 64x (1809) my ESP32 (HelTec ESP32) shows up as COM3 (Silabs CP210x_Universal_Windows_Driver)
unplugging the device: it disappears
In Device Manager->Silicon Labs CP... ->Right Click -> Properties -> Port Settings I set it to 115200 Baud

2.) In Ubuntu (Windows Subsystem for Linux) I execute:
sudo chmod 666 /dev/ttyS3
sudo usermod -a -G dialout $USER
3.) Menuconfig is configured ->Serial Flasher config -> (/dev/ttyS3) default port

Running make flash I get an error:
raise.serialutil.SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg)
serial.serialutil.SerialException: [Errno 5] could not open port /dev/ttyS3: [Errno 5] Input/Output error: '/dev/ttyS3'

____________________________________________________________
Now the strange thing that do not understand:
a.) I go into the registry and change the COM port to something else (e.q. 9)
b.) I adjust the port in Ubuntu and makeconfig to /dev/ttyS9
Now I can flash my ESP32

BUT: make monitor does not work:
Errno 5
could no open port
Input/Output error

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
I followed several instructions to get things working, but have failed so far.
Any clue, any ideas?
Please help.

Thank you very much in advance and a happy new year to everyone!
Georg

GvTardy
Posts: 23
Joined: Tue Jan 01, 2019 3:26 pm

Re: WSL Ubuntu & Silabs CP210x => COM Port Problem

Postby GvTardy » Fri Jan 04, 2019 12:36 pm

Hi everybody,

I could narrow the Com Port problem a bit down:

Driver: Silicon Labs USB to UART Bridge (Version 10.1.4.2290 Date 11/26/2018)

a.)
setting the driver as COM3 and booting Windows, entering UBUNTU -> Errno 5 on make flash or make monitor

b.)
setting the driver as COM4 and booting Windows,
changing the Com Port in the registry (HKLM\HARDWARE\DEVICEMAP\SERIALCOMM) to COM3
entering UBUNTU -> works fine

The bad thin is: I have to manually change the COM Port number everytime I plug the ESP32 in again.

It seems as if Windows grabs the port.

Any ideas?

Kind regards
GvTT

GvTardy
Posts: 23
Joined: Tue Jan 01, 2019 3:26 pm

Re: WSL Ubuntu & Silabs CP210x => COM Port Problem

Postby GvTardy » Fri Jan 04, 2019 1:15 pm

Hi,

I solved this problem:

finding that the problem was caused by windows, I downloaded another driver.

The one on the SILICON LABS web page does not seem to work.

I now use the one provided by Pololu, which works fine with Windows and WSL Ubuntu.

Sorry for bother you,
hope I helps others.

GvTT

chrismerck
Posts: 76
Joined: Tue May 29, 2018 8:00 pm

Re: WSL Ubuntu & Silabs CP210x => COM Port Problem

Postby chrismerck » Fri Jan 04, 2019 2:34 pm

Hey Georg,

In my experience, using a serial port through some amount of emulation is only useful in an emergency... for serious development, it's best to have it native. Otherwise you waste a lot of time with comms issues.

If you're stuck on Windows, note that the build system and flashing does work for us under Cygwin. Perhaps that's an alternative to Ubuntu for you. (My experience has been best with MacOS however.)

GvTardy
Posts: 23
Joined: Tue Jan 01, 2019 3:26 pm

Re: WSL Ubuntu & Silabs CP210x => COM Port Problem

Postby GvTardy » Sat Jan 05, 2019 11:41 am

Hello Chris,

thank you for your answer. I totally agree: if you are serious about it, go native!

As I am hobbyist and have all my other computer programs windows based, installing a native Linux is not an option.

I tried Msys32 before, this gave the impression of being slow, though I failed to time it.

For this reason I wanted to give WSL a change as an alternative to a Virtual Machine.
The installation went smooth, except for the driver trouble. Was it worth it? I cannot say. Now that it is running, I will not go back.

As I am new, my posts have been reviewed to clearance while you answered.

To sum this up: the original Silicon Labs "CP210x USB to UART Bridge Driver" caused the problem in Ubuntu (Windows Subsystem for Linux). This got solved by installing the Pololu CP210x COM driver.

Thank you very much
many greetings
Georg

Who is online

Users browsing this forum: Bing [Bot], Gaston1980 and 148 guests