Skip to content
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_open error #7

Closed
ShuangjunLiu opened this issue Aug 10, 2018 · 21 comments
Closed

uvc_open error #7

ShuangjunLiu opened this issue Aug 10, 2018 · 21 comments

Comments

@ShuangjunLiu
Copy link

I tried to run code
uvc_deviceinfo.py
uv_radiometry.py

Both has error
"uvc_open error"
I checked the code. It seems that PT_USB_VID and PT_USB_PID is not defined when call
res = libuvc.uvc_find_device(ctx, byref(dev), PT_USB_VID, PT_USB_PID, 0)

I find out my device ID
image

as
VID: '1E4E'
PID: '0100'

Transfer them into int format and put in the code.

Still same erro
'uvc_open error'

@moscamich
Copy link

moscamich commented Dec 29, 2018

check if the lepton sensor is well in place, I notified problem with the carrier board holder. Afterward try to run with sudo

@mylesjoseph
Copy link

sudo works - but is there a solution that does not involve sudo?

@kekiefer
Copy link
Member

You can define udev rules to give regular users access to a usb device. This rule would give everyone rw access:

sudo sh -c "echo 'SUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"1e4e\", ATTRS{idProduct}==\"0100\", SYMLINK+=\"pt1\", GROUP=\"usb\", MODE=\"666\"' > /etc/udev/rules.d/99-pt1.rules"

@mylesjoseph
Copy link

mylesjoseph commented Feb 6, 2019

I am still seeing uvc_open error - do I have to modify anything to that script?

@kekiefer
Copy link
Member

kekiefer commented Feb 6, 2019

What OS are you using?

@mylesjoseph
Copy link

Ubuntu 16.04.5 LTS xenial

@kekiefer
Copy link
Member

kekiefer commented Feb 6, 2019

It should work, but OS support is getting a bit out of scope here.

Check that the permissions on the usb device are actually being set by udev. lsusb will give you the bus and device number -- look for it in /dev/bus/usb/*/*. If the rule is working properly, you'll see the device mode is crw-rw-rw- (the last rw is what you're looking for this to work as a non-privileged user). A one-liner to list all the device permissions:

find /dev/bus/usb/*/* -exec ls -l {} \;

@pellarboss
Copy link

Took me a while to figure this out.

I had to set LD_LIBRARY_PATH for it to work
export LD_LIBRARY_PATH='/usr/local/lib'

Hope this helps the next guy :)

@techmaticsnz
Copy link

I'm currently getting the same error on raspbian stretch.
PT_USB_VID=0x1E4E
PT_USB_PID=0x0100

init works
find device works
uvc_open error
sudo doesn't work.

Unique part of the system is that two cameras are running through libuvc.
however If i stop the other camera the error still persists.
Can anyone help or point me in right direction?
output of ls
crw-rw-rw- 1 root root 189, 6 Apr 16 00:15 /dev/bus/usb/001/007

output of lsusb
Bus 001 Device 007: ID 1e4e:0100 Cubeternet WebCam

@sayezz
Copy link

sayezz commented May 8, 2020

I have the same error on windows 10 using Visual Studio 2017.
Changed my hardware ids:
PT_USB_VID=0x1E4E
PT_USB_PID=0x0100

Tryed to execute as admin.
-> Device found
->uvc_open: "Not found (-5)".

@luv-deluxe
Copy link

I ran into this issue, but running app using sudo has made it working.

@getandplay
Copy link

I have the same error on windows 10 using Visual Studio 2017.
Changed my hardware ids:
PT_USB_VID=0x1E4E
PT_USB_PID=0x0100

Tryed to execute as admin.
-> Device found
->uvc_open: "Not found (-5)".

I have the same issue, have you fixed that? @mudzin Could you share your solution, thank you.

@sayezz
Copy link

sayezz commented Mar 23, 2021

@getandplay what are you trying to do? It has been a while so I need to work myself back into the code. If you try to get the pure thermal running under windows, let me know, I can probably provide you a working code/VS project that you can use.

@getandplay
Copy link

getandplay commented Mar 23, 2021

@sayezz Yeah, I am trying to make it running under windows. That would be very nice if you could share your code. Thank you.

@sayezz
Copy link

sayezz commented Mar 24, 2021

I send you an e-mail with the source code. Long ago I thought about doing a PR but I do not find the time to kind of sort the project out and make a stand alone version without all the other non cam related stuff.

@ghost
Copy link

ghost commented Sep 10, 2021

@sayezz I have the same problem, can you send me your solution if you still have it? thanks a lot!

@sayezz
Copy link

sayezz commented Sep 14, 2021

@postaldude I send you an e-mail with the source code. Let me know if thats enough or if you need more help.

@sayezz
Copy link

sayezz commented Sep 14, 2021

well... your mail is not valid PostalDude

@criminact
Copy link

@postaldude I send you an e-mail with the source code. Let me know if thats enough or if you need more help.

Hey, I am stuck with the same problem and getting -5 from the uvc_open() function. Is this a permission issue? or something else?

I am working on windows 11. Building my application on QT. Thanks in advance. I wouldn't mind the source code that you have sent to other people. Thanks.

@sayezz
Copy link

sayezz commented Apr 16, 2023

Hey @criminact ,
I worked only on Windows 10, might be that there a some differences between Win 10 and 11.
Anyways, can you see the PR (#60)? Here you can find my modified code.

Reharding the -5, I don't know exactly where this is coming from. Did you check the VIDs in the device manager for the cameras? Might be that your IDs are different and therefore you need to adjust the code and set PT_USB_VID to the correct address. This is just a guess but the IDs in the code and the device manager should match.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests