VX4500 Phone Info
Dustin <[email protected]>
| Newsgroups | gmane.comp.mobile.bitpim.devel |
|---|---|
| Message-ID | <[email protected]> |
I got the Phone Info to work on my VX4500. I wanted to include battery and signal strength but it doesn't look like any LG phones support that yet. How would I go about dumping the info from the phone so I can figure out how to parse it? If someone could tell me that'd be sweet. Heres the diff on the files I edited for Phone Info support (com_lgvx4500.py and p_lgvx4500.p).
com_lgvx4500.py:
RCS file: /cvsroot/bitpim/bitpim/com_lgvx4500.py,v
retrieving revision 1.14
diff -u -r1.14 com_lgvx4500.py
--- com_lgvx4500.py 29 Sep 2005 02:03:07 -0000 1.14
+++ com_lgvx4500.py 30 Sep 2005 04:35:07 -0000
@@ -21,6 +21,7 @@
# my modules
import common
import copy
+import p_brew
import p_lgvx4500
import com_lgvx4400
import com_brew
@@ -73,6 +74,26 @@
return e
my_model='VX4500'
+
+ def getphoneinfo(self, phone_info):
+ self.log('Getting Phone Info')
+ try:
+ s=self.getfilecontents('brew/version.txt')
+ if s[:6]=='VX4500':
+ phone_info.append('Manufacturer:', "LG")
+ phone_info.append('Model:', "VX4500")
+ #import pdb; pdb.set_trace()
+ req=p_brew.firmwarerequest()
+ res=self.sendbrewcommand(req, self.protocolclass.firmwareresponse)
+ phone_info.append('Firmware Version:', res.firmware)
+ s=self.getfilecontents("nvm/$SYS.ESN")[85:89]
+ txt='%02X%02X%02X%02X'%(ord(s[3]), ord(s[2]), ord(s[1]), ord(s[0]))
+ phone_info.append('ESN:', txt)
+ txt=self.getfilecontents("nvm/nvm/nvm_0000")[457:467]
+ phone_info.append('Phone Number:', txt)
+ except:
+ pass
+ return
parentprofile=com_lgvx4400.Profile
class Profile(parentprofile):
and p_lgvx4500.p:
RCS file: /cvsroot/bitpim/bitpim/p_lgvx4500.p,v
retrieving revision 1.13
diff -u -r1.13 p_lgvx4500.p
--- p_lgvx4500.p 29 Sep 2005 02:03:07 -0000 1.13
+++ p_lgvx4500.p 30 Sep 2005 04:08:09 -0000
@@ -189,6 +189,14 @@
4 UINT numcalls
1 UINT unknown1
* LIST {'elementclass': call} +calls
+
+PACKET firmwareresponse:
+ 1 UINT command
+ 11 STRING {'terminator': None} date1
+ 8 STRING {'terminator': None} time1
+ 11 STRING {'terminator': None} date2
+ 8 STRING {'terminator': None} time2
+ 8 STRING {'terminator': None} firmware
###
### SMS
###
Dustin Heimerl
AIM: hypercooljake
MSN: [email protected]
Cell Phone: (920)-915-7271
Email: [email protected] or [email protected]
http://www.uberprofile.info