Remote Device: monitor remote device or list existing.
platformio remote device list [OPTIONS]
pio remote device list [OPTIONS]
# List devices from the specified agents. Multiple agents are allowed.
platformio remote --agent NAME device list [OPTIONS]
List Serial Ports on remote machines where PlatformIO Remote Agent is started.
You can list devices from the specified remote machines using --agent NAME
option between “remote” & “device” sub-commands. For example, you have run
platformio remote agent start --name
command with “home” and “office”
options:
platformio remote agent start --name home
platformio remote agent start --name office
Now, to list devices from office machine please use
platformio remote --agent office device list
.
Multiple agents are allowed (
platformio remote --agent lab1 --agent lab3 device ...
).
Return the output in JSON format
> platformio remote device list
Agent innomac.local
===================
/dev/cu.Bluetooth-Incoming-Port
-------------------------------
Hardware ID: n/a
Description: n/a
/dev/cu.obd2ecu-SPPDev
----------------------
Hardware ID: n/a
Description: n/a
/dev/cu.usbmodemFA1431
----------------------
Hardware ID: USB VID:PID=2A03:0043 SER=75435353038351015271 LOCATION=250-1.4.3
Description: Arduino Uno
/dev/cu.usbserial-A6004003
--------------------------
Hardware ID: USB VID:PID=0403:6001 SER=A6004003 LOCATION=253-1.3.1
Description: FT232R USB UART - FT232R USB UART
/dev/cu.SLAB_USBtoUART
----------------------
Hardware ID: USB VID:PID=10C4:EA60 SER=0001 LOCATION=253-1.3.2
Description: CP2102 USB to UART Bridge Controller - CP2102 USB to UART Bridge Controller
/dev/cu.usbmodem589561
----------------------
Hardware ID: USB VID:PID=16C0:0483 SER=589560 LOCATION=250-1.4.1
Description: USB Serial
Remote Serial Port Monitor
platformio remote device monitor [OPTIONS]
pio remote device monitor [OPTIONS]
# Connect to a specified agent
platformio remote --agent NAME device monitor [OPTIONS]
platformio remote -a NAME device monitor [OPTIONS]
Connect to Serial Port of remote device and receive or send data in real time. PlatformIO Remote Agent should be started before on a remote machine.
To control monitor please use these “hot keys”:
Ctrl+C
Quit
Ctrl+T
Menu
Ctrl+T followed by Ctrl+H
Help
Port, a number or a device name
Set baud rate, default 9600
Set parity (None, Even, Odd, Space, Mark), one of
[N
, E
, O
, S
, M
], default N
Enable RTS/CTS
flow control, default Off
Enable software flow control, default Off
Set initial RTS
line state, default 0
Set initial DTR
line state, default 0
Enable local echo, default Off
Set the encoding for the serial port (e.g. hexlify
, Latin1
, UTF-8
),
default UTF-8
.
Add text transformation. Available filters:
colorize
Apply different colors for received and echo
debug
Print what is sent and received
default
Remove typical terminal control codes from input
direct
Do-nothing: forward all data unchanged
nocontrol
Remove all control codes, incl. CR+LF
printable
Show decimal code for all non-ASCII characters and replace
most control codes
End of line mode (CR
, LF
or CRLF
), default CRLF
Do not apply any encodings/transformations
ASCII code of special character that is used to exit the application,
default 3
(DEC, Ctrl+C
).
For example, to use Ctrl+]
run
platformio remote device monitor --exit-char 29
.
ASCII code of special character that is used to control miniterm (menu),
default 20
(DEC)
Diagnostics: suppress non-error messages, default Off
Specify the path to project directory. By default, --project-dir
is equal
to current working directory (CWD
).
Process specified environments.
You can also specify which environments should be processed by default using default_envs option from “platformio.ini” (Project Configuration File).
Show available options for monitor
> platformio remote device monitor --help
Usage: platformio remote device monitor [OPTIONS]
Options:
-p, --port TEXT Port, a number or a device name
-b, --baud INTEGER Set baud rate, default=9600
--parity [N|E|O|S|M] Set parity, default=N
--rtscts Enable RTS/CTS flow control, default=Off
--xonxoff Enable software flow control, default=Off
--rts [0|1] Set initial RTS line state, default=0
--dtr [0|1] Set initial DTR line state, default=0
--echo Enable local echo, default=Off
--encoding TEXT Set the encoding for the serial port (e.g. hexlify,
Latin1, UTF-8), default: UTF-8
-f, --filter TEXT Add text transformation
--eol [CR|LF|CRLF] End of line mode, default=CRLF
--raw Do not apply any encodings/transformations
--exit-char INTEGER ASCII code of special character that is used to exit
the application, default=29 (DEC)
--menu-char INTEGER ASCII code of special character that is used to
control miniterm (menu), default=20 (DEC)
--quiet Diagnostics: suppress non-error messages, default=Off
-h, --help Show this message and exit.
Communicate with serial device and print help inside terminal
> platformio remote device monitor
--- Available ports:
--- /dev/cu.Bluetooth-Incoming-Port n/a
--- /dev/cu.Bluetooth-Modem n/a
--- /dev/cu.SLAB_USBtoUART CP2102 USB to UART Bridge Controller
--- /dev/cu.obd2ecu-SPPDev n/a
Enter port name:/dev/cu.SLAB_USBtoUART
--- Miniterm on /dev/cu.SLAB_USBtoUART: 9600,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
Hello PlatformIO!
---
--- Ctrl+] Exit program
--- Ctrl+T Menu escape key, followed by:
--- Menu keys:
--- Ctrl+T Send the menu character itself to remote
--- Ctrl+] Send the exit character itself to remote
--- Ctrl+I Show info
--- Ctrl+U Upload file (prompt will be shown)
--- Toggles:
--- Ctrl+R RTS Ctrl+E local echo
--- Ctrl+D DTR Ctrl+B BREAK
--- Ctrl+L line feed Ctrl+A Cycle repr mode
---
--- Port settings (Ctrl+T followed by the following):
--- p change port
--- 7 8 set data bits
--- n e o s m change parity (None, Even, Odd, Space, Mark)
--- 1 2 3 set stop bits (1, 2, 1.5)
--- b change baud rate
--- x X disable/enable software flow control
--- r R disable/enable hardware flow control
--- exit ---