Discussion:
[BitPim-devel] developing for samsung SPH-A900
Aaron Solochek
2006-01-30 22:23:13 UTC
Permalink
I just got an A900, and was told on the bitpim-user list to send a
message here once I got bitpim running from source. I think my python
install is a little screwy, since I have python2.4 and python2.3 stuff
on my debian unstable system, but I installed everything according to
the webpage, and am able to run 0.8.07.

So, if anyone wants me to extract info from this phone somehow, just let
me know.

-Aaron
Stephen Wood
2006-01-31 05:23:22 UTC
Permalink
Post by Aaron Solochek
So, if anyone wants me to extract info from this phone somehow, just let
me know.
Could you make a zipfile of the A900 files system and email it to me
(Privately as it will contain personal data from your phone.)

Also you could try reading the phonebook using the A840 setting. If it
works or partially works, the A840 will be a starting point for A900 code.


Stephen



--
Stephen Wood

One of the "Steves" of Project Steve at http://www.ncseweb.org/.
Aaron Solochek
2006-01-31 16:03:35 UTC
Permalink
Post by Aaron Solochek
So, if anyone wants me to extract info from this phone somehow, just let
me know.
Could you make a zipfile of the A900 files system and email it to me
(Privately as it will contain personal data from your phone.)
Also you could try reading the phonebook using the A840 setting. If it
works or partially works, the A840 will be a starting point for A900 code.
No luck using the 840 setting. Browsing the filesystem I only see one
file, that has no name, is 10124 bytes, and has a timestamp of 06/04/80
02:32:55. I have the protocol log of when it was accessing the
filesystem, and at the bottom of it is the exception dump when I tried
to get the contacts off the phone. Because it's a 3.5MB textfile, I
zipped it and stuck it here:
http://www.aberrant.org/~aarons/a900_protolog.zip

-Aaron
Stephen Wood
2006-01-31 16:54:07 UTC
Permalink
Aaron:

I got your protocol log.

It looks like the A900 has a file system with more than just one file, but
it is getting in some kind of repeating loop trying to crawl the
filesystem. Maybe it uses the new version of the filesystem, which I'll try
to explain how to use.

You should try to make yourself a trial A900 setup in your copy of the
source.

Copy the com_samsungspha840.py and p_samsungspha840.p files to
com_samsungspha900.py and p_samsungspha900.p, and replace all instances os
a840 with a900 in the new files.

When you create p_samsungspha900.p and everytime you change it, you need to
run "python protogen.py" to "recompile" the protocol definitions.

In the .p you made, put the line "BREW_FILE_SYSTEM=2". See p_lgvx8100.p as
an example.

In guiwidgets.py, find where the menu that lets you select which phone you
have and add the A900. You'll be adding a line that looks like "'SPH-A900':
'com_samsungspha900'.

Then when you run, if you select the A900, when you try to browse the file
system, the "new" brew file system code will be used. (Simon, correct me if
I am wrong about this.)

In parallel to file system examining, there are some things to try to do to
read the phonebook.

Copy the routine "getfundamentals" from com_samsungspha620.py in to the
Phone class in your com_samsungspna900.py. Comment out the line where it
tries to read the amsRegistry file. If reading the phonebook crashes
again, try commenting out the that crashes things.

You should look at the various notes in the dev-doc subdirectory of the cvs,
in particular phonspec.html and packetdescription.txt.

Stephen
Aaron Solochek
2006-01-31 17:31:49 UTC
Permalink
Post by Stephen Wood
I got your protocol log.
It looks like the A900 has a file system with more than just one file,
but it is getting in some kind of repeating loop trying to crawl the
filesystem. Maybe it uses the new version of the filesystem, which I'll
try to explain how to use.
You should try to make yourself a trial A900 setup in your copy of the
source.
Copy the com_samsungspha840.py and p_samsungspha840.p files to
com_samsungspha900.py and p_samsungspha900.p, and replace all instances
os a840 with a900 in the new files.
When you create p_samsungspha900.p and everytime you change it, you need
to run "python protogen.py" to "recompile" the protocol definitions.
In the .p you made, put the line "BREW_FILE_SYSTEM=2". See
p_lgvx8100.p as an example.
In guiwidgets.py, find where the menu that lets you select which phone
you have and add the A900. You'll be adding a line that looks like
"'SPH-A900': 'com_samsungspha900'.
Then when you run, if you select the A900, when you try to browse the
file system, the "new" brew file system code will be used. (Simon,
correct me if I am wrong about this.)
Ok, I copied the files, edited them, and ran protogen.py. Browsing the
filesystem still results in some loop.
Post by Stephen Wood
In parallel to file system examining, there are some things to try to do
to read the phonebook.
Copy the routine "getfundamentals" from com_samsungspha620.py in to the
Phone class in your com_samsungspna900.py. Comment out the line where
it tries to read the amsRegistry file. If reading the phonebook
crashes again, try commenting out the that crashes things.
I commented out the line "self.amsanalyze(results)" and now there is no
crash, but there is an error that the phone isn't responding when trying
to manipulate the address book. The protocol log shows that it doesn't
seem to like this AT command:

11:21:52.588 /dev/ttyACM0: Writing Data - 12 bytes
00000000 41 54 23 50 4d 4f 44 45 3d 31 0d 0a AT#PMODE=1..

11:21:52.604 /dev/ttyACM0: Reading remaining data Data - 4 bytes
00000000 4f 4b 0d 0a OK..

11:21:52.605 SPH-A900: Now in phonebook mode
11:21:52.605 SPH-A900: Now in phonebook mode
11:21:52.605 SPH-A900: Samsung phonebook request Data - 8 bytes
<#! p_samsung_packet.phonebookslotrequest !#>
00000000 23 50 42 4f 4b 52 3d 31 #PBOKR=1

11:21:52.605 /dev/ttyACM0: Writing Data - 12 bytes
00000000 41 54 23 50 42 4f 4b 52 3d 31 0d 0a AT#PBOKR=1..

11:21:52.623 /dev/ttyACM0: Reading remaining data Data - 7 bytes
00000000 45 52 52 4f 52 0d 0a ERROR..

11:21:52.627 Error: Device needs attention - SPH-A900 on /dev/ttyACM0
SPH-A900 on /dev/ttyACM0: The phone is not responding while manipulating
the phonebook.
Post by Stephen Wood
You should look at the various notes in the dev-doc subdirectory of the
cvs, in particular phonspec.html and packetdescription.txt.
Stephen
!DSPAM:43df968a12899273420090!
Stephen Wood
2006-01-31 17:53:51 UTC
Permalink
Post by Aaron Solochek
11:21:52.588 /dev/ttyACM0: Writing Data - 12 bytes
00000000 41 54 23 50 4d 4f 44 45 3d 31 0d 0a AT#PMODE=1..
11:21:52.604 /dev/ttyACM0: Reading remaining data Data - 4 bytes
Post by Aaron Solochek
00000000 4f 4b 0d 0a OK..
The phone went into "Phonebook mode"

AT#PBOKR=1..
Post by Aaron Solochek
11:21:52.623 /dev/ttyACM0: Reading remaining data Data - 7 bytes
00000000 45 52 52 4f 52 0d 0a ERROR..
But it didn't like the command for reading a phonebook entry.

Try talking to your phone with kermit or other terminal emulation program.
Put the phone into phonebook mode with "AT#PMODE=1" and experiment with
various commands. Look in dev-doc/samsungnotes.txt for examples of commands
to try.

One thing to try is "AT#PBOKR=?" which should show how many phonebook
entries the phone can hold.


I'll look at your protocol log dump in more detail tonight to see if I have
any ideas.

Stephen


--
Stephen Wood

One of the "Steves" of Project Steve at http://www.ncseweb.org/.
Aaron Solochek
2006-01-31 18:25:40 UTC
Permalink
Post by Stephen Wood
Try talking to your phone with kermit or other terminal emulation program.
Put the phone into phonebook mode with "AT#PMODE=1" and experiment with
various commands. Look in dev-doc/samsungnotes.txt for examples of
commands to try.
I actually had already tried that -- the phone doesn't seem to
understand most commands. Aside from the hayes-compatible stuff, I
could only find 3 commands that it understood, at#pmode, at#pclnk (which
is set to 0, and cannot be set to 1), and at#pcout (which is set to 1,
and cannot be set to 0). None of the other at# commands work.
Post by Stephen Wood
One thing to try is "AT#PBOKR=?" which should show how many phonebook
entries the phone can hold.
Nope.
Post by Stephen Wood
I'll look at your protocol log dump in more detail tonight to see if I
have any ideas.
Stephen
I think I should probably run a script that spams the phone with at
commands and records the valid ones, unless someone knows a better way
of finding the commandset this phone uses.

-Aaron
Stephen Wood
2006-01-31 19:16:55 UTC
Permalink
Post by Aaron Solochek
...
I actually had already tried that -- the phone doesn't seem to
understand most commands. Aside from the hayes-compatible stuff, I
could only find 3 commands that it understood, at#pmode, at#pclnk (which
is set to 0, and cannot be set to 1), and at#pcout (which is set to 1,
and cannot be set to 0). None of the other at# commands work.
Bummer.
Post by Aaron Solochek
I think I should probably run a script that spams the phone with at
commands and records the valid ones, unless someone knows a better way
of finding the commandset this phone uses.
Search the source code sendatcommand to see how it is used. You could call
sendatcommand in a loop over whatever commands you want. Put in in in your
getfundamentals and then try getting the phonebook with protocol logging on.

I would avoid commands that end in "W" as that is what most write commands
end with on other Samsung phones.

Stephen

Loading...