English Chinese (Traditional) (zh_TW)
ttyU0 "/usr/libexec/getty 3wire" vt100 onifconsole secure
ttyU1 "/usr/libexec/getty 3wire" vt100 onifconsole secure
Then add these lines to [.filename]#/etc/devd.conf#:
notify 100 {
match "system" "DEVFS";
match "subsystem" "CDEV";
match "type" "CREATE";
match "cdev" "ttyU[0-9]+";
action "/sbin/init q";
};
Reload the configuration if man:devd[8] is already running:
# service devd restart
Make sure the necessary modules are loaded and the correct template is set at boot by adding those lines to [.filename]#/boot/loader.conf#, creating it if it does not already exist:
umodem_load="YES"
hw.usb.template=3
To load the module and set the template without rebooting use:
# kldload umodem
# sysctl hw.usb.template=3
Connecting to USB Device Mode Serial Ports from FreeBSD 自 FreeBSD 連線到 USB 裝置模式序列埠
To connect to a board configured to provide USB device mode serial ports, connect the USB host, such as a laptop, to the boards USB OTG or USB client port. Use `pstat -t` on the host to list the terminal lines. Near the end of the list you should see a USB serial port, eg "ttyU0". To open the connection, use:
# cu -l /dev/ttyU0
After pressing the kbd:[Enter] key a few times you will see a login prompt.
Connecting to USB Device Mode Serial Ports from macOS
To connect to a board configured to provide USB device mode serial ports, connect the USB host, such as a laptop, to the boards USB OTG or USB client port. To open the connection, use:
# cu -l /dev/cu.usbmodemFreeBSD1
Connecting to USB Device Mode Serial Ports from Linux 自 Linux 連線到 USB 裝置模式序列埠
# minicom -D /dev/ttyACM0
Connecting to USB Device Mode Serial Ports from Microsoft Windows 10 自 Microsoft Windows 10 連線到 USB 裝置模式序列埠
To connect to a board configured to provide USB device mode serial ports, connect the USB host, such as a laptop, to the boards USB OTG or USB client port. To open a connection you will need a serial terminal program, such as PuTTY. To check the COM port name used by Windows, run Device Manager, expand "Ports (COM & LPT)". You will see a name similar to "USB Serial Device (COM4)". Run serial terminal program of your choice, for example PuTTY. In the PuTTY dialog set "Connection type" to "Serial", type the COMx obtained from Device Manager in the "Serial line" dialog box and click Open.