Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USB isn't working 🤔 #2

Open
beriberikix opened this issue May 13, 2023 · 4 comments
Open

USB isn't working 🤔 #2

beriberikix opened this issue May 13, 2023 · 4 comments

Comments

@beriberikix
Copy link
Owner

The basic test is flashing an ESP32-C3. On a Linux host (mint) using docker, this works:

docker build -t embedded-container .
docker run -it --device /dev/ttyUSB0 embedded-container
cd zephyr
west build -b esp32c3_devkitm samples/hello_world
west flash

But not with podman:

podman build -t embedded-container-podman .
docker run -it --device /dev/ttyUSB0 embedded-container-podman
cd zephyr
west build -b esp32c3_devkitm samples/hello_world
west flash

The error is:

root@563c9f6da5a6:~/zephyr# west flash
-- west flash: rebuilding
ninja: no work to do.
-- west flash: using runner esp32
-- runners.esp32: Flashing esp32 chip on None (921600bps)
esptool.py v4.5
Found 1 serial ports
Serial port /dev/ttyUSB0
/dev/ttyUSB0 failed to connect: Could not open /dev/ttyUSB0, the port doesn't exist

A fatal error occurred: Could not connect to an Espressif device on any of the 1 available serial ports.
FATAL ERROR: command exited with status 2: /usr/bin/python3 /root/modules/hal/espressif/components/esptool_py/esptool/esptool.py --chip auto --baud 921600 --before default_reset --after hard_reset write_flash -u --flash_mode dio --flash_freq 40m --flash_size detect 0x0 /root/zephyr/build/esp-idf/build/bootloader/bootloader.bin 0x8000 /root/zephyr/build/esp-idf/build/partitions_singleapp.bin 0x10000 /root/zephyr/build/zephyr/zephyr.bin
@beriberikix
Copy link
Owner Author

beriberikix commented May 13, 2023

The USB device is there too:

root@13386886b893:~# ls -al /dev/tty*
crw-rw-rw- 1 nobody nogroup   5, 0 May 13 10:19 /dev/tty
crw-rw---- 1 nobody nogroup 188, 0 May 13 10:18 /dev/ttyUSB0

@beriberikix
Copy link
Owner Author

podman run -it --device /dev/ttyUSB0 --privileged embedded-container-podman made no difference.

@trond-snekvik
Copy link

@beriberikix did you ever find a solution to this?

@beriberikix
Copy link
Owner Author

Unfortunately not. I started looking into the machine configuration file but moved on to other things when I got frustrated 😬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants