Date: Thu, 11 Oct 2007 21:17:38 +0800 From: "Xiaofan Chen" <xiaofanc@gmail.com> To: "M. Warner Losh" <imp@bsdimp.com> Cc: freebsd-usb@freebsd.org Subject: Re: VID parser problem with usbdevs Message-ID: <a276da400710110617u714bdd0cs8a123e97ea7ee874@mail.gmail.com> In-Reply-To: <20071011.070249.2073896410.imp@bsdimp.com> References: <a276da400710110600i17fc2f5as58a0897e77f276e0@mail.gmail.com> <20071011.070249.2073896410.imp@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 10/11/07, M. Warner Losh <imp@bsdimp.com> wrote: > In message: > : ===[mcuee] ~/Desktop/build/fsusb/fsusb-0.1.11-2 # sudo usbdevs -v > : Controller /dev/usb1: > : addr 126: full speed, power 100 mA, config 1, product 0x000b(0x000b), > : I-Tuner Networks(0x04d8), rev 0.00 > : port 4 addr 126: full speed, power 100 mA, config 1, product > : 0x000b(0x000b), I-Tuner Networks(0x04d8), rev 0.00 > > While 4d8 is for microchip technology, we get the name that we print > here directly from the usb device itself. > What makes you think that the vendor ID is parsed wrong? > I have read the firmware source codes so I do not think there is anything called "I-Tuner" in the descriptors or anywhere in the firmware. 04d8/000b is the bootloader firmware VID/PID for Microchip PICDEM FS USB demo board. The following is the relevant descriptor. #pragma romdata /* Device Descriptor */ rom USB_DEV_DSC device_dsc= { sizeof(USB_DEV_DSC), // Size of this descriptor in bytes DSC_DEV, // DEVICE descriptor type 0x0200, // USB Spec Release Number in BCD format 0x00, // Class Code 0x00, // Subclass code 0x00, // Protocol code EP0_BUFF_SIZE, // Max packet size for EP0, see usbcfg.h 0x04D8, // Vendor ID 0x000b, // Product ID: PICDEM FS USB (Boot Mode) 0x0001, // Device release number in BCD format 0x00, // Manufacturer string index 0x00, // Product string index 0x00, // Device serial number string index 0x01 // Number of possible configurations }; /* Configuration 1 Descriptor */ CFG01= { /* Configuration Descriptor */ sizeof(USB_CFG_DSC), // Size of this descriptor in bytes DSC_CFG, // CONFIGURATION descriptor type sizeof(cfg01), // Total length of data for this cfg 1, // Number of interfaces in this cfg 1, // Index value of this configuration 0, // Configuration string index _DEFAULT, // Attributes, see usbdefs_std_dsc.h 50, // Max power consumption (2X mA) /* Interface Descriptor */ sizeof(USB_INTF_DSC), // Size of this descriptor in bytes DSC_INTF, // INTERFACE descriptor type 0, // Interface Number 0, // Alternate Setting Number 2, // Number of endpoints in this intf 0x00, // Class code 0x00, // Subclass code 0x00, // Protocol code 0, // Interface string index /* Endpoint Descriptors */ sizeof(USB_EP_DSC),DSC_EP,_EP01_OUT,_BULK,BOOT_EP_SIZE,0x00, sizeof(USB_EP_DSC),DSC_EP,_EP01_IN,_BULK,BOOT_EP_SIZE,0x00 }; rom struct{byte bLength;byte bDscType;word string[1];}sd000={ sizeof(sd000),DSC_STR,0x0409}; So I plug in PICkit 2, another Microchip product. It is fine. ===[mcuee] ~ # sudo usbdev -v addr 125: full speed, power 100 mA, config 1, PICkit 2 Microcontroller Programme r(0x0033), Microchip Technology Inc.(0x04d8), rev 0.01 port 2 addr 125: full speed, power 100 mA, config 1, PICkit 2 Microcontroller P rogrammer(0x0033), Microchip Technology Inc.(0x04d8), rev 0.01 Kind of strange. Xiaofan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a276da400710110617u714bdd0cs8a123e97ea7ee874>