I’ve been using Mac OS for decades and I’m not used to Windows anymore.
Now, I need to proceed my work in VSCode for Windows because I’ve received a new model of TTGO T3 that uses WCH CH9102F USB interface. This interface simply doesn’t connect to Mac.
I’m running Windows in Parallels Desktop virtual machine. I’ve installed VSCode for Windows and imported a copy of my project folder into it.
Then I’ve installed the port driver and now it’s already available in Windows Control Panel:
COM3 is the device name. upload_port = COM3 is valid as you can see in the docs.
However, the correct answer is to delete both upload_port and monitor_port instructions from the platformio.ini, since PlatformIO is well-capable of auto-detecting the upload port.
Just that? It couldn’t be easier. Good solution of Microsoft (finally).
I’ve been running projects in parallel, connected via an USB hub. One of them consists of two LoRa modules communicating with each other. There’s always one that shows up as /dev/cu.SLAB_USBtoUART and the other ones receive numerical suffixes which always increase every time a module is switched off or disconnected and further reconnected.
Moreover, so far I could never depend on this auto-detecting feature. For some reason it rarely works. Not even with a single device connected at a time.
Usually I visit PIO Home, section “Projects”, “configure”, where I delete the selected port and wait for the updated ports list. I select the corresponding port and “Save”. But it usually has no effect on platformio.ini, it’s just to be aware what’s the new port designation. Then I open platformio.ini and edit the port manually.
I guess fixing this represents as a good improvement opportunity. But I’m aware it affects only a few users, maybe only who connects more that one device and uses Mac OS.