现代电子技术2025,Vol.48Issue(2):46-50,5.DOI:10.16652/j.issn.1004-373x.2025.02.008
Gadget Configfs的研究及在USB虚拟串口的应用
Research on Gadget Configfs and its application in USB virtual serial port
摘要
Abstract
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.关键词
虚拟串口/USB Gadget/Configfs/Linux/串口设备/I.MX6ULLKey words
virtual serial port/USB Gadget/Configfs/Linux/serial port device/I.MX6ULL分类
电子信息工程引用本文复制引用
张怡,鲍爱达,郭鑫,刘昕沂..Gadget Configfs的研究及在USB虚拟串口的应用[J].现代电子技术,2025,48(2):46-50,5.基金项目
国家自然科学基金资助项目(62204232) (62204232)
山西省基础研究计划资助项目(202103021244198) (202103021244198)