airnef logo

airnef - Wireless download from your Nikon Camera!

This is the official homepage of Airnef, my open-source utility for downloading images and movies from your WiFi-equipped Nikon camera. Airnef runs on Windows, Mac, and Linux. It supports all Nikon cameras that have built-in WiFi interfaces, along with those using external Nikon WU-1a and WU-1b WiFi adapters. Airnef may also work with Nikon's WT-4A and WT-5A wireless adapters for the D3/D4/D8x, although I don't have any of these adapters on hand to test. Airnef supports Canon cameras as well, although Canon supplies its own excellent EOS Utility for wireless downloads. Airnef is licensed under GPL v3.

Downloads

Airnef is written in the Python programming language and is distributed in both installable form (Windows and OS X, directory of binaries for Linux) and as a source tree that can execute on any platform supporting Python 2.7.x or 3.4.x.

Dates
Ver
Change List
Windows Installer
OS X application
Linux Binary
Python Source Code
09/11/2015
1.00
N/A
airnef-installer-v1.0.exe
airnef v1.00.dmg
airnef_v1.00_Linux_Binary.tar.gz
airnef_v1.00_Source.zip

Description

Airnef is two applications - a GUI front-end and a command-line app. The GUI front-end allows you to visually select the criteria of which images to download and then launches the command-line app to perform the transfer. You can optionally use the command-line version directly to script your transfers.

Major Features

  • One-button click to download all new images and video from the camera, selected on either the camera or computer by criteria
  • Fast downloads - Airnef uses optimized Media Transfer Protocol (MTP) parameters for sustained throughput around 2.5 MB/s
  • Remembers every file you've ever downloaded, automatically skipping those files in the future
  • Advanced local caching of MTP metadata allows for very fast click-to-download start times
  • Extensive criteria selection makes it easy to quickly choose which images to download, including by file type (NEF, JPG, MOV, etc...), starting and/or ending capture date, specific camera folders, and media card slot - in any combination. And Airnef will automatically skip over files you've already downloaded!
  • Lets you decide the order that files are downloaded, either oldest first or newest first. That way you can start working on the files you want right away instead of waiting for all the files to be downloaded
  • Fault-tolerant operation - Airnef will continuously retry any failed communication/transfer, resuming the download exactly where it left off, even in the middle of a file. This is important when downloading very large video files on marginal wireless connections

airnef screen-shot animation

Articles about Airnef

Thom Hogan - Finally, Desktop WiFi

DPReview - Airnef brings desktop Wi-Fi transfer to Nikon users

Known Issues

Installation

Windows Installer

  1. Download the Windows installer and launch it
  2. The application is unsigned so you'll receive a warning from Windows about it coming from an "unknown publisher"
  3. Once the installer is running you'll be prompted to agree to the GPL v3 license.
  4. You'll then be prompted for the installation directory, which defaults to C:\Program Files\airnef (32-bit Windows) or C:\Program Files (x86)\airnef (64-bit Windows)
  5. A start-menu folder will be created under testcams.com, from which you can launch Airnef

Here are a few post-installation Windows tips that will help make Airnef more convenient to use:

  1. There is a one-time wireless setup you can perform that will allow Windows to automatically switch to your camera's WiFi network whenever you turn your camera on and/or enable its WiFi. This is much more convenient than having to manually select the network every time you'd like to download images/videos from your camera. Here are the steps for the one-time setup:
    1. Turn on your camera's WiFi feature and wait for the network to be listed in the available wireless network list. It should have a name prefixed with "Nikon_", such as "Nikon_WU2_52A670FB7F45". When you see the camera's network listed, click on the network and make sure "Connect automatically" is checked, then press "Connect" button.
    2. Right-click the WiFi icon in the bottom-right system tray and select "Open Network and Sharing Center", then click "Manage wireless networks" in the dialog that comes up. You'll be presented with a list of all the wireless networks you have ever connected to on your network. The list is sorted in order of connection priority, with the first item having the highest priority. Make sure the Nikon wireless network you just added is at the top of the priority list.
    3. Even though you've made the Nikon network the highest priority, Windows will still connect to your main home/work wireless network when you don't have your camera powered on and its WiFi enabled. This is desirable. However, whenever you do turn on your camera and its WiFi to download images, by default Windows will not drop the connection to your home/work network and automatically switch to your camera's network. To have it automatically switch to your camera's WiFi network whenever it's available, right-click on your home/work network(s) and select 'Properties' from the pop-up menu. Then check the box "Connect to a more preferred network if available" and press OK to accept the changes. Now whenever you turn your camera's on and enable its WiFi your system will automatically switch to its network. Note that sometimes Windows will a while before automatically switching to the camera's network after it becomes available - you can expedite the process by clicking on the WiFi icon in the bottom-right system tray. This causes Windows to perform a network rescan immediately rather than waiting its normal polling interval.
  2. Whenever you'd like to cancel the current Airnef download/operation, press <ctrl-c> within the terminal window that airnefcmd is running. DO NOT click the "X" in that terminal window's title bar - doing this will cause airnefcmd to be terminated without properly cleaning up the resources and files it was processing.

OS X application (.dmg)

  1. Download the OS X .dmg and double-click it
  2. The virtual disk image will be mounted and it should automatically open up to reveal the Airnef application and a shortcut to your Applications folder.
  3. Drag and drop the Airnef application into the Applications shortcut icon.
  4. The application is unsigned so you'll likely need to perform a one-time security override to permanently add the application to OS X's safe application list. You can do this by right-clicking (Control-Mouse Click) on the Airnef icon in your Applications folder and selecting open.
  5. Agree to open the application when prompted about it being downloaded from the internet.

Here are a few post-installation OS X tips that will help make Airnef more convenient to use:

  1. When you tell the Airnef GUI to start downloading images it launches the airnefcmd application in a terminal window to perform the actual download. When airnefcmd has completed its downloads, OS X will by default leave the terminal window open, requiring you to manually close it. This can be annoying because you'll have to repeat this action after every download completion. Fortunately the OS X terminal app has a configurable setting which allows the terminal window to automatically close after a console app has completed. In the Terminal application, select 'Preferences' in the menu. In the dialog that opens, click 'Profiles' in the top left and then the 'Shell' tab. Set "When the shell exits" to either "Close if the shell exited cleanly" or "Close". See this sample screen image of the dialog to help you locate this option.
  2. Whenever you'd like to cancel the current Airnef download/operation, press <ctrl-c> within the terminal window that airnefcmd is running. DO NOT click the "X" in that terminal window's title bar - doing this will cause airnefcmd to be terminated without properly cleaning up the resources and files it was processing.

Linux Binary

  1. The Linux binary ships in a compressed image that expands to directory tree of files, with the base directory expanding as ./airnef. You can unzip to your directory of choice and optionally add that directory/airnef to PATH
  2. The GUI is airnef/airnef and the command-line utility is airnef/airnefcmd

Windows/OS X/Linux running Airnef source with installed Python interpreter

Instead of running the bundled Python environment that ships with the pre-built executables you can also run the source through your existing Python installation. Airnef supports both Python 2.7.x and 3.4.x environments. OS X and most Linux distributions install Python by default. For Linux the Tkinter GUI framework may not come preinstalled; you can install it via "sudo apt-get install python-tk". For Windows you'll need to download and install Python - I suggest enabling the option to add Python to your system path during the installation.

User's Guide (Graphical Interface)

The best resource for learning how to use Airnef is the Youtube tutorial linked at the top of this page.

Basic Operation

Airnef provides two basic methods for selecting which images/movies to download - in the camera or on your computer. The benefit of selecting in the camera is that you can visually preview the images(s) first. The downside is that it's more cumbersome to select a large number of images. Also, some models limit the types of files you can select within the camera. For example the D7200 doesn't allow video files to be selected. Consumer-level cameras like the Nikon 1 J4 only let you select JPEGs. Fortunately both raw and video files can be downloaded on all camera models using the computer selection method within Airnef.

Airnef is really two separate applications - a Graphical Interface (airnef) and a Command-Line program (airnefcmd). The graphical interface lets you to visually specify your download options, which are then passed to airnefcmd to perform the actual downloads. You can optionally use the command-line program directly, which enables you to script/automate your downloads. See the Command Line Reference in this page for details.

Airnef maintains a permanent download history of every file you transfer. Airnef uses this history to allow you to automatically skip over files you've already transferred, without having to specifically set a criteria that excludes those files. Airnef's default behavior is to skip files that are in its download history; you can override this behavior by un-checking the "Skip images/movies you've previously downloaded" option in each of the dialogs.

Airnef remembers all the options you specified on your last download along with the last 32 directories you've used. These options are saved every time you start a download operation.

IP address

Nikon Cameras

By default your Nikon camera has an IP address of 192.168.1.1 and runs without encryption. You can modify both the IP address and wireless security via a one-time procedure using Nikon's Wireless Mobile Utility app (iOS and Android). Nikon has published instructions on modifying the security settings here. Modifying the IP address of your camera is useful if you run a typical network configuration that has the router at 192.168.1.1, which conflicts with the camera and makes it impossible to use a wired connection to your router/Internet at the same time you'd like to download from the camera. Here are instructions for the one-time procedure to change your cameras IP address:

  1. Install the Nikon Wireless Mobile Utility (WMU) app on your phone (iOS and Android).
  2. Turn your camera's WiFi on and then have your phone/tablet connect to that Network (Nikon's network usually starts with "Nikon_", such as "Nikon_WU2_52A670FB7F45"
  3. Run WMU and click the gear icon at the top-right of the main screen to get to the Settings page.
  4. Click "WMA Settings" on the Settings Page.
  5. Click "Advanced Settings" on the WMA Settings Page.
  6. On the Advanced Settings Page, click on the DHCP Server IP address and change the subnet. For example, change it from the default of 192.168.1.1 to 192.168.2.1. Then click the DHCP client IP address and change it to the same subnet. For example, from 192.168.1.2 to 192.168.2.2.
  7. You're done. Enter the new DHCP Server IP address in the Camera IP address field of Airnef (192.168.2.1 in this example).

Canon Cameras

On Canon cameras the ad hoc wireless the IP address is usually 192.168.1.2. Canon bodies also support wireless infrastructure mode, meaning the camera can use an existing wireless network rather than creating its own ad hoc network. For infrastructure mode Canon lets you specify a static IP address of the camera - use that option and then use the same IP address in Airnef.

Selecting images in the camera

  1. Click the "Select in Camera" button on the Main Application Dialog, which will bring up the Select in Camera dialog.
  2. On your camera, find the menu location where files can be selected for upload, which varies depending on model. You should look for the option that reads similar to "Select for Upload" or "Select to send to smart device" or "Send to smartphone", etc... The Media Transfer Protocol (MTP) interface that Airnef uses to communicate with the cameras is principally oriented for sending images to smartphones, which is why you may need to look for the "Send to smartphone" option on your camera even though you'll be sending the images to your computer running Airnef. Some cameras also allow you to select images in the playback menu, including the Nikon D7200 and D750 - what's nice about these models is that the selections persist across camera power cycles, which means you can select images as you're shooting across multiple days and then use Airnef to download your selected images all at once.
  3. Once you've located your camera's menu that allows choosing files to upload, select one or more files in the camera using the button shortcuts depicted on your camera's screen. For example on the Nikon D7200 the button is the zoom-out key; on the Nikon J4 it's the bottom button of the circular multi-selector.
  4. When you've finished selecting which files to upload your camera will either let you proceed directly to enabling its WiFi (Nikon J4 allows this by pressing the OK button on the multi-selector), or it may require you to enable the WiFi as a separate step (Nikon D7200). Use whichever method is available to enable the camera's WiFi
  5. Once the camera's WiFi is enabled you should see its SSID in the available wireless networks on your computer. Nikon prefixes their SSID with "Nikon_", for example "Nikon_WU2_52A670FB7F45". Connect to the camera's network on your computer by selecting its SSID. Ideally you'd like to configure your computer to automatically connect to your camera's WiFi whenever it's available, although not every operating system may support this. Windows supports this - please read the wireless setup instructions on this page for details.
  6. In the 'Select in Camera' dialog, set your output directory. The default directory is the one specified when you last used Airnef. If this is the first time you're using Airnef then the default directory will be the Airnef application's directory. For Windows users make sure you don't use this directory because it's not writable without running Airnef with administrative privileges (details), otherwise the files will go the a virtualized directory. Airnef remembers the most recent directories you've used in Airnef (up to 32), sorted by how recently you used each directory. If the directory you want is not already in the list you can click the 'More choices' button to summon a directory navigation dialog that will allow you to either navigate to your directory of choice or enter a directory path manually.
  7. Set how you'd like Airnef to handle filename conflicts, ie what you'd like Airnef to do if it encounters any files on your system with the same name as the ones you've selected to download. By default Airnef will create a unique filename for any incoming files whose names conflict with existing files. The full options are:
  8. By default Airnef will skip over images/movies you've downloaded from the camera on a previous session. You can override this behavior by un-checking the "Skip images/movies you've previously downloaded" option, which will cause Airnef to ignore its download history.
  9. Click the 'Start Download' button to begin the transfer. Airnef will launch airnefcmd in its own terminal window - airnefcmd is the command-line utility that handles all communication with the camera, including the downloads. airnefcmd will report the progress of its operations in its terminal window, exiting when it's complete, or when it encounters what it believes is an unrecoverable error, or if you cancel the transfer by press <ctrl-c>
  10. After airnefcmd exits, Airnef will display a transfer report that contains all the progress information generated by airnefcmd. For brevity the report excludes information about files that were skipped due to being in the download history (ie, files skipped because you previously downloaded them). If you'd like to see when the skipped files were previously downloaded and to what location, set the Logging: option to 'verbose' before clicking 'Start Download'

Selecting images by criteria on the computer

  1. Launch Airnef if you haven't already done so and click the "Select on Computer" button on the Main Application Dialog, which will bring up the Select on Computer dialog.
  2. By default Airnef will download every image/video file on the camera, except for those you've previously downloaded. The 'Select on Computer' dialog lets you to establish any combination of criteria that then limits which of those files get downloaded.
  3. The 'File Types' section lets you choose which types of files are downloaded, based on the extension of the file. The built-in types are NEF, JPG, TIF, MOV, and CR2. If your camera supports a type not listed you can enter its extension in the 'More:' field that is positioned next to the built-in types.
  4. The 'Capture Date' section lets you limit which files are downloaded based on a capture/acquisition date. You can choose from either the preselected set of dates (today, yesterday, past week, past month, past year), or enter a custom date range. For the custom date range you can enter a starting date, ending date, or both. Each date must be in the format of mm/dd/yy and include leading zeros - for example, "05/02/12". You an optionally include a time specification as well, in the form of hh:mm:ss - for example, "05/02/12 15:35:15". When you specify a starting date without a time, the time will be assumed to start from midnight. When you specify an ending date without a time, the time will assumed to end at 23:59:59. For example, a starting date of 04/05/12 and ending date of 04/10/12 will download all files captured on or after 04/05/12 at midnight and on or before 04/10/12 23:59:59.
  5. The 'Media Card' section lets you specify which media card slot on the camera will be used as the source of the images to download. By default Airnef will use the first populated card slot it finds, starting from the first slot. You can optionally override this by specifying a particular slot.
  6. The 'Download Order' option lets you to specify the chronological order by which files are downloaded (by capture-date). The choices are oldest-first or newest-first. This option doesn't limit which files are downloaded, only the order by which they're downloaded. This is useful when you'd like to start working on more recently taken images/movies right away (as they download), rather than waiting for the download of all the files to complete.
  7. The 'Output Directory' section lets you specify where the downloaded files will be placed. The default directory is the one specified when you last used Airnef. If this is the first time you're using Airnef then the default directory will be the Airnef application's directory. For Windows users make sure you don't use this directory because it's not writable without running Airnef with administrative privileges (details), otherwise the files will go the a virtualized directory. Airnef remembers the most recent directories you've used in Airnef (up to 32), sorted by how recently you used each directory. If the directory you want is not already in the list you can click the 'More choices' button to summon a directory navigation dialog that will allow you to either navigate to your directory of choice or enter a directory path manually.
  8. The 'If File(s) Exist' section lets you specify how Airnef will handle filename conflicts, ie what you'd like Airnef to do if it encounters any files on your system with the same name as the ones you've selected to download. By default Airnef will create a unique filename for any incoming files whose names conflict with existing files. The full options are:
  9. The 'Additional Args' section lets you specify additional command line arguments to be passed to airnefcmd. These can be options that allow for additional selection criteria and/or options that control the general operation of airnefcmd. See the Command Line Reference section on this page for a full list of arguments.
  10. The 'Skip images/movies you've previously downloaded' option allows you to control whether Airnef should skip (ie, not download) files you've previously downloaded from the camera.
  11. With your criteria now set, you can either click 'Start Download' to perform the transfer or 'Preview File List for Criteria' if you'd first like to see a directory listing of files on the camera, filtered by your criteria. Note that the list will include files you've already downloaded even if you've checked the 'Skip images/movies you've previously downloaded' option; however, those files will not be re-downloaded once you click 'Start Download' (unless you've unchecked the option).

FAQ - Frequently Asked Questions

Command Line Reference

airnefcmd.exe (Windows) or airnefcmd (Linux) or airnefcmd.py (Windows/OS X/ Linux running source through Python interpreter) [optional args]

When run with no options Airnef's default behavior is to either download every image that has been selected for download by the user on the camera's playback menu or, if no images were selected on the camera, to download every image/movie file it finds on the first populated memory card in the camera located at IP address 192.168.1.1 (Nikon's default IP address), storing the files into the current directory and skipping any files downloaded on previous invocations. Any name collisions with existing files will be resolved by generating unique filenames by adding a -new-x suffix (for example, DSC_1575.nef becomes DSC_1575-new-1.nef, DSC_1575-new-2.nef, etc...). Optional command-line arguments can be added to set the criteria of which files to download, where they should be downloaded, how filename collisions should be resolved, and other general behavior of the application.

Optional arguments:

--help
Prints a help display listing all the typical options supported

@filename
Load additional arguments from a text file. In addition to any parameter files you specify, airnefcmd will always load a file named 'airnefcmd-defaultopts' in its working directory (if it exists). The parameters from the default file will be loaded first, allowing you to override them with parameters from your own files and those specified on the command line. All parameter files must be formatted so that each parameter word is on a separate line, which is a requirement of Python's argparse routine. For example:

	--action
	getsmallthumbs
	--extlist
	NEF
	JPG

--ipaddress
Specifies the IP address of the camera supporting the MTP-IP interface. For Nikon's ad hoc wireless this is always the default, 192.168.1.1. On Canon the ad hoc wireless address is usually 192.168.1.2. Canon also supports wireless infrastructure mode, where instead of the camera serving as a temporary WiFi access point it can use an existing wireless network - for this mode you can configure the camera to any IP address you'd like.

--action [getfiles | getlargethumbs | listfiles]
What action to perform. The default action 'getfiles' will download the full-sized version of the files. 'getlargethumbs' will download the large thumbnail of each image/video. 'getsmallthumbs' will download the small thumbnail of each image/video. 'listfiles' will generate a directory listing of files on the camera, sorted by the --transferorder option.

--extlist [extension ...]
Specifies which types of files (by extension) to download/list. The default is <ALL>, which will download/list every file found. Multiple extensions can be specified. Example: extlist NEF JPG MOV. In the unlikely case where a camera has downloadable files without extensions, include <noext> in the extlist to download those files as well.

--startdate and --enddate [mm/dd/yy] or [mm/dd/yy hh:mm:ss]
Selects the starting and/or ending creation-date criteria of files to download/list. There are two specifications supported - date-only or date+time. The dates/time is inclusive - any file created on or after startdate will be included; any file created on or before enddate will be included. Examples:

--startdate 05/06/15 (download all files created on or after 05/06/15 00:00:00)

--enddate 09/07/15 (download all files created on or before 09/07/15 23:59:59)

--startdate 05/06/15 --endddate 09/07/15 (download all files created on or after 05/06/15 00:00:00 and before 09/07/15 23:59:59)

--startdate 05/06/15 15:05:10 (download all files created on or after 05/06/15 3:05:10 PM)

--outputdir [directory]
The directory to store the downloaded files. The directory must be preexisting. Put quotes around the directory if it contains spaces. Example: outputdir "c:\My Documents". The default is the current working directory.

--ifexists [uniquename | skip | overwrite | prompt | exit]
Specifies what action to take if a local file exists in the output directory matching a file to be downloaded. The default 'uniquename' will cause a unique filename to be generated by adding -new-x suffix (for example, DSC_1575.nef becomes DSC_1575-new-1.nef, DSC_1575-new-2.nef, etc...). 'skip' will cause the file to be skipped and not downloaded - be careful when using this option without the --camerafolderinoutputdir option, because if the same root filename exists in multiple folders on the camera then this will cause the file in all folders but the first to be skipped. 'overwrite' will overwrite the local file with the downloaded file - the same caution as 'skip' applies regarding the same file in multiple camera directories. 'prompt' will present a choice of actions to take on the console (uniquename/skip/overwrite/prompt/exit). 'exit' will cause the application to terminate whenever an existing file with the same name as a download candidate is found - note that the existence check of a given file is performed just before the download begins.

--downloadhistory [skipfiles | ignore | clear]
Controls how the file download history is handled for this invocation. Airnefcmd maintains a database of all files it has downloaded for a given camera model/serial number combination. Each file in the database is identified by the combination of its name, creation date, and size; these three elements together allow Airnef to guarantee against false positives/negatives of the history. The default 'skipfiles' will skip any file that is in the download history. 'ignore' will cause airnefcmd to ignore the download history for this invocation when deciding whether to download a given file - ie, it will download files even if they're in the download history. Note that the download history will still be updated for any files downloaded during 'ignore' invocations; this allows the history to be utilized on future invocations when 'ignore' is not specified. 'clear' will delete the entire download history for the connected camera model/serial number at the start of execution; the download history will still be updated for any files downloaded during the session.

--onlyfolders [folder ...]
List of folders on the camera from which to download from. Any downloadable file(s) found that are not in one of the list folders will not be downloaded/listed. Example: onlyfolders 100D7200 101D7200. The default is to download/list from any folder on the camera. In the unlikely case where a camera has downloadable files in the root directory, include <root> in the list to download those files as well.

--excludefolders [folder ...]
List of folders on the camera from which to not download from. Any downloadable file(s) found that are in one of the list folders will not be downloaded/listed. The default is to not exclude any folders. In the unlikely case where a camera has downloadable files in the root directory, include <root> in the list to exclude the the download of those files as well.

--camerafolderinoutputdir [no | yes]
Determines whether downloaded images will be stored locally in a subdirectory named after the camera folder in which the image resides. For example, with an --outputdir of "c:\pics" and --camerafolderinoutputdir yes, any files found in a camera folder named 100D7200 will be stored locally to c:\pics\100D7200. The default is not recreate the camera folder in the output directory for downloaded images.

--transferorder [oldestfirst | newestfirst]
Controls the order of which files are downloaded/list, based on their creation dates. When 'oldestfirst' is specified the oldest file on the camera will be downloaded/listed first, then the next oldest, etc... When 'newestfirst' is specified the newest file on the camera will be downloaded first, then the next newest, etc...

--slot [firstfound | first | second]
Determines which media slot/card on the camera will be selected to download/list files from. The default 'firstfound', which will select the first slot found populated with a media card. 'first' or 'second' will select the first or second slot respectively.

--cameratransferlist [useifavail | exitifnotavail | ignore]
Controls how to manage a potential camera transfer list, which is the list created by the camera when the user selects image(s) to download on the camera's playback menu. When airnefcmd runs it interrogates the camera to see if a transfer list exists; the cameratransferlist controls how airnefcmd is to respond to the existence or non-existence of this list. When 'useifavail' is specified airnefcmd will only download images within the transfer list, and will ignore all other selection criteria specified by the other command line options. The download history will still be utilized however, meaning any images previously downloaded will be ignored, depending on the setting of the downloadhistory option. When 'exitifnotavail' is specified airnefcmd will terminate if the camera's transfer list is empty (ie, there are no user-selected images for download). When 'ignore' is specified airnefcmd will ignore any potential transfer list on the camera and will instead download/list all images on the camera based on the criteria specified with the other command line options.

--logginglevel [normal | verbose | debug]
The verbosity level of logging for an airnefcmd session. Airnef outputs its messages both to the console (stdout/stderr) and to a pair of logging files, named airnefcmd-log-last.txt (log messages from most recent session) and airnefcmd-log-lifetime.txt (log messages from all sessions). 'normal' indicates that only important/useful informational messages will be logged. These include messages such as the connected model/serial number of the camera and information about each file downloaded/listed. 'verbose' includes some additional messages, useful for instance when you'd like more information about why a particular file was not downloaded. 'debug' will include all developer-level messages and debug information, including hex dumps of all MTP-IP communication between the airnefcmd and the camera. The default logging level is 'normal'.

Debug/Troubleshooting arguments:

The following is a list of less common arguments that can be used when troubleshooting or debugging the operation of airnefcmd. These options are hidden from the --help display, to limit the clutter of options presented for normal use.

--connecttimeout <seconds>
The amount of time to wait for a TCP/IP socket connection to be established with the camera. The default is 10 seconds. When Nikon's ad hoc wireless network is ready the camera usually connects very quickly. However it may take a little longer if the user just enabled the WiFi option on the camera and/or just selected the network on his computer. Canon bodies usually take a bit longer to establish a connection, esp if its WiFi has been idle for some period of time.

--socketreadwritetimeout <seconds>
The amount of time to wait for a single TCP/IP socket read/write request to complete. The default is 5 seconds.

--retrycount <number>
The number of full-cycle retries airnefcmd will perform before completing its configured action on all files. By "full-cycle" I mean the process of recovering from a failed transaction, which includes restarting the full MTP-IP session. The default is unlimited.

--retrydelaysecs <number>
The number of seconds to pause between full-cycle retries. The default is 5 seconds. This value was chosen to allow some measure of time for the camera to reestablish its ad hoc wireless network; typically the camera will require a few retry cycles before it is ready for a new MTP-IP session after a failed attempt.

--printstackframes [no | yes]
Print stack frames for all exceptions. The default is to only print stack frames for programming exceptions, such as AssertionError, ValueError, etc..

---mtpobjcache [enabled | writeonly | readonly | verify | disabled]
Controls the behavior of the MTP object info cache. Every file on the camera is represented by an MTP object that describes its attributes such as filename, date, size, type, etc.. Airnef retrieves the full list of object infos at the start of execution - this list is required to support the criteria filtering and date sorting features of the program. Some cameras take a long time to complete many MTP_OP_GetObjectInfo requests, accessing the media card for each request on-demand rather than using predictive read-ahead caching to anticipate the next MTP_OP_GetObjectInfo request. This can make repeated executions of airnefcmd slow. To avoid incurring this penalty for every invocation, airnefcmd caches the last list of object infos it obtained on a per model/serial number basis, storing the cache as a file in its local appdata directory. The default of 'enabled' enables the MTP object cache. The cache has mechanisms to ensure both the integrity and coherency of the cache, the latter of which requires algorithms to avoid cases where the cached copy of object infos can become stale relative to what's on the camera. The following options are used to verify and troubleshoot these mechanisms. 'writeonly' disables cache hits for this invocation but still enables writing the persistent cache file. 'readonly' enables cache hits for this invocation but disables updating th persistent cache file. 'verify' is the same as 'enabled' but will do a full coherency check of the cache - this involves performing a MTP_OP_GetObjectInfo for each object on the camera and verifying any cached copy against that information. 'disabled' will turn off the cache completely for this invocation.

---mtpobjcache_maxagemins [minutes]
The MTP object info cache includes a timestamp of when it was last updated. This options controls how old the cache is allowed to be (ie, relative to its last update) before it is fully invalidated. The default is zero, which means no age limit. Any other value is an age limit in minutes.

---maxgetobjtransfersizekb [kilobytes]
The maximize request size for MTP_OP_GetPartialObject requests in kilobytes, which is the MTP request used to retrieve the full-size image/movie files. During Airnef development it was discovered that Nikon's MTP-IP implementation has a bug in its processing of MTP_OP_GetObject requests that cause transfers to get progressively slower and eventually lead to a complete halt of transfers, requiring the MTP session to be restarted to recover. It appears Nikon's firmware is committing internal memory for the entire object and eventually runs out of memory. The solution is to use MTP_OP_GetPartialObject, which allows the transfer of an object in separate segments rather than the full object as is done with MTP_OP_GetObject. This option sets the maximum size we request for each segment. The default is 1024 (1MB), which was empirically determined to be large enough to saturate Nikon's WiFi interface throughput while being small enough to avoid any memory issues in the camera. The actual request size may be further constrained by the --maxgetobjbuffersize parameter; for example, if the max transfer size is 1MB but the max buffer size is 256KB, the size of each MTP_OP_GetPartialObject transfer will be the smaller of the two, in this case 256KB. This parameter has no effect for --action getlargethumbs and --action getsmallthumbs since the MTP interface requires those to be obtained via MTP_OP_GetObject - those elements are typically very small and thus aren't sensitive to the Nikon issue related to large transfers.

---maxgetobjbuffersizekb [kilobytes]
The maximum number of kilobytes we buffer across MTP_OP_GetPartialObject requests for a full-size image/movie file download before we flush the data. The default is 32768 (32MB). The value should be large enough to maximize throughput on the filesystem (although in most cases filesystem caches will ensure this through write caching) but small enough to limit airnefcmd's memory footprint.

Features Planned for Next Release

Developer Notes

For anyone interested in the ongoing progress of Airnef development, I've created a developer notes page.

GPL v3 License

    airnef - Wirelessly download images and movies from your Nikon Camera
    Copyright (C) 2015, testcams.com

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

Credits

Support

To report issues or for help, please visit the Airnef discussion forum