Controlling the Nikon D40 with gphoto2
gphoto2 is a neat little command line interface to talk to digital cameras. The Nikon D40 DSLR is also supported. I was not able to find a good guide on interfacing the D40 to gphoto, so I wrote this down for reference.
1. I have Fedora10 installed on my laptop. Running the following simple command “yum install gphoto2″ as root installs gphoto2.
2. Doing the above however does not install libghoto2 which is the core library designed to allow access to digital cameras by external programs.
- Goto ghoto2.org and download the latest version of libgphoto2. The latest at my time of downloading was 2.4.5.
- Extract all the contents on the Desktop in a libgphoto folder.
- Open a terminal. As root, type “make”. If you encounter any errors, it maybe because libgphoto cannot find the packages it needs. I had to install libusb. Doing “yum install libusb” did it. If you are unable to successfully compile it, post in the comments, I’ll try to help.
- Once compilation is done, type “make install” as root.
- Close the terminal. Done!
1. Gphoto2 is now installed and ready to use. Make sure the camera is in PTP mode. Goto SETUP MENU -> USB and select MTP/PTP mode. Restart your camera.
6. Now for capturing, type the following:
This first saves the file “capt0000.jpg” on you camera in the “store_00010001″ folder. It then copies it to the current folder on your PC and deletes the one on the camera.
If this guide was helpful or if you need any help, let me know in the comments below and remember to Subscribe