Reply
Thread Tools
darethehair's Avatar
Posts: 273 | Thanked: 104 times | Joined on Mar 2007 @ Manitoba, Canada
#31
scuba04:

Well, did you run the 'ldconfig' command as mentioned in the README? I recall having problems myself until I did that -- but I don't recall if the error message was the one that you mentioned.

In any case, I think you are now saying that $PATH is *not* the problem i.e. that 'gphoto2' *can* be found without explicitly specifying its location -- and that the real problem is loading the libgphoto libraries?
 
anidel's Avatar
Posts: 1,743 | Thanked: 1,231 times | Joined on Jul 2006 @ Twickenham, UK
#32
It's very interesting this idea.
I'll play with my linux laptop and gphoto2 and my Canon camera and see what can be done with it.

To compile it, I would suggest you guys to add

Code:
deb-src http://ftp.debian.org/debian stable main contrib free non-free
deb-src http://ftp.debian.org/debian testing main contrib free non-free
to the sources.list in /etc/apt and run:

Code:
apt-get update
to update the list of packages.
After that you can simply run:

Code:
apt-get source gphoto2
to get the debian source (ready to be packaged) of gphoto2.
After that to experiment with it just cd in the source directory and run:

Code:
dpkg-buildpackage -rfakeroot
and it will compile and create the deb file for you in the parent directory.
Of course this is likely to fail due to source dependecies and here comes the worst part. Going thru the dependencies, install and compile a dependency and figure out which one is useless on the tablet (for example gphoto2 depends on gpm and this is useless [I think] on our tablet).

After this boring work, you'll have a cool .deb file that will install cleanly on the tablet.

To be really clean you should edit the control file in the debian folder and remove the useless dependencies, update the Maintainer to yourself, remove any Uploaders entry (if any) and change the version of the package to reflect the fact it is for Maemo:

Code:
dch --newversion=<old version number>chinook1
for example for the debian gphoto2 package:

Code:
dch --newversion=2.4.0-1chinook1
as "2.4.0-1" is the debian version.
Any subsequent update should be done with:

Code:
dch -i
Also remember to change the Section entry in the control file to a Maemo compatible one (like user/Tools).

This is only a short guide.
If you follow these hints and the ones present in the Maemo documentation pages, you will end up with a nicely packaged deb file ready to be uploaded to a public repository and that plays fair with other packages.

EDIT: of course, this in the scratchbox environment

Last edited by anidel; 2008-05-15 at 14:46.
 

The Following 2 Users Say Thank You to anidel For This Useful Post:
Posts: 19 | Thanked: 1 time | Joined on Apr 2008
#33
darethehair:

Sorry, what I meant to say was that ./gphoto2 only ran properly when run from the /usr/local/bin, running gphoto2 from anywhere else in terminal fails. I think this means that $PATH isn't set correctly, but not entirely sure...

That error that I got was looking for libgphoto2.so.2, which definitely resides in /usr/local/lib but gphoto2 can't seem to find it. Running gphoto2-config --prefix=/usr/local/lib sounded hopeful, as that changes the libgphoto2 prefix, but got the same error after running that.

anidel:
Thanks for that quick guide. I'm looking at setting up scratchbox to port some apps, so that should definitely come in handy.
 
anidel's Avatar
Posts: 1,743 | Thanked: 1,231 times | Joined on Jul 2006 @ Twickenham, UK
#34
scuba04: I spent days figuring everything out...I would love to write a wiki on maemo.org. Time..sigh..time..
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#35
Originally Posted by anidel View Post
scuba04: I spent days figuring everything out...I would love to write a wiki on maemo.org. Time..sigh..time..
Or start a wiki here at ITT! Just start by dumping what you've already written into a wiki page. I'm sure it'd be appreciated by lots of people.
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 

The Following User Says Thank You to qole For This Useful Post:
darethehair's Avatar
Posts: 273 | Thanked: 104 times | Joined on Mar 2007 @ Manitoba, Canada
#36
scuba04:

I am still curious about the 'ldconfig' stuff. Did you try that yet?

In my README, I say the following:

6A) Edit '/etc/ld.so.conf' to add entry '/usr/local/lib'

vi /etc/ld.so.conf

Add the new entry '/usr/local/lib', so that (for me) it ended up looking like
this:

/usr/lib/microb-engine
/usr/lib/microb-engine/components
/usr/local/lib

6B) Run 'ldconfig' to refresh:

ldconfig
 

The Following User Says Thank You to darethehair For This Useful Post:
Posts: 19 | Thanked: 1 time | Joined on Apr 2008
#37
Ahhh, sorry - missed that part of the readme. I've fixed that now and running "/usr/local/bin/gphoto2" from the command line works fine. Not sure if I was confused into thinking "gphoto2" would work by itself, but its not a big issue anyway.

Wow, it runs superbly! These commands all function fine: http://www.gphoto.org/doc/manual/using-gphoto2.html I'm currently dumping 1.5GB of photos from my Canon A610 to the n810's memory card (USB Host connection). Just what I needed, cheers for your help! Would be happy to do any further testing if need be.

EDIT: File dump completed perfectly, now to upload to flickr with altpublisher (http://www.youtube.com/watch?v=hhgwP8HcNUo ). I tried out --capture-image afterwards, which reset the tablet...

Last edited by scuba04; 2008-05-16 at 00:35.
 
darethehair's Avatar
Posts: 273 | Thanked: 104 times | Joined on Mar 2007 @ Manitoba, Canada
#38
scuba04:

That is great news! Thanks for confirming at least partial success using my cross-compiled efforts

What I really want to use this for myself is 'remote capture', but since that is so flaky right now I have temporarily given up.
 
Posts: 52 | Thanked: 22 times | Joined on Apr 2008
#39
Interesting thread; I was going to try building gphoto2 myself. Though it seems like it could be rewritten way smaller with less libraries with a bit (a lot..) of effort.

I use gphoto2 with my Kodak; AFAIK the camera does not support capture. I've never found a list of what cameras do.
My daughter's (newer) camera can be set to either gphoto mode or USB memory mode; I presume the N810 would be able to read it in memory mode.
 
Posts: 3 | Thanked: 1 time | Joined on May 2008
#40
workaround to avoid reboots.

what works for me is to put everything into a script.
my N800 is default in USB OTG mode.
At the beginning of the script i put the N800 in HOST mode
then i execute the gphoto2 commands
and at the end of the script i put the N800 back in the default OTG mode

i then start the script with sh <scriptname>

i currently use it to take a 5 shot HDR sequence, the full script i use takes over 30 seconds from start to finish and havent had a reboot yet. ( in contrast, if a do a single capture from the command line my N800 hangs and reboots)

so make script like this :

---------
echo host > /sys/devices/platform/musb_hdrc/mode
sleep 1

<put your gphoto2 commands here>

echo otg > /sys/devices/platform/musb_hdrc/mode
sleep 1
----------

P.S. my EEEPC is moving to a closet
 

The Following User Says Thank You to bk227865 For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 13:14.