PlatformIO Community

Serial monitor cannot find port

Hi!

Have a problem with monitor port autodetection. Upload works fine but monitor cannot find port. Please help.

viktor@Black-pro-4:~/Documents/PlatformIO/Projects/Test $ cat platformio.ini
[env:esp12e]
platform = espressif8266
board = esp12e
framework = arduino
upload_port = /dev/cu.wchusbser*
upload_speed = 921600
monitor_speed = 115200
monitor_port = /dev/cu.wchusbser*
viktor@Black-pro-4:~/Documents/PlatformIO/Projects/Test $ ls -l /dev/cu.wchusbser*
crw-rw-rw-  1 root  wheel   19,  29 Jun 28 20:17 /dev/cu.wchusbserial14140
viktor@Black-pro-4:~/Documents/PlatformIO/Projects/Test $ ~/.platformio/penv/bin/platformio device monitor
could not open port '/dev/cu.wchusbser*': [Errno 2] could not open port /dev/cu.wchusbser*: [Errno 2] No such file or directory: '/dev/cu.wchusbser*'
viktor@Black-pro-4:~/Documents/PlatformIO/Projects/Test $

I don’t think it does shell path expansion when passing the monitor device to miniterm.py.

Works when used as upload_port and monitor_port?

Also PIO should try and autodetect the correct port automatically, so you don’t need to specify it.

Sorry, I use platformio for a 2 days for now and not too familiar with it yet, but I bet it was working yesterday ))
Also from the docs :


Sure, if I specify exact path to the port, it works fine. The problem is, that ch341 driver changes the port name in case… I don’t really know when, but quite often )))
In case I do not specify the monitor_port at all, it lists me all available ports prompting to choose which one shall I use - each time, a bit annoying.

If the wildcards don’t work (which I didn’t know exist), then something is broken. Open an issue at https://github.com/platformio/platformio-core/issues with the exact hardware you’re using.

Ok, was not sure is it issue or just me doing something wrong. Thank you!

monitor_port wildcards are new for PIO 4… so if the OP isn’t using the 4.0 beta, it won’t work. PIO 4 should go live in the next few days or week, so probably best to just wait for that.

1 Like

well, ok, thank you!