Hi :)
I wanna connect seek shot pro(thermal camera) to Jetson TX2 and streaming it in real time.
But I have some problems :(
First, when I command lsusb
2207:0000 is my device’s IdVendor and IdProduct.
So I use this code(from this site) with my device’s IdVendor and IdProduct.
# You will need to have python 2.7 (3+ may work)
# and PyUSB 1.0
# and PIL 1.1.6 or better
# and numpy
# and scipy
# and ImageMagick
# Many thanks to the folks at eevblog, especially (in no particular order)
# miguelvp, marshallh, mikeselectricstuff, sgstair and many others
# for the inspiration to figure this out
# This is not a finished product and you can use it if you like. Don't be
# surprised if there are bugs as I am NOT a programmer..... ;>))
## https://github.com/sgstair/winusbdotnet/blob/master/UsbDevices/SeekThermal.cs
import usb.core
import usb.util
import Tkinter
from PIL import Image, ImageTk
import numpy
from scipy.misc import toimage
import sys, os, time
# find our Seek Thermal device 289d:0010
dev = usb.core.find(idVendor=0x2207, idProduct=0x0000)
if not dev: raise ValueError('Device not found')
def send_msg(bmRequestType, bRequest, wValue=0, wIndex=0, data_or_wLength=None, timeout=None):
assert (dev.ctrl_transfer(bmRequestType, bRequest, wValue, wIndex, data_or_wLength, timeout) == len(data_or_wLength))
# alias method to make code easier to read
receive_msg = dev.ctrl_transfer
def deinit():
'''Deinit the device'''
msg = '\x00\x00'
for i in range(3):
send_msg(0x41, 0x3C, 0, 0, msg)
# set the active configuration. With no arguments, the first configuration will be the active one
dev.set_configuration()
# get an endpoint instance
cfg = dev.get_active_configuration()
intf = cfg[(0,0)]
But, when I run this code, I got this error…
Traceback (most recent call last):
File "seek.py", line 44, in <module>
dev.set_configuration()
File "/usr/local/lib/python3.6/dist-packages/usb/core.py", line 869, in set_configuration
self._ctx.managed_set_configuration(self, configuration)
File "/usr/local/lib/python3.6/dist-packages/usb/core.py", line 102, in wrapper
return f(self, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/usb/core.py", line 148, in managed_set_configuration
self.backend.set_configuration(self.handle, cfg.bConfigurationValue)
File "/usr/local/lib/python3.6/dist-packages/usb/backend/libusb1.py", line 794, in set_configuration
_check(self.lib.libusb_set_configuration(dev_handle.handle, config_value))
File "/usr/local/lib/python3.6/dist-packages/usb/backend/libusb1.py", line 595, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 16] Resource busy
I really confused what is exactly problem with this…
I am not sure, But I guess Jetson TX2 couldn’t recognize my device…
If Jetson TX2 couldn’t recognize my device, then Is there any way to recognize it or other way?
ps. I also considering using ros.
If anyone knows, I would really really appreciate your help :)
Thank you for reading this topic :) !