Discussion:
[Bitpim-devel] bitpim with non-supported phones
DanW
2004-05-24 16:56:39 UTC
Permalink
I finally had a chance to view the data from my phone in the protocol analyzer.

bitpim 7 betas seem to accurately read the folder names, but not the file names.


Here is the partial information from the Protocol Log screen:

11:41:46.479 Other CDMA Phone: Listing dir 'user/mypictures'

11:41:46.709 Other CDMA Phone: brew response Data - 51 bytes
<#! p_brew.listfileresponse !#>
00000000 59 0b 00 01 00 00 00 01 ff 00 01 00 56 23 af 2d Y...........V#.-
00000010 35 17 00 00 00 18 00 00 10 19 75 73 65 72 2f 6d 5.........user/m
00000020 79 70 69 63 74 75 72 65 73 2f 42 6d 70 30 31 2e ypictures/Bmp01.
00000030 70 6e 67 png

11:41:46.719 Other CDMA Phone: brew request Data - 23 bytes
<#! p_brew.listfilerequest !#>
00000000 59 0b 02 00 00 00 10 75 73 65 72 2f 6d 79 70 69 Y......user/mypi
00000010 63 74 75 72 65 73 00 ctures.

11:41:46.759 Other CDMA Phone: brew response Data - 51 bytes
<#! p_brew.listfileresponse !#>
00000000 59 0b 00 02 00 00 00 01 ff 00 01 00 bc 25 af 2d Y............%.-
00000010 db 2a 00 00 00 2c 00 00 10 19 75 73 65 72 2f 6d *...,....user/m
00000020 79 70 69 63 74 75 72 65 73 2f 42 6d 70 30 33 2e ypictures/Bmp03.
00000030 70 6e 67 png

11:41:46.759 Other CDMA Phone: brew request Data - 23 bytes
<#! p_brew.listfilerequest !#>
00000000 59 0b 03 00 00 00 10 75 73 65 72 2f 6d 79 70 69 Y......user/mypi
00000010 63 74 75 72 65 73 00 ctures.

11:41:46.789 Other CDMA Phone: brew response Data - 51 bytes
<#! p_brew.listfileresponse !#>
00000000 59 0b 00 03 00 00 00 01 ff 00 01 00 f6 2b af 2d Y............+.-
00000010 d9 3d 00 00 00 40 00 00 10 19 75 73 65 72 2f 6d =***@....user/m
00000020 79 70 69 63 74 75 72 65 73 2f 42 6d 70 30 32 2e ypictures/Bmp02.
00000030 70 6e 67 png



Here is some sample data from the Protocol Analyzer:

p_brew.listfileresponse
responseheader header: <p_brew.responseheader>
UINTlsb commandmode: 89 0x59
UINTlsb command: 11 0xb
UINTlsb errorcode: 0 0x0
UINTlsb entrynumber: 2 0x0
UNKNOWN unknown1: '\x01\xff\x00\x01'
UINTlsb date: -1356481536 0xaf25bc00
UINTlsb size: 2808621 0x2adb2d
UNKNOWN unknown2: '\x00\x00,\x00\x00'
STRING filename: '\x19user/mypictures'

00000000 59 0B 00 02 00 00 00 01 FF 00 01 00 BC 25 AF 2D Y............%.-
00000010 DB 2A 00 00 00 2C 00 00 10 19 75 73 65 72 2F 6D *...,....user/m
00000020 79 70 69 63 74 75 72 65 73 2F 42 6D 70 30 33 2E ypictures/Bmp03.
00000030 70 6E 67 png

It would appear to me that the data from the newer Kyocera phones is stored a bit differently from the other phones that are supported by bitpim, but I am not that familiar with the code, so I could easily be wrong. I wonder if anyone more familiar with the file system code could easily make a modification to support these phones?

Dan
Roger Binns
2004-05-24 23:59:40 UTC
Permalink
Post by DanW
It would appear to me that the data from the newer Kyocera phones is
stored a bit differently from the other phones that are
supported by bitpim, but I am not that familiar with the code, so I could
easily be wrong. I wonder if anyone more familiar with
the file system code could easily make a modification to support these phones?
For some reason the 'unknown2' field is one byte longer. Or the name
has one more prefix byte depending on how you view it.

I am working on some code that should work for all phones. Please can you
post what protocol you get for listing files in the root directory.
Post by DanW
p_brew.listfileresponse
responseheader header: <p_brew.responseheader>
UINTlsb commandmode: 89 0x59
UINTlsb command: 11 0xb
UINTlsb errorcode: 0 0x0
UINTlsb entrynumber: 2 0x0
UNKNOWN unknown1: '\x01\xff\x00\x01'
UINTlsb date: -1356481536 0xaf25bc00
UINTlsb size: 2808621 0x2adb2d
UNKNOWN unknown2: '\x00\x00,\x00\x00'
STRING filename: '\x19user/mypictures'
Did you type that all in by hand?

Roger
Dale
2004-05-25 14:37:45 UTC
Permalink
Hi Roger, I was wondering if you are still going to work on the the code for
the 4600 or are you going to wait until you can get the phone from RPI?
Roger Binns
2004-05-25 17:31:11 UTC
Permalink
Post by Dale
Hi Roger, I was wondering if you are still going to work on the the code for
the 4600 or are you going to wait until you can get the phone from RPI?
It is going to take a while to get a phone via RPI.

I am prepared to do more, but you have to tell me what works and what
doesn't, and thoroughly test everything.

Roger
DanW
2004-05-25 17:29:05 UTC
Permalink
Yes, I did re-type that section of data, since copy/paste isn't available.

I'm not sure where I'm looking for protocol, so I'll just attach the
Roger Binns
2004-05-25 17:37:29 UTC
Permalink
Post by DanW
Yes, I did re-type that section of data, since copy/paste isn't available.
Ouch :-) Of course anyone is welcome to implement copy and paste :-)
Post by DanW
I'm not sure where I'm looking for protocol, so I'll just attach the
entire log and protocol log result from accessing the root
of the phone.
That had the information I needed. I am trying to write the code so
that it automatically works wether the extra byte is present or not.
It i quite hairy stuff.

Can you please get a developer version of BitPim up and running
so you can test my changes?

Also, try saving a file to phone and see if that works. We
need to verify that this is the only place they have gratioutously
changed the protocol.

Roger
Dale
2004-05-25 19:44:57 UTC
Permalink
Ok, works for me.

I was able to download a contact off the phone and was waiting to here back
from you when I could try and upload to it.

-----Original Message-----
From: bitpim-devel-***@lists.sourceforge.net
[mailto:bitpim-devel-***@lists.sourceforge.net] On Behalf Of Roger Binns
Sent: Tuesday, May 25, 2004 10:31 AM
To: bitpim-***@lists.sourceforge.net
Subject: Re: [Bitpim-devel] LG 4600 phone
Post by Dale
Hi Roger, I was wondering if you are still going to work on the the
code for the 4600 or are you going to wait until you can get the phone
from RPI?

It is going to take a while to get a phone via RPI.

I am prepared to do more, but you have to tell me what works and what
doesn't, and thoroughly test everything.

Roger


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest
thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
Roger Binns
2004-05-26 08:26:18 UTC
Permalink
Post by Dale
I was able to download a contact off the phone and was waiting to here back
from you when I could try and upload to it.
I need the following from you:

- Thorough confirmation that wallpaper and ringtone uploading and downloading
work. You need to verify the various files match expectations and that
the phone is happy with them, including deleting various ones and
adding more.

- I need the offset numbers for the phonebook. I detailed these in a previous
message (the number added to the index number in the wallpaper/ringtone desc
file when it is used in the phonebook).

I won't attempt the upload code until I am certain every byte of the download
code is correct. You should look at the decoding in the protocol log pane
and change one thing in an entry and verify that the right thing is happening
on the next read.

The following fields are all two bytes on your J2ME phone, but one byte
on the brew phone. That is currently my best guess and you need to work
out if that is correct or not.

- group
- ringtone
- wallpaper

Roger
DanW
2004-05-25 21:10:02 UTC
Permalink
I downloaded 0.7-test11 and successfully copied a file to the phone. I was able to set the image as my background.

I setup the development environment a couple of months ago. I'm not familiar with these tools, but I'm more than willing to give it a try.

Dan
Roger Binns
2004-05-26 08:14:15 UTC
Permalink
Post by DanW
I downloaded 0.7-test11 and successfully copied a file to the phone.
I was able to set the image as my background.
That is good since it means they have changed the protocol anywhere
else.

BTW what is your phone model again?
Post by DanW
I setup the development environment a couple of months ago. I'm
not familiar with these tools, but I'm more than willing to give
it a try.
You should just be able to do a CVS update and then run the
code.

I have just committed some code that automagically works out if
that spurious zero is there. I have tested it against my own
phones, as well as against your protocol traces and all is fine.

For everyone else, the change only affects parsing the filenames
when reading directory entries. Do look out for errors, such
as characters being chopped off, or extra ones present.

Roger
Dale
2004-08-23 20:30:34 UTC
Permalink
Hey Roger, is this still all that is needed to finish the 4600 code?

-----Original Message-----
From: bitpim-devel-***@lists.sourceforge.net
[mailto:bitpim-devel-***@lists.sourceforge.net] On Behalf Of Roger Binns
Sent: Wednesday, May 26, 2004 1:26 AM
To: bitpim-***@lists.sourceforge.net
Subject: Re: [Bitpim-devel] LG 4600 phone
Post by Dale
I was able to download a contact off the phone and was waiting to here
back from you when I could try and upload to it.
I need the following from you:

- Thorough confirmation that wallpaper and ringtone uploading and
downloading
work. You need to verify the various files match expectations and that
the phone is happy with them, including deleting various ones and
adding more.

- I need the offset numbers for the phonebook. I detailed these in a
previous
message (the number added to the index number in the wallpaper/ringtone
desc
file when it is used in the phonebook).

I won't attempt the upload code until I am certain every byte of the
download code is correct. You should look at the decoding in the protocol
log pane and change one thing in an entry and verify that the right thing is
happening on the next read.

The following fields are all two bytes on your J2ME phone, but one byte on
the brew phone. That is currently my best guess and you need to work out if
that is correct or not.

- group
- ringtone
- wallpaper

Roger


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest
thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
Roger Binns
2004-08-23 21:36:17 UTC
Permalink
Post by Dale
Hey Roger, is this still all that is needed to finish the 4600 code?
Those are the things that need to be addressed for the Telus (J2ME)
one. There will probably be other details as well, but those are
major details.

Roger
Dale
2004-08-24 14:43:32 UTC
Permalink
What version of python do I need to compile the new version of the code? I
was using python22

-----Original Message-----
From: bitpim-devel-***@lists.sourceforge.net
[mailto:bitpim-devel-***@lists.sourceforge.net] On Behalf Of Roger Binns
Sent: Monday, August 23, 2004 2:36 PM
To: bitpim-***@lists.sourceforge.net
Subject: Re: [Bitpim-devel] LG 4600 phone
Post by Dale
Hey Roger, is this still all that is needed to finish the 4600 code?
Those are the things that need to be addressed for the Telus (J2ME) one.
There will probably be other details as well, but those are major details.

Roger


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk
Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off
Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
Roger Binns
2004-09-09 05:30:47 UTC
Permalink
Post by Dale
What version of python do I need to compile the new version of the
code? I was using python22
2.3

http://bitpim.org/developer.html

Roger

Dale
2004-08-25 15:28:57 UTC
Permalink
I tested the downloading of wallpapers and ringtones and they both work,
they come off the phone fine. The problem arises when trying to add a new
wallpaper. First off, when I add a new wallpaper and send it up to the phone
it creates the directory correctly under usr/wallpaper/xxxx and sends the
two files it needs: .desc, body the problem is when I look in the .desc file
in a hex editor column 8 needs to be set with the correct index. For example
if I added a new wallpaper and it number 5, when I look in the .desc file
under column 8 row 1 it should say 05. here is a screen shot







roger > I need the following from you:

- Thorough confirmation that wallpaper and ringtone uploading and
downloading
work. You need to verify the various files match expectations and that
the phone is happy with them, including deleting various ones and
adding more.
Roger Binns
2004-08-25 23:06:20 UTC
Permalink
the problem is when I look in the .desc file in a hex editor column
8 needs to be set with the correct index.
It *is* set. Look at every single wallpaper/ringtone and you
will find they all set a number. The numbering starts at zero.
For new items you add, the first free number is used.

Roger
Dale
2004-08-26 13:59:53 UTC
Permalink
Well then the problem is it isn't setting the correct number, I already had
four wallpapers on the phone and when
I added the fifth it set the number to 00.


-----Original Message-----
From: bitpim-devel-***@lists.sourceforge.net
[mailto:bitpim-devel-***@lists.sourceforge.net] On Behalf Of Roger Binns
Sent: Wednesday, August 25, 2004 4:06 PM
To: bitpim-***@lists.sourceforge.net
Subject: Re: [Bitpim-devel] LG4600(telus) results of upload wallpaper
the problem is when I look in the .desc file in a hex editor column
8 needs to be set with the correct index.
It *is* set. Look at every single wallpaper/ringtone and you will find they
all set a number. The numbering starts at zero.
For new items you add, the first free number is used.

Roger


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk
Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off
Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
Roger Binns
2004-08-26 20:08:32 UTC
Permalink
Post by Dale
I added the fifth it set the number to 00.
You are counting from one. BitPim and computers and phones count from
zero. Add a sixth image and you will see.

Roger
Dale
2004-08-26 14:21:52 UTC
Permalink
Hey Roger, disregard last message, the problem doesn't have to do with the
index, it has to do with the body file size and that any picture I import
comes in as bmp even if it was a jpg or png. I am trying to get you some
more information on the difference.
Dale
2004-08-26 14:37:59 UTC
Permalink
Hey Roger, I did somemore digging and found out that when you import the jpg
file into bitpim for some reason it changes it to bmp and the size of the
file changes. I have included in a zip file a working copy of the image file
and the same file that was imported in through bitpim, I also included the
image I used. Hope this helps.
Roger Binns
2004-08-26 20:07:47 UTC
Permalink
Post by Dale
Hey Roger, I did somemore digging and found out that when you import
the jpg file into bitpim for some reason it changes it to bmp and the
size of the file changes. I have included in a zip file a working
copy of the image file and the same file that was imported in through
bitpim, I also included the image I used. Hope this helps.
Not really. BitPim converts all images to the best supported
format for each phone, as well as resizing it to fit the phone
if the image isn't within 20% of the phone screen size.

The vx4600 code currently looks like this:

WALLPAPER_WIDTH=120
WALLPAPER_HEIGHT=131
MAX_WALLPAPER_BASENAME_LENGTH=19
WALLPAPER_FILENAME_CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwyz0123456789 ."
WALLPAPER_CONVERT_FORMAT="bmp"

MAX_RINGTONE_BASENAME_LENGTH=19
RINGTONE_FILENAME_CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwyz0123456789 ."

If you are absolutely sure that jpg works fine, I can change the format to
jpg. You need to thoroughly test. For example the VX6000 looks like it
supports jpeg, and will even preview jpeg images, but setting the wallpaper
to a jpg results in a blank screen.

As for the size, your image is 120x160. The LG phones have two image
sizes. One is for the startup and shutdown screens, which are full
screen and 120x160. The other size is when used as wallpaper/pictureid
and the screen has menus and stuff at the top and bottom. Most recent
LG models use 120x131 for that. If you select a full screen wallpaper
for the latter then the phone crops out 23% of the image.

BitPim currently only allows for one image size. I picked the main screen/
wallpaper/pictureid size since that is what is in use most often by a
large majority.

The code will be changing soon so that a phone specific function is called
which will return what to do. In the case of LG phones, if an image is
120x131 or 120x160 it will be left alone. Only ones not within a reasonable
range of either of those sizes will be resized.

Note that this is the least important of the information needed to complete
support of the phone. I still don't know fundamental things like how many
bytes some fields are etc.

Roger
Dale
2004-08-26 20:54:35 UTC
Permalink
Which data do you need that is more relevant, I will focus my testing on
that. If you could explain to me how I might test things would help.

-----Original Message-----
From: bitpim-devel-***@lists.sourceforge.net
[mailto:bitpim-devel-***@lists.sourceforge.net] On Behalf Of Roger Binns
Sent: Thursday, August 26, 2004 1:08 PM
To: bitpim-***@lists.sourceforge.net
Subject: Re: [Bitpim-devel] LG4600(telus) results of upload wallpaper
Post by Dale
Hey Roger, I did somemore digging and found out that when you import
the jpg file into bitpim for some reason it changes it to bmp and the
size of the file changes. I have included in a zip file a working copy
of the image file and the same file that was imported in through
bitpim, I also included the image I used. Hope this helps.
Not really. BitPim converts all images to the best supported format for
each phone, as well as resizing it to fit the phone if the image isn't
within 20% of the phone screen size.

The vx4600 code currently looks like this:

WALLPAPER_WIDTH=120
WALLPAPER_HEIGHT=131
MAX_WALLPAPER_BASENAME_LENGTH=19
WALLPAPER_FILENAME_CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwy
z0123456789 ."
WALLPAPER_CONVERT_FORMAT="bmp"

MAX_RINGTONE_BASENAME_LENGTH=19
RINGTONE_FILENAME_CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwyz
0123456789 ."

If you are absolutely sure that jpg works fine, I can change the format to
jpg. You need to thoroughly test. For example the VX6000 looks like it
supports jpeg, and will even preview jpeg images, but setting the wallpaper
to a jpg results in a blank screen.

As for the size, your image is 120x160. The LG phones have two image sizes.
One is for the startup and shutdown screens, which are full screen and
120x160. The other size is when used as wallpaper/pictureid and the screen
has menus and stuff at the top and bottom. Most recent LG models use
120x131 for that. If you select a full screen wallpaper for the latter then
the phone crops out 23% of the image.

BitPim currently only allows for one image size. I picked the main screen/
wallpaper/pictureid size since that is what is in use most often by a large
majority.

The code will be changing soon so that a phone specific function is called
which will return what to do. In the case of LG phones, if an image is
120x131 or 120x160 it will be left alone. Only ones not within a reasonable
range of either of those sizes will be resized.

Note that this is the least important of the information needed to complete
support of the phone. I still don't know fundamental things like how many
bytes some fields are etc.

Roger


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk
Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off
Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
Roger Binns
2004-08-26 21:22:40 UTC
Permalink
Post by Dale
Which data do you need that is more relevant, I will focus my testing
on that. If you could explain to me how I might test things would
help.
I did explain it all in several previous messages :-)

It involved various fields I highlighted and verifying that they were
the correct size, and had the right effects. For example I guessed
that the wallpaper and ringtone indices in the phonebook entries
are two bytes, but they may be one byte. I also need the offsets
to distinguish between builtin and downloaded wallpapers/ringtones.

Roger
Dale
2004-08-27 14:45:27 UTC
Permalink
I am not sure how to test if the phonebook entries are two bytes or one
maybe you could explain that.

The offset to distinguish between builtin and downloaded wallpapers is 10. I
picked a wallpaper that had 05 in the .desc file for the index and then when
I looked in protocal logger at the entry where I picked that wallpaper it
had 15 for the number.

Dale



Roger wrote>>
Post by Roger Binns
I did explain it all in several previous messages :-)
It involved various fields I highlighted and verifying that they were the
correct size, and had the right effects. For example I guessed that the
wallpaper and ringtone indices in the phonebook entries are two bytes, but
they may be one byte. I also need the offsets to distinguish between
builtin and downloadedwallpapers/ringtones.
Roger Binns
2004-08-27 22:57:32 UTC
Permalink
Post by Dale
I am not sure how to test if the phonebook entries are two bytes or
one maybe you could explain that.
Try to see if you can get the second byte to change by changing all
other settings on the phonebook entry. For example the second
byte may be the private flag, but you can't tell unless you have made
the entry private.

Also see if you can find somewhere what the limit is for the number
of ringtones/wallpapers. If it is more than or close to 250
then the field must be two bytes.

Other than that, it is blind guessing and intuition.
Post by Dale
The offset to distinguish between builtin and downloaded wallpapers
is 10. I picked a wallpaper that had 05 in the .desc file for the
index and then when I looked in protocal logger at the entry where I
picked that wallpaper it had 15 for the number.
I assume that is 10 decimal (as opposed to 10 hex which is 16 decimal).
The code is currently using 30 for both ringtones and wallpaper.
There are 10 builtin wallpapers listed as well as no wallpaper
which means that the numbers 0 thru 10 are already in use
which conflicts with the 10 decimal you report.

You'll need to work out the number for ringtones as well.

Roger
Loading...