Discussion:
[BitPim-devel] Update to LG Phones
Joe Pham
2005-08-24 04:24:53 UTC
Permalink
8100: added memo, autodetect, phone info, changed ringtone
directory, minor bug fixes.
6100: added autodetect, phone info, call history
4400: added SMS, call history
Look like you've been busy :-) I moved the AutoDetect code into com_lgvx4400 so that it's available for all LG phones, please test them out and post feedbacks. I committed that and your changes.

-Joe Pham



______________________________________________________________________
NetZero Is Giving Away $3,000 A Day!
Sign up for NetZero HiSpeed 3G with Instant On!
Visit http://www.netzero.com/3Gsweeps TODAY for your chance to win!
Simon C
2005-08-24 18:48:30 UTC
Permalink
Joe.
Post by Joe Pham
Look like you've been busy :-) I moved the AutoDetect code
into com_lgvx4400 so that it's available for all LG phones,
please test them out and post feedbacks. I committed that
and your changes.
The autodetect did not work for the 6100 or 4400. 4400 caused an exception.
I fixed the exception.
Also some data is stored in the res passed to detect_phone and that is
persistant from one model to the next as all the phone models are called,
this causes problems, I changed the info to not be persistant.
Also if the version file is present it should be the only thing used to
match the phone, the other check for phones without the version file caused
the 6100 to be detected as a 6000!, not sure why. I tightened up the check
so that if the version file is present it is used and the other method is
only used if the version file is missing on the phone.
I lost access to the 6100 before I could test all the changes, but the 4400
and 8100 do work with the code attached. Maybe someone else could try this
on the 6100, as I will not get access to the phone again for about 4 days.
Code changes attached.

p_lvgvx4400.p, p_lgvx6100.p and p_lgvx8100.p did not work with protogen. I
had to add a line feed at the end of the files. Fix attached

In the SMS screen...
In the inbox the "from: " label is not showing always, although the actual
number is, to reproduce select a sent message and then select an inbox
message, the from label will disappear.
The "read" flag is visible only in the outbox, this should be visible only
in the inbox not the outbox.

I am done testing the 8100 so you can change guiwidgets.py to make the phone
work in non-debug mode if you want.

Simon
John O'Shaughnessy
2005-08-24 19:12:47 UTC
Permalink
Simon,

I can check items on the 6100, but probably not until Saturday.

John
Post by Simon C
Joe.
Post by Joe Pham
Look like you've been busy :-) I moved the AutoDetect code
into com_lgvx4400 so that it's available for all LG phones,
please test them out and post feedbacks. I committed that
and your changes.
The autodetect did not work for the 6100 or 4400. 4400 caused an exception.
I fixed the exception.
I lost access to the 6100 before I could test all the changes, but the 4400
and 8100 do work with the code attached. Maybe someone else could try this
on the 6100, as I will not get access to the phone again for about 4 days.
Code changes attached.
Joe Pham
2005-08-25 04:53:57 UTC
Permalink
Post by Simon C
The autodetect did not work for the 6100 or 4400. 4400 caused an
exception.
Please post the exception. There's a reason I have debugging statements in the code.
Post by Simon C
Also some data is stored in the res passed to detect_phone and that
is persistant from one model to the next as all the phone models are
called, this causes problems, I changed the info to not be
persistant.
That was by design. The idea is to initially read as much info as possible and share that info with other phone codes. Please elaborate on the problems that this caused you.
Post by Simon C
Also if the version file is present it should be the only thing used
to match the phone, the other check for phones without the version
file caused the 6100 to be detected as a 6000!, not sure why.
Do both 6000 and 6100 have version files? I need more data to evaluate this.
Post by Simon C
In the inbox the "from: " label is not showing always, although the
actual number is, to reproduce select a sent message and then select
an inbox message, the from label will disappear.
The "read" flag is visible only in the outbox, this should be
visible only in the inbox not the outbox.
I'll work on them.

-Joe Pham




______________________________________________________________________
NetZero Is Giving Away $3,000 A Day!
Sign up for NetZero HiSpeed 3G with Instant On!
Visit http://www.netzero.com/3Gsweeps TODAY for your chance to win!
Simon C
2005-08-26 23:55:01 UTC
Permalink
Post by Simon C
4400 caused an
Post by Simon C
exception.
Please post the exception. There's a reason I have
debugging statements in the code.
Here it is.

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 173, in run
res=call()
File "C:\projects\bitpim\gui.py", line 113, in
__call__
return apply(self.method, self.args+args, d)
File "C:\projects\bitpim\gui.py", line 1735, in
detectphone
return
phone_detect.DetectPhone(self).detect(using_port)
File "C:\projects\bitpim\phone_detect.py", line 217,
in detect
module)
File "C:\projects\bitpim\com_lgvx4400.py", line
1039, in detectphone
p.eval_detect_data(res[port])
File "C:\projects\bitpim\com_lgvx4400.py", line
1008, in eval_detect_data
if res.get(self.brew_version_txt_key,
'')[:len(self.my_model)]==self.my_model or \
TypeError: unsubscriptable object

Variables by last 8 frames, innermost last

Frame __bootstrap in c:\python23\lib\threading.py at
line 442
self = <WorkerThread(BitPim helper,
started daemon)>

Frame run in C:\projects\bitpim\gui.py at line 166
e = <exceptions.TypeError instance at
0x0314D120>
res = None
self = <WorkerThread(BitPim helper,
started daemon)>
item = (<gui.Request instance at
0x020C8738>, <gui.Callback instance at 0x0211CA80>)
call = <gui.Request instance at
0x020C8738>
ex = <exceptions.TypeError instance at
0x0314D120>
resultcb = <gui.Callback instance at
0x0211CA80>
first = 0

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

Frame detectphone in C:\projects\bitpim\gui.py at line
1735
self = <WorkerThread(BitPim helper,
started daemon)>
using_port = 'COM7'

Frame detect in C:\projects\bitpim\phone_detect.py at
line 217
models = ['Audiovox CDM-8900', 'LG-TM520',
'LG-VX10', 'LG-VX3200', 'LG-VX4400', 'LG-VX450
using_port = 'COM7'
coms = [{'available': True, 'driverdate':
(2001, 7, 1), 'description': 'Communications
found_port = None
threads = []
likely_ports = ['COM7']
found_model = None
x = Keys ['active', 'available',
'class', 'description', 'driverdate',
'driverdescription', 'driverprovider',
'driverversion', 'hardwareinstance', 'name']
{'available': False, 'driverdate':
(2004, 8, 3), 'description': 'Standard Modem
model = 'LG-VX4400'
pm = Keys ['Audiovox CDM-8900',
'LG-TM520', 'LG-VX10', 'LG-VX3200', 'LG-VX4400',
'LG-VX4500', 'LG-VX4600 (Telus Mobility)', 'LG-VX4650
(VZW)', 'LG-VX6000', 'LG-VX6100', 'LG-VX7000',
'LG-VX8000 (Verizon Wireless)', 'LG-VX8100 (Verizon
Wireless)', 'MM-7400', 'Other CDMA phone', 'PM-8200',
'RL-4920', 'SCH-A310', 'SCH-A650', 'SCH-A670',
'SCP-4900', 'SCP-5300', 'SCP-5400', 'SCP-5500',
'SCP-7200', 'SCP-7300', 'SCP-8100', 'SCP-8100 (Bell
Mobility)', 'SK6100 (Pelephone)', 'SPH-A460',
'SPH-A620 (VGA1000)']
{'LG-VX3200': 'com_lgvx3200',
'SCP-7200': 'com_sanyo7200', 'SCP-4900': 'com_sany
available_coms = ['COM7']
self = <phone_detect.DetectPhone object at
0x020E5950>
available_modem_coms = []

Frame detectphone in
C:\projects\bitpim\com_lgvx4400.py at line 1043
res = Keys ['COM7']
{'COM7': {'mode_modem': None,
'esn_file': '\xff\xff\xff\xff\xff\xff\xff\xff\xff\
coms = [{'available': True, 'driverdate':
(2001, 7, 1), 'description': 'Communications
p = <com_lgvx4400.Phone instance at
0x0211CB48>
likely_ports = ['COM7']
port = 'COM7'

Frame eval_detect_data in
C:\projects\bitpim\com_lgvx4400.py at line 1008
res = Keys ['brew_version.txt', 'esn',
'esn_file', 'firmware_version', 'firmwareresponse',
'lgpbinfo', 'manufacturer', 'mode_brew', 'mode_modem',
'model']
{'mode_modem': None, 'esn_file':
'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x
self = <com_lgvx4400.Phone instance at
0x0211CB48>
Post by Simon C
Post by Simon C
Also some data is stored in the res passed to
detect_phone and that
Post by Simon C
is persistant from one model to the next as all the
phone models are
Post by Simon C
called, this causes problems, I changed the info to
not be
Post by Simon C
persistant.
That was by design. The idea is to initially read
as much info as possible and share that info with
other phone codes. Please elaborate on the problems
that this caused you.
I did not debug into it in great detail, but when I
changed the info to be reevaluated for each model the
problem went away, however I also changed the
algorithm to use the version file if present at the
same time and ignore the other information so it may
be that this does not really make a difference.
The critical change was in eval_detect_data(self,
res):

Changing :
if res.get(self.brew_version_txt_key,
'')[:len(self.my_model)]==self.my_model or \
res.get(self.lgpbinfo_key,
'').find(self.my_model)!=-1:

To:

version=phone_info.get(self.brew_version_txt_key, '')
if (version!=None and
version[:len(self.my_model)]==self.my_model) or \
(version==None and
phone_info.get(self.lgpbinfo_key,
'').find(self.my_model)!=-1):

Got rid of the exception and stopped the 6100 showing
up as a 6000.
Joe Pham
2005-08-29 02:21:18 UTC
Permalink
the other test using the lgpbinfo_key did return 'vx6000' in the
string from the phone
Interesting. Can you find out if the phone or the cable returns to incorrect info. I updated the phone detection code with the fixes. I also added 'duration' field to call_history so you may want to take advantage of that. I'm asking Roger to do a Build next Tuesday, so I'd like to have all the code in by Monday night.

-Joe Pham



______________________________________________________________________
NetZero Is Giving Away $3,000 A Day!
Sign up for NetZero HiSpeed 3G with Instant On!
Visit http://www.netzero.com/3Gsweeps TODAY for your chance to win!
Simon C
2005-08-29 05:28:55 UTC
Permalink
Post by Joe Pham
the other test using the lgpbinfo_key did return 'vx6000' in the
string from the phone
Interesting. Can you find out if the phone or the cable
returns to incorrect info. I updated the phone detection
code with the fixes.
Probably the phone as I am using a straight through cable I got from VZW,
but I'm not too sure about this. I'll try to grab the phone in the next day
or so to experiment with.


I also added 'duration' field to
Post by Joe Pham
call_history so you may want to take advantage of that.
great, I'll try to get you updates for monday, CVS does not show the updates
yet.

Simon

Loading...