2
\$\begingroup\$

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.

\$\endgroup\$
9
  • 1
    \$\begingroup\$ 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. \$\endgroup\$
    – Michael C
    Commented Mar 23, 2018 at 12:28
  • \$\begingroup\$ 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 \$\endgroup\$
    – dstonek
    Commented Mar 23, 2018 at 15:33
  • \$\begingroup\$ But D600 is not detected by RPi (its SD card) \$\endgroup\$
    – dstonek
    Commented Mar 23, 2018 at 15:49
  • 1
    \$\begingroup\$ 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. \$\endgroup\$ Commented Mar 23, 2018 at 18:28
  • \$\begingroup\$ @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. \$\endgroup\$
    – dstonek
    Commented Mar 23, 2018 at 19:22

2 Answers 2

3
\$\begingroup\$

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.
\$\endgroup\$
2
  • 1
    \$\begingroup\$ In further evidence, the home page of the website says "It is built on top of libgphoto using GTK-3 for its interface". \$\endgroup\$ Commented Mar 23, 2018 at 8:25
  • \$\begingroup\$ 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. \$\endgroup\$
    – dstonek
    Commented Mar 23, 2018 at 16:01
2
\$\begingroup\$

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

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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