RE: updated code for the LG PM325

"Baltz, Philip" <[email protected]>
Newsgroups gmane.comp.mobile.bitpim.devel
Message-ID <[email protected]>
>Here is the updated code for the LG PM325 phone.  It currently supports
reading and writing of
>the phonebook.  I have cleaned up the code quite a bit from the
previous version by removing 
>a lot of unused and untested code.
	 
>The biggest problem right now is that the phone it is not currently
being auto-detected.  If I 
>set brew_required=True the phone is not detected at all.  If I set it
to false, the phone is 
>detected , but on the modem port instead.
	 
>Can I get this code checked in?  Does anyone have time to do some
testing and let me know how 
>it works for you?
>	 
>	Thanks,
>	 
>	Brent Roettger 

 
I tried bitpim 8.0.4 developer release on my LG 325.   I was able to
download phonebook data from the phone.  I added a new entry and then
tried to upload the phonebook.  The only option available was to replace
all data instead of just the new entry.  The update started and received
the below exception.  This garbled my phonebook: deleting some entries
and mixing data from others.
	 
-phil
	 
	An unexpected exception has occurred.
	Please see the help for details on what to do.
	 
	Traceback (most recent call last):
	  File "C:\projects\bitpim\gui.py", line 174, in run
	    res=call()
	  File "C:\projects\bitpim\gui.py", line 114, in __call__
	    return apply(self.method, self.args+args, d)
	  File "C:\projects\bitpim\gui.py", line 1681, in senddata
	    apply(func, args)
	  File "C:\projects\bitpim\gui.py", line 1698, in writephonebook
	    return self.commphone.savephonebook(data)
	  File "C:\projects\bitpim\com_lgpm325.py", line 357, in
savephonebook
	    res=self.sendpbcommand(req,
self.protocolclass.pbupdateentryresponse)
	  File "C:\projects\bitpim\com_lg.py", line 121, in
sendpbcommand
	    raise common.CommsDataCorruption("LG packet failed CRC
check", self.desc)
	CommsDataCorruption: LG LX325/PM325: LG packet failed CRC check
	 
	Variables by last 8 frames, innermost last
	 
	Frame __bootstrap in C:\Program Files\Python23\lib\threading.py
at line 442
	           self =  <WorkerThread(BitPim helper, started daemon)>
	 
	Frame run in C:\projects\bitpim\gui.py at line 167
	              e =  <common.CommsDataCorruption instance at
0x03425490>
	            res =  None
	           self =  <WorkerThread(BitPim helper, started daemon)>
	           item =  (<gui.Request instance at 0x03425850>,
<gui.Callback instance at 0x034257D8>)
	           call =  <gui.Request instance at 0x03425850>
	             ex =  <common.CommsDataCorruption instance at
0x03425490>
	       resultcb =  <gui.Callback instance at 0x034257D8>
	          first =  0
	 
	Frame __call__ in C:\projects\bitpim\gui.py at line 114
	           self =  <gui.Request instance at 0x03425850>
	           args =  ()
	              d =  Keys []
	                   {}
	         kwargs =  Keys []
	                   {}
	 
	Frame senddata in C:\projects\bitpim\gui.py at line 1681
	          count =  0
	           self =  <WorkerThread(BitPim helper, started daemon)>
	           args =  [{'phonebook':
{'c65411d061100e8af992c98194158271f1759cda': {'serial1': 27, 'gro
	             xx =  (<bound method WorkerThread.writephonebook of
<WorkerThread(BitPim helper, start
	           dict =  Keys ['categories', 'groups', 'phonebook',
'ringtone-index', 'speeddials', 'uniqueserial', 'wallpaper-index']
	                   {'phonebook':
{'c65411d061100e8af992c98194158271f1759cda': {'serial1': 27, 'grou
	           func =  <bound method WorkerThread.writephonebook of
<WorkerThread(BitPim helper, starte
	           todo =  [(<bound method WorkerThread.writephonebook
of <WorkerThread(BitPim helper, star
	           desc =  'Phonebook'
	 
	Frame writephonebook in C:\projects\bitpim\gui.py at line 1698
	           self =  <WorkerThread(BitPim helper, started daemon)>
	           data =  Keys ['categories', 'groups', 'phonebook',
'ringtone-index', 'speeddials', 'uniqueserial', 'wallpaper-index']
	                   {'phonebook':
{'c65411d061100e8af992c98194158271f1759cda': {'serial1': 27, 'grou
	 
	Frame savephonebook in C:\projects\bitpim\com_lgpm325.py at line
357
	  existingpbook =  Keys [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]
	                   {0: {'serial1': 22, 'number': 22, 'name':
'Zoran Nikolic'}, 1: {'serial1': 21, '
	          pbook =  Keys
['031d519a3fcfa4c740afb7d3f688bdb87f1d32d7',
'207e7340bf9c645b5a5acc861e4bd0e2bf4926f8',
'27b1c360e0cfcfdca4ec41ca1ab36f75ef25b446',
'2b5304d0c999368a6a385c129caf6c3cacf3bd2b',
'3013ca64c889dbfe143ce2415236e7a506e88642',
'45b3bd08ba9ada59811bd0c58a350da9dac0b4bb',
'4b206ec53190004b34c5ac4942f1e00202c1f86b',
'53874d0de67d68d0eee10be43a5461bd1d422c01',
'54bc3132fdd2a9a5ac90fc13ba319ef13d34fe25',
'59d2e8d89ac1366de720a09adf39454b9ad6c6b8',
'5f664f22ac095cfb2dd882050820c06332f543b5',
'74596931fdfd93a05ae6c175e3f514bc368b841a',
'748f2166908cd438f37f99c77cd4325ce83a8ff9',
'7ae337e9a66c17b103171b838b9b79d99ebabfbf',
'7f9ce6e2f5370694adb48106a06126c4417612eb',
'8715f40904c608d0e267f715b57ae3dbd6c66bdf',
'952665a1903c97bc11b2ce531a85d58d572d50c6',
'96c5f5a8a0ae0057975d220f8e622efc431a4e3a',
'9ecea2adc6af3ad12fc053e3b85f47bdf06c5364',
'ab44caeeccf33b6b95c494c7afb82c3fc86d80a8',
'ab5228bec92325a5acf7ccf00231ef38ebe315fc',
'c4956d70f2281fedb777aad719f150603820e917',
'c65411d061100e8af992c98194158271f1759cda',
'd734864cee774f320e23763a11078c7deb8785c5',
'd99a3dae08a0bd7b9ad05955883dc419ab6fcc5c',
'daa1d3117ba5e266cf697028cbb11553c2ceb766',
'f21315c490d2a14f1c6ebcdee5f7970d13927708',
'f3dfccf6bd73e636c5b13c5a4eccc9b24d4a0b1d',
'f7068bd6b16d32d0745179c34d49e02091cfd337',
'f9216b11041edd55b4515ecee860f7d297b4a378']
	                   {'c65411d061100e8af992c98194158271f1759cda':
{'serial1': 27, 'group': 0, 'name':
	            req =  <p_lgpm325.pbupdateentryrequest object at
0x03429110>
	           keys =  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 2
	              i =  25
	            res =  <p_lg.pbupdateentryresponse object at
0x0344BAB0>
	           self =  <com_lgpm325.Phone instance at 0x0341CD00>
	        counter =  26
	    progressmax =  89
	           data =  Keys ['categories', 'groups', 'phonebook',
'ringtone-index', 'speeddials', 'uniqueserial', 'wallpaper-index']
	                   {'phonebook':
{'c65411d061100e8af992c98194158271f1759cda': {'serial1': 27, 'grou
	  serialupdates =  [({'sourcetype': 'bitpim', 'id':
'7ae337e9a66c17b103171b838b9b79d99ebabfbf'}, {'
	             ii =  Keys ['bitpimserial', 'emails', 'group',
'memo', 'name', 'numbers', 'numberspeeds', 'numbertypes', 'ringtone',
'secret', 'serial1', 'url', 'wallpaper']
	                   {'serial1': 4, 'group': 0, 'name':
'Concepcions', 'url': '', 'memo': '', 'wallpa
	           item =  '74596931fdfd93a05ae6c175e3f514bc368b841a'
	numexistingentries =  29
	existingserials =  [22, 21, 20, 19, 18, 17, 16, 15, 29, 14, 13,
1, 12, 11, 10, 9, 8, 28, 7, 6, 5, 2
	    progresscur =  55
	          entry =  <p_lgpm325.pbentry object at 0x0341E070>
	         serial =  2
	        dellist =  []
	           loop =  xrange(29)
	 
	Frame sendpbcommand in C:\projects\bitpim\com_lg.py at line 121
	       origdata =
'\x14\xff\x04\x92\x01\x04\x00\x00\x00n\x02\x19\x00\x00\x00Co\x00\xe1\xdd
~'
	              d =  1
	  responseclass =  <class 'p_lg.pbupdateentryresponse'>
	         buffer =  <prototypes.buffer instance at 0x03425300>
	           data =
'\xff\x04\x92\x01\x04\x00\x00\x00n\x02\x19\x00\x00\x00Co\x00'
	    callsetmode =  True
	       firsttwo =  '\xff\x04'
	        request =  <p_lgpm325.pbupdateentryrequest object at
0x03429110>
	            crc =  '\xe1\xdd'
	        calccrc =  '\x802'
	           self =  <com_lgpm325.Phone instance at 0x0341CD00>
	
	 
	 



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.