I just got 4 cameras attached to the Jetson Nano via USB2.0_UC-391_Rev.E boards. Using the corresponding config “DVP/MT9J003*.cfg” versions it works well on Windows via the “USBTest.exe” file (tried all 4 cameras connected via a usb 3.0 hub and also “directly attached”).
On my Jetson Nano I try to execute “ArduCam_Py_Demo.py” with Python 3.6.9 64Bit but only receive:
color mode 3
open fail,rtn_val = 65281
Which means ArducamSDK.Py_ArduCam_autoopen() failed.
Is there a way to identify what exactly fails / what is missing?
I prepended
cam_count, indexs, serials = ArducamSDK.Py_ArduCam_scan()
print("Camera count %i" % (cam_count))
print("FmtMode", FmtMode)
print("Size: %i x %i. Bit width=%i, color mode=%i" % (Width, Height, BitWidth, color_mode))
to check if it sees the cameras etc.
Output of the execution contains this then:
Camera count 4
FmtMode 0
Size: 1280 x 720. Bit width=8, color mode=3
(using the 720p config file as test - all others fail too but work on Windows(10) ).
I also tried to open a specific camera by “index” - with the same result.
Hi @yang,
Thanks for your suggestion.
I tried “sudo” on some customized stuff and it still failed.
I then run the original “ArduCam_Py_Demo.py” with sudo - and it worked (so thanks here for that).
So I tried to find out what was the difference:
Adding ArducamSDK.Py_ArduCam_scan() before ArducamSDK.Py_ArduCam_autoopen(cfg) leads to the error code (failed to create the camera connection).
# add this line:
cam_count, indexs, serials = ArducamSDK.Py_ArduCam_scan()
#ret,handle,rtn_cfg = ArducamSDK.Py_ArduCam_open(cfg,0)
ret,handle,rtn_cfg = ArducamSDK.Py_ArduCam_autoopen(cfg)
if ret == 0:
#ArducamSDK.Py_ArduCam_writeReg_8_8(handle,0x46,3,0x00)
usb_version = rtn_cfg['usbType']
So for me the “scan” command seems to do something which makes opening the camera faulty.
Edit: just for completeness: after the “scan” it would also fail to explicitely open a specific camera with ArducamSDK.Py_ArduCam_open(cfg,0) (or (cfg, 1) as your docs show.
Can you replicate that?
Second question:
What needs to be changed (some rules.d? addding the user to which groups?) to avoid requiring sudo?