English Chinese (Traditional) (zh_TW)
# ctladm create -b block -o file=/data/target0
# cu -l /dev/cu.usbmodemFreeBSD1
# cu -l /dev/ttyU0
# kldload cfumass
# kldload if_cdce
# sysctl hw.usb.template=1
# kldload umodem
# sysctl hw.usb.template=3
# minicom -D /dev/ttyACM0
# service cfumass start
# service ctld reload
# service ctld start
# service devd restart
A LUN can be created without the man:ctld[8] daemon:
After pressing the kbd:[Enter] key a few times you will see a login prompt.
As the man:ctld[8] daemon is started, it reads [.filename]#/etc/ctl.conf#. If this file is edited after the daemon starts, reload the changes so they take effect immediately:
Chapter 26. USB Device Mode / USB OTG
Connecting to USB Device Mode Serial Ports from macOS
Differently from serial and network functionality, the template should not be set to 0 or 10 in [.filename]#/boot/loader.conf#. This is because the LUN must be set up before setting the template. The cfumass startup script sets the correct template number automatically when started.
How to configure FreeBSD to provide a virtual USB network interface.
How to configure FreeBSD to provide a virtual USB storage device.
How to configure the virtual serial port on FreeBSD.