Unstable serial port communication on Windows 10


#1

Observations

When operating the respective development sandbox on LinuxOnWindows, @clemens experienced different kinds of flaky behavior, specifically with board communication stability. Mostly, the issues are manifesting as different kinds of timeout errors, most probably caused by inadvertently resetting the MCU during communication.

@tonke also was able to confirm the same erratic timeout behavior on Win10 altogether - even without WSL.

"make recycle" freezes

Thanks, @clemens.

Windows 10 native and WSL

c:\Program Files (x86)\Pycom\Pycom Firmware Update>pycom-fwtool-cli.exe -v -p COM5 flash -t c:\temp\FiPy-1.20.0.rc9.tar.gz
Running in PIC mode
Product ID: 19 HW Version: 3 FW Version: 0.0.8
Connecting....
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Erasing 256 KiB at address 0x00001000
Erasing 256 KiB at address 0x00041000
Erasing 256 KiB at address 0x00081000
Erasing 256 KiB at address 0x000C1000
Erasing 256 KiB at address 0x00101000
Erasing 256 KiB at address 0x00141000
Erasing 256 KiB at address 0x00181000
Erasing 256 KiB at address 0x001C1000
Auto-detected Flash size: 8MB0
Flash params set to 0x023f
Compressed 21456 bytes to 14957...
Flash params set to 0x023f 0x00001000... (100 %)
Compressed 21456 bytes to 14957...
Flash params set to 0x023f
Compressed 21456 bytes to 14957...
Exception: Write timeout

Thanks, @tonke.


Investigations

We started to investigate the issue and found out that other people also have become frustrated by this or similar problems.

Outcome

So, we recognize running the development sandbox on LinuxOnWindows might not be the very best choice yet and will require more polishing. In the meanwhile, we will probably discourage the native usage of Win10 for running the development sandbox.

Outlook

However, we will test whether programming the device through a VirtualBox machine running Debian works flawlessly.


Running rshell natively on Windows
Setup commandline-based MicroPython development environment on Linux, macOS and Windows
Running rshell natively on Windows
#2

Introduction

We are trying to compile a list of possibly related issues here which somehow match the scope of “serial interface communication problems with ESP32 modules, mostly timeout related” - on Win10 natively as well as on WSL.

Documentation

Issues

rshell

Pycom

Microsoft WSL

Pyserial


#3

Possible solutions

These are two issues from the rshell project itself dedicating themselves to make it Windows compatible. As users report about having success with them, there should be a way for us as well?

1. Enable serial port

2. Run natively on Windows / Use different serial port notation

rshell --port COM3 repl

Running rshell natively on Windows
split this topic #4

A post was split to a new topic: Running rshell natively on Windows


#5

I tried this on Linux under Win10 but see no more stable behavior. Same sometimes working, mostely not as before!