Table of Contents
Kernel Configuration
On Embedded Platform
Insmod Drivers
After that, a new UART device node will be found in /dev/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# create mod.sh file and input followed command #/bin/sh insmod configfs.ko insmod libcomposite.ko insmod u_serial.ko insmod usb_f_acm.ko insmod g_serial.ko # chmod +x mod.sh # ./mod.sh g_serial gadget: Gadget Serial v2.4 g_serial gadget: g_serial ready # ls /dev/ttyGS0 -l crw-rw---- 1 root root 249, 0 Jan 1 02:40 /dev/ttyGS0 |
Connect Target to Host with a USB cable
You will see Windows notice found a new hardware and try to search and install driver.
On Host Platform
After installation complete, you will see a new serial on Windows
And, you will see followed print on target console
1 2 3 |
# g_serial gadget: high-speed config #2: CDC ACM config |
Then you can test it use ‘putty’ or ‘Secure CRT’ and so on.
Also, you can connect and test it on virtual PC.
with followed kernel message print
1 2 3 4 5 6 7 8 9 |
[ 7676.420719] usb 1-2: new high-speed USB device number 7 using xhci_hcd [ 7676.767377] usb 1-2: New USB device found, idVendor=0525, idProduct=a4a7 [ 7676.767381] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 7676.767382] usb 1-2: Product: Gadget Serial v2.4 [ 7676.767384] usb 1-2: Manufacturer: Linux 3.14.38+ with 2184000.usb [ 7676.801767] cdc_acm 1-2:2.0: This device cannot do calls on its own. It is not a modem. [ 7676.801862] cdc_acm 1-2:2.0: ttyACM0: USB ACM device |
so you can test it by ‘minicom -D /dev/ttyACM0’.