Two pitfalls + question

Home Forums Two pitfalls + question

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #464

    This seems a great and well programmed application. Thanks for spending the time and sharing it.

    Two pitfalls before I got it to work (Windows 10):
    – My home network also uses the 192.168.1.x IP range and when I had my laptop connected to both the wired network and the camera the app could not connect. Only when I pulled the network plug the app could connect.
    – The C:\Program Files (x86)\airnef directory is write protected. The app did transfer the images but they never showed up in the airnef directory. I made a new directory C:\Photos which was also write protected by default. After un-checking the protection box in the properties all went well.

    I didn’t look yet in detail but what I really want to do is automatically send small jpegs from the camera to the computer in the background which will then be picked up by my own program. I loaded the source files into Visual Studio and I can run the app but my Python is a bit rusty. Any quick pointers what I should focus on to:
    – have the app automatically download all images without pressing buttons (probably through the command line arguments, didn’t look yet)
    – run the app continuously and poll the camera every so much seconds
    – delete the jpegs in the camera after download for otherwise there will be too many
    – make sure no windows pop up that I have to minimize as they block my own program

    Thanks again!



    Thanks for the feedback. When two network interfaces are on the same IP subnet the system will select the interface with the fastest link/shortest route, which will be the wired ethernet connection in your case. It might be possible to juggle the metric values to route individual traffic to each interface on the same subnet but since your router is using the same IP address of the camera you’d only be able to use one at a time in your configuration. Unfortunately Nikon doesn’t allow changing the IP address of its ad hoc wireless network so my suggestion would be to change the subnet of your router to another local address, such as This will allow you to use your home network/internet at the same time you use the camera. I’ll add this info to the user guide to help others.

    Regarding the program files directory, I covered this in the user guide and video. The Program Files directories (both 32-bit and 64-bit versions) are protected when running without admin privilege – any wires get redirected to the Windows Virtual Store, which is a shadow copy of the Program Files directory. That shadow copy is accessible but it’s generally better to just specify an alternate, real directory that’s writable, which you’ve done. For the next release I’ll probably modify the app to not default to the Program Directory on the Windows executable the first time the app runs.

    Regarding automatically pulling down new files, it’s a feature I considered in 1.00 but decided to defer to a future rev. The ideal way to implement this is to monitor event messages from the camera on the event socket and trigger a download when a new-object event is received. This would require Airnef continuously running in an event loop mode, which again is considered for a future rev. For now one hack might be to continuously run Airnef from a batch file/script, probably best with a delay between each invocation. Even with a delay however the extra WiFi activity will likely run the battery down faster plus warm the camera up a bit.

    I had an option in place to automatically delete each file on the camera as they’re downloaded but intentionally left it out for data protection reasons. I didn’t want a Rev 1 product to do file-destructive camera operations. It’s yet another feature I’d consider for a future rev. Btw the MTP command to delete a file is MTP_OP_DeleteObject.

    Hope this helps!


    Thanks, yes it helps.

    You can and I did change the IP subnet of the camera with the Wireless Mobile App from Nikon, the one thing it is good for. Also enables you to set encryption to WPA2 and set a password. I do not have the Play Store so I downloaded it here Hope that is safe 🙂

    I used the program as Admin but still the images didn’t show up. BTW I use 64 bit Windows 10 but still Airnef is installed in Program Files (x86). Not sure I missed something while installing as I was eager to try but had to run out too.

    My own program can launch applications so I can make a loop no problem and battery life is no issue. Losing the USB cable from the *directly soldered on the motherboard USB socket* (facepalm) would be a godsend. Despite being careful and using USB cables knotted to the camera to prevent stress on the socket I still ruined two good cameras as the repair is too costly when it’s older.

    Thanks for the delete command, I’ll have a look and plunge back in to Python.

    Cheers, you made me happy with this project!

    • This reply was modified 6 years, 11 months ago by Flashlight.

    The self-contained executable I build for the Windows platform is 32-bit so it’ll go in the Program Files (x86) folder. The virtual store alias for any data files written to the Program Files directory should be something like: C:\Users\your user name\AppData\Local\VirtualStore\Program Files (x86)\airnef

    Thanks for the tip on the Nikon Wireless Mobile App! It never would have occurred to me that Nikon would put the ability to change the camera’s ad hoc IP address/security in their mobile app and not on the camera’s menu system like Canon does. I guess it makes sense since Nikon’s only wireless software right now is their mobile app. I’ll be sure to add this info to the user guide for those who run wired+WiFi or anyone looking to secure their camera’s WiFi.

    • This reply was modified 6 years, 11 months ago by Adam.

    Adam wrote:
    “Thanks for the tip on the Nikon Wireless Mobile App! It never would have occurred to me that Nikon would put the ability to change the camera’s ad hoc IP address/security in their mobile app and not on the camera’s menu system like Canon does.”

    Sometimes, in rare cases, it actually pays to RTFM 🙂

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.