I have been looking in the Documentation and it seems it might be abstracted on purpose, but I cannot select the COM port I want to use manually. When the cloud agent is running, It connects to my ESP32 board and the Cloud editor shows the connection via USB is good, but I still want manual control like with the desktop IDE version, as I am developing for 2 X ESP32 boards connected to my computer at the same time (project requires both).
I noted that in the Cloud Agent Debug console I can send commands like list, but I cannot find anything on the command and args needed to select a current "active" COM port so I can switch between the two:
I don't really understand your problem, but for the past few days I was running two copies of the IDE and had no problem selecting two different ports. In fact they would automagically re-connect if I used the same USB port.
Without running two, I never see a choice of ports; one is selected for me every time. In fact I do not see any mechanism to select a port.
I also have no idea why you are bringing the CloudAgent into the discussion, it has sat in my menu bar passively for years, and I seldom look at it, it just works, and I don't think it has anything to do with what you are trying to do but my hunches can be off.
It is true that it is intentionally abstracted when working with an Arduino Cloud IoT Thing. In this case, Arduino Cloud Editor will automagically select the port of the Device for you. In the case where you are working with multiple boards and it selects the serial port of the wrong board, you can force it to use the intended port by disconnecting the other board from your computer before performing an upload over USB.
However, when you are working with a non-IoT sketch, you do have control over the port selection. I'll provide instructions you can follow to do that:
Click the board selector on the Arduino Cloud Editor toolbar.
The "Select device" dialog will open.
Select the port you wish to use from the dialog.
If the board model that created the port could not be automatically identified (as will be the case for boards like yours that use a general purpose USB chip such as the WCH CH340 chip), an "Unknown Device Found" dialog will open. Select the model of your board from the dialog.
There isn't one. Arduino Cloud Agent only provides Cloud Editor the list of ports it discovered on your computer. It is Cloud Editor that decides what to do with that list.
Hi @sonofcy , appologies, I understand the confusion - To be more specific, With the standard Arduino Desktop IDE (no arduino cloud in use), I could simply select a COM port and Board type from a drop down. With Arduiono Cloud IDE, the agent you need to install in conjunction is what allows USB com to the device plugged in and the Web IDE, it works if you have one compatible device connected, but I couldn't find a place to tell the cloud agent to use a different COM port as I have multiple ESP devices connected to my PC at one time.
@ptillisch thanks! I did not realise that distinction in flow between and IoT sketch and regular sketch on the cloud IDE, I will only use non-IoT sketches anyway. Let me try you above guide tonight and let you know if I managed. Much appreciated!
You are welcome. I'm glad if I was able to be of assistance.
Yeah, it is a bit tricky. You are using the Arduino Cloud Editor to develop both IoT and non-IoT sketches, but in this specific detail there is a difference in how Cloud Editor behaves when you are working on an Arduino Cloud IoT Thing sketch.