I am using https://github.com/cedricve/raspicam API for a project which uses Raspicam. I generate a binary of my C++ project and run it in the end using CMD
. I am getting the following error:
[Logs] [9/25/2020, 9:47:13 AM] [camera-test] Opening Camera...
[Logs] [9/25/2020, 9:47:13 AM] [camera-test] Failed to set I2C address
[Logs] [9/25/2020, 9:47:13 AM] [camera-test] Sleeping for 3 secs
[Debug] Device state not settled, retrying in 1000ms
[Debug] Device state not settled, retrying in 1000ms
[Logs] [9/25/2020, 9:47:16 AM] [camera-test] Measuring fps ...
[Live] Device state settled
^C[Live] Cleaning up device...
Raspicam is supposed to take screenshots after printing Measuring fps ...
but the program just hangs after that. You can also see I get Failed to set I2C address
.
I want to use a 32-bit system as I am also using some older version of libraries which do not support 64 bit. Balena OS version I am using is: Raspberry Pi 3 BalenaOS 2.58.3+rev1 armv7hf development
. The base image I am using is balenalib/raspberrypi3-debian
. I used all the steps mentioned in the docs to make use of Raspicam and i2c. Here is my docker-compose file:
version: "2"
services:
camera-test:
build:
context: .
dockerfile: Dockerfile.balena
privileged: true
restart: always
network_mode: "host"
labels:
io.balena.features.kernel-modules: '1'
And here is the CMD command I am using to run the binary in Dockerfile:
CMD modprobe i2c-dev && /bin/camera-test
Any help would be appreciated. Thanks in advance.