ethz-asl / libseekthermal

Driver library for Seek Thermal imaging devices
GNU Lesser General Public License v3.0
58 stars 35 forks source link

Seek Thermal Compact PRO not supported #5

Open NicoSilvestri opened 7 years ago

NicoSilvestri commented 7 years ago

Seek Thermal Compact Pro apparently isn't supported.

Hardware and environment

Intel NUC Thermal Compact PRO plugged into USB 3.0 port Ubuntu 14.04

Current situation

lsusb output

lsusb -v

.....
Bus 001 Device 005: ID 289d:0011  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x289d 
  idProduct          0x0011 
  bcdDevice            1.00
  iManufacturer           1 Seek Thermal, Inc.
  iProduct                2 PIR324 Thermal Camera
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    240 
      bInterfaceProtocol      0 
      iInterface              3 VC
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
......

Compact PRO product id is 0x0011 while the library seems to be configured for 0x0010 product id.

Rules file

In /etc/udev/rules.d/50-seekthermal-usb.rules i added this line: SUBSYSTEM=="usb", ATTRS{idVendor}=="289d", ATTRS{idProduct}=="0011", GROUP="plugdev"

Utils output

When i run seekthermal-list utilitiy, it gives empty output.
All the others utilities that want the device address as argument, return "no such device" (for example if lsusb output is the one reported above i run: seekthermal-capture 001:005

Code debug

I couldn't find a way to make discoverDevices() able to the camera

at-wat commented 7 years ago

I'm not the author of libseekthermal, but I had read some of the source code.

Compact and Compact Pro seems to have different resolution. So, at least image frame sizes of them are different even if the protocol is compatible.

USB Product ID of Compact seems to be configured at https://github.com/ethz-asl/libseekthermal/blob/master/src/lib/seekthermal/models/aaa/device.cpp#L54-L65. The actual value (0x10) is defined at https://github.com/ethz-asl/libseekthermal/blob/master/src/lib/seekthermal/models/aaa/device.h#L41.

Frame width and height are defined at https://github.com/ethz-asl/libseekthermal/blob/master/src/lib/seekthermal/models/aaa/device.cpp#L182-L183.

You can try changing product ID and frame width and height to confirm the protocol. I hope that protocol of Compact Pro is same as Compact.

NicoSilvestri commented 7 years ago

Thank you Atsushi, now seekthermal-list gives Seek UW-AAA Thermal Imaging Camera on Universal Serial Bus (USB) Interface 001:005 Unfortunately seekthermal-capture 001:005 gives

terminate called after throwing an instance of 'SeekThermal::Usb::Error'
  what():  USB error: Pipe error.
Aborted (core dumped)

so, like you said, maybe the issue is a little more deep..

unizard commented 7 years ago

Hi, all.

I have a plane to buy Compact Pro. So is this issue solved or not? @NicoSilvestri Could you tell us how to fix it?

NicoSilvestri commented 7 years ago

Hi @unizard. I,ve not been able to solve the problem. My current situation is what you read in my last post. I bought a Seek Thermal Compact at last . Please share your results in case you want to work on it. Cheers

maartenvds commented 7 years ago

Hi, I've been able to reverse engineer the compact pro. I've written a library supporting both seek compact models using libusb and opencv. You can find the code + samples over here: https://github.com/maartenvds/libseek-thermal Feel free to fork/implement support onto this library