espflash
espflash copied to clipboard
wsl1 ubuntu20.04.5 Error: espflash::serial_not_found
I can't flash with ubuntu20.04, but idf.py flash is working normally.
: espflash /dev/ttyS7 target/riscv32imc-esp-espidf/debug/esp-rust
Error: espflash::serial_not_found
× The serial port '/dev/ttyS7' could not be found
help: Make sure the correct device is connected to the host system
@JurajSadel would you mind looking into this?
Hi @HoGC! Sorry for the late reply. What version and what command are you using, please?
@JurajSadel
esp-idf(v4.4.2) commit: 1b16ef6cfc2479a08136782f9dc57effefa86f661
Create project: cargo generate https://github.com/esp-rs/esp-idf-template cargo
cargo generate https://github.com/esp-rs/esp-idf-template cargo
🤷 Project Name : rs-demo
🔧 Destination: /home/g/00build-tools/01esp/rs-demo ...
🔧 Generating template ...
✔ 🤷 ESP-IDF native build version (v4.3.2 = previous stable, v4.4 = stable, mainline = UNSTABLE) · v4.4
? 🤷 Configure project to use Dev Containers (VS Code, GitHub Codespaces and Gitpod)? (beware: Dev Containers not avai✔ 🤷 Configure project to use Dev Containers (VS Code, GitHub Codespaces and Gitpod)? (beware: Dev Containers not available for esp-idf v4.3.2) · false
✔ 🤷 STD support · true
✔ 🤷 MCU · esp32
build: cargo build
flash: espflash /dev/ttyS3 target/xtensa-esp32-espidf/debug/rs-demo
Error: espflash::serial_not_found
× The serial port '/dev/ttyS3' could not be found
help: Make sure the correct device is connected to the host system
espflash is v1.7.0
but esptool.py is working normally.
read chip id: esptool.py -p /dev/ttyS3 chip_id
esptool.py v3.3.2-dev
Serial port /dev/ttyS3
Connecting.........
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting....
Detecting chip type... ESP32
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 3c:71:bf:88:dc:8c
Uploading stub...
Running stub...
Stub running...
Warning: ESP32 has no Chip ID. Reading MAC instead.
MAC: 3c:71:bf:88:dc:8c
Hard resetting via RTS pin...
@HoGC Thank you for providing more information. I followed your steps and I can't reproduce the issue, however, I'm using WSL2 instead of WSL1.
@JurajSadel
Can you install a new LTS, change wsl to 1, and then test it?
If you are using Ubuntu-20.04, you can install Ubuntu-22.04.
Use wsl --set-version Ubuntu-22.04 1 to change the version
Would you mind running the commands below from within WSL1 (making sure that the target device is connected!) and posting the output please? I just want to make sure this isn't an issue with the underlying serialport library.
$ sudo apt install pkg-config libudev-dev
$ git clone https://github.com/serialport/serialport-rs
$ cargo run --example=list_ports
@JurajSadel No ports found
g@LAPTOP-Q3JSDBEA:~/serialport-rs$ esptool.py -p /dev/ttyS2 chip_id
esptool.py v3.3.2-dev
Serial port /dev/ttyS2
Connecting.........
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting....
Detecting chip type... ESP32
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 08:3a:f2:b3:a4:68
Uploading stub...
Running stub...
Stub running...
Warning: ESP32 has no Chip ID. Reading MAC instead.
MAC: 08:3a:f2:b3:a4:68
Hard resetting via RTS pin...
g@LAPTOP-Q3JSDBEA:~/serialport-rs$ cargo run --example=list_ports
Finished dev [unoptimized + debuginfo] target(s) in 0.04s
Running `target/debug/examples/list_ports`
No ports found.
Sorry for the (very) late response, this issue sort of slipped my mind.
Since this seems to be (at least partially) to do with the serialport dependency, there's not much for us to do here until that is fixed upstream. We do explicitly state in the README presently that WSL1 is not supported, and I will update this text when/if this issue is resolved.