WhyCan Forum(哇酷开发者社区)

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn

您尚未登录。

#1 2020-09-04 21:51:41

逸俊晨晖
会员
注册时间: 2018-08-29
累计积分: 88

如何修改f1c100s主线弄出来的那个usb虚拟串口的设备名?

如题 在搞stm32里会有很多描述符可以修改的 部分字符串描述符 就是usb设备显示出来的名字
那么linux弄出来的usb gadget怎么修改呢

离线

#2 2020-09-04 22:30:49

天马行空
会员
注册时间: 2019-11-12
累计积分: 52

Re: 如何修改f1c100s主线弄出来的那个usb虚拟串口的设备名?

我记得是 modprobe/insmod 的时候命令行传入参数就可以了.

离线

#3 2020-09-05 09:34:51

逸俊晨晖
会员
注册时间: 2018-08-29
累计积分: 88

Re: 如何修改f1c100s主线弄出来的那个usb虚拟串口的设备名?

根据楼上说的 我找了下文档发现确实是可以这样做 有空再测试一下
Documentation\usb\gadget_printer.txt

HOWTO USE THIS DRIVER
=====================

To load the USB device controller driver and the printer gadget driver. The
following example uses the Netchip 2280 USB device controller driver:

modprobe net2280
modprobe g_printer


The follow command line parameter can be used when loading the printer gadget
(ex: modprobe g_printer idVendor=0x0525 idProduct=0xa4a8 ):

idVendor - This is the Vendor ID used in the device descriptor. The default is
	the Netchip vendor id 0x0525. YOU MUST CHANGE TO YOUR OWN VENDOR ID
	BEFORE RELEASING A PRODUCT. If you plan to release a product and don't
	already have a Vendor ID please see www.usb.org for details on how to
	get one.

idProduct - This is the Product ID used in the device descriptor. The default
	is 0xa4a8, you should change this to an ID that's not used by any of
	your other USB products if you have any. It would be a good idea to
	start numbering your products starting with say 0x0001.

bcdDevice - This is the version number of your product. It would be a good idea
	to put your firmware version here.

iManufacturer - A string containing the name of the Vendor.

iProduct - A string containing the Product Name.

iSerialNum - A string containing the Serial Number. This should be changed for
	each unit of your product.

iPNPstring -  The PNP ID string used for this printer. You will want to set
	either on the command line or hard code the PNP ID string used for
	your printer product.

qlen - The number of 8k buffers to use per endpoint. The default is 10, you
	should tune this for your product. You may also want to tune the
	size of each buffer for your product.

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB