TheImagingSource / tiscamera

The Linux SDK for The Imaging Source cameras.
https://www.theimagingsource.com
Apache License 2.0
299 stars 148 forks source link

Unable to open a DMM 22BUC03-MLA camera #520

Closed ismael-benito closed 1 year ago

ismael-benito commented 1 year ago

Describe the bug

We're getting this error when connecting a DMM 22BUC03-MLA camera to a Linux system (Debian and Ubuntu):

2023-05-24T09:48:21 - unknown:0: warning libpng warning: iCCP: known incorrect sRGB profile

To Reproduce Steps to reproduce the behavior:

  1. Connect a DMM 22BUC03-MLA camera to PC with a Linux Debian based distribution with the latest tcam-capture utility.
  2. Check if the camera is there and retrieve the serial number using dmesg --follow:
[  658.256219] usb 2-2: new high-speed USB device number 10 using xhci_hcd
[  658.617682] usb 2-2: New USB device found, idVendor=199e, idProduct=8202, bcdDevice= 8.13
[  658.617686] usb 2-2: New USB device strings: Mfr=2, Product=1, SerialNumber=3
[  658.617688] usb 2-2: Product: DMM 22BUC03-MLA
[  658.617689] usb 2-2: Manufacturer: The Imaging Source Europe GmbH
[  658.617690] usb 2-2: SerialNumber: 47020928
  1. Use the serial number to force tcam-capture to use that camera, otherwise the error is mutted by the GUI and the camera does not appear:
$ tcam-capture --serial 47020928
  1. Obtain the error:
2023-05-24T09:48:21 - unknown:0: warning libpng warning: iCCP: known incorrect sRGB profile

Expected behavior The camera opens in tcam-capture and subsequently in our Python-based front-end.

Screenshots If applicable, add screenshots to help explain your problem.

computer used (please complete the following information):

Versions: 
    Tcam:   1.1.0_master/70abad2a_rev_4139
    Aravis: 0.8_version_e977fa4
    Modules:    gst_aravis_arvu3v_v4l2_libusb_tools_doc_tests

Additional context Add any other context about the problem here.

If your bug report has potentially sensitive information, please write us directly at support@theimagingsource.com .

ismael-benito commented 1 year ago

Update: the camera works with no problem on Windows with the IC Capture software, and seems to be communicating at USB level with the computer as shown in the dmesg log. Here is suggested that apps running libpng should not treat warnings as errors: https://community.magento.com/t5/Magento-2-x-Technical-Issues/libpng-warning-iCCP-known-incorrect-sRGB-profile/td-p/127379

Cheers,

TIS-Stefan commented 1 year ago

Hello

That is the typical issue. For UVC/v4l2 compatibility the camera needs a firmware update. The update program and the firmwares are at https://github.com/TheImagingSource/tcam-firmware-update . The firmware file to be written into the camera is dmk22uc03_3017.euvc

Stefan

ismael-benito commented 1 year ago

That fixed the problem! Thank you :)

ismael-benito commented 1 year ago

We have a similar issue for two DMM 22BUC03-ML cameras, but they do not show in the dmesg --follow log as the other camera, and when trying to write the same firmware, we obtain this error:

terminate called after throwing an instance of 'std::runtime_error'
  what():  Unable to attain device handle.
[1]    26297 abort      ./tcam-firmware-update -ud 07220032 -f ../../firmware/usb2/dmk22uc03_3017.euv

And then if we run once again the firmware update we obtain:

Unable to find device with serial "07220032"

Are those errors related, or do we open another issue? Cheers,

TIS-Stefan commented 1 year ago

If the camera does not show up in dmesg log, then it is not found at all. This means, it may is broken. I suppose, you exchanged the cables already for a test, right? If yes, then you may create an RMA case for checking, so you go in contact with me at https://www.theimagingsource.com/en-us/company/contact/

ismael-benito commented 1 year ago

Well, I was using the same USB cable for all cameras, and it did work for the one that needed the firmware update. To be precise, they show up in dmesg but this is what appears, some errors istead of the typical vendor, product, etc. information.

[17537.892586] usb 2-2: new full-speed USB device number 55 using xhci_hcd
[17538.024154] usb 2-2: device descriptor read/64, error -71
[17538.260133] usb 2-2: device descriptor read/64, error -71
[17538.496119] usb 2-2: new full-speed USB device number 56 using xhci_hcd
[17554.080142] usb 2-2: device descriptor read/64, error -110

Cheers,

TIS-Stefan commented 1 year ago

Hello

In /usr/src/linux-headers-5.15.0-56/include/uapi/asm-generic/errno.h I found

#define ETIMEDOUT   110 /* Connection timed out */    

so I think, the camera is somehow gone. I suggest to contact your camera dealer for sending the camera in for repair. I see, there are two devices connected. What happens, if only one device is connected?

Stefan

ismael-benito commented 1 year ago

The message appears when only one camera is connected. Why it appears as two devices is unknown to me, if I understand correctly, first the 71 error appears, later the 110, but it is the same device. Error 71 is:

#define EPROTO      71  /* Protocol error */

Today I'm in remote, but on Monday I can check again the logs. But as you were saying, it seems it will be related with some problem on the board themselves, we are in touch with our Spanish dealer.

Cheers, Ismael

TIS-Stefan commented 1 year ago

Hi Ismael The protocol error can be ignored and as far as I can see, it is from another camera. At least den device number is different. Stefan

TIS-Stefan commented 1 year ago

Hello Ismael I am a little but confused. If the cameras are connected alone, then they work. Correct? Stefan

ismael-benito commented 1 year ago

Hi Stefan,

no they do not. If I plug one single camera to the computer, the dmesg log shows after I plug the camera:

[  116.279095] usb 2-1: new full-speed USB device number 9 using xhci_hcd
[  116.407112] usb 2-1: device descriptor read/64, error -71
[  116.643147] usb 2-1: device descriptor read/64, error -71
[  116.879143] usb 2-1: new full-speed USB device number 10 using xhci_hcd
[  117.007151] usb 2-1: device descriptor read/64, error -71
[  117.243187] usb 2-1: device descriptor read/64, error -71
[  117.351331] usb usb2-port1: attempt power cycle
[  117.763214] usb 2-1: new full-speed USB device number 11 using xhci_hcd
[  117.763450] usb 2-1: Device not responding to setup address.
[  117.971444] usb 2-1: Device not responding to setup address.
[  118.179211] usb 2-1: device not accepting address 11, error -71
[  118.307227] usb 2-1: new full-speed USB device number 12 using xhci_hcd
[  118.307441] usb 2-1: Device not responding to setup address.
[  118.515500] usb 2-1: Device not responding to setup address.
[  118.723275] usb 2-1: device not accepting address 12, error -71
[  118.723344] usb usb2-port1: unable to enumerate USB device
TIS-Stefan commented 1 year ago

Hello Ismael

I think, the camera in question is broken. So please go in contact with your camera dealer for a repair. I am sorry for not having a better answer.

Stefan

ismael-benito commented 1 year ago

Hi Stefan,

thanks for your help! I will close the issue as the original MLA camera is working, we happen to have this other problem with two ML models.

Cheers,

Ismael

TIS-Stefan commented 1 year ago

Hell Ismael It is unlikely, that two of this cameras from one batch do not work. Also they have been checked before they were sent out. Thus I suppose, something went wrong during firmware update. E.g. A bad USB connection can interrupt the firmware update, which makes the camera unusable. Stefan

ismael-benito commented 1 year ago

In neither of them have we attempted a firmware update, one of them was opened by me last week, and did not work. It is also strange for us that they do not work out-of-the-box, firmware updates aside. We also have another sealed camera of the same batch. We are arranging on how to proceed with the dealer (Iberoptics) on the matter.

Cheers, Ismael

TIS-Stefan commented 1 year ago

Hello Ismael

I am a little bit concerned. However, say Hello from me to Iberoptics.

Stefan