Fatal Error: Could not open COM20, the port does not exist

Compiled software but then I receive the error message:
A fatal error occured: Could not open COM20, the port doesn´t exist.

Of course I checked and the Windows Device Manager shows the port and the device.
It´s an ttgo-lora32-v21
Device Manager shows: USB-Enhanced-Serial CH9102 (COM20)

I really would love to upload the compiled firmware but it does not work…

Also put upload_port = COM20 in platformio.ini without success

Not sure but I am using Docker - DEV Container:Python 3
do I have to configure something here??

Many thanks for your hints and help!
Pete

upload_port = \\.\COM20

Thank you - but does not help at all.
Same error - still no clue…

Welp, double escape maybe? upload_port = \\\\.\COM20

Tried again with upload_port = \\.\COM20
same problem and error message.

I checked the board and it´s working.
The cable is also fine.
I was able to upload meshtastic and other software like tinygs with their web based flashing tools.

When I launch the PlatformIO: Serial Monitor
it does not show any available ports
and
if I type in COM20
I receive: Error: could not open port COM20: No such file or directory: COM20

The lower left of VSCode (in your very pixelated image) says something about “Dev Container Python 3”? Are you perhaps connected to some remote machine or local continer?

Thats correct.
I had to install Docker on my machine to compile the code. (Never had this before…)

I am not a programmer… and do not have this much knowledge unfortunately.
So when I open the folder with PlatformIO it is always starting the DevContainer

I also thought, that the COM Port is not working due to the container?? but I am lost as I do not know if and where I have to configure the upload port somewhere else outside PlatformIO

I’ve never seen a setup before where you had to PlatformIO inside a Docker container… or how VSCode could even interact this before.

Well and if the docker is a linux machine, it would use some /dev/tty.. port, not COM ports. And that’s assuming it’s being forwarded at all.

What was the error when you tried to natively install and use PlatformIO?

Ok… mmmhhh
So I had a lot of trouble with this project.
I downloaded the code from GITHUB and unpacked it on my desktop in a folder
When I open the folder with PlatformIO a message comes up with: Folder contains a DevContainer configuration file. Reopen folder to develop in a container…

This is the software on github GitHub - lora-aprs/LoRa_APRS_iGate: This is a LoRa APRS iGate/Digi based on an ESP32

and you see there is a .devcontainer dir.

Will try the following:
I deleted all packages in user/name/.plaformio/packages
and try to compile again.
This time i did not reopen the container.

I think you can just uninstall the “DevContainer” extension in the VSCode extension tab.

I don’t get why they make it so complicated. I clone the project, I select the environment, I press build, I press upload and it just works.

If you want it to work in that “DevContainer” thing, which I presume is just a Docker container, you’ll probably have to adapt the config file to make it have access to all your serial ports / USB devices. And if it’s a Linux one it’ll not use COMx as port, but /dev/ttyUSB0 or whatever.

I deleted all packages in user/name/.plaformio/packages
and try to compile again.

This time i did not reopen the container and docker.

And the code was compiled and the upload to the board worked without any problems.
So the board is now flashed which is fine. :laughing:

I then deinstalled Docker extension and
deinstalled PlatformIO

Reinstalled PlatformIO extension

and compiled Filesystem Image
and it worked like a charm.

Problem solved…

Everything is working and Gateway is online.

Many thanks for your help and support!

Peter