I want to connect a Nikon camera to a Raspberry Pi with entangle installed.

From a remote computer, via wifi and ssh I have access to the RPi.

How can I simply take a photo (and optionally download it to the RPi) from command line?

I only see graphic interface to manage the camera.

  • 1
    Exactly which Nikon camera you intend to use may also be very applicable to your problem. The Nikon D3x000 and D5x00 series don't do many types of tethering particularly well.
    – Michael C
    Mar 23 '18 at 12:28
  • I first tried my D600 with USB cable connected to Ubuntu and it worked okay. I also tried an old Coolpix 8800 but it was not detected
    – dstonek
    Mar 23 '18 at 15:33
  • But D600 is not detected by RPi (its SD card)
    – dstonek
    Mar 23 '18 at 15:49
  • 1
    I'm not sure what the appropriate Stack Exchange site would be for working that out (SuperUser?), but the output of lsusb, gphoto2 --auto-detect, ptpcam --list-devices would be useful to figure it out. Mar 23 '18 at 18:28
  • @PeterTaylor That's right. Both cards are listed in Nautilus (file browser in Ubuntu) but executing gphoto2 -> Error 'Could not claim the USB device'. This is a question, how you say, for SuperUser. BTW, gphoto2 autodetect does detect Nikon DSC D600.
    – dstonek
    Mar 23 '18 at 19:22

Reading Entangle's man page, it doesn't appear there are any command line options to control the camera and/or capture images.

Note that the bottom of Entangle's man page suggests to see also gphoto2, which is a fairly full-featured command line interface to interact with and control the camera. gphoto2's man page gives the following example usage:

gphoto2 --capture-image --interval 60 --hook-script /usr/share/doc/gphoto2/test-hook.sh

    Capture one image every 60 seconds from now to eternity. The
    example hook script will be called after each captured image has
    been stored on the computer.
  • 1
    In further evidence, the home page of the website says "It is built on top of libgphoto using GTK-3 for its interface". Mar 23 '18 at 8:25
  • Despite I cannot check gphoto2 with my D600 (it is not detected by RPi) I marked the answer as a solution because it is the way to follow.
    – dstonek
    Mar 23 '18 at 16:01

Most graphical tethering programs for Linux are GUI wrappers around libgphoto2. The standard command-line interface for libgphoto2 is gphoto2.

The main competitor which I know of is libptp / ptpcam. I have a fork which compiles on my Raspberry Pi and adds an exposure bracketing feature at https://github.com/pjt33/ptpcam-fork

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.