English Chinese (Traditional) (zh_TW)
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
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
# minicom -D /dev/ttyACM0
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.
USB Device Mode Network Interfaces
Virtual network interfaces support is provided by templates number 1, 8, and 10. Note that none of them works with Microsoft Windows. Other host operating systems work with all three templates. Both man:usb_template[4] and man:if_cdce[4] kernel modules must be loaded.
if_cdce_load="YES"
hw.usb.template=1
# kldload if_cdce
# sysctl hw.usb.template=1
USB Virtual Storage Device
The man:cfumass[4] driver is a USB device mode driver first available in FreeBSD 12.0.