Brooklyn/gnuk/chopstx/example-cdc-gnu-linux
Scare Crowe 9cbba792a1 GNUK
2021-05-27 00:21:07 +05:00
..
board.h GNUK 2021-05-27 00:21:07 +05:00
command.c GNUK 2021-05-27 00:21:07 +05:00
command.h GNUK 2021-05-27 00:21:07 +05:00
config.h GNUK 2021-05-27 00:21:07 +05:00
Makefile GNUK 2021-05-27 00:21:07 +05:00
README GNUK 2021-05-27 00:21:07 +05:00
sample.c GNUK 2021-05-27 00:21:07 +05:00
tty.h GNUK 2021-05-27 00:21:07 +05:00
usb-cdc.c GNUK 2021-05-27 00:21:07 +05:00

(0) Build and generate initial flash data

$ make
$ make build/flash.data


(1) preparation as root 

Don't run ModemManager

# systemctl stop ModemManager

Install USBIP host module
# modprobe vhci_hcd


(2) Run sample program of USBIP server

$ ./sample


(3) Use the USB device as root

Attach the Chopstx application program (USBIP device) to USBIP host.

# usbip attach -r 127.0.0.1 -b 1-1


(4) Connect CDC-ACM device

$ cu -l /dev/ttyACM0

Then, you see the message from Chopstx.  As you type lines, it echos.

Type RET, ~ then . , you can terminate the session.


(5) Detach the USBIP device as root

# usbip detach -p 0