Research on Gadget Configfs and its application in USB virtual serial port
In allusion to the problem of inconvenient modification of device configuration information when simulating USB interfaces to other USB devices by means of the USB Gadget framework under Linux,Configfs can be used to configure USB devices dynamically.The framework and principle of USB Gadget is introduced,and the main data structure and internal mechanism of Configfs is analyzed stressly.A specific method for configuring USB devices in user mode using Configfs is provided.After configuring the existing serial port function driver program of the Gadget function driver layer on the I.MX6ULL platform using Configfs,the USB interface was virtualized into a USB serial port device.The testing results show that the virtual serial device transmission is normal,providing a reference for developers to configure USB devices using Configfs under USB Gadget.
virtual serial portUSB GadgetConfigfsLinuxserial port deviceI.MX6ULL