webcamd and cameras with Micron (MT9M0x1 and MT9T0x1) chips

Hans Petter Selasky hselasky at c2i.net
Sat Apr 24 15:04:09 UTC 2010


Hi,

> For both Micron cameras, #webcamd -B just gives `Cannot find USB device'.

This usually happens when the webcamd is not listed.

> 
> dmesg output for the Mightex camera (MT9M001 chip):
> ugen3.2: <Mightex> at usbus3
> 
> and usbconfig -d ugen3.2 dump_device_desc gives:
> ugen3.2: <USB-MT9M001-2 Mightex> at usbus3, cfg=0 md=HOST spd=HIGH
> (480Mbps) pwr=ON
> 
>     bLength = 0x0012
>     bDescriptorType = 0x0001
>     bcdUSB = 0x0200
>     bDeviceClass = 0x0000
>     bDeviceSubClass = 0x0000
>     bDeviceProtocol = 0x0000
>     bMaxPacketSize0 = 0x0040
>     idVendor = 0x04b4
>     idProduct = 0x0228
>     bcdDevice = 0x0000
>     iManufacturer = 0x0001  <Mightex>
>     iProduct = 0x0002  <USB-MT9M001-2>
>     iSerialNumber = 0x0000  <no string>
>     bNumConfigurations = 0x0001
> 
> 
> For the MT9T031 camera (likely prototype), dmesg gives:
> ugen3.2: <Micron> at usbus3
> 
> and usbconfig -d ugen3.2 dump_device_desc:
> ugen3.2: <Demo2A Micron> at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON
> 
>     bLength = 0x0012
>     bDescriptorType = 0x0001
>     bcdUSB = 0x0200
>     bDeviceClass = 0x0000
>     bDeviceSubClass = 0x0000
>     bDeviceProtocol = 0x0000
>     bMaxPacketSize0 = 0x0040
>     idVendor = 0x0634
>     idProduct = 0x1007
>     bcdDevice = 0x0021
>     iManufacturer = 0x0001  <Micron>
>     iProduct = 0x0002  <Demo2A>
>     iSerialNumber = 0x0000  <no string>
>     bNumConfigurations = 0x0001
> 
> 
> 
> 
> Now, I have no coding skills, but thought it would be good to have a
> look into the driver code. I hoped I would find Vendor and Product
> id's that differed from how the camera identified, this explaining the
> refusal to associate. But while some other v4l drivers appear to
> contain things like {USB_DEVICE(0xXXXX, 0xXXXX), .driver_info=XXXXX},
> such code is absent from the mt9xxxx.c files. Instead, there is a
> function data = reg_read(client, MT9M001_CHIP_VERSION) that does some
> sort of identification. But this is on the i2c level, reading the chip
> version number. I thought that for doing this, the system would
> already need to know what Micron chip it is dealing with.
> 
> Any thoughts would be appreciated.

Hi,

I did a little bit of grepping, and I think you need to patch the following 
file to get your webcam working:

v4l-dvb/linux/drivers/media/video/gspca/sn9c20x.c

You can use this entry as an example:

{USB_DEVICE(0x0c45, 0x6240), SN9C20X(MT9M001, 0x5d, 0)},

The iProduct dump indicates this is the right place to hack for the MT9M001 
one :-)

--HPS


More information about the freebsd-usb mailing list