Using arducam USB camera shield on Linux not working

Hi,

I bought one camera with a global shutter: AR0134 connected to a usb camera shield: USB2 Rev.D (UC-391 Rev.D) shield.

I was able to use it on a Windows computer after installing the driver.
Now, I would like to use it on a Linux device. I tried on my own laptop: Lenovo T490s with Ubuntu 18.04 I already had opencv and python installed on it. After following the instructions on the github (https://github.com/ArduCAM/ArduCAM_USB_Camera_Shield) : I have downloaded the arducam config parser, built it and installed it.
Afterwards, I have download the last version of lib usb (1.0.23), configured it and installed it.

However it did not work when I tried the demo software ( I tried the python file in the folder Streaming_demo in the Linux_x86 repository as well as the demo with ROS). I always get the errors:
“”"
color mode 0
USB VERSION: 2
Serial: AU2S-2017-0005
Capture began, rtn_val = 0
Error capture image, rtn_val = 65317
“”"
or
“”"
process[cam0/arducam_ros_node-2]: started with pid [16333]
color mode 0
USB VERSION: 2
Serial: AU2S-2017-0005
Capture began, rtn_val = 0
USB_CAMERA_DATA_LEN_ERROR RECEIVE_LENGTH:1235700
Error capture image, rtn_val = 65316
“”"
(I am using the config file AR0134_1280x964_8bit_M.cfg unmodified).

Moreover I get the message :
“”"
[272878.210093] usb 1-3: new high-speed USB device number 14 using xhci_hcd
[272878.530988] usb 1-3: language id specifier not provided by device, defaulting to English
[272878.531859] usb 1-3: New USB device found, idVendor=52cb, idProduct=52cb, bcdDevice= 0.01
[272878.531863] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=
“”"
when I look at dmseg on a terminal.
The camera is not recognized on qv4l2 nor vlc when I try to open it manually.

Is there a specific driver to install on Linux device ( I found the driver for Windows computer but nothing for another OS, or is there a specific step that I was forgetting when I did the installation of the camera?

Finally, I would like to use this camera on a Odroid XU4Q with Ubuntu 18.04 installed on it. I made the same procedure than explained before but it does not work either. I got the same error except that the receive_length value change from time to time. I also tried with a raspberry pi 3b with the same results although I saw on your demonstration video that you were able to use it.

Could you please help me to make it work?
What am I doing wrong?

Thank you in advance
Best regards
Tom

Hi @TomVanden ,

It is normal for a 65316, 65317 error to occur once, which does not affect normal use.

The camera is not recognized on qv4l2 nor vlc when I try to open it manually.
The USB camera shield is not a UVC camera, it needs to be used with our SDK.

Hi,

Thank you for your reply. However, it does not completely solve my problem.

This error happens once when I use it on my laptop and then it get stucked. There is no picture displayed by imshow, imshow is not even opening.

When I tried on the odroid, I continuously receive the error message and there is never a valid picture, it does not just occur once.

I understand that I should use your SDK. I suppose that installing the config parser and usb lib should be sufficient to use your SDK with your python code or ROS code. However, it does not work in my case, do you have any idea why?

Thank you in advance

Hi @TomVanden ,

This is strange, it should output some errors.
Can you use the cpp version of the example program on your laptop?

I have this type of error when I try to make :


tom@tom-ThinkPad-T490s:~/ArduCAM_USB_Camera_Shield/RaspberryPi/Cpp/Streaming_demo$ make install-sdk
sudo cp -d ./Arducam_SDK/lib*.so* /usr/lib
tom@tom-ThinkPad-T490s:~/ArduCAM_USB_Camera_Shield/RaspberryPi/Cpp/Streaming_demo$ make
g++ ArduCam_Demo.cpp Arducam_SDK/ArduCamLib.h -o ArduCam_Demo -lArduCamLib -lusb-1.0 -lpthread -larducam_config_parser <code>pkg-config --cflags --libs opencv</code> -L. -I. -std=gnu++11 -g
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/../../../../lib/libArduCamLib.so when searching for -lArduCamLib
/usr/bin/ld: skipping incompatible /usr/lib/../lib/libArduCamLib.so when searching for -lArduCamLib
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/../../../libArduCamLib.so when searching for -lArduCamLib
/usr/bin/ld: skipping incompatible //usr/lib/libArduCamLib.so when searching for -lArduCamLib
/usr/bin/ld: cannot find -lArduCamLib
collect2: error: ld returned 1 exit status
makefile:8: recipe for target 'ArduCam_Demo' failed
make: *** [ArduCam_Demo] Error 1

Hi @TomVanden ,

You should install the sdk in the Linux_x86 directory instead of the RaspberryPi directory.