以下是一个完整的示例脚本,可以保存为scripts/usbnet_setup.sh,并赋予执行权限。 #!/bin/bash# 加载模块modprobe libcomposite# 挂载configfsmount -t configfs none /sys/kernel/config# 进入USB Gadget目录cd/sys/kernel/config/usb_gadget/mkdir-p g1cdg1# 设置USB描述符echo0x1d6b > idVendorecho0x0104 >...
CDC类是USB组织定义的一类专门给各种通信设备(电信通信设备和中速网络通信设备)使用的USB子类 CDC,USB Driver支持以下子类: ECM、NCM、ACM、OBEX、设备管理。 Configfs Documentation/filesystems/configfs.rst configfs is a ram-based filesystem that provides the converse of sysfs's functionality. Where sysfs ...
CONFIG_USB_CONFIGFS_F_TCM=y +# CONFIG_USB_CONFIGFS_F_UAC1 is not set +# CONFIG_USB_CONFIGFS_F_UAC1_LEGACY is not set +# CONFIG_USB_CONFIGFS_F_UAC2 is not set CONFIG_USB_CONFIGFS_F_UVC=y CONFIG_USB_CONFIGFS_MASS_STORAGE=y CONFIG_USB_CONFIGFS_NCM=y @@ -10180,6 +10228,7 ...
rm configfs/c.1/ncm.usb0 rmdir configs/./strings/ rmdir configs/. rmdir functions/. rmdir strings/ rmdir g1 // gadget有它的config组,它有一些属性(idVendor,idProduct等)和默认子组(配置、函数、字符串)。 写入属性会导致信息存储在适当的位置。在配置、函数和字符串子组中 ...
rm configfs/c.1/ncm.usb0 rmdir configs/./strings/ rmdir configs/. rmdir functions/. rmdir strings/ rmdir g1 // gadget有它的config组,它有一些属性(idVendor,idProduct等)和默认子组(配置、函数、字符串)。 写入属性会导致信息存储在适当的位置。在配置、函数和字符串子组中 ...
so,CONFIG_USB_CONFIGFS_F_FS=yseems to be sufficient; also,CONFIG_USB_FUNCTIONFScan't be enabled without disabling something else; it's achoicemenuconfig: in the picture above,Function filesystem (FunctionFS)is selected [already]; theCONFIG_USB_FUNCTIONFSsymbol is underUSB Gadget precomposed confi...
CONFIG_USB_USBNET=y CONFIG_USB_NET_AX8817X=y CONFIG_USB_NET_AX88179_178A=y CONFIG_USB_NET_CDCETHER=y CONFIG_USB_NET_CDC_EEM=y CONFIG_USB_NET_CDC_NCM=y # CONFIG_USB_NET_HUAWEI_CDC_NCM is not set # CONFIG_USB_NET_CDC_MBIM is not set CONFIG_USB_NET_DM9601=y #...
CONFIG_USB_CONFIGFS_F_HID=y CONFIG_USB_CONFIGFS_F_UVC=y CONFIG_USB_CONFIGFS_F_PRINTER=y # CONFIG_USB_ZERO is not set # CONFIG_USB_AUDIO is not set # CONFIG_USB_ETH is not set # CONFIG_USB_G_NCM is not set # CONFIG_USB_GADGETFS is not set ...
CONFIG_USB_SUPPORT=y CONFIG_USES_DEVICETREE=y CONFIG_arm=y CONFIG_ARCH="arm" # # Target Images # # CONFIG_TARGET_ROOTFS_INITRAMFS is not set CONFIG_EXTERNAL_CPIO="" # # Root filesystem archives # # CONFIG_TARGET_ROOTFS_CPIOGZ is not set # CONFIG_TARGET_ROOTFS_TAR...
Composite Gadget Through CONFIGFS The following example shows how to create the USB composite gadget from the user space, which includes two USB device functions: • USB NCM gadget • USB ACM gadget 3.2.1 Creating NCM and ACM Composite Gadgets To set up NCM and ACM composite gadgets: 1....