aboutsummaryrefslogtreecommitdiff
path: root/documentation/content/en/books/handbook/usb-device-mode
diff options
context:
space:
mode:
authorLi-Wen Hsu <lwhsu@FreeBSD.org>2021-03-14 12:08:55 +0000
committerLi-Wen Hsu <lwhsu@FreeBSD.org>2021-03-14 12:08:55 +0000
commita9a9e661059557e5bb6ab3e756e007b8e5d231ce (patch)
treeb4fba4f5b8c4f985ade395b460936a7447e8d499 /documentation/content/en/books/handbook/usb-device-mode
parent55c95407aa64d98cdd8edf18990d89e5b86db96c (diff)
Diffstat (limited to 'documentation/content/en/books/handbook/usb-device-mode')
-rw-r--r--documentation/content/en/books/handbook/usb-device-mode/_index.adoc24
1 files changed, 12 insertions, 12 deletions
diff --git a/documentation/content/en/books/handbook/usb-device-mode/_index.adoc b/documentation/content/en/books/handbook/usb-device-mode/_index.adoc
index 798c90d6a5..a0a2d2baba 100644
--- a/documentation/content/en/books/handbook/usb-device-mode/_index.adoc
+++ b/documentation/content/en/books/handbook/usb-device-mode/_index.adoc
@@ -92,14 +92,14 @@ notify 100 {
Reload the configuration if man:devd[8] is already running:
-[source,bash]
+[source,shell]
....
# 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:
-[source,bash]
+[source,shell]
....
umodem_load="YES"
hw.usb.template=3
@@ -107,7 +107,7 @@ hw.usb.template=3
To load the module and set the template without rebooting use:
-[source,bash]
+[source,shell]
....
# kldload umodem
# sysctl hw.usb.template=3
@@ -117,7 +117,7 @@ To load the module and set the template without rebooting use:
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:
-[source,bash]
+[source,shell]
....
# cu -l /dev/ttyU0
....
@@ -128,7 +128,7 @@ After pressing the kbd:[Enter] key a few times you will see a login prompt.
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:
-[source,bash]
+[source,shell]
....
# cu -l /dev/cu.usbmodemFreeBSD1
....
@@ -137,7 +137,7 @@ To connect to a board configured to provide USB device mode serial ports, connec
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:
-[source,bash]
+[source,shell]
....
# minicom -D /dev/ttyACM0
....
@@ -161,7 +161,7 @@ hw.usb.template=1
To load the module and set the template without rebooting use:
-[source,bash]
+[source,shell]
....
# kldload if_cdce
# sysctl hw.usb.template=1
@@ -188,7 +188,7 @@ cfumass_enable="YES"
To configure the target without restarting, run this command:
-[source,bash]
+[source,shell]
....
# service cfumass start
....
@@ -201,7 +201,7 @@ The rest of this chapter provides detailed description of setting the target wit
USB Mass Storage does not require the man:ctld[8] daemon to be running, although it can be used if desired. This is different from iSCSI. Thus, there are two ways to configure the target: man:ctladm[8], or man:ctld[8]. Both require the [.filename]#cfumass.ko# kernel module to be loaded. The module can be loaded manually:
-[source,bash]
+[source,shell]
....
# kldload cfumass
....
@@ -215,7 +215,7 @@ cfumass_load="YES"
A LUN can be created without the man:ctld[8] daemon:
-[source,bash]
+[source,shell]
....
# ctladm create -b block -o file=/data/target0
....
@@ -247,14 +247,14 @@ ctld_enable="YES"
To start man:ctld[8] now, run this command:
-[source,bash]
+[source,shell]
....
# service ctld start
....
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:
-[source,bash]
+[source,shell]
....
# service ctld reload
....