balena-io-experimental / balena-rpi-nodejs-picamera

20 stars 3 forks source link

Raspistill hangs on Buster (balenalib/raspberrypi3-node:8) #3

Open JeffJassky opened 5 years ago

JeffJassky commented 5 years ago

When using the new Docker image (balenalib/raspberrypi3-node:8) the deployment hangs on Raspistill.

This seems to be more of an image/os related bug than a bug with this project. However, since I'm trying to use raspistill on balenalib/raspberrypi3-node:8 it would be helpful to see it updated.

Thanks!

imrehg commented 5 years ago

@JeffJassky this is because Raspberry Pi updated their raspistill that ships in the latest Raspbian (buster for the base image you mention) in a way that is not working with the previous (pre 2019 July) firmware on the devices. We found this out this week, and working on a new balenaOS version for the Raspberry Pi that adds the new firmware (cc @agherzan). In the meantime, you can fix the issues by downgrading to the previous package, which in buster can be done by adding this to the Dockerfile:

RUN apt-get update && apt-get install libraspberrypi-bin=1.20180328-1~nokernel1 libraspberrypi0=1.20180328-1~nokernel1 --allow-downgrades -y

(for reference, for other projects, based on stretch, the downgrade can be done as easy as:

RUN apt-get update && apt-get install libraspberrypi-bin/oldstable --allow-downgrades -y

but it's not directly relevant here. Just for the record.)

Also note, that this project is not using the image you mention by default, so issues with using different base images than the project would require troubleshooting by those who change the image. Having said that, we should definitely update from base image to the balenalib/... line cc @chrisys, so thanks for the heads up here nonetheless!

smashah commented 5 years ago

This project doesn't work at all

I tested on ras pi 3 and 4 with latest and suggested versions of the image.

image

I tried adding http://archive.raspberrypi.org/debian/ buster main as a source also still didn't work.

How can this be fixed???

imrehg commented 5 years ago

@smashah the issue in your case is differen, it is with using the 64-bit base image, which cannot use Raspbian packages (as Raspbian doesn't have 64-bit version). We are testing the changes in #5 to allow your issue to be fixed.

imrehg commented 5 years ago

@smashah can you check the latest version of this project? Should be working on all Raspberry Pi variants again. Thanks for the report!

smashah commented 5 years ago

@imrehg I wasn't aware of the distinction on the 64 bit image. Your fix worked perfectly however my test case includes using the gpio pins and that can't be done with the image in your fix. FROM balenalib/raspberrypi3-node:9-buster-build works though. Tested on both 3 and 4. (used a ras pi 3 image on the ras pi 4) Thanks

imrehg commented 5 years ago

@smashah that is likely then a Node version issue, there are things that change between versions (I know Node 12 needed a lot of upgrade from different libraries to work). So I guess that's the case for you too.

It's not for this Github issue, but out of curiosity, what library give you the problem? Will probably need to update it, and would be curious.

imrehg commented 5 years ago

@JeffJassky does it work for you on the latest Pi3 images? There was a firmware change that affected the camera, so there are a couple of OS versions which have tricky picamera support, but the latest one should run old and new versions of PiCamera, on any versions of Raspbian. Just checking whether this issue can be closed. Cheers! :)

smashah commented 5 years ago

@imrehg The pi-pins dependency causes an issue due to gyp. gyp fails on anything other than -build. I was trying to combine the GPIO and Camera example projects. The image mentioned in my previous comment allows both to work.