balena-io-experimental / balena-rpi-python-picamera

balena + python + raspberry pi camera module
39 stars 21 forks source link

Not compatible with rpi4 #16

Open roman-mazur opened 4 years ago

roman-mazur commented 4 years ago

On rpi4, balenaOS 2.41.0+rev4 I get the following:

mmal: mmal_vc_shm_init: could not initialize vc shared memory service
mmal: mmal_vc_component_create: failed to initialise shm for 'vc.camera_info' (7:EIO)
mmal: mmal_component_create_core: could not create component 'vc.camera_info' (7)

...
picamera.exc.PiCameraMMALError: Failed to create MMAL component vc.camera_info: I/O error
HughWarrington commented 4 years ago

I get the same error and have got nowhere trying to debug this. Balena team, do you read these comments and are you interested in helping out?

simeneide commented 4 years ago

Ive tried to get this to work the whole day now..

edcloudcycle commented 4 years ago

Hi all, I have the same problem I think, I managed to get the container to deploy on Buster with Python latest by making the following changes: Add to the dockerfile: ENV READTHEDOCS True Change to http.server from SimpleHttpServer in start.sh I also followed to instructions on modifying the device settings through the dashboard.

But then I get an error on the import of picamera File "/usr/local/lib/python3.8/site-packages/picamera/mmal.py", line 47, in <module> from .bcm_host import VCOS_UNSIGNED File "/usr/local/lib/python3.8/site-packages/picamera/bcm_host.py", line 47, in <module> _lib = ct.CDLL('libbcm_host.so') File "/usr/local/lib/python3.8/ctypes/__init__.py", line 373, in __init__ self._handle = _dlopen(self._name, mode) OSError: libbcm_host.so: cannot open shared object file: No such file or directory

A bit stuck now, I am trying to evaluate how easy it is to get access to hardware peripherals from the container. Seems not that easy. All suggestions very welcome.

Thanks

Ed

edcloudcycle commented 4 years ago

Hi all, This project is similar and does work if you set the chrome settings as described in the readme: https://github.com/balenalabs/balena-cam Cheers Ed

fjfricke commented 3 years ago

Anyone having a solution yet?

DavideFemia commented 3 years ago

i had the same problem with balenaOS 2.73.1+rev1 on rpi4:

mmal: mmal_vc_shm_init: could not initialize vc shared memory service mmal: mmal_vc_component_create: failed to initialise shm for 'vc.camera_info' (7:EIO) mmal: mmal_component_create_core: could not create component 'vc.camera_info' (7) ... picamera.exc.PiCameraMMALError: Failed to create MMAL component b'vc.camera_info': I/O error

the rpi4 was working properly for 5 days straight when suddenly it stopped after pushing new code without updating Dockerfile.template.

arthurborgesdev commented 3 years ago

Your link is wrong, @edcloudcycle.

puccaso commented 9 months ago

i actually upgraded the OS recently and this then broke my config 2 identical setups, in the same fleet.. only change is OS one works and one doesnt not working OS version: balenaOS 5.0.8+rev1/SUPERVISOR VERSION 15.2.0 working OS version: balenaOS 2.94.4/SUPERVISOR VERSION 14.9.8

as I understand it, the issue is related to the kernel, base os, libs and files.