gPhoto2 Integration

There are two methods use to integrate the gPhoto2 library. The first is comprised of functions built on top of libgphoto2, but this version currently runs on Ubuntu but doesn’t run under Angstrom because other dependencies have not been ported to high enough versions. The second method makes system calls to the gphoto2 command line interface and this version does run on Angstrom.

Ubuntu 12.04 Install
1. Install gphoto2 and libgphoto2: sudo apt-get install gphoto2 libgphoto2-2 libgphoto2-2-dev
***These commands may change slightly as newer versions are released

Angstrom Install
1. Download tar from here.
2. Copy to the board and untar.
3. Set the data and time properly if it resets everytime the board turns off. date -s "9 AUG 2013 08:13:37"
4. Navigate to the directory and type ./configure
5. Now make and make install
6. You need to make soft links to the proper folders:
ln -s /usr/local/lib/ /usr/lib/
ln -s /usr/local/lib/ /usr/lib/

Ubuntu Application
Ubuntu is awesome because all the require dependencies are ported to high enough versions to properly interface with libgphoto2. This requires more work to get going, but you can access the entire library this way. The general idea is you create a new camera and context structures. You then call functions in the library with those structures. The library is documented here. I will admit their documentation can seem overwhelming at first, but they also include examples in the libgphoto folder that will demonstrate the basics of detecting a camera and taking pictures. I highly recommend you start there rather than the doxygen mess of files.

Angstrom Application

In Angstrom at the time of this writing, some of the dependencies such as libusb-1.0-dev have not been ported to high enough versions to properly interface with libgPhoto2 with a USB camera. For now I have written a program that will get you by using system commands. ***NOTE: This program only works when it is ran in root because gphoto2 requires access to /dev/USB*. The example program shows how to send the capture an image and download command. As you can see, all you have to do to extend functionality is stuff a byte array with the normally character string you would type on the command line. The gphoto2 commands are documented here.