Yogiz | 1 Dec 19:02 2007
Picon

Get only a part of a file with obex

Hello,

I've used obexfs for my file transfers and so far it works well. Now
however, I have the need to only get a part of a file. I need it so I
could get reliable timestamps from the end of jpg images without having
to download all the file for it (obexfs gives bogus timestamps). Then I
could selectively get only the images that are made after certain time.

I have no idea however how to accomplish that, can you help?

Yogiz

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
Hendrik Sattler | 1 Dec 20:28 2007
Picon

Re: Get only a part of a file with obex

Am Samstag 01 Dezember 2007 schrieb Yogiz:
> I've used obexfs for my file transfers and so far it works well. Now
> however, I have the need to only get a part of a file. I need it so I
> could get reliable timestamps from the end of jpg images without having
> to download all the file for it (obexfs gives bogus timestamps). Then I
> could selectively get only the images that are made after certain time.
>
> I have no idea however how to accomplish that, can you help?

The OBEX protocol doesn't feature selecting a file offset. So no, this is not 
possible. However, is your file time problem related to obexfs or your phone?

HS

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
Yogiz | 1 Dec 21:26 2007
Picon

Re: Get only a part of a file with obex

> The OBEX protocol doesn't feature selecting a file offset. So no,
> this is not possible. However, is your file time problem related to
> obexfs or your phone?
I suspect that my phone (SonyEricsson W810i) just doesn't have a saner
way of timestamping photos. When I saw that obexfs showed ancient
timestamps I checked them from phone and they were right. So I looked
around and found them inside the jpg file hexdump. Obexfs says all the
files on the phone have same date:

sander <at> gabriel:~$ ls -l /mnt/bluetooth/Memory\
Stick/DCIM/100MSDCF/DSC00011.JPG -rw-r--r-- 1 sander users 334274
1970-01-01 02:59 /mnt/bluetooth/Memory Stick/DCIM/100MSDCF/DSC00011.JPG

Well, too bad then. Guess I'll have to make an app for my phone that
sorts the photos by itself for right downloading.

Thanks for answering and let me know if you have any other ideas.

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
Petit Eric | 1 Dec 21:31 2007
Picon

Re: Get only a part of a file with obex

2007/12/1, Yogiz <yogizz <at> gmail.com>:
> > The OBEX protocol doesn't feature selecting a file offset. So no,
> > this is not possible. However, is your file time problem related to
> > obexfs or your phone?
> I suspect that my phone (SonyEricsson W810i) just doesn't have a saner
> way of timestamping photos. When I saw that obexfs showed ancient
> timestamps I checked them from phone and they were right. So I looked
> around and found them inside the jpg file hexdump. Obexfs says all the
> files on the phone have same date:
>
> sander <at> gabriel:~$ ls -l /mnt/bluetooth/Memory\
> Stick/DCIM/100MSDCF/DSC00011.JPG -rw-r--r-- 1 sander users 334274
> 1970-01-01 02:59 /mnt/bluetooth/Memory Stick/DCIM/100MSDCF/DSC00011.JPG
>
> Well, too bad then. Guess I'll have to make an app for my phone that
> sorts the photos by itself for right downloading.
I'm not sur to understand everything correctly, but either write a
tool, do you try Cs-ObexFtp ?
http://sourceforge.net/projects/cs-obexftp/
>
> Thanks for answering and let me know if you have any other ideas.
>
> -------------------------------------------------------------------------
> SF.Net email is sponsored by: The Future of Linux Business White Paper
> from Novell.  From the desktop to the data center, Linux is going
> mainstream.  Let it simplify your IT future.
> http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
> _______________________________________________
> Openobex-users mailing list
> Openobex-users <at> lists.sourceforge.net
(Continue reading)

Hendrik Sattler | 1 Dec 21:41 2007
Picon

Re: Get only a part of a file with obex

Am Samstag 01 Dezember 2007 schrieb Yogiz:
> > The OBEX protocol doesn't feature selecting a file offset. So no,
> > this is not possible. However, is your file time problem related to
> > obexfs or your phone?
>
> I suspect that my phone (SonyEricsson W810i) just doesn't have a saner
> way of timestamping photos. When I saw that obexfs showed ancient
> timestamps I checked them from phone and they were right. So I looked
> around and found them inside the jpg file hexdump. Obexfs says all the
> files on the phone have same date:
>
> sander <at> gabriel:~$ ls -l /mnt/bluetooth/Memory\
> Stick/DCIM/100MSDCF/DSC00011.JPG -rw-r--r-- 1 sander users 334274
> 1970-01-01 02:59 /mnt/bluetooth/Memory Stick/DCIM/100MSDCF/DSC00011.JPG
>
> Well, too bad then. Guess I'll have to make an app for my phone that
> sorts the photos by itself for right downloading.
>
> Thanks for answering and let me know if you have any other ideas.

Try obexftp program directly. It gives you the raw XML data listing that may 
or may not have time values. Check that.

HS

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
(Continue reading)

Christian W. Zuckschwerdt | 2 Dec 00:47 2007

Re: Get only a part of a file with obex

Hi Yogiz,

can you get a directory listing of your pictures (just a few entries, i
need to check the XML output) with obexftp and send it to me?

regards,
Christian

Yogiz schrieb:
> could get reliable timestamps from the end of jpg images without having
> to download all the file for it (obexfs gives bogus timestamps).

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
Yogiz | 2 Dec 01:00 2007
Picon

Re: Get only a part of a file with obex

>I'm not sur to understand everything correctly, but either write a
>tool, do you try Cs-ObexFtp ?
What I need, is to get a small part of the jpg where I could extract
the timestamps. Haven't tried Cs-ObexFtp, you think it would help me in
any way?

>Try obexftp program directly. It gives you the raw XML data listing
>that may or may not have time values. Check that.
&
> can you get a directory listing of your pictures (just a few entries,
> i need to check the XML output) with obexftp and send it to me?
sander <at> gabriel:~$ obexftp -b 00:16:B8:49:CB:51 -v -l "/Memory Stick/DCIM/100MSDCF"
Browsing 00:16:B8:49:CB:51 ...
Channel: 7
Connecting...done
Receiving "/Memory Stick/DCIM/100MSDCF"... Sending ""... Sending "Memory Stick"... Sending
"DCIM"... done
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE folder-listing SYSTEM "obex-folder-listing.dtd">
<!--
 XML Coder, (C) 2001 Sony Ericsson Mobile Communications AB 
-->
<folder-listing version="1.0"><parent-folder/>
<file name="DSC00011.JPG" size="334274"/>
<file name="DSC00012.JPG" size="503223"/>
</folder-listing>
done
Disconnecting...done

No timestamps as you might see. Thanks for your replies.
(Continue reading)

Petit Eric | 2 Dec 02:00 2007
Picon

Re: Get only a part of a file with obex

2007/12/2, Yogiz <yogizz <at> gmail.com>:
> >I'm not sur to understand everything correctly, but either write a
> >tool, do you try Cs-ObexFtp ?
> What I need, is to get a small part of the jpg where I could extract
> the timestamps. Haven't tried Cs-ObexFtp, you think it would help me in
> any way?
>
> >Try obexftp program directly. It gives you the raw XML data listing
> >that may or may not have time values. Check that.
> &
> > can you get a directory listing of your pictures (just a few entries,
> > i need to check the XML output) with obexftp and send it to me?
> sander <at> gabriel:~$ obexftp -b 00:16:B8:49:CB:51 -v -l "/Memory Stick/DCIM/100MSDCF"
> Browsing 00:16:B8:49:CB:51 ...
> Channel: 7
> Connecting...done
> Receiving "/Memory Stick/DCIM/100MSDCF"... Sending ""... Sending "Memory Stick"... Sending
"DCIM"... done
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE folder-listing SYSTEM "obex-folder-listing.dtd">
> <!--
>  XML Coder, (C) 2001 Sony Ericsson Mobile Communications AB
> -->
> <folder-listing version="1.0"><parent-folder/>
> <file name="DSC00011.JPG" size="334274"/>
That s meen this phone doesn't send the time stamp, only size and name
as we see!
> <file name="DSC00012.JPG" size="503223"/>
> </folder-listing>
> done
(Continue reading)

Hendrik Sattler | 2 Dec 10:42 2007
Picon

Re: Get only a part of a file with obex

Am Sonntag 02 Dezember 2007 schrieb Yogiz:
> >I'm not sur to understand everything correctly, but either write a
> >tool, do you try Cs-ObexFtp ?
>
> What I need, is to get a small part of the jpg where I could extract
> the timestamps. Haven't tried Cs-ObexFtp, you think it would help me in
> any way?

You mean the EXIF information, I assume. No, Cs-ObexFtp wouldn't help you on 
this at all.

> >Try obexftp program directly. It gives you the raw XML data listing
> >that may or may not have time values. Check that.
>
> &
>
> > can you get a directory listing of your pictures (just a few entries,
> > i need to check the XML output) with obexftp and send it to me?
>
> sander <at> gabriel:~$ obexftp -b 00:16:B8:49:CB:51 -v -l "/Memory
> Stick/DCIM/100MSDCF" Browsing 00:16:B8:49:CB:51 ...

Isn't that phone also gphoto compatible?
Actually the DCIM standard is supposed to allow only getting new files bases 
on the file name: the number should only increase, so you just have to 
compare the previous highest number and start from there.
See http://en.wikipedia.org/wiki/Design_rule_for_Camera_File_system

HS

(Continue reading)

Petit Eric | 2 Dec 16:18 2007
Picon

time stamp in jpg

I see something who can give you a solution, not very beautifull but
should working, if you open a jpg file download from a Sony Ericson
whit a text editor, at the begining of it you see the time stamp :

ÿØÿá2ExifSony EricssonK750iR1AA008     prgCXC125952_EU_1_CL 4.5
2007:09:09 15:10:04

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4

Gmane