sportsnapper
Posts: 69
Joined: Wed Sep 05, 2012 11:27 am

Re: Photography Projects

Wed Mar 13, 2013 10:41 pm

Yep, was just looking at that...
Index: camlibs/ptp2/library.c
===================================================================
--- camlibs/ptp2/library.c (revision 14263)
+++ camlibs/ptp2/library.c (working copy)
@@ -1730,7 +1730,9 @@
params = NULL;
camera->pl = NULL;
}
- if ((camera->port!=NULL) && (camera->port->type == GP_PORT_USB)) {
+ /* This code hangs USB 3 devices after the first bulk image transmission.
+ * For some unknown reason. */
+ if (0 && (camera->port!=NULL) && (camera->port->type == GP_PORT_USB)) {
/* clear halt */
gp_port_usb_clear_halt
(camera->port, GP_PORT_USB_ENDPOINT_IN);
Not done this before - I assume that the - lines remove the code, and the + lines add the code. And if there's no + or - then it stays the same....?

mald
Posts: 3
Joined: Wed May 16, 2012 9:35 pm

Re: Photography Projects

Thu Mar 14, 2013 2:55 am

Yep. But there's really one line that changes actual code. The if statement changes, and the other two lines are Comments. So you can just replace the if statement and then follow the steps to compile and you are on your way!

texy
Forum Moderator
Forum Moderator
Posts: 5157
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Photography Projects

Thu Mar 14, 2013 1:28 pm

I got it wokring fine on one of my SD cards, but not the one I will end up using it on. It seems if you follow the steps outlined above to compile the code then you can run it...as root. I would like to run it as pi though. I'd like it to be run by using just entering

Code: Select all

gphoto2........
rather than

Code: Select all

../gphoto-suite-install/bin/gphoto2
Yadmin suggested I use this command to have it run from usr/bin/ :

Code: Select all

ln -s ../gphoto-suite-install/bin/gphoto2 /usr/bin
However, I,m sure a Linux newb that I can't make it run like that.
Any other/better suggestions?
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

davidmam
Posts: 101
Joined: Tue Dec 06, 2011 4:13 pm

Re: Photography Projects

Thu Mar 14, 2013 1:42 pm

You may have to set the permissions for the USB ports in order to run as Pi. Maybe create a camera group, add pi to that and make the USB port read/writeable by the camera group.

I'm sure a proper sysadmin will be along in a minute to explain how to do this properly.

sportsnapper
Posts: 69
Joined: Wed Sep 05, 2012 11:27 am

Re: Photography Projects

Thu Mar 14, 2013 1:46 pm

Texy, remember when you make the link you need to sudo, to be able to write into the /usr/bin directory.

I've just got gphoto2 built, but am having trouble removing the original before I make the link. My original version is installed in /usr/local/bin for some reason

texy
Forum Moderator
Forum Moderator
Posts: 5157
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Photography Projects

Thu Mar 14, 2013 1:58 pm

Yadmin did advise to

Code: Select all

apt-get purge gphoto2
before I started the compilation, which I did, although I don't know where it was removed from :roll:

Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

davidmam
Posts: 101
Joined: Tue Dec 06, 2011 4:13 pm

Re: Photography Projects

Thu Mar 14, 2013 2:12 pm

You could find the location using 'locate gphoto2' or 'which gphoto2'

sportsnapper
Posts: 69
Joined: Wed Sep 05, 2012 11:27 am

Re: Photography Projects

Thu Mar 14, 2013 5:35 pm

Couple of things:
I couldn't do a apt-get purge, as I'd used GonZoo's script to install gphoto2 (without the patch). But his script deletes the installation directories, so I couldn't do a 'make uninstall' until I'd completely reinstalled gphoto2 using the script (suitably edited to not remove the new directories it created). This still leaves remnants in /usr/local/include and /usr/local/share/doc that need to be removed by hand.

gphoto2 with the patch seems to work well.

To get it running without moving it /usr/bin, I've edited my .profile as follows:

Code: Select all

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/gphoto-suite-install/bin" ] ; then
    PATH="$HOME/gphoto-suite-install/bin:$PATH"
fi
I did this rather than move it to my private ~/bin directory as I'm not sure yet what I would need to move there.
But I don't need to run gphoto2 using sudo - it works without it.

Wisar
Posts: 60
Joined: Tue Sep 25, 2012 6:33 am
Location: Temple near Marlow, England
Contact: Website

Re: Photography Projects

Fri Mar 15, 2013 1:14 pm

davidmam wrote:I've been playing with Gphoto2 on the Pi with my D80. There appears to be a bug in gphoto2 where it will not release after writing to the camera via USB. This means that everything works upto and including the first write command, but subsequent commands don't.

If you run the shell then you can do multiple commands. It has been reported recently as a bug on canons under ARM and I can confirm it also happens for Nikon. Seems to be a PTP error.
I am getting the following error on my first command line attempt to capture from my Cannon 500D:

*** Error ***
PTP I/O error
ERROR: Could not capture image.
ERROR: Could not capture.

*** Error ***
Canon EOS Get Changes failed: 0x02ff

Subsequent commands don't even get this far. I wonder if this is more USB trial and tribulation?

sportsnapper
Posts: 69
Joined: Wed Sep 05, 2012 11:27 am

Re: Photography Projects

Fri Mar 15, 2013 1:17 pm

This may seem obvious, but make sure you have a card in the camera even if you're doing a capture-and-download - gphoto2 doesn't grab images from the camera memory but by reading the image that's on the card.

texy
Forum Moderator
Forum Moderator
Posts: 5157
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Photography Projects

Mon Mar 18, 2013 12:50 pm

Does anyone have any other links with the procedure to compile gphoto2 on the pi?
I just can't get it to work anymore. I,ve tried multiple times now and it just doesn't compile. It got it work once, but its not on the SD card I need it to work on,
and I can't work out how to copy it from one system to another.
If anyone asks what the error messages are, tell me how to redirect the 'make all' and 'make install' output messages, ie will 'make all > anyfile' work?
....becase the make commands output many screenfulls of messages, lol.
Cheers,
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

sportsnapper
Posts: 69
Joined: Wed Sep 05, 2012 11:27 am

Re: Photography Projects

Mon Mar 18, 2013 1:10 pm

Texy, If you followed the http://www.yannock.be/computer/compilin ... spberry-pi instructions, then you should have a gphoto-suite-install directory. You can copy that to your other SD card, and then use that. You really only need the gphoto-suite-install/bin directory, but having the rest of the stuff may be handy later if you need to rebuild again. If you do this, then you need to modify your path variable as I mentioned above to use that rather then the 'standard' gphoto2.

texy
Forum Moderator
Forum Moderator
Posts: 5157
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Photography Projects

Mon Mar 18, 2013 1:15 pm

Thanks - I appreciate the help. I,ve wasted too many evenings getting this to compile again - and the other half isn't too pleased :cry:
I will give that a go later tonight and report back ;)
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

texy
Forum Moderator
Forum Moderator
Posts: 5157
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Photography Projects

Mon Mar 18, 2013 6:58 pm

OK. I finally got gphoto2 working on the sd card I need it too. It's not quite as simple as just copying the gphoto-suite-install folder from one pi to the other however. When you do that you lose the symbolic links in the lib directory - those need to be added again. There may be an easier way but I had to manually create those with

Code: Select all

root@raspberrypi:/gphoto-suite-install/lib# ln -s libgphoto2_port.so.10.0.0 libgphoto2_port.so
root@raspberrypi:/gphoto-suite-install/lib# ln -s libgphoto2_port.so.10.0.0 libgphoto2_port.so.10
root@raspberrypi:/gphoto-suite-install/lib# ln -s libgphoto2.so.6.0.0 libgphoto2.so
root@raspberrypi:/gphoto-suite-install/lib# ln -s libgphoto2.so.6.0.0 libgphoto2.so.6
I still need to understand why I can't compile again from scratch, but I see yadmin has responded on his webpage.
Thanks again :D
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

sportsnapper
Posts: 69
Joined: Wed Sep 05, 2012 11:27 am

Re: Photography Projects

Mon Mar 18, 2013 7:13 pm

OK - I didn't spot the symbolic links - that's really useful to know for the future.
Hope the OH is happier - mine doesn't understand what all this stuff is doing in the kitchen at the moment ;)
Attachments
small_IMG_1084_Snapseed.jpg
small_IMG_1084_Snapseed.jpg (59.34 KiB) Viewed 7044 times

texy
Forum Moderator
Forum Moderator
Posts: 5157
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Photography Projects

Tue Mar 19, 2013 5:25 pm

sportsnapper wrote:Couple of things:
I couldn't do a apt-get purge, as I'd used GonZoo's script to install gphoto2 (without the patch). But his script deletes the installation directories, so I couldn't do a 'make uninstall' until I'd completely reinstalled gphoto2 using the script (suitably edited to not remove the new directories it created). This still leaves remnants in /usr/local/include and /usr/local/share/doc that need to be removed by hand.

gphoto2 with the patch seems to work well.

To get it running without moving it /usr/bin, I've edited my .profile as follows:

Code: Select all

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/gphoto-suite-install/bin" ] ; then
    PATH="$HOME/gphoto-suite-install/bin:$PATH"
fi
I did this rather than move it to my private ~/bin directory as I'm not sure yet what I would need to move there.
But I don't need to run gphoto2 using sudo - it works without it.
Hi again,
can't get the PATH bit to work :cry:

Code: Select all

pi@raspberrypi ~/gphoto-suite-install/bin $ sudo ./gphoto2 --version
gphoto2 2.5.0.1

Copyright (c) 2000-2012 Lutz Mueller and others

gphoto2 comes with NO WARRANTY, to the extent permitted by law. You may
redistribute copies of gphoto2 under the terms of the GNU General Public
License. For more information about these matters, see the files named COPYING.

This version of gphoto2 is using the following software versions and options:
gphoto2         2.5.0.1        gcc, popt(m), exif, no cdk, no aa, no jpeg, no readline
libgphoto2      2.5.0.1        all camlibs, gcc, ltdl, EXIF
libgphoto2_port 0.10.0         gcc, ltdl, USB, serial without locking
pi@raspberrypi ~/gphoto-suite-install/bin $ cd ..
pi@raspberrypi ~/gphoto-suite-install $ sudo ./gphoto2 --version
sudo: ./gphoto2: command not found
pi@raspberrypi ~/gphoto-suite-install $ echo $PATH
/home/pi/gphoto-suite-install/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
pi@raspberrypi ~/gphoto-suite-install $
As you can see, i can run it if I point to the correct directory, but even though I've edited my .profile, it will not work from outside even though $PATH appears to be correct. Or is it?
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

sportsnapper
Posts: 69
Joined: Wed Sep 05, 2012 11:27 am

Re: Photography Projects

Tue Mar 19, 2013 5:43 pm

Code: Select all

pi@raspberrypi ~/myquick2wire $ gphoto2 --version
gphoto2 2.5.0.1

Copyright (c) 2000-2012 Lutz Mueller and others

gphoto2 comes with NO WARRANTY, to the extent permitted by law. You may
redistribute copies of gphoto2 under the terms of the GNU General Public
License. For more information about these matters, see the files named COPYING.

This version of gphoto2 is using the following software versions and options:
gphoto2         2.5.0.1        gcc, popt(m), exif, no cdk, no aa, no jpeg, no readline
libgphoto2      2.5.0.1        all camlibs, gcc, ltdl, EXIF
libgphoto2_port 0.10.0         gcc, ltdl, USB, serial without locking
pi@raspberrypi ~/myquick2wire $ sudo ./gphoto2
sudo: ./gphoto2: command not found
pi@raspberrypi ~/myquick2wire $ 
The problem is using the ./ notation, which is saying find this file/command in my current directory. If you just execute the command, then is should work....

I also don't need to use sudo to use gphoto2 - just tested it to be sure. I'm not sure if that's becasue it's previously be installed, and the install script shcnges the permissions on the USB ports or not

texy
Forum Moderator
Forum Moderator
Posts: 5157
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Photography Projects

Tue Mar 19, 2013 8:34 pm

Hi,
it seems I have 2 issues. Firstly, I still need 'sudo'. Secondly, the $PATH isn't working anyway :

Code: Select all

pi@raspberrypi ~ $ sudo gphoto2 --version
sudo: gphoto2: command not found
pi@raspberrypi ~ $ gphoto2 --version
gphoto2: error while loading shared libraries: libgphoto2.so.6: cannot open shared object file: No such file or directory
pi@raspberrypi ~ $ sudo ./gphoto2 --version
sudo: ./gphoto2: command not found
pi@raspberrypi ~ $ sudo ./gphoto-suite-install/bin/gphoto2 --version
gphoto2 2.5.0.1

Copyright (c) 2000-2012 Lutz Mueller and others

gphoto2 comes with NO WARRANTY, to the extent permitted by law. You may
redistribute copies of gphoto2 under the terms of the GNU General Public
License. For more information about these matters, see the files named COPYING.

This version of gphoto2 is using the following software versions and options:
gphoto2         2.5.0.1        gcc, popt(m), exif, no cdk, no aa, no jpeg, no readline
libgphoto2      2.5.0.1        all camlibs, gcc, ltdl, EXIF
libgphoto2_port 0.10.0         gcc, ltdl, USB, serial without locking
pi@raspberrypi ~ $
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

poing
Posts: 1131
Joined: Thu Mar 08, 2012 3:32 pm

Re: Photography Projects

Tue Mar 19, 2013 9:50 pm

And now for something completely different: Eye-Fi on the Pi. I used these files: https://code.google.com/p/eyefiserver/ but they didn't work as was indicated. To make it work don't execute:

Code: Select all

sudo update-rc.d eyefiserver defaults 98 02
as is indicated there, for it doesn't work for a reason I don't understand. Instead add to /etc/rc.local

Code: Select all

printf "Starting eyefiserver from rc.local\n"
python /usr/local/bin/eyefiserver.py&
Then it should work, although there's a lot of text scrolling over the console, which I didn't want. I managed to suppress all the output by editing the file eyefiserver.py into this (copy this text and use it as 'eyefiserver.py' instead of the file from the link):

Code: Select all

#!/usr/bin/env python

"""
* Copyright (c) 2009, Jeffrey Tchang
* Additional *pike
* All rights reserved.
*
*
* THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""


import string
import cgi
import time

import sys
import os
import socket
import thread
import StringIO

import hashlib
import binascii
import select
import tarfile

import xml.sax
from xml.sax.handler import ContentHandler
import xml.dom.minidom

from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
import BaseHTTPServer

import SocketServer

import logging

#pike
from datetime import datetime
import ConfigParser


"""
General architecture notes


This is a standalone Eye-Fi Server that is designed to take the place of the Eye-Fi Manager.


Starting this server creates a listener on port 59278. I use the BaseHTTPServer class included
with Python. I look for specific POST/GET request URLs and execute functions based on those
URLs.




"""




# Create the main logger
#eyeFiLogger = logging.Logger("eyeFiLogger",logging.DEBUG)

# Create two handlers. One to print to the log and one to print to the console
#consoleHandler = logging.StreamHandler(sys.stdout)

# Set how both handlers will print the pretty log events
#eyeFiLoggingFormat = logging.Formatter("[%(asctime)s][%(funcName)s] - %(message)s",'%m/%d/%y %I:%M%p')
#consoleHandler.setFormatter(eyeFiLoggingFormat)

# Append both handlers to the main Eye Fi Server logger
#eyeFiLogger.addHandler(consoleHandler)




# Eye Fi XML SAX ContentHandler
class EyeFiContentHandler(ContentHandler):

  # These are the element names that I want to parse out of the XML
  elementNamesToExtract = ["macaddress","cnonce","transfermode","transfermodetimestamp","fileid","filename","filesize","filesignature"]

  # For each of the element names I create a dictionary with the value to False
  elementsToExtract = {}

  # Where to put the extracted values
  extractedElements = {}


  def __init__(self):
    self.extractedElements = {}

    for elementName in self.elementNamesToExtract:
        self.elementsToExtract[elementName] = False

  def startElement(self, name, attributes):

    # If the name of the element is a key in the dictionary elementsToExtract
    # set the value to True
    if name in self.elementsToExtract:
      self.elementsToExtract[name] = True

  def endElement(self, name):

    # If the name of the element is a key in the dictionary elementsToExtract
    # set the value to False
    if name in self.elementsToExtract:
      self.elementsToExtract[name] = False


  def characters(self, content):

    for elementName in self.elementsToExtract:
      if self.elementsToExtract[elementName] == True:
        self.extractedElements[elementName] = content

# Implements an EyeFi server
class EyeFiServer(SocketServer.ThreadingMixIn, BaseHTTPServer.HTTPServer):


  def server_bind(self):

    BaseHTTPServer.HTTPServer.server_bind(self)
    self.socket.settimeout(None)
    self.run = True

  def get_request(self):
    while self.run:
      try:
        connection, address = self.socket.accept()
        #eyeFiLogger.debug("Incoming connection from client %s" % address[0])

        connection.settimeout(None)
        return (connection, address)

      except socket.timeout:
        pass

  #def stop(self):
  #  self.run = False

  # alt serve_forever method for python <2.6
  # because we want a shutdown mech ..
  #def serve(self):
  #  while self.run:
  #    self.handle_request()
  #  self.socket.close()



# This class is responsible for handling HTTP requests passed to it.
# It implements the two most common HTTP methods, do_GET() and do_POST()

class EyeFiRequestHandler(BaseHTTPRequestHandler):

  # pike: these seem unused ?
  protocol_version = 'HTTP/1.1'
  sys_version = ""
  server_version = "Eye-Fi Agent/2.0.4.0 (Windows XP SP2)"


  def do_GET(self):

    #eyeFiLogger.debug(self.command + " " + self.path + " " + self.request_version)

    SOAPAction = ""
    #eyeFiLogger.debug("Headers received in GET request:")
    for headerName in self.headers.keys():
      for headerValue in self.headers.getheaders(headerName):
        #eyeFiLogger.debug(headerName + ": " + headerValue)
        if( headerName == "soapaction"):
          SOAPAction = headerValue

    # couldnt get this to work ..
    #if((self.client_address == "localhost") and (self.path == "/api/soap/eyefilm/v1x") and (SOAPAction == "\"urn:StopServer\"")):
    #  #eyeFiLogger.debug("Got StopServer request .. stopping server")
    #  self.server.stop()
    # or, for python 2.6>
    #  self.server.shutdown()

    self.send_response(200)
    self.send_header('Content-type','text/html')
    # I should be sending a Content-Length header with HTTP/1.1 but I am being lazy
    # self.send_header('Content-length', '123')
    self.end_headers()
    self.wfile.write(self.client_address)
    self.wfile.write(self.headers)
    self.close_connection = 0


  def do_POST(self):
    #eyeFiLogger.debug(self.command + " " + self.path + " " + self.request_version)

    SOAPAction = ""
    contentLength = ""

    # Loop through all the request headers and pick out ones that are relevant

    #eyeFiLogger.debug("Headers received in POST request:")
    for headerName in self.headers.keys():
      for headerValue in self.headers.getheaders(headerName):

        if( headerName == "soapaction"):
          SOAPAction = headerValue

        if( headerName == "content-length"):
          contentLength = int(headerValue)

        #eyeFiLogger.debug(headerName + ": " + headerValue)


    # Read contentLength bytes worth of data
    #eyeFiLogger.debug("Attempting to read " + str(contentLength) + " bytes of data")
    postData = self.rfile.read(contentLength)
    #eyeFiLogger.debug("Finished reading " + str(contentLength) + " bytes of data")

    # TODO: Implement some kind of visual progress bar
    # bytesRead = 0
    # postData = ""

    # while(bytesRead < contentLength):
    #  postData = postData + self.rfile.read(1)
    #   bytesRead = bytesRead + 1

    #  if(bytesRead % 10000 == 0):
    #    print "#",


    # Perform action based on path and SOAPAction
    # A SOAPAction of StartSession indicates the beginning of an EyeFi
    # authentication request
    if((self.path == "/api/soap/eyefilm/v1") and (SOAPAction == "\"urn:StartSession\"")):
      #eyeFiLogger.debug("Got StartSession request")
      response = self.startSession(postData)
      contentLength = len(response)

      #eyeFiLogger.debug("StartSession response: " + response)

      self.send_response(200)
      self.send_header('Date', self.date_time_string())
      self.send_header('Pragma','no-cache')
      self.send_header('Server','Eye-Fi Agent/2.0.4.0 (Windows XP SP2)')
      self.send_header('Content-Type','text/xml; charset="utf-8"')
      self.send_header('Content-Length', contentLength)
      self.end_headers()

      self.wfile.write(response)
      self.wfile.flush()
      self.handle_one_request()

    # GetPhotoStatus allows the card to query if a photo has been uploaded
    # to the server yet
    if((self.path == "/api/soap/eyefilm/v1") and (SOAPAction == "\"urn:GetPhotoStatus\"")):
      #eyeFiLogger.debug("Got GetPhotoStatus request")

      response = self.getPhotoStatus(postData)
      contentLength = len(response)

      #eyeFiLogger.debug("GetPhotoStatus response: " + response)

      self.send_response(200)
      self.send_header('Date', self.date_time_string())
      self.send_header('Pragma','no-cache')
      self.send_header('Server','Eye-Fi Agent/2.0.4.0 (Windows XP SP2)')
      self.send_header('Content-Type','text/xml; charset="utf-8"')
      self.send_header('Content-Length', contentLength)
      self.end_headers()

      self.wfile.write(response)
      self.wfile.flush()


    # If the URL is upload and there is no SOAPAction the card is ready to send a picture to me
    if((self.path == "/api/soap/eyefilm/v1/upload") and (SOAPAction == "")):
      #eyeFiLogger.debug("Got upload request")
      response = self.uploadPhoto(postData)
      contentLength = len(response)

      #eyeFiLogger.debug("Upload response: " + response)

      self.send_response(200)
      self.send_header('Date', self.date_time_string())
      self.send_header('Pragma','no-cache')
      self.send_header('Server','Eye-Fi Agent/2.0.4.0 (Windows XP SP2)')
      self.send_header('Content-Type','text/xml; charset="utf-8"')
      self.send_header('Content-Length', contentLength)
      self.end_headers()
      #print "resp1"
      self.wfile.write(response)
      #print "resp2"
      self.wfile.flush()

    # If the URL is upload and SOAPAction is MarkLastPhotoInRoll
    if((self.path == "/api/soap/eyefilm/v1") and (SOAPAction == "\"urn:MarkLastPhotoInRoll\"")):
      #eyeFiLogger.debug("Got MarkLastPhotoInRoll request")
      response = self.markLastPhotoInRoll(postData)
      contentLength = len(response)

      #eyeFiLogger.debug("MarkLastPhotoInRoll response: " + response)
      self.send_response(200)
      self.send_header('Date', self.date_time_string())
      self.send_header('Pragma','no-cache')
      self.send_header('Server','Eye-Fi Agent/2.0.4.0 (Windows XP SP2)')
      self.send_header('Content-Type','text/xml; charset="utf-8"')
      self.send_header('Content-Length', contentLength)
      self.send_header('Connection', 'Close')
      self.end_headers()

      self.wfile.write(response)
      self.wfile.flush()

      #eyeFiLogger.debug("Connection closed.")

  def log_message(self, format, *args):
    return

  # Handles MarkLastPhotoInRoll action
  def markLastPhotoInRoll(self,postData):
    # Create the XML document to send back
    doc = xml.dom.minidom.Document()

    SOAPElement = doc.createElementNS("http://schemas.xmlsoap.org/soap/envelope/","SOAP-ENV:Envelope")
    SOAPElement.setAttribute("xmlns:SOAP-ENV","http://schemas.xmlsoap.org/soap/envelope/")
    SOAPBodyElement = doc.createElement("SOAP-ENV:Body")

    markLastPhotoInRollResponseElement = doc.createElement("MarkLastPhotoInRollResponse")

    SOAPBodyElement.appendChild(markLastPhotoInRollResponseElement)
    SOAPElement.appendChild(SOAPBodyElement)
    doc.appendChild(SOAPElement)

    return doc.toxml(encoding="UTF-8")


  # Handles receiving the actual photograph from the card.
  # postData will most likely contain multipart binary post data that needs to be parsed
  def uploadPhoto(self,postData):

    # Take the postData string and work with it as if it were a file object
    postDataInMemoryFile = StringIO.StringIO(postData)

    # Get the content-type header which looks something like this
    # content-type: multipart/form-data; boundary=---------------------------02468ace13579bdfcafebabef00d
    contentTypeHeader = self.headers.getheaders('content-type').pop()
    #eyeFiLogger.debug(contentTypeHeader)

    # Extract the boundary parameter in the content-type header
    headerParameters = contentTypeHeader.split(";")
    #eyeFiLogger.debug(headerParameters)

    boundary = headerParameters[1].split("=")
    boundary = boundary[1].strip()
    #eyeFiLogger.debug("Extracted boundary: " + boundary)

    # #eyeFiLogger.debug("uploadPhoto postData: " + postData)

    # Parse the multipart/form-data
    form = cgi.parse_multipart(postDataInMemoryFile, {"boundary":boundary,"content-disposition":self.headers.getheaders('content-disposition')})
    #eyeFiLogger.debug("Available multipart/form-data: " + str(form.keys()))

    # Parse the SOAPENVELOPE using the EyeFiContentHandler()
    soapEnvelope = form['SOAPENVELOPE'][0]
    #eyeFiLogger.debug("SOAPENVELOPE: " + soapEnvelope)
    handler = EyeFiContentHandler()
    parser = xml.sax.parseString(soapEnvelope,handler)

    #eyeFiLogger.debug("Extracted elements: " + str(handler.extractedElements))


    imageTarfileName = handler.extractedElements["filename"]

    #pike
    #uid = self.server.config.getint('EyeFiServer','upload_uid')
    #gid = self.server.config.getint('EyeFiServer','upload_gid')
    #mode = self.server.config.get('EyeFiServer','upload_mode')
    ##eyeFiLogger.debug("Using uid/gid %d/%d"%(uid,gid))
    ##eyeFiLogger.debug("Using mode " + mode)

    now = datetime.now()
    uploadDir = now.strftime(self.server.config.get('EyeFiServer','upload_dir'))
    if not os.path.isdir(uploadDir):
       os.makedirs(uploadDir)
       #if uid!=0 and gid!=0:
       #  os.chown(uploadDir,uid,gid)
       #if mode!="":
       #  os.chmod(uploadDir,string.atoi(mode))

    imageTarPath = os.path.join(uploadDir,imageTarfileName)
    #eyeFiLogger.debug("Generated path " + imageTarPath)


    fileHandle = open(imageTarPath, 'wb')
    #eyeFiLogger.debug("Opened file " + imageTarPath + " for binary writing")

    fileHandle.write(form['FILENAME'][0])
    #eyeFiLogger.debug("Wrote file " + imageTarPath)

    fileHandle.close()
    #eyeFiLogger.debug("Closed file " + imageTarPath)

    #if uid!=0 and gid!=0:
    #  os.chown(imageTarPath,uid,gid)
    #if mode!="":
    #  os.chmod(imageTarPath,string.atoi(mode))

    #eyeFiLogger.debug("Extracting TAR file " + imageTarPath)
    imageTarfile = tarfile.open(imageTarPath)
    imageTarfile.extractall(path=uploadDir)

    #eyeFiLogger.debug("Closing TAR file " + imageTarPath)
    imageTarfile.close()

    #eyeFiLogger.debug("Deleting TAR file " + imageTarPath)
    os.remove(imageTarPath)

    # Create the XML document to send back
    doc = xml.dom.minidom.Document()

    SOAPElement = doc.createElementNS("http://schemas.xmlsoap.org/soap/envelope/","SOAP-ENV:Envelope")
    SOAPElement.setAttribute("xmlns:SOAP-ENV","http://schemas.xmlsoap.org/soap/envelope/")
    SOAPBodyElement = doc.createElement("SOAP-ENV:Body")

    uploadPhotoResponseElement = doc.createElement("UploadPhotoResponse")
    successElement = doc.createElement("success")
    successElementText = doc.createTextNode("true")

    successElement.appendChild(successElementText)
    uploadPhotoResponseElement.appendChild(successElement)

    SOAPBodyElement.appendChild(uploadPhotoResponseElement)
    SOAPElement.appendChild(SOAPBodyElement)
    doc.appendChild(SOAPElement)

    return doc.toxml(encoding="UTF-8")


  def getPhotoStatus(self,postData):
    handler = EyeFiContentHandler()
    parser = xml.sax.parseString(postData,handler)

    # Create the XML document to send back
    doc = xml.dom.minidom.Document()

    SOAPElement = doc.createElementNS("http://schemas.xmlsoap.org/soap/envelope/","SOAP-ENV:Envelope")
    SOAPElement.setAttribute("xmlns:SOAP-ENV","http://schemas.xmlsoap.org/soap/envelope/")
    SOAPBodyElement = doc.createElement("SOAP-ENV:Body")

    getPhotoStatusResponseElement = doc.createElement("GetPhotoStatusResponse")
    getPhotoStatusResponseElement.setAttribute("xmlns","http://localhost/api/soap/eyefilm")

    fileidElement = doc.createElement("fileid")
    fileidElementText = doc.createTextNode("1")
    fileidElement.appendChild(fileidElementText)

    offsetElement = doc.createElement("offset")
    offsetElementText = doc.createTextNode("0")
    offsetElement.appendChild(offsetElementText)

    getPhotoStatusResponseElement.appendChild(fileidElement)
    getPhotoStatusResponseElement.appendChild(offsetElement)

    SOAPBodyElement.appendChild(getPhotoStatusResponseElement)

    SOAPElement.appendChild(SOAPBodyElement)
    doc.appendChild(SOAPElement)

    return doc.toxml(encoding="UTF-8")


  def startSession(self, postData):
    #eyeFiLogger.debug("Delegating the XML parsing of startSession postData to EyeFiContentHandler()")
    handler = EyeFiContentHandler()
    parser = xml.sax.parseString(postData,handler)

    #eyeFiLogger.debug("Extracted elements: " + str(handler.extractedElements))

    # Retrieve it from C:\Documents and Settings\<User>\Application Data\Eye-Fi\Settings.xml

    #eyeFiLogger.debug("Setting Eye-Fi upload key to " + self.server.config.get('EyeFiServer','upload_key'))

    credentialString = handler.extractedElements["macaddress"] + handler.extractedElements["cnonce"] + self.server.config.get('EyeFiServer','upload_key');
    #eyeFiLogger.debug("Concatenated credential string (pre MD5): " + credentialString)

    # Return the binary data represented by the hexadecimal string
    # resulting in something that looks like "\x00\x18V\x03\x04..."
    binaryCredentialString = binascii.unhexlify(credentialString)

    # Now MD5 hash the binary string
    m = hashlib.md5()
    m.update(binaryCredentialString)

    # Hex encode the hash to obtain the final credential string
    credential = m.hexdigest()

    # Create the XML document to send back
    doc = xml.dom.minidom.Document()

    SOAPElement = doc.createElementNS("http://schemas.xmlsoap.org/soap/envelope/","SOAP-ENV:Envelope")
    SOAPElement.setAttribute("xmlns:SOAP-ENV","http://schemas.xmlsoap.org/soap/envelope/")
    SOAPBodyElement = doc.createElement("SOAP-ENV:Body")


    startSessionResponseElement = doc.createElement("StartSessionResponse")
    startSessionResponseElement.setAttribute("xmlns","http://localhost/api/soap/eyefilm")

    credentialElement = doc.createElement("credential")
    credentialElementText = doc.createTextNode(credential)
    credentialElement.appendChild(credentialElementText)

    snonceElement = doc.createElement("snonce")
    snonceElementText = doc.createTextNode("99208c155fc1883579cf0812ec0fe6d2")
    snonceElement.appendChild(snonceElementText)

    transfermodeElement = doc.createElement("transfermode")
    transfermodeElementText = doc.createTextNode("2")
    transfermodeElement.appendChild(transfermodeElementText)

    transfermodetimestampElement = doc.createElement("transfermodetimestamp")
    transfermodetimestampElementText = doc.createTextNode("1230268824")
    transfermodetimestampElement.appendChild(transfermodetimestampElementText)

    upsyncallowedElement = doc.createElement("upsyncallowed")
    upsyncallowedElementText = doc.createTextNode("false")
    upsyncallowedElement.appendChild(upsyncallowedElementText)


    startSessionResponseElement.appendChild(credentialElement)
    startSessionResponseElement.appendChild(snonceElement)
    startSessionResponseElement.appendChild(transfermodeElement)
    startSessionResponseElement.appendChild(transfermodetimestampElement)
    startSessionResponseElement.appendChild(upsyncallowedElement)

    SOAPBodyElement.appendChild(startSessionResponseElement)

    SOAPElement.appendChild(SOAPBodyElement)
    doc.appendChild(SOAPElement)


    return doc.toxml(encoding="UTF-8")


def main():

  #if len(sys.argv) < 2:
  #      print "usage: %s configfile logfile" % os.path.basename(sys.argv[0])
  #      sys.exit(2)

  configfile = "/etc/eyefiserver.conf" #sys.argv[1]
  #eyeFiLogger.info("Reading config " + configfile)

  config = ConfigParser.SafeConfigParser()
  config.read(configfile)

  # open file logging
  logfile = "/var/log/eyefiserver.log" #sys.argv[2]
  #fileHandler = logging.FileHandler(logfile,"w",encoding=None)
  #fileHandler.setFormatter(eyeFiLoggingFormat)
  #eyeFiLogger.addHandler(fileHandler)


  server_address = (config.get('EyeFiServer','host_name'), config.getint('EyeFiServer','host_port'))

  # run webserver as www-data - cant get it working
  #if config.get('EyeFiServer','user_id')!='':
  #  os.setuid(config.getint('EyeFiServer','user_id'))

  try:
    # Create an instance of an HTTP server. Requests will be handled
    # by the class EyeFiRequestHandler
    eyeFiServer = EyeFiServer(server_address, EyeFiRequestHandler)
    eyeFiServer.config = config

    # Spawn a new thread for the server
    # thread.start_new_thread(eyeFiServer.serve, ())
    # eyeFiLogger.info("Eye-Fi server started listening on port " + str(server_address[1]))

    #eyeFiLogger.info("Eye-Fi server started listening on port " + str(server_address[1]))
    eyeFiServer.serve_forever()

    #raw_input("\nPress <RETURN> to stop server\n")
    #eyeFiServer.stop()
    #eyeFiLogger.info("Eye-Fi server stopped")
    #eyeFiServer.socket.close()

  except KeyboardInterrupt:
    eyeFiServer.socket.close()
    eyeFiServer.shutdown()

  #eyeFiLogger.info("Eye-Fi server stopped")

if __name__ == '__main__':
    main()

Hope this helps someone ;)

sportsnapper
Posts: 69
Joined: Wed Sep 05, 2012 11:27 am

Re: Photography Projects

Wed Mar 20, 2013 1:19 pm

Texy,

Normal gphoto2 service resumed....

When you use sudo, it changes the $PATH - I'm not going to try to explain it as I'm not sure I understand all the details at the moment. You can test this by doing this:

Code: Select all

pi@raspberrypi ~/gphoto-suite-install/lib $ env | grep ^PATH=
PATH=/home/pi/gphoto-suite-install/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
pi@raspberrypi ~/gphoto-suite-install/lib $ sudo env | grep ^PATH=
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
pi@raspberrypi ~/gphoto-suite-install/lib $ 
That's why the sudo gphoto2 commands fail, except where you explicitly specify the location (./gphoto-suite-install/bin/gphoto2)

I notice that by not using sudo, you do find gphoto2, but you get an error with libgphoto2.so.6 - so I think that your $PATH changes are successful. My lib directory looks like this....

Code: Select all

pi@raspberrypi ~/gphoto-suite-install/lib $ ls -al
total 408
drwxr-xr-x 8 pi pi   4096 Mar 14 12:31 .
drwxr-xr-x 7 pi pi   4096 Mar 17 17:42 ..
drwxr-xr-x 3 pi pi   4096 Mar 14 12:31 libgphoto2
-rwxr-xr-x 1 pi pi   1125 Mar 14 12:28 libgphoto2.la
drwxr-xr-x 3 pi pi   4096 Mar 14 09:32 libgphoto2_port
-rwxr-xr-x 1 pi pi   1073 Mar 14 12:28 libgphoto2_port.la
lrwxrwxrwx 1 pi pi     25 Mar 14 12:28 libgphoto2_port.so -> libgphoto2_port.so.10.0.0
lrwxrwxrwx 1 pi pi     25 Mar 14 12:28 libgphoto2_port.so.10 -> libgphoto2_port.so.10.0.0
-rwxr-xr-x 1 pi pi  76065 Mar 14 12:28 libgphoto2_port.so.10.0.0
drwxr-xr-x 2 pi pi   4096 Mar 14 12:31 libgphoto2-sharp
lrwxrwxrwx 1 pi pi     19 Mar 14 12:28 libgphoto2.so -> libgphoto2.so.6.0.0
lrwxrwxrwx 1 pi pi     19 Mar 14 12:28 libgphoto2.so.6 -> libgphoto2.so.6.0.0
-rwxr-xr-x 1 pi pi 298598 Mar 14 12:28 libgphoto2.so.6.0.0
drwxr-xr-x 2 pi pi   4096 Mar 14 12:31 pkgconfig
drwxr-xr-x 3 pi pi   4096 Mar 14 12:31 python2.7
drwxr-xr-x 2 pi pi   4096 Mar 14 12:31 udev
I'd check that your's looks the same. Might also be worth pinging yadmin with the issue - or even directing him to this thread??

sportsnapper
Posts: 69
Joined: Wed Sep 05, 2012 11:27 am

Re: Photography Projects

Wed Mar 20, 2013 2:08 pm

And...looking in the gphoto2 FAQ http://www.gphoto.org/doc/manual/FAQ.ht ... tion-error, 3.6.1 I found this:

Find out which library files you are using for the gphoto2 command with the ldd `which gphoto2` command.

I get this:

Code: Select all

pi@raspberrypi ~/gphoto-suite-install/lib $ ldd `which gphoto2`
	/usr/lib/arm-linux-gnueabihf/libcofi_rpi.so (0x401f1000)
	libgphoto2.so.6 => /home/pi/gphoto-suite-build/../gphoto-suite-install/lib/libgphoto2.so.6 (0x400df000)
	libgphoto2_port.so.10 => /home/pi/gphoto-suite-build/../gphoto-suite-install/lib/libgphoto2_port.so.10 (0x40160000)
	libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x4016f000)
	libexif.so.12 => /usr/lib/arm-linux-gnueabihf/libexif.so.12 (0x4018e000)
	libpopt.so.0 => /lib/arm-linux-gnueabihf/libpopt.so.0 (0x4004f000)
	libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x401fa000)
	libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x4026b000)
	libltdl.so.7 => /usr/lib/arm-linux-gnueabihf/libltdl.so.7 (0x40089000)
	/lib/ld-linux-armhf.so.3 (0x40015000)
	libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x4039a000)
	libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x401ca000)
So you should be able to see where your gphoto2 is looking for the lib

texy
Forum Moderator
Forum Moderator
Posts: 5157
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Photography Projects

Wed Mar 20, 2013 7:38 pm

sportsnapper wrote:Texy,

Normal gphoto2 service resumed....

When you use sudo, it changes the $PATH - I'm not going to try to explain it as I'm not sure I understand all the details at the moment. You can test this by doing this:

Code: Select all

pi@raspberrypi ~/gphoto-suite-install/lib $ env | grep ^PATH=
PATH=/home/pi/gphoto-suite-install/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
pi@raspberrypi ~/gphoto-suite-install/lib $ sudo env | grep ^PATH=
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
pi@raspberrypi ~/gphoto-suite-install/lib $ 
That's why the sudo gphoto2 commands fail, except where you explicitly specify the location (./gphoto-suite-install/bin/gphoto2)

I notice that by not using sudo, you do find gphoto2, but you get an error with libgphoto2.so.6 - so I think that your $PATH changes are successful. My lib directory looks like this....

Code: Select all

pi@raspberrypi ~/gphoto-suite-install/lib $ ls -al
total 408
drwxr-xr-x 8 pi pi   4096 Mar 14 12:31 .
drwxr-xr-x 7 pi pi   4096 Mar 17 17:42 ..
drwxr-xr-x 3 pi pi   4096 Mar 14 12:31 libgphoto2
-rwxr-xr-x 1 pi pi   1125 Mar 14 12:28 libgphoto2.la
drwxr-xr-x 3 pi pi   4096 Mar 14 09:32 libgphoto2_port
-rwxr-xr-x 1 pi pi   1073 Mar 14 12:28 libgphoto2_port.la
lrwxrwxrwx 1 pi pi     25 Mar 14 12:28 libgphoto2_port.so -> libgphoto2_port.so.10.0.0
lrwxrwxrwx 1 pi pi     25 Mar 14 12:28 libgphoto2_port.so.10 -> libgphoto2_port.so.10.0.0
-rwxr-xr-x 1 pi pi  76065 Mar 14 12:28 libgphoto2_port.so.10.0.0
drwxr-xr-x 2 pi pi   4096 Mar 14 12:31 libgphoto2-sharp
lrwxrwxrwx 1 pi pi     19 Mar 14 12:28 libgphoto2.so -> libgphoto2.so.6.0.0
lrwxrwxrwx 1 pi pi     19 Mar 14 12:28 libgphoto2.so.6 -> libgphoto2.so.6.0.0
-rwxr-xr-x 1 pi pi 298598 Mar 14 12:28 libgphoto2.so.6.0.0
drwxr-xr-x 2 pi pi   4096 Mar 14 12:31 pkgconfig
drwxr-xr-x 3 pi pi   4096 Mar 14 12:31 python2.7
drwxr-xr-x 2 pi pi   4096 Mar 14 12:31 udev
I'd check that your's looks the same. Might also be worth pinging yadmin with the issue - or even directing him to this thread??
Thanks for that - I had to do a LOT of chmod'ing to get my files to have the same attributes as yours :o
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

texy
Forum Moderator
Forum Moderator
Posts: 5157
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Photography Projects

Wed Mar 20, 2013 7:40 pm

sportsnapper wrote:And...looking in the gphoto2 FAQ http://www.gphoto.org/doc/manual/FAQ.ht ... tion-error, 3.6.1 I found this:

Find out which library files you are using for the gphoto2 command with the ldd `which gphoto2` command.

I get this:

Code: Select all

pi@raspberrypi ~/gphoto-suite-install/lib $ ldd `which gphoto2`
	/usr/lib/arm-linux-gnueabihf/libcofi_rpi.so (0x401f1000)
	libgphoto2.so.6 => /home/pi/gphoto-suite-build/../gphoto-suite-install/lib/libgphoto2.so.6 (0x400df000)
	libgphoto2_port.so.10 => /home/pi/gphoto-suite-build/../gphoto-suite-install/lib/libgphoto2_port.so.10 (0x40160000)
	libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x4016f000)
	libexif.so.12 => /usr/lib/arm-linux-gnueabihf/libexif.so.12 (0x4018e000)
	libpopt.so.0 => /lib/arm-linux-gnueabihf/libpopt.so.0 (0x4004f000)
	libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x401fa000)
	libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x4026b000)
	libltdl.so.7 => /usr/lib/arm-linux-gnueabihf/libltdl.so.7 (0x40089000)
	/lib/ld-linux-armhf.so.3 (0x40015000)
	libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x4039a000)
	libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x401ca000)
So you should be able to see where your gphoto2 is looking for the lib
Thanks again - I can see the problem :

Code: Select all

pi@raspberrypi ~/gphoto-suite-install/lib $ ldd `which gphoto2`
        /usr/lib/arm-linux-gnueabihf/libcofi_rpi.so (0xb6f41000)
        libgphoto2.so.6 => not found
        libgphoto2_port.so.10 => not found
        libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6f16000)
        libexif.so.12 => /usr/lib/arm-linux-gnueabihf/libexif.so.12 (0xb6eda000)
        libpopt.so.0 => /lib/arm-linux-gnueabihf/libpopt.so.0 (0xb6ec7000)
        libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6e56000)
        libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6d27000)
        /lib/ld-linux-armhf.so.3 (0xb6f4d000)
        libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0xb6cff000)
pi@raspberrypi ~/gphoto-suite-install/lib $ ls -lt
total 400
lrwxrwxrwx 1 pi pi     19 Mar 18 20:03 libgphoto2.so.6 -> libgphoto2.so.6.0.0
drwxr-x--x 3 pi pi   4096 Mar 18 20:03 libgphoto2_port
drwxr-xr-x 3 pi pi   4096 Mar 18 20:03 libgphoto2
-rwxr-xr-x 1 pi pi  75993 Mar 18 20:03 libgphoto2_port.so.10.0.0
-rwxr-xr-x 1 pi pi   1051 Mar 18 20:03 libgphoto2_port.la
lrwxrwxrwx 1 pi pi     25 Mar 18 20:03 libgphoto2_port.so -> libgphoto2_port.so.10.0.0
lrwxrwxrwx 1 pi pi     25 Mar 18 20:03 libgphoto2_port.so.10 -> libgphoto2_port.so.10.0.0
lrwxrwxrwx 1 pi pi     19 Mar 18 20:03 libgphoto2.so -> libgphoto2.so.6.0.0
drwxr-xr-x 3 pi pi   4096 Mar 18 20:03 python2.7
-rwxr-xr-x 1 pi pi 298454 Mar 18 20:03 libgphoto2.so.6.0.0
drwxr-xr-x 2 pi pi   4096 Mar 18 20:03 udev
-rwxr-xr-x 1 pi pi   1081 Mar 18 20:03 libgphoto2.la
drwxr-xr-x 2 pi pi   4096 Mar 18 20:03 libgphoto2-sharp
drwxr-xr-x 2 pi pi   4096 Mar 18 20:03 pkgconfig
pi@raspberrypi ~/gphoto-suite-install/lib $
Time for tea, so still more work to do on this.
Regards,
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

hueblo
Posts: 2
Joined: Wed Mar 06, 2013 5:19 am

Re: Photography Projects

Thu Apr 04, 2013 10:49 pm

Hello everyone!

I'm a frustrated newb that has learned a lot since reading this threat but now I'm really tired. I'm trying to create a David Hunt camera grip. I have learned to configure and install Raspbian. Installed the gphoto2 along with dependencies (even applied the usb patch). Whenever I reinstall gphoto2 I always have to remove the file
/usr/share/dbus1/services/org.gtk.Private.GPhoto2VolumeMonitor.service
in order for my camera (Canon 5D Mark II) to be recognized. Once its recognized If i run a --capture-image or --capture-tethered I will eventually get an error to specify a /store_xxxxxxxx folder (if i run the --keep command I will get the error right away). I then run a
-f /store_00010001/DCIM/100EOS5D command to specify the folder and the command executes with no error but if run the capture command again I get the same exact error. I have tried different versions of gphoto2 up to the latest one version with the same results. Any help will be appreciated.

mexicodirk2
Posts: 15
Joined: Wed Oct 31, 2012 1:37 am

Re: Photography Projects

Sun Apr 14, 2013 2:16 am

Thanks GonZoo
works good your patch an instructins
now i can play with gphoto2.5
thanks
dirk

Return to “Other projects”