-
Notifications
You must be signed in to change notification settings - Fork 1.7k
USB: CDC ACM
hasu@tmk edited this page Nov 24, 2020
·
11 revisions
Supports Windows and Linux
jerm -b 115200 -rxtrn /dev/ttyACM0
JERM(1) BSD General Commands Manual JERM(1)
NAME
jerm — communication terminal through serial and TCP/IP interfaces
SYNOPSIS
jerm [-common_options] [-device_options] [-client_options] device_file
jerm [-46] [-P port] [-common_options] [-client_options] host_name
jerm -i [-46] [-P port] [-common_options] [-device_options] [-client_options] host_name < device_file >
device_file
jerm -D [-46T] [-P port] [-common_options] device_file
DESCRIPTION
jerm is primarily intended to communicate with a remote machine through a serial interface. Additionally jerm
can communicate with another through a TCP/IP connection like telnet(1) and relay a serial communication to a
TCP/IP connection to another remote machine.
To connect a remote machine through a serial interface, use the first form. device_file should be a special
device file of a serial interface (typically /dev/cu*). The second form lets jerm connect to the remote ma‐
chine host_name through the TCP port. In the case of invoking jerm with the third or the fourth form, it re‐
lays the communications between a serial and a TCP/IP ports. The former relays the specific machine host_name
and the serial device_file, while the latter lets jerm work as a daemon; it listens to the TCP port first.
After a connection on the port is established, then jerm opens the device device_file and relay the communica‐
tions between the TCP port and the device. See EXAMPLES for more information.
The following options are available:
Common options
-z Empty the log file at first.
-l log_file
Write output characters to log_file. Since jerm always appends characters to log_file, use -z in con‐
junction with this flag to log a single session.
Device options
-b speed
Designate the speed of serial interface. The default is 9600.
-p n[one]|e[ven]|o[dd]
Designate the parity of serial interface. The valid value is one of ‘none’, ‘even’ or ‘odd’. The
first character is suffice. The default is ‘none’.
-d 7|8 Designate the bit length of data. The default is ‘8’.
-s 1|1.5|2
Designate the stop bit. The default is ‘1’.
-f n[one]|x|h[ard]
Designate the flow control. The default is ‘none’.
Client options
-x Starts in hexadecimal dump mode.
-r rnRN
Set CR NL mapping method. Option argument rnRN consists of four charactears. Each character may be the
one of the followings:
`x' Map to nothing. (drop)
`r' Map to CR.
`n' Map to NL.
`t' Map to CR+NL.
The argument r specifies how to map a CR from remote to local, n specifies how to map a NL from remote
to local, R specifies how to map a CR from local to remote, and N specifies how to map a NL from local
to remote. The default is ‘rnrn’.
Other options
-i Pipe mode. Initialize the standard input/output as a serial interface.
-4 Use IPv4 for TCP/IP connection.
-6 Use IPv6 for TCP/IP connection.
-P port
Designate TCP port for TCP/IP connection. The default port is ‘8086’.
-T Use hosts_access(3) when accepting connection.
Escape Characters
Typed characters are normally transmitted directly to the remote machine (which does the echoing as well). A
tilde preceded by a Control-M or Enter (‘^M ~’) is an escape signal; the following are recognized:
^M ~ .
Drop the connection and exit (you may still be logged in on the remote machine). When jerm is invoked
as a relaying server (with -D), Control-C (‘^C’) will terminate jerm. If in the pipe mode (-i is
specified), jerm does not terminate. Send a hang up signal (typically kill -HUP) instead.
^M ~ ~
Send a tilde (‘~’) to the remote machine.
^M ~ #
Send a BREAK signal to the remote machine.
^M ~ > file
Send the local file file to the remote machine as its input.
^M ~ x
Toggle back and forth between the normal and the hexadecimal dump mode. The hexadecimal dump mode dis‐
plays received characters in hexadecimal.
^M ~ r rnRN
Set CR NL mapping method in the same manner as the -r option.
^M ~ ?
Get a summary of the ‘^M ~’ escapes.
EXAMPLES
The command:
jerm /dev/cuaa0 (FreeBSD)
jerm /dev/dty00 (NetBSD)
jerm /dev/cua00 (OpenBSD)
jerm /dev/cu.usbmodemUSB-COM (Darwin/Mac OS X)
connects a remote host through a serial interface. The actual device file may vary.
When FreeBSD HOST1 connects to the remote machine RMACH through a serial interface, The command:
jerm -D -P 9800 -b 4800 /dev/cuaa0
on HOST1 will relay RMACH to TCP port 9800. Then the command:
jerm -P 9800 HOST1
on NetBSD HOST2 can communicate with RMACH. Instead of the above command, execute the command:
jerm -i -P 9800 HOST1 -b 4800 < /dev/dty00 > /dev/dty00
on the HOST2 and connect HOST2's serial interface with Darwin HOST3, then the command:
jerm /dev/cu.usbmodemUSB-COM
on HOST3 connects RMACH through HOST1 and HOST2.
SEE ALSO
cu(1), tip(1), telnet(1)
AUTHOR
KANDA Toshihiro
BUGS
Although jerm with TCP/IP connection is analogous to telnet(1), jerm does not support telnet protocol.
BSD Jul 16, 2004 BSD