You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/jumpstarter-driver-pyserial/README.md
+52Lines changed: 52 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,58 @@ export:
33
33
| check_present | Check if the serial port exists during exporter initialization, disable if you are connecting to a dynamically created port (i.e. USB from your DUT) | bool | no | True |
34
34
| cps | Characters per second throttling limit. When set, data transmission will be throttled to simulate slow typing. Useful for devices that can't handle fast input | float | no | None |
35
35
36
+
## CLI Commands
37
+
38
+
The pyserial driver provides two CLI commands for interacting with serial ports:
39
+
40
+
### start_console
41
+
42
+
Start an interactive serial console with direct terminal access.
43
+
44
+
```bash
45
+
j serial start-console
46
+
```
47
+
48
+
Exit the console by pressing CTRL+B three times.
49
+
50
+
### pipe
51
+
52
+
Pipe serial port data to stdout or a file. Automatically detects if stdin is piped and enables bidirectional mode.
53
+
54
+
When stdin is used, commands are sent until EOF, then continues monitoring serial output until Ctrl+C.
55
+
56
+
```bash
57
+
# Log serial output to stdout
58
+
j serial pipe
59
+
60
+
# Log serial output to a file
61
+
j serial pipe -o serial.log
62
+
63
+
# Send command to serial, then continue monitoring output
64
+
echo"hello"| j serial pipe
65
+
66
+
# Send commands from file, then continue monitoring output
67
+
cat commands.txt | j serial pipe -o serial.log
68
+
69
+
# Force bidirectional mode (interactive)
70
+
j serial pipe -i
71
+
72
+
# Append to log file instead of overwriting
73
+
j serial pipe -o serial.log -a
74
+
75
+
# Disable stdin input even when piped
76
+
cat data.txt | j serial pipe --no-input
77
+
```
78
+
79
+
#### Options
80
+
81
+
-`-o, --output FILE`: Write serial output to a file instead of stdout
82
+
-`-i, --input`: Force enable stdin to serial port (auto-detected if piped)
83
+
-`--no-input`: Disable stdin to serial port, even if stdin is piped
84
+
-`-a, --append`: Append to output file instead of overwriting
0 commit comments