Discussion:
[BitPim-devel] DMv6 Patch
Nathan Hjelm
2008-06-27 18:02:16 UTC
Permalink
After spending some time looking at challenges/responses and assembly
code I can say I have DMv6 about 95% figured out. DMv6 phones respond
to the 0xfe 0x00 command with a 0xfe 0x02 response (as opposed to 0xfe
0x01). The response is then a 0xfe 0x03 command containing an XOR of
the DMv5 response mixed in with random numbers. The random numbers
appear to have an effect on the locations of the key bytes (something
I haven't had a chance to fully investigate) so for now I have hard-
coded some "random" values for which the locations of the XOR bytes
are known.

Attached is the patch to enables DMv6 (which used on the VX-9100 and
newer Verizon LG phones). I have verified that the changes do no
interfere with the DMv5 code and that the code does indeed appear to
work with the VX-9100.
Aaron G. Stemen
2008-06-28 00:59:02 UTC
Permalink
In addition to Nathan's patch, here is a patch adding the VX9100. Most
of the items worked out of the box, but I had to make a change for the
phone book that will need to be tested well.

I had to change the getphonebook() method in the com_lgvx8550.py file so
as it iterates through the phone entries, it stops after the Nth entry
based on the maximum number of phone book entries for the
protocolclass. The error seems to be caused by an extraneous entry at
the end of the file enclosed with <HPE></HPE> tags and contains at least
the model name. After making the change, I was able to read and write
the phone book. Unfortunately, I don't have any other LG phones to test
the routine to make sure that the last phone book entry isn't getting
truncated.

I was unable to get SMS reads working. It appears that the SMS messages
may be longer than previous models. The first point of failure is
retrieving the sender. The sender name starts at a later offset in the
index.dat file for the message.

Here is the error message:
20:06:03.341 Exception: BitPim version: trunk-bitpim-developer build
An unexpected exception has occurred.
Please see the help for details on what to do.

Traceback (most recent call last):
File "D:\projects\bitpim\src\gui.py", line 284, in run
res=call()
File "D:\projects\bitpim\src\gui.py", line 159, in __call__
return apply(self.method, self.args+args, d)
File "D:\projects\bitpim\src\gui.py", line 1909, in getdata
i[1](results)
File "D:\projects\bitpim\src\phones\com_lgvx4400.py", line 131, in getsms
result['sms']=self._readsms()
File "D:\projects\bitpim\src\phones\com_lgvx8800.py", line 69, in _readsms
entry=self._getinboxmessage(sf)
File "D:\projects\bitpim\src\phones\com_lgvx4400.py", line 197, in
_getinboxmessage
txt+=self._get_text_from_sms_msg_with_header(sf.msgs[i].msg,
sf.msglengths[i].msglength)
File "D:\projects\bitpim\src\prototypes.py", line 1486, in __getitem__
return self._thelist[index]
IndexError: list index out of range

Variables by last 8 frames, innermost last

Frame run in D:\projects\bitpim\src\gui.py at line 277
resultcb = <gui.Callback instance at 0x04B28648>
res = None
self = <WorkerThread(BitPim helper, started daemon)>
item = (<gui.Request instance at 0x04A730A8>, <gui.Callback
instance at 0x04B28648>)
call = <gui.Request instance at 0x04A730A8>
ex = IndexError('list index out of range',)
e = IndexError('list index out of range',)
first = 0

Frame __call__ in D:\projects\bitpim\src\gui.py at line 159
self = <gui.Request instance at 0x04A730A8>
args = ()
d = Keys []
{}
kwargs = Keys []
{}

Frame getdata in D:\projects\bitpim\src\gui.py at line 1909
count = 1
results = Keys ['canned_msg', 'groups', 'ringtone-index',
'sync', 'uniqueserial', 'wallpaper-index']
{'uniqueserial':
'e7335acee96c9db865b06bd06e4840a026fe4cd2', 'sync': {'sms': 'ME
i = (<bound method GetPhoneDialog.GetSMSSetting of
<guiwidgets.GetPhoneDialog; proxy
self = <WorkerThread(BitPim helper, started daemon)>
req = <guiwidgets.GetPhoneDialog; proxy of <Swig Object of
type 'wxDialog *' at 0x45a6
willcall = [(<bound method GetPhoneDialog.GetSMSSetting of
<guiwidgets.GetPhoneDialog; prox
sync = Keys ['sms']
{'sms': 'MERGE'}
st = 0
todo = [(<bound method WorkerThread.rebootcheck of
<WorkerThread(BitPim helper, started

Frame getsms in D:\projects\bitpim\src\phones\com_lgvx4400.py at line 131
self = <phones.com_lgvx9100.Phone object at 0x06CDEF90>
result = Keys ['canned_msg', 'groups', 'ringtone-index',
'sync', 'uniqueserial', 'wallpaper-index']
{'uniqueserial':
'e7335acee96c9db865b06bd06e4840a026fe4cd2', 'sync': {'sms': 'ME

Frame _readsms in D:\projects\bitpim\src\phones\com_lgvx8800.py at line 69
res = Keys []
{}
self = <phones.com_lgvx9100.Phone object at 0x06CDEF90>
buf = <prototypes.buffer object at 0x06C02FD0>
sf = <phones.p_lgvx8500.sms_in object at 0x06C02D70>
item = <phones.p_lgvx8800.indexentry object at 0x06BF16D0>

Frame _getinboxmessage in D:\projects\bitpim\src\phones\com_lgvx4400.py
at line 197
i = 10
entry = <sms.SMSEntry object at 0x04CD0A90>
self = <phones.com_lgvx9100.Phone object at 0x06CDEF90>
txt =
'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
sf = <phones.p_lgvx8500.sms_in object at 0x06C02D70>

Frame __getitem__ in D:\projects\bitpim\src\prototypes.py at line 1486
index = 10
self = <prototypes.LIST object at 0x06C136F0>


Also, I was unable to get BitPim to read the items from Notepad. I
think these are the "Memo" items, but I'm not sure. There was no error,
it just didn't retrieve anything.

Here is the list of items that I tested and the results:

read file system - ok
write file system - ok
read phone book - ok
write phone book - OK? (the phone resets after writing the phone book
every time)
read calendar - ok
write calendar - ok (the phone seemed to reset randomly. I wasn't able
to reproduce it every time)
read wallpaper - ok
write wallpaper - ok
read ringers - ok
write ringers - ok
read memo - FAILED (I think that this is supposed to read the items from
the Notepad tool, but nothing was displayed.)
write memo - did not test (this may not be an available option for this
phone)
read SMS - FAILED (get sender fails, then an error message follows on the )
write SMS - did not test
read call history - ok
read T9 editor - ok
write T9 editor - ok

Thanks for doing the hard work on this Nathan!

-Aaron
Post by Nathan Hjelm
After spending some time looking at challenges/responses and assembly
code I can say I have DMv6 about 95% figured out. DMv6 phones respond
to the 0xfe 0x00 command with a 0xfe 0x02 response (as opposed to 0xfe
0x01). The response is then a 0xfe 0x03 command containing an XOR of
the DMv5 response mixed in with random numbers. The random numbers
appear to have an effect on the locations of the key bytes (something
I haven't had a chance to fully investigate) so for now I have
hard-coded some "random" values for which the locations of the XOR
bytes are known.
Attached is the patch to enables DMv6 (which used on the VX-9100 and
newer Verizon LG phones). I have verified that the changes do no
interfere with the DMv5 code and that the code does indeed appear to
work with the VX-9100.
-Nathan
------------------------------------------------------------------------
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
------------------------------------------------------------------------
_______________________________________________
BitPim-devel mailing list
https://lists.sourceforge.net/lists/listinfo/bitpim-devel
Loading...