-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uvc_start_streaming failed: -2 #27
Comments
Hi, what PureThermal camera firmware do you have? RPi has a bug limiting usb iso bandwidth that we added a workaround starting with version 1.3.0. |
Thanks for reply, i didn't download purethermal1-firmware. |
The firmware is the code running on the PureThermal board itself. Instructions for updating this code are in the groupgets/purethermal1-firmware readme. Since version 1.2.0, you can get the version number this way:
The latest version is 1.3.0, which is the minimum required for raspberry pi. |
Thanks kekiefer for reply, I used the code and got reply below: It seems that my firmware is the latest version but I still got error uvc_start_streaming failed: -2 |
OK, that's good. Another thought -- do you have a version of libuvc from your OS installed? You can try with the purethermal1-uvc-capture code on the branch master+libuvc-upstream. This will work with libuvc upstream: https://github.com/libuvc/libuvc (your OS version may be new enough, I don't know) |
Hi, I am having the same problem. In my environment, Getthermal worked, but when I try uvc-radiometry.py I get the same error, uvc_start_streaming failed: -2. |
Ditto - same issue here. with the uvc_start_streaming failure: -2 |
Have you tried this? |
Thanks very much kekiefer for reply. I followed the steps below to install libuvc.
However, This problem has not been resolved. |
Are you also using the |
Thanks very much kekiefer for reply.
Then, I executed command of ...(Omitted because it is long) I am sorry to cause you inconvenience, but I am looking forward to your reply |
Did you run What you posted is not useful. You're looking for the part in that output where it locates libuvc, to make sure it loads the one you built. Also, verify your PT1 firmware version is 1.3.0 with the methods above, to make sure we're all on the same page. |
Thanks very much kekiefer for reply. |
Thanks for the input. I've created #34 to make this change the default. |
hi @kekiefer i use jetson nano and PT with lepton 3.0 i have run: but the problem is still showing up. when i run LD_DEBUG=libs python3 uvc-radiometry.py 7837: calling init: /usr/lib/python3/dist-packages/numpy/random/mtrand.cpython-36m-aarch64-linux-gnu.so is there another command that i missed? im looking forward to hearing your solution. thank you |
It looks like you have done everything right. I do not have this platform so I can't offer much beyond that. Make sure the device is not attached to a hub if you can avoid it, check for kernel error messages, and reach out to the vendor and ask them to fix their isochronous full-speed USB bandwidth limitations. |
Hi, I have followed this recipe but despite it I have the same problem with uvc_start_streaming failed: -2. Other program opencv-capture.py in ~/purethermal1-uvc-capture-master-libuvc-upstream/python works! When I looked what -2 error means in libuvc it is UVC_ERROR_INVALID_PARAM = -2 Do we actually know what the problem is? Seems that up to libuvc.uvc_start_streaming(devh, byref(ctrl), PTR_PY_FRAME_CALLBACK, None, 0) call everything works. I will appreciate any pointers how to solve this. |
Hi I think I have found what the problems is. It is mismatch between format of the frame in the call to libuvc.uvc_start_streaming and the format specified libuvc.uvc_get_stream_ctrl_format_size just one line above. In libuvc.uvc_get_stream_ctrl_format_size we have UVC_FRAME_FORMAT_Y16 and in the same call we call frame_formats[0]. However frame_formats[0] represent not format Y16 but format UYVY so when I have used this one instead of UVC_FRAME_FORMAT_Y16 uvc-radiometry.py started to work. What this means is that we could leave UVC_FRAME_FORMAT_Y16 and use frame_formats[1] instead, but then with frame_format[1] two formats are reported : Cheers |
Hi, if you look in libuvc_internal.h you will notice that Y16 is NOT UVC_FRAME_FORMAT_Y16 = 9 but should be 10. Cheers Important bit form libuvc_internal.h below enum uvc_frame_format {
|
Good find. We've been struggling with bandwidth problems for so long with the same error message that finding another cause for them never occurred to me. I guess this is the problem with pointing to upstream code and doing the bindings like this. The commit libuvc/libuvc@53e2d2f came in and added a value in the middle of the enumeration which broke us. |
Commit libuvc/libuvc@53e2d2f added a value to the middle of the types enumeration, which broke our bindings. This manifested as the "uvc_start_streaming failed: -2" error. This change corrects the enumeration value to match master. Refs #27
Hi guys,
|
Thanks for the update! For anyone who comes across this -- that enumeration value needs to match with the value used in the libuvc you're loading. Note that with the code in |
for linux user's |
Hi @kekiefer We got the exact same error here, and using your fix in branch master+libuvc-upstream it worked again. |
hello,i'm the new user of purethermal
I just bought purethermal2 with flir lepton2.5 and I connected to raspberry Pi 4 model B via usb port
i have tried getthermal and it could work.
But then i try uvc-radiometry.py and got wrong:
device opened!
Version gpp: 1.0.32 dsp: 1.0.32
FLIR part #: b'500-0763-01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
FLIR serial #: b'@\xb0*\x00\x00\x00\x00\x00'
format: b'UYVY'
frame 80x60 @ 9fps
format: b'Y16 '
frame 80x60 @ 9fps
frame 80x63 @ 9fps
format: b'Y8 '
frame 80x60 @ 9fps
format: b'RGBP'
frame 80x60 @ 9fps
format: b'}\xeb6\xe4'
frame 80x60 @ 9fps
uvc_start_streaming failed: -2
I also tried uvc-deviceinfo.py and it could work
I had modified uvc_find_device function and it couldn't work either
libuvc.ucv_find_device(ctx, byref(dev), 0x1e4e, 0x0100,0)
Please help me figure out the wrong message!
The text was updated successfully, but these errors were encountered: