1 cocat/cocatd - CANopen cat tools
2 ================================
9 cocat [-i ms | --inhibit=ms] [interface] [StdIn_COBID] [StdOut_COBID]
14 cocatd [-D | --no-daemon] [-f filenname | --file=filename]
15 [-n node-ID | --node=node-ID] [interface] [command]
20 The CANopen cat tools provide netcat-like functionality over the CAN bus. Their
21 implementation is based on object 1026 (OS prompt), which provides SDO and
22 (event-driven) PDO access to the `stdin`, `stdout` and `stderr` streams on a
27 `cocat` is the client program. It reads bytes from `stdin` and writes them as
28 single-byte PDOs to the CAN bus, provided the second argument is a valid PDO
29 COB-ID. If the third and fourth arguments are valid COB-IDs, bytes received from
30 PDOs with those COB-IDs are written to `stdout` and `stderr`, respectively.
32 The options are as follows:
34 -h, --help Display help.
35 -i <ms>, --inhibit=<ms>
36 Wait at least <ms> milliseconds between PDOs
41 `cocatd` is the server program, and by default runs as a daemon. It executes the
42 provided command in a child process, and connects the `stdin`, `stdout` and
43 `stderr` streams of that process to sub-objects 1026:01, 1026:02 and 1026:03 in
44 its object dictionary, respectively. The default configuration enables PDO
45 access to each of these sub-objects. Regardless of the configuration, `cocatd`
46 expects RPDO1 to map to 1026:01 (StdIn), and TPDO1 and TPDO2 to map to 1026:02
47 (StdOut) and 1026:03 (StdErr), respectively.
49 The options are as follows:
51 -D, --no-daemon Do not run as daemon.
52 -f <filename>, --file=<filename>
53 Use <filename> as the EDS/DCF file instead of using
54 the default configuration.
55 -h, --help Display help.
56 -n <node-ID> --node=<node-ID>
57 Use <node-ID> as the CANopen node-ID.
62 The CANopen cat tools can be used to provide shell access over the CAN bus. To
63 setup such a configuration, run
65 cocatd can0 -n 1 /bin/sh
69 cocat can0 0x201 0x181 0x281
71 on the client. Any commands typed at the client side are executed on the server,
72 and the response is printed by the client.