web-dev-qa-db-ja.com

Microdia UVC顕微鏡をインストールするにはどうすればよいですか?

AmazonでMaozua 5mp USB顕微鏡を購入しました(Linuxで動作することをレビューで確認した後)。悲しいことに、Lubuntu 16.04で接続した場合、guvcviewやチーズでは動作しません。

調査をしました。以下に関連する部分を示します。

ls /dev | grep video
video0
video1

顕微鏡はvideo1にあり、logitechウェブカメラはvideo0にあります。ウェブカメラは顕微鏡が接続されていないときに機能しますが、顕微鏡が接続されているとguvcviewとcheeseはそこからビデオを取得できません。

lsusb 
Bus 003 Device 009: ID 0c45:6366 Microdia 

より詳細な情報:

lsusb -v
Bus 003 Device 008: ID 0c45:6366 Microdia 
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 ?
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  idVendor           0x0c45 Microdia
  idProduct          0x6366 
  bcdDevice            1.00
  iManufacturer           2 
  iProduct                1 
  iSerial                 3 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          662
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass         14 Video
      bFunctionSubClass       3 Video Interface Collection
      bFunctionProtocol       0 
      iFunction               5 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      1 Video Control
      bInterfaceProtocol      0 
      iInterface              5 
      VideoControl Interface Descriptor:
        bLength                13
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdUVC               1.00
        wTotalLength          108
        dwClockFrequency       15.000000MHz
        bInCollection           1
        baInterfaceNr( 0)       1
      VideoControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             5
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bSourceID               4
        iTerminal               0 
      VideoControl Interface Descriptor:
        bLength                28
        bDescriptorType        36
        bDescriptorSubtype      6 (EXTENSION_UNIT)
        bUnitID                 3
        guidExtensionCode         {7033f028-1163-2e4a-ba2c-6890eb334016}
        bNumControl            24
        bNrPins                 1
        baSourceID( 0)          2
        bControlSize            3
        bmControls( 0)       0xff
        bmControls( 1)       0xff
        bmControls( 2)       0xff
        iExtension              0 
      VideoControl Interface Descriptor:
        bLength                29
        bDescriptorType        36
        bDescriptorSubtype      6 (EXTENSION_UNIT)
        bUnitID                 4
        guidExtensionCode         {b42153bd-35d6-45ca-b203-4e0149b301bc}
        bNumControl            32
        bNrPins                 1
        baSourceID( 0)          3
        bControlSize            4
        bmControls( 0)       0x03
        bmControls( 1)       0x80
        bmControls( 2)       0x3f
        bmControls( 3)       0x9f
        iExtension              0 
      VideoControl Interface Descriptor:
        bLength                18
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0201 Camera Sensor
        bAssocTerminal          0
        iTerminal               0 
        wObjectiveFocalLengthMin      0
        wObjectiveFocalLengthMax      0
        wOcularFocalLength            0
        bControlSize                  3
        bmControls           0x0000000e
          Auto-Exposure Mode
          Auto-Exposure Priority
          Exposure Time (Absolute)
      VideoControl Interface Descriptor:
        bLength                11
        bDescriptorType        36
        bDescriptorSubtype      5 (PROCESSING_UNIT)
      Warning: Descriptor too short
        bUnitID                 2
        bSourceID               1
        wMaxMultiplier          0
        bControlSize            2
        bmControls     0x0000177f
          Brightness
          Contrast
          Hue
          Saturation
          Sharpness
          Gamma
          White Balance Temperature
          Backlight Compensation
          Gain
          Power Line Frequency
          White Balance Temperature, Auto
        iProcessing             0 
        bmVideoStandards     0x 0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               6
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      VideoStreaming Interface Descriptor:
        bLength                            15
        bDescriptorType                    36
        bDescriptorSubtype                  1 (INPUT_HEADER)
        bNumFormats                         2
        wTotalLength                      411
        bEndPointAddress                  129
        bmInfo                              0
        bTerminalLink                       5
        bStillCaptureMethod                 2
        bTriggerSupport                     1
        bTriggerUsage                       1
        bControlSize                        1
        bmaControls( 0)                    11
        bmaControls( 1)                    11
      VideoStreaming Interface Descriptor:
        bLength                            11
        bDescriptorType                    36
        bDescriptorSubtype                  6 (FORMAT_MJPEG)
        bFormatIndex                        1
        bNumFrameDescriptors                5
        bFlags                              0
          Fixed-size samples: No
        bDefaultFrameIndex                  1
        bAspectRatioX                       0
        bAspectRatioY                       0
        bmInterlaceFlags                 0x00
          Interlaced stream or variable: No
          Fields per frame: 1 fields
          Field 1 first: No
          Field pattern: Field 1 only
          bCopyProtect                      0
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         1
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           2592
        wHeight                          1944
        dwMinBitRate                1209323520
        dwMaxBitRate                1209323520
        dwMaxVideoFrameBufferSize    10078285
        dwDefaultFrameInterval         666666
        bFrameIntervalType                  1
        dwFrameInterval( 0)            666666
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         2
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           2320
        wHeight                          1744
        dwMinBitRate                971059200
        dwMaxBitRate                971059200
        dwMaxVideoFrameBufferSize     8092749
        dwDefaultFrameInterval         666666
        bFrameIntervalType                  1
        dwFrameInterval( 0)            666666
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         3
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           2048
        wHeight                          1536
        dwMinBitRate                754974720
        dwMaxBitRate                754974720
        dwMaxVideoFrameBufferSize     6292045
        dwDefaultFrameInterval         666666
        bFrameIntervalType                  1
        dwFrameInterval( 0)            666666
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         4
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           1920
        wHeight                          1080
        dwMinBitRate                497664000
        dwMaxBitRate                497664000
        dwMaxVideoFrameBufferSize     4147789
        dwDefaultFrameInterval         666666
        bFrameIntervalType                  1
        dwFrameInterval( 0)            666666
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         5
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           1280
        wHeight                          1024
        dwMinBitRate                314572800
        dwMaxBitRate                314572800
        dwMaxVideoFrameBufferSize     2622029
        dwDefaultFrameInterval         666666
        bFrameIntervalType                  1
        dwFrameInterval( 0)            666666
      VideoStreaming Interface Descriptor:
        bLength                            26
        bDescriptorType                    36
        bDescriptorSubtype                  3 (STILL_IMAGE_FRAME)
        bEndpointAddress                    0
        bNumImageSizePatterns               5
        wWidth( 0)                       2592
        wHeight( 0)                      1944
        wWidth( 1)                       2320
        wHeight( 1)                      1744
        wWidth( 2)                       2048
        wHeight( 2)                      1536
        wWidth( 3)                       1920
        wHeight( 3)                      1080
        wWidth( 4)                       1280
        wHeight( 4)                      1024
        bNumCompressionPatterns             5
      VideoStreaming Interface Descriptor:
        bLength                            27
        bDescriptorType                    36
        bDescriptorSubtype                  4 (FORMAT_UNCOMPRESSED)
        bFormatIndex                        2
        bNumFrameDescriptors                5
        guidFormat                            {59555932-0000-1000-8000-00aa00389b71}
        bBitsPerPixel                      16
        bDefaultFrameIndex                  1
        bAspectRatioX                       0
        bAspectRatioY                       0
        bmInterlaceFlags                 0x00
          Interlaced stream or variable: No
          Fields per frame: 2 fields
          Field 1 first: No
          Field pattern: Field 1 only
          bCopyProtect                      0
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         1
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           2592
        wHeight                          1944
        dwMinBitRate                161243136
        dwMaxBitRate                161243136
        dwMaxVideoFrameBufferSize    10077696
        dwDefaultFrameInterval        5000000
        bFrameIntervalType                  1
        dwFrameInterval( 0)           5000000
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         2
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           2320
        wHeight                          1774
        dwMinBitRate                131701760
        dwMaxBitRate                131701760
        dwMaxVideoFrameBufferSize     8231360
        dwDefaultFrameInterval        5000000
        bFrameIntervalType                  1
        dwFrameInterval( 0)           5000000
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         3
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           2048
        wHeight                          1536
        dwMinBitRate                150994944
        dwMaxBitRate                150994944
        dwMaxVideoFrameBufferSize     6291456
        dwDefaultFrameInterval        3333333
        bFrameIntervalType                  1
        dwFrameInterval( 0)           3333333
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         4
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           1920
        wHeight                          1080
        dwMinBitRate                 99532800
        dwMaxBitRate                 99532800
        dwMaxVideoFrameBufferSize     4147200
        dwDefaultFrameInterval        3333333
        bFrameIntervalType                  1
        dwFrameInterval( 0)           3333333
      VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         5
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                           1280
        wHeight                          1024
        dwMinBitRate                104857600
        dwMaxBitRate                104857600
        dwMaxVideoFrameBufferSize     2621440
        dwDefaultFrameInterval        2000000
        bFrameIntervalType                  1
        dwFrameInterval( 0)           2000000
      VideoStreaming Interface Descriptor:
        bLength                            26
        bDescriptorType                    36
        bDescriptorSubtype                  3 (STILL_IMAGE_FRAME)
        bEndpointAddress                    0
        bNumImageSizePatterns               5
        wWidth( 0)                       2592
        wHeight( 0)                      1944
        wWidth( 1)                       2320
        wHeight( 1)                      1744
        wWidth( 2)                       2048
        wHeight( 2)                      1536
        wWidth( 3)                       1920
        wHeight( 3)                      1080
        wWidth( 4)                       1280
        wHeight( 4)                      1024
        bNumCompressionPatterns             5
      VideoStreaming Interface Descriptor:
        bLength                             6
        bDescriptorType                    36
        bDescriptorSubtype                 13 (COLORFORMAT)
        bColorPrimaries                     1 (BT.709,sRGB)
        bTransferCharacteristics            1 (BT.709)
        bMatrixCoefficients                 4 (SMPTE 170M (BT.601))
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0080  1x 128 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       2
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0100  1x 256 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       3
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0320  1x 800 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       4
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0b20  2x 800 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       5
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x1320  3x 800 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       6
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x1400  3x 1024 bytes
        bInterval               1

Dmesgの出力を見ると、次の不吉な行が見つかりました。

[ 2364.670728] usb 3-2: new high-speed USB device number 8 using xhci_hcd
[ 2364.829594] usb 3-2: New USB device found, idVendor=0c45, idProduct=6366
[ 2364.829598] usb 3-2: New USB device strings: Mfr=2, Product=1, SerialNumber=3
[ 2364.829601] usb 3-2: Product: Digital microscope
[ 2364.829604] usb 3-2: Manufacturer: Sonix Technology Co., Ltd.
[ 2364.829606] usb 3-2: SerialNumber: SN0001
[ 2364.831835] uvcvideo: Found UVC 1.00 device Digital microscope (0c45:6366)
[ 2364.839225] uvcvideo 3-2:1.0: Entity type for entity Extension 4 was not initialized!
[ 2364.839229] uvcvideo 3-2:1.0: Entity type for entity Extension 3 was not initialized!
[ 2364.839232] uvcvideo 3-2:1.0: Entity type for entity Processing 2 was not initialized!
[ 2364.839235] uvcvideo 3-2:1.0: Entity type for entity Camera 1 was not initialized!
[ 2364.839369] input: Digital microscope: Digital mic as /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/input/input20
[ 2637.035796] usb 3-2: USB disconnect, device number 8
[ 2646.208190] usb 3-2: new high-speed USB device number 9 using xhci_hcd
[ 2646.367005] usb 3-2: New USB device found, idVendor=0c45, idProduct=6366
[ 2646.367009] usb 3-2: New USB device strings: Mfr=2, Product=1, SerialNumber=3
[ 2646.367012] usb 3-2: Product: Digital microscope
[ 2646.367015] usb 3-2: Manufacturer: Sonix Technology Co., Ltd.
[ 2646.367017] usb 3-2: SerialNumber: SN0001
[ 2646.369205] uvcvideo: Found UVC 1.00 device Digital microscope (0c45:6366)
[ 2646.376527] uvcvideo 3-2:1.0: Entity type for entity Extension 4 was not initialized!
[ 2646.376531] uvcvideo 3-2:1.0: Entity type for entity Extension 3 was not initialized!
[ 2646.376534] uvcvideo 3-2:1.0: Entity type for entity Processing 2 was not initialized!
[ 2646.376536] uvcvideo 3-2:1.0: Entity type for entity Camera 1 was not initialized!
[ 2646.376672] input: Digital microscope: Digital mic as /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0/input/input21

対話を避けるためにLogitech Webカメラを切断し、コンソールからチーズを実行しました(許可の問題を避けるためにSudoを使用しました)。私は次の出力を見ました:

paul@clio:~$ Sudo cheese
[Sudo] password for paul: 

(cheese:3520): IBUS-WARNING **: The owner of /home/paul/.config/ibus/bus is not root!
libv4l2: error turning on stream: Protocol error

(cheese:3520): cheese-WARNING **: Could not read from resource.: gstv4l2bufferpool.c(1054): gst_v4l2_buffer_pool_poll (): /GstCameraBin:camerabin/GstWrapperCameraBinSrc:camera_source/GstBin:bin18/GstV4l2Src:v4l2src1:
poll error 1: Protocol error (71)

「microdia」と「0c45:6366」をグーグルで検索したところ、多くの人がこの顕微鏡に苦労していることがわかりました。一部の人はそれが機能していると信じていますが、解決策は長いスレッドの意識の流れに広がっており、私は機能するものをつなぎ合わせていません。ほとんどのスレッドの日付は2008-2009であることに注意しました。その期間の後に、動作するドライバーが利用可能になったのではないかと思うようになりましたが、見つけることができません!

どんな助けも大歓迎です。

4
user1759557

やっと解決しました。多くの時間のテストと理論化の結果、問題はドライバーやOSバージョンとは何の関係もないという結論に達しました。問題が発生したのは特定のマシン1台だけのようでした。これはハードウェアの問題を示していました。偶然、私はASMedia USB3デバイスがKinect2で持つすべての問題に関する記事を偶然見つけました。私のマザーボード(Asus X99 Deluxe II)の仕様では、USB3にはASMediaを使用していますが、明らかにUSB2には使用していません。ウェブカメラと顕微鏡をUSB2ポートに切り替えて以来、問題はありませんでした。

これを手伝ってくれたKristopher Ivesに感謝します。

結論UVCデバイスに問題があり、ASMedia USB3がある場合は、USB2ポートを試してください。また、ASMedia USBは吸います!

2
user1759557

USB延長ケーブルやハブではなく、PCのマザーボード上のUSBにウェブカメラを直接接続してみてください。

さまざまな視聴者を試し、Ubuntuをアップグレードした後でも、運がありませんでした。私は最終的に上記の答えを見て、USB3ではなくUSB2を試してみましたが、うまくいきました。 ただしそれは私の場合は偶然でした-使用していた延長ケーブルを取り外してもUSB3は機能しました。

Webカメラが列挙してほぼ動作しているように見えますが、Webカメラ内に低品質のケーブルまたは回路があり(または大量の電力を消費している)、USBがすぐに動作し始めます大量のデータを転送しようとします。

0
Gordon Williams