econsysqtcam / qtcam

QtCAM is a free, Open Source Linux Webcamera Software with more than 10 image control settings, extension settings and Color space switching.
http://www.e-consystems.com/opensource-linux-webcam-software-application.asp
GNU General Public License v3.0
185 stars 95 forks source link

Problems with enableTriggerMode() #27

Closed victor3105 closed 6 years ago

victor3105 commented 6 years ago

Hello! I'm developing program for capturing images from two See3CAM_11CUG cameras. In my project I'm using Qtcam source code. I'm trying to switch cameras to the Trigger mode using following method from uvccamera.h. But write function returns -1 with error EINVAL. Before switching to trigger mode camera is opened: fd = open(device.c_str(), O_RDWR | O_NONBLOCK, 0); After that the camera is initialized with the necessary exposure value and the pixel format is set to V4L2_PIX_FMT_YUYV. Could you please tell, what could be the reason of such error? Maybe there are some necessary conditions that must be met before switching to the trigger mode?

Thank you in advance.

econsysqtcam commented 6 years ago

Hi,

To use trigger mode functionality, You need to use hid device. Please make sure you are opening the device "dev/hidrawX" node rather than "/dev/videoX".
Also, If you send code snippet contains trigger mode access, It will be helpful for us to identify the problem.

victor3105 commented 6 years ago

Thank you! I was trying to use "/dev/videoX" instead.