Tenrec-Builders / pi-scan

Pi Scan is a simple, robust capture appliance for book scanners. It runs on a Raspberry Pi 2.
BSD 2-Clause "Simplified" License
264 stars 37 forks source link

Failed: Failed to prepare camera: Failed to disable flash #9

Closed jhub95 closed 6 years ago

jhub95 commented 6 years ago

Hi there,

PiScan is loading, finding my SD card, and finding the two cameras. When it gets to the screen where you can adjust the zoom, focus, etc., whatever option I want to do ends up with the same error and failure to proceed. This is what displays on the screen twice, once for odd and once for even cameras.

Failed: Failed to prepare camera: Failed to disable flash

I'm not sure which log file to give to you to help troubleshoot this. I'm wondering if I've installed CHDK properly, though each camera boots up just fine into CHDK. Both cameras are the same model, Canon PowerShot A810

Thanks for your help.

duerig commented 6 years ago

Hi. Sorry for taking a few days to respond. I'm not sure exactly what is causing your problem. But it might be reasonable to just comment out the line of code that disables flash. I haven't used an A810 camera before, but that particular CHDK command may not be implemented properly for it.

Comment out this line:

https://github.com/Tenrec-Builders/pi-scan/blob/master/src/camera_chdk.py#L97

You can find the file at /home/pi/pi-scan/camera_chdk.py and you can edit it with nano.

Then test by running

python /home/pi/pi-scan/main.py

If it works, then you will need to make the change permanent. Any changes are lost by default when your reboot the Pi (this is to protect the disk image from filesystem corruption). To make the change permanent, run:

sudo mount -o remount,rw /

Then edit /home_org/pi/pi_scan/camera_chdk.py and comment out the line of code. Then reboot:

sudo shutdown -r now

That should make the change permanent and you will now have your own variation which doesn't try to disable flash.

Let me know how it goes.

jhub95 commented 6 years ago

Hi, thanks for writing. No problem about the wait. Nice program, BTW.

I made the temporary change as you suggested and then it came up with an error for white balance. So, obviously there's something prohibiting pi-scan from making changes to the cameras. The lenses do turn on, the lens tube extends from the camera body, but other than that there doesn't seem to be much control (it can make them beep too). I followed the instructions here on how to prepare the cameras' SD cards. I'll prepare the cards again and see if that makes a difference.

duerig commented 6 years ago

The problem is that you need to install the 'full' version of CHDK on your cameras. Give it a try. If that works, let me know and close the issue.

On Tue, Oct 24, 2017, at 05:52 AM, Justin wrote:

Hi, thanks for writing. No problem about the wait. Nice program, BTW.> I made the temporary change as you suggested and then it came up with an error for white balance. So, obviously there's something prohibiting pi-scan from making changes to the cameras. The lenses do turn on, the lens tube extends from the camera body, but other than that there doesn't seem to be much control (it can make them beep too). I followed the instructions here on how to prepare the cameras' SD cards. I'll prepare the cards again and see if that makes a difference.> — You are receiving this because you commented. Reply to this email directly, view it on GitHub[1], or mute the thread[2].>

Links:

  1. https://github.com/Tenrec-Builders/pi-scan/issues/9#issuecomment-338964887
  2. https://github.com/notifications/unsubscribe-auth/AA1sTHkvZrBz9xuJTRsL9QXmogjfx9YFks5svc9sgaJpZM4P_DNA
jhub95 commented 6 years ago

Ends up that I didn't have the FULL CHDK package on my SD cards. Jonathon helped me with this through email. Thanks!