All of lore.kernel.org
 help / color / mirror / Atom feed
* help needed harvesting photos from nokia phone
@ 2011-06-28 13:11 acousmetre
  0 siblings, 0 replies; only message in thread
From: acousmetre @ 2011-06-28 13:11 UTC (permalink / raw)
  To: linux-bluetooth

Dear list,

I recently volunteered to help a group of actors in a performance. They
wish to use a mobile phone to take photos during a performance and have
these snaps automatically projected. A laptop with bluetooth and a
projector will be placed on the stage - where they can place the mobile
between shots in order to make the file transfer - they will move in and
out of range of the laptop. 

I thought this should be easy to do and patched together a script to
fetch and display the most recent photo taken. I'm not much of a
programmer however. With a pre-coupled phone and laptop, the script
works some of the time - other times it gets stuck - and I have to
physically remove and replace to bluetooth dongle to get it running
again (this works again, only sometimes!). I'll paste my script below -
can anyone suggest what I might be doing wrong - or a better way? At
present the script is too unreliable to use.

Here it is - cheers, Iain :

#!/bin/sh
folder='Images' #Nokia folder
name='/home/iain/projetos/chuvadesangue/fotos'
address='00:26:69:4D:D1:7C'
cd $name
touch ./preto.jpg
killall geeqie
/usr/bin/geeqie -f -t preto.jpg&

while : ; do
obexftp -b $address -l $folder > /tmp/list_files
trap "rm -f /tmp/list_files; exit 1" INT
cat /tmp/list_files | grep -o "file name="*.*"\ s" | sed 's/name="//' |
sed 's/file//' | sed 's/" s//' > /tmp/list_files2
if [ -s /tmp/list_files2 ] ; then
    sleep 2
    obexftp -b $address  -c $folder -G `cat /tmp/list_files2`
    lastimage=$(ls -c|head -n1)
#     echo "If there was a photo taken since the last loop, show it"
    /usr/bin/geeqie -r file: $lastimage
fi ;        
        sleep 3
done
  rm -f /tmp/list_files
  rm -f /tmp/list_files2
  echo "Done"






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-06-28 13:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-28 13:11 help needed harvesting photos from nokia phone acousmetre

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.