I’m currently working on a project with the AR-0135 global shutter camera using a Raspberry Pi module, and sometimes, but not always, having trouble connecting to the camera.
USB2 camera shield: UC-391 Rev. D
Platform: Raspberry Pi 3B+
Arducam Software SDK and API for C/C++
Arducam config file: AR0134_960p_Color.yml
QT framework (for writing the application)
I have basically copied the code from the Streaming_demo cpp example but divided it into a couple of QT classes.
- Scans for cameras
- Reads the config file
- Opens the camera
- On successful camera open, creates one capture thread and one read thread
- The capture thread
- The read thread
I am sometimes (but only sometimes) having trouble opening the camera with the SDK function ArduCam_open function (or ArduCam_autoopen, same symptom).
When it actually opens, everything is working as expected and I am successfully streaming and displaying images, but sometimes the ArduCam_open function fails and returns USB_CAMERA_USB_CREATE_ERROR (0xFF01) and I just can’t figure out why.
Just before opening the camera I succesfully scans for avaialable cameras and this always succeeds. If I compile and run the Cpp Streaming Demo code this problem doesn’t seem to occur. But the thing is I haven’t changed any essential parts of the demo code, so I really can’t find any differences.
I realize that the issue very well still might be in my code but before ripping any more of my hair off :
Is there any known issues with the used hardware described above or the software SDK that can explain this problem? Could it be som sort of timing problem?
I downloaded the SDK in feb 2019 (the project hase been on hold for a while) and I can see that some updates have been made.
Greatful for any tips or insights.
I can post the relevant code if helpful.