fotosyn / berrycam

Source code and support files for BerryCam - the controller app for the Raspberry Pi camera module
16 stars 2 forks source link

iOS App Connects but won't show previews or take photos #9

Closed DishItDash closed 2 years ago

DishItDash commented 2 years ago

It seems that with the introduction of LibCamera as the default library in Bullseye, the python script doesn't trigger the correct commands In the iOS app I am able to successfully connect to the raspberry pi, but no image is visible on screen. Here is what I'm seeing, even after attempting to manually install PiCam and following all of the steps in the ReadMe:

Traceback (most recent call last): File "/usr/lib/python3.9/socketserver.py", line 316, in _handle_request_noblock self.process_request(request, client_address) File "/usr/lib/python3.9/socketserver.py", line 347, in process_request self.finish_request(request, client_address) File "/usr/lib/python3.9/socketserver.py", line 360, in finish_request self.RequestHandlerClass(request, client_address, self) File "/usr/lib/python3.9/http/server.py", line 653, in init super().init(*args, **kwargs) File "/usr/lib/python3.9/socketserver.py", line 720, in init self.handle() File "/usr/lib/python3.9/http/server.py", line 427, in handle self.handle_one_request() File "/usr/lib/python3.9/http/server.py", line 415, in handle_one_request method() File "/home/pi/berrycam/berryCam.py", line 44, in do_GET with picamera.PiCamera() as camera: File "/usr/lib/python3/dist-packages/picamera/camera.py", line 367, in init with mo.MMALCameraInfo() as camera_info: File "/usr/lib/python3/dist-packages/picamera/mmalobj.py", line 2346, in init super(MMALCameraInfo, self).init() File "/usr/lib/python3/dist-packages/picamera/mmalobj.py", line 631, in init mmal_check( File "/usr/lib/python3/dist-packages/picamera/exc.py", line 184, in mmal_check raise PiCameraMMALError(status, prefix) picamera.exc.PiCameraMMALError: Failed to create MMAL component b'vc.camera_info': Function not implemented

fotosyn commented 2 years ago

Thanks @DishItDash for pointing this out. Looks like a straightforward fix as it's a new library (Libcamera) as opposed to any changes in the underlying OS itself - so will add a new script that allows for that to be used. Not sure how this affects things like the Image FX but will see what I can do in the next couple of days.

Have you tried the PiCamera version of the script in the repo? Or does it seem to have a dependency on using the raspistill/raspivid libraries too? I'll check this out when I put a new build of Raspberry Pi OS in one of my test cameras.

DishItDash commented 2 years ago

Thank you for your swift response! I have basically no knowledge of programming/python, so I am actually hiring a tutor to show me how I could alter BerryCam myself as a learning goal. As I had mentioned to you on Instagram, this will be for taking pictures through my telescope. I really appreciate your time and effort, and am so excited to have come across your application. Earlier this year I tried to set up something similar, but I didn't get any usable results besides the moon since the HQ Camera sensor is so small. I do have a focal reducer that makes taking pictures with the telescope more manageable, but I'll be very curious to see if having the detailed control of BerryCam will make it a winner!

On Wed, Nov 17, 2021 at 1:41 AM fotosyn @.***> wrote:

Thanks @DishItDash https://github.com/DishItDash for pointing this out. Looks like a straightforward fix as it's a new library (Libcamera) as opposed to any changes in the underlying OS itself - so will add a new script that allows for that to be used. Not sure how this affects things like the Image FX but will see what I can do in the next couple of days.

Have you tried the PiCamera version of the script in the repo? Or does it seem to have a dependency on using the raspistill/raspivid libraries too? I'll check this out when I put a new build of Raspberry Pi OS in one of my test cameras.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/fotosyn/berrycam/issues/9#issuecomment-971405279, or unsubscribe https://github.com/notifications/unsubscribe-auth/APH3IPBZNXQNCEHWNF3HVOTUMN2F7ANCNFSM5IFUPGFA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

fotosyn commented 2 years ago

Did I mention the fix was gonna be easy? Well in some respects, getting Libcamera to talk to Berrycam is straightforward. There are some issues with the extended functionality which is going to take a bit of time to sort out, mainly around exif tagging, image FX and annotations.

The short term fix is to continue to use Raspberry Pi OS Buster until a fix can be formulated that replicates all of the functionality of Raspistill and PiCamera. I will also try to simplify the deployment process across OSes and Pi versions, but this needs a bit of time and there's only one of me to do that at the moment.

I hope this isn't too much of an issue. If you use one of the later builds of Raspberry Pi OS 10 (pre October 2021) this should allow you to install and get up and running without too many issues.

Raspberry Pi images can be found here