Hi everyone. I’m working with an ArduCam PTZ B01675MP camera connected to a Raspberry Pi 4 (4GB RAM) running Buster OS. I’m trying to find Python code that can reset the camera over I2C instead of having to physically power it on/off. Is there any I2C reset command for this particular PTZ model? I’ve been searching around but can’t find anything specific for the B01675MP.
Thanks for the details. Our team has managed to run the referenced Python script, but only on Bullseye OS - we haven’t tested it on Buster, so compatibility there is uncertain. I’d suggest following the Arducam quick-start guide to pull down the repo and its dependencies: https://docs.arducam.com/Raspberry-Pi-Camera/Pan-Tilt-Zoom-Camera/quick-start/#step-1-install-the-opencv. Once the demo script is running, press the ‘r’ key and it will reset the focus and zoom on the camera. That’s the closest thing to a software reset we’ve verified so far. Just keep in mind it has only been verified on Bullseye, so if it acts up on Buster, that could be the reason.
Thanks, but I was actually hoping for more than a focus/zoom reset - something like a full reboot or power-cycle of the camera over I2C. The problem I’m seeing: after roughly 24 hours of continuous powered-on operation, the camera stops responding and raspistill can no longer capture an image. The only fix I’ve found is rebooting the Raspberry Pi itself, but then the same thing happens again after another ~24 hours.
Setup details: Buster OS, and the camera takes 5 still images every 15 minutes. Here’s the exact command that timed out:
raspistill -o /home/pi/images/zipfiles/cam1_BWD1094_24-01-20_15-18-53/img_rgb2_24-01-20_15-18-53.jpg -w 1920 -h 1520 --nopreview --timeout 2000 --exposure auto -rot 180
It timed out after 3 seconds. So my question is - is there any I2C command to reboot or power-cycle the camera module itself?
Unfortunately there is no I2C control available to remotely power off the camera - a software power-cycle over I2C isn’t something this hardware supports. That said, the camera locking up after 24 hours of operation is quite unusual, so we’d want to investigate it further. One thing we’d suggest: remove the PTZ control board and run a stability test on the camera again without it. That will help determine whether the PTZ board is involved in the lockup. If you can test it that way and report back the results, that would be really helpful.
Quick update while I test that. I’ve noticed raspistill actually freezes after working fine for several hours, before it even reaches the full 24-hour lockup. I suspect the camera connection isn’t being closed properly between captures - maybe GPU or memory conflicts building up in the background. Is there any code available to close the camera connection and re-open it each time an image is captured? That seems like it might clear the freeze without needing a full Pi reboot.
There isn’t any supported code to reboot or re-open the camera connection on every capture - nothing we can provide for that. Part of the problem here is that raspistill is quite old and no longer the recommended way to drive the camera. I’d suggest moving off raspistill and using the libcamera commands instead. That’s the current approach and it generally handles connection management much better. Give libcamera a try in your capture loop and let us know if the freezing still occurs.