################################################################################ # d70c is released under the WFM ('Works For Me') licence. This means that the # # software worked for me but may not work for you. Any damage or loss caused # # by this program is your responsibility. You may copy, modify and distribute # # this program in any way you desire but you may NOT charge for it. If you # # modify and distribute this program, please add your name to the author list, # # below. # ################################################################################ 17th April 2005 - alpha release Author: sjb (Steve Brown) Based, partially, on the work of Steve Harris. ####################### # About this software # ####################### The latest(!) version can usually be downloaded from http://www.ottaky.com/scripts/d70c.tar.gz This software is a "work in progress" and is likely to contain bugs and errors. While I believe this software is safe, only you can make the decision to use it with your expensive camera. ################ # Requirements # ################ The following software *must* be installed and working for d70c to function: - Perl version 5 or later http://www.perl.org/ - 'Curses' module for Perl http://search.cpan.org/~giraffed/Curses-1.12/ - 'Curses::UI' module for Perl http://search.cpan.org/~marcus/Curses-UI-0.95/ - ptpcam, part of the libptp2 package (tested with version 1.0.2) http://libptp.sourceforge.net/ The following software is optional: - gphoto2 (tested with version ????) http://gphoto.sourceforge.net/ If you don't have gphoto2 installed you can't take a photograph, only set the camera features and properties. - ImageMagick http://www.imagemagick.org/ Or some other program that can display PPM and JPEG files in X. - dcraw http://www.cybercom.net/~dcoffin/dcraw/ If you want to preview RAW files, you'll need this to convert them into something less propietry. ################# # What is d70c? # ################# d70c is an application to control a Nikon D70 camera from a Linux PC. It can run on a console with no option to review captured photos, or in a terminal in X windows where reviewing of images is possible. This might be useful if you want to frame a photograph and then try various exposure settings or image options without having to disturb the camera once it's in position. d70c is written in Perl and is basically a wrapper for the other software detailed above. It uses ptpcam extensively to read and set properties on the camera. d70c works specifically with the nikon D70. You may be able to hack it to work with other cameras, but you'll almost certainly have to spend a lot of time doing it. ###################### # How do I use d70c? # ###################### The first thing you need to do is to edit d70c and ensure that the $ptpcam variable is pointing to your copy of ptpcam in the EDIT THESE section. d70c doesn't search for ptpcam, you have to enter the path manually. Secondly, make sure that the very first line of d70c is pointing to your copy of Perl. Since you're editing d70c anyway, you may want to change the paths for $gphoto, $viewer and $dcraw at the same time. These variables are not essential and d70c checks that the paths are correct and that the programs are executable. Don't worry if you don't edit these values, d70c will check to make sure they are correct before trying to use them. If you don't have these applications, you can set them to empty strings (e.g. $gphoto = '';) or leave them as they are. The next thing to do is to put d70c somewhere in your path so that you can run it from anywhere. Try /usr/bin or /usr/local/bin. Then make it executable with 'chmod +x d70c'. ################ # Running d70c # ################ Make sure that your USB cable is plugged into the D70 at one end, your PC at other end, that USB support on the camera is set to PTP (not Mass Storage) and that the camera is switched on. Most of the settings available in d70c only apply when the camera is in M(anual) mode, so make sure the command dial is set to M. Other modes will work, but you may not get the results you expected. d70c accepts no command line parameters, so you simply type d70c [return] to start it. If d70c detects one D70 it will immediately show you the control interface. If, however, you have more than one D70, d70c will list them for you to select one of the cameras to control. If d70c fails to detect any D70s, it will terminate. Once the control interface is running, you can use [tab] and [shift][tab] to move between the various options. Highlighting an option will allow you to change its value. You change a value by either using the [up] and [down] arrow keys, or by hitting [enter] to display all of the options and then using the arrow keys to make your selection before hitting [enter] to confirm your choice. If you have mouse support in your console or terminal, you may find that you can use your mouse to select items too - try it and see! (You can also press [enter] to open a selection list and press [?] to search for a value if you like) As soon as you change an option, the change is sent to the camera - there is no 'update' button or command. Hit [r] to refresh. Use this if you change a camera setting on the camera manually. For example, if you change from Auto Focus to Manual by flipping the lever on the camera body, hit [r] in d70c to refresh the camera status. ([s]ave & [l]oad are experimental features!) Use [s] to save the settings on the camera to a profile on your PC. You will be prompted for a filename. Files are written to /home/USERNAME/.d70c/ and have a .d70 extension. Use [l] to load previous saved settings. This function will take a few seconds to run and update the display, so please be patient. Hit [q] to quit. If you have gphoto installed you can press [c] to capture and optionally review the image if you specify a viewer etc. ####### # FAQ # ####### Q: When I run d70c, I see 'bash: ./d70c: /usr/bin/perl: bad interpreter'. What's up with that? A: Assuming you have Perl installed, you need to edit the first line of d70c so that it points to your Perl. For help, try 'which perl' on the command line and that should tell you where it is. You must keep the '#!' intact! Q: When I run d70c, I see 'Can't locate Curses/UI.pm ..' or similar. What's up? A: Perl can't find the module stated. d70c uses Curses and Curses::UI, make sure that both are installed. Q: When I run d70c, I see 'Your screen is currently too small ..'. Huh? A: If you're running d70c in a terminal in X windows, resize the terminal until the message disappears. If you're running in a console, you need to increase the resolution. Q: Why doesn't d70c recognise my lens and just says 'Unknown (XX)' (where XX is a number)? A: The camera identifies the lens (if possible) by a number which d70c translates into the lens name. The number in parenthesis is the ID number for the lens. If you can hack Perl, you can add an entry for your lens. Alternatively, send the ID number, manufacturer name and a *full* description for the lens to me and I will include it in the next version. If you just see 'Unknown' without a number, the camera is unable to determine the lens ID and it cannot be added to d70c. Q: Why can't I select certain options? A: Some options can only be read from the camera and cannot be changed. These options are displayed, but cannot be selected or changed e.g. 'Battery' Q: I can't change some options, e.g. 'Image size' A: Some options are mutually exclusive. For example, you cannot change the image size on the camera while 'RAW' or 'RAW + JPEG Basic' is selected for 'Compression'. This mimics the operation of the camera. Q: Why are some items indented? A: This is a visual cue for where some options depend on other options before they have any effect. For example, 'Colour mode', 'Sharpening' etc. can be set at any time, but they don't have any effect until 'Optimise image' is set to 'Custom +'. Where possible, the indented items appear under the control that applies their effect and the appropriate option has a '+' next to it, e.g. 'Custom +' in 'Optimise image' If there's no '+' in the option above, use your common sense. e.g. 'WB Auto balance' only has an effect when 'Auto' is selected for 'White balance'. Q: Why do some options have a '+' on the end? A: See the previous question. Q: What happened to 1/8000, 1/5000 and 'bulb' shutter speeds? A: There appears to be a bug in the D70 firmware. Specifically, the camera reports '1/8000' & '1/6000' as speed '1', and '1/5000' & '1/4000' as speed '2'. When you set the shutter speed to '1', the camera always sets '1/6000', and when you set the speed to '2' the camera always says '1/4000'. Therefore it's actually impossible to select '1/8000' or '1/5000' via PTP. If this is fixed in a future firmware upgrade I'll fix d70c to reflect the changes. If you select 1/8000 or 1/5000 on the camera before starting d70c the setting will stick on the camera as long as you don't change it with d70c. 'bulb' is reported as speed '65535' - this may be a bug in the D70 or in ptpcam. Either way, you can't set it so it's not in the list. Q: If I mess with the camera while d70c is running, will d70c update? A: No. d70c doesn't check for changes automatically. If, for example, you start d70c and then switch from auto to manual focus, you need to quit d70c and restart it *or* press [r] to refresh the display. Pressing [r] may take a second or two to complete, so be patient. Polling the camera constantly chews the battery, so try to avoid constant refreshing of the display. Q: I don't understand what a setting means or does. Is there any help? A: Not as such. In most cases the labels use the same names as the camera manual, so check there first. Q: I found a bug, what should I do? A: Ideally, fix it and send me the patch ;-) Alternatively, send me an Email with instructions for reproducing the problem and I will endeavour to fix it for the next release. Q: I pressed [c] and got a weird error message and no photo. What's up? A: If the camera cannot take a photo for any reason you may see a weird error message. This might happen if you're using autfocus but the camera fails to focus, or your memory card is full, or the battery is low or what have you. Fix the problem, restart d70c and try again. Q: Your Perl sucks .. why put quotes around strings when using => in a hash? Why are you using 'eq' for numeric values? A: d70c grew out of a quick hack and contains a lot of guesswork - I just hacked it together as I went along. Once it's a little more stable, I may re-write sections of it so that it's less embarassing for the author ;-) ######## # ToDo # ######## Re-write with GTK. Profiles? Automatic bracketing completion? ############# # Changelog # ############# 17th April 05 - Initial alpha release complete with bugs for TESTING ONLY 23rd April 05 - Added 4 new lenses - thanks Ralf. - Added "auto" update for flash status - Fixed regex for enumerating fstop values from CPU lens - Added [r] key binding to refresh the display 24th April 05 - Added [l]oad and [s]ave for experimental profile support 2nd May 05 - Added Sigma 70-300 APO lens ID - thanks Dennis 30th May 05 - Added Tamron 28-200mm 1:3.8-5.6 Super XR Aspherical IF Macro - thanks me