CLI serial connection

I tried my hands on CLI and tested some serial functions but I cant get any serial functions to work properly.

In the output bellow I have checked for the device but get a error responce:

C:\Users\Endless\repos\C:\Users\Endless\repos\EndlessPorj>particle serial list
Found 1 device connected via serial:
COM25 - Electron>particle serial list
Found 1 device connected via serial:
COM25 - Electron
C:\Users\Endless\repos\Endlessproj>particle serial monitor COM25
Connect and display messages from a device
Usage: particle serial monitor [options]

Global Options:
  -v, --verbose  Increases how much logging to display                                                                                                [count]
  -q, --quiet    Decreases how much logging to display                                                                                                [count]

  --follow  Reopen the port after it closes, for example when the device resets                                                                     [boolean]
  --port    Use this serial port instead of auto-detecting. Useful if there are more than 1 connected device                                         [string]

I think you need to write particle serial monitor --port COM25. But with only one device connected you can even do this particle serial monitor (or better still particle serial monitor --follow) and let CLI detect that one and only device automatically.

Also be aware that this is only a monitor so you have no way of sending data to the device that way.
To do that you'd need a serial terminal program (e.g. PuTTY).

BTW, I think you disproved yourself above

but then you post this

That seems to do absolutely what it is supposed to do.
It lists the connected devices and which port they got assigned to.

1 Like

Thanks, again!

The -- port argument made it work
Maybe the function description should be updated.

Another question: Is there a way to exit the monitor?

The inline description does however tell

Nevertheless I've added the switch to the docs you linked too. That should go live soon.

When you reset the device it should drop out automatically or you can press Ctrl+C

1 Like

Super thanks for the fast support!

1 Like