Preliminary support for LG G7200 / T5100 [was LG G4015 Testers?]
littletux <[email protected]>
| Newsgroups | gmane.comp.mobile.bitpim.devel |
|---|---|
| Message-ID | <1132138591.30397.49.camel@localhost> |
Le jeudi 20 octobre 2005 à 04:54 +0000, Joe Pham a écrit :
> Anyone who has a G4015 and can run BitPim off source, and willing to help? I need to verify the data format for the SMS messages & Call History data, and since my loaner has no services, I have no real data to verify.
Hi, i have no G4015 but a T5100 (a LG GSM phone too, seen as "G7200"
using serial cable).
Much of the code for the G4015 also works for this phone (I could import
phonebook, wallpaper index, ringtone index, calendar, memos, with very
little modifications:).
So, about the SMS, i've noticed an issue importing messages containing
carriage returns ('\x0a'): the massage isn't imported fully, and then
the next message import fails (doesn't find the '+CMGL: ' string but the
rest of the previous message). I didn't try to fix this yet.
To fix the display of Inbox, I had to change in sms_tab.py, l 48:
- int(v[9:11]), int(v[11:13]), int(v[13:])))
+ int(v[9:11]), int(v[11:13]), int(v[13:15])))
I did test Call History briefly, I think the commands are wrong for my
phone : they result in AT Errors.
Joined are other patches for the T5100. Don't know if it can help with
the G4015.
"com_" and "p_" patches apply to a copy of respective file for the
G4015.
BTW, can support for the T5100 be added in bitpim ?
Anyway, thanks for the great software;)
Best regards,
Guillaume B.
PS:
USB should be disabled for T5100 as these kinds of syncs don't work with
this cable (only photos, videos and mp3 with usb, see t5100-utils for
now to do this).
p_lgt5100.p.patch
(text/x-patch, 3.1 KB)
--- p_lgg4015.p 2005-10-24 08:00:35.000000000 +0200
+++ p_lgt5100.p 2005-11-15 21:18:05.000000000 +0100
@@ -5,11 +5,10 @@
### This program is free software; you can redistribute it and/or modify
### it under the terms of the BitPim license as detailed in the LICENSE file.
###
-### $Id: p_lgg4015.p,v 1.4 2005/10/24 06:00:35 djpham Exp $
%{
-"""Various descriptions of data specific to LG G4015"""
+"""Various descriptions of data specific to LG T5100"""
from prototypes import *
from prototypeslg import *
@@ -71,9 +70,9 @@
# Phonebook constans
PB_MEMORY_SIM='AD'
PB_MEMORY_MAIN='ME'
-PB_MEMORY_LAST_DIALED='LD'
-PB_MEMORY_LAST_RECEIVED='LR'
-PB_MEMORY_LAST_MISSED='LM'
+#PB_MEMORY_LAST_DIALED='LD'
+#PB_MEMORY_LAST_RECEIVED='LR'
+#PB_MEMORY_LAST_MISSED='LM'
PB_MAIN_TOTAL_ENTRIES=255
PB_MAIN_MIN_INDEX=0
PB_MAIN_MAX_INDEX=254
@@ -85,19 +84,19 @@
PB_EMAIL_LEN=40
PB_MEMO_LEN=50
PB_SIM_NAME_LEN=16
-PB_LD_MIN_INDEX=1
-PB_LD_MAX_INDEX=10
-PB_LR_MIN_INDEX=1
-PB_LR_MAX_INDEX=20
-PB_LM_MIN_INDEX=1
-PB_LM_MAX_INDEX=10
-PB_CALL_HISTORY_INFO=(
- ('Getting Last Dialed Calls', PB_MEMORY_LAST_DIALED,
- PB_LD_MIN_INDEX, PB_LD_MAX_INDEX),
- ('Getting Last Received Calls', PB_MEMORY_LAST_RECEIVED,
- PB_LR_MIN_INDEX, PB_LR_MAX_INDEX),
- ('Getting Missed Calls', PB_MEMORY_LAST_MISSED,
- PB_LM_MIN_INDEX, PB_LM_MAX_INDEX))
+#PB_LD_MIN_INDEX=1
+#PB_LD_MAX_INDEX=10
+#PB_LR_MIN_INDEX=1
+#PB_LR_MAX_INDEX=20
+#PB_LM_MIN_INDEX=1
+#PB_LM_MAX_INDEX=10
+#PB_CALL_HISTORY_INFO=(
+# ('Getting Last Dialed Calls', PB_MEMORY_LAST_DIALED,
+# PB_LD_MIN_INDEX, PB_LD_MAX_INDEX),
+# ('Getting Last Received Calls', PB_MEMORY_LAST_RECEIVED,
+# PB_LR_MIN_INDEX, PB_LR_MAX_INDEX),
+# ('Getting Missed Calls', PB_MEMORY_LAST_MISSED,
+# PB_LM_MIN_INDEX, PB_LM_MAX_INDEX))
# Memo constants
MEMO_MIN_INDEX=0
@@ -239,19 +238,20 @@
* CSVINT office_type
* CSVSTRING name
* CSVSTRING email
- * CSVSTRING memo
+ * CSVSTRING { 'terminator': None } memo
PACKET read_sim_phonebook_resp:
* STRING { 'terminator': ord(' '), 'constant': '+CPBR:' } command
* CSVINT index
- * CSVINT group
+ #* CSVINT group
* CSVSTRING mobile
* CSVINT mobile_type
- * CSVSTRING name
+ * CSVSTRING { 'terminator': None } name
P STRING { 'terminator': None, 'default': '' } +home
P STRING { 'terminator': None, 'default': '' } +office
P STRING { 'terminator': None, 'default': '' } +email
P STRING { 'terminator': None, 'default': '' } +memo
+ P UINT{ 'default': -1 } +group
P BOOL { 'default': True } +sim
PACKET del_phonebook_req:
@@ -288,7 +288,7 @@
PACKET write_sim_phonebook_req:
* STRING { 'terminator': None, 'default': '+CPBW=,' } +command
- * CSVINT { 'default': 0 } +group
+ #* CSVINT { 'default': 0 } +group
* CSVSTRING { 'default': '',
'maxsizeinbytes': PB_NUMBER_LEN,
'raiseontruncate': False } +number
@@ -349,3 +349,4 @@
* SMSDATETIME timestamp
* CSVINT address_type
* CSVINT { 'terminator': None } data_len
+ #* STRING { 'terminator': '\r' } msg_content
guiwidgets.py.patch
(text/x-patch, 372 B)
--- guiwidgets.py.old 2005-11-16 11:23:07.000000000 +0100
+++ guiwidgets.py 2005-11-14 22:58:10.000000000 +0100
@@ -372,6 +372,7 @@
'SCH-A670': 'com_samsungscha670',
'SK6100 (Pelephone)' : 'com_sk6100',
'Other CDMA phone': 'com_othercdma',
+ 'LG-T5100': 'com_lgt5100',
}
if __debug__:
com_lgt5100.py.patch
(text/x-patch, 2.7 KB)
--- com_lgg4015.py 2005-11-08 06:59:10.000000000 +0100
+++ com_lgt5100.py 2005-11-16 11:44:21.000000000 +0100
@@ -5,9 +5,8 @@
### This program is free software; you can redistribute it and/or modify
### it under the terms of the BitPim license as detailed in the LICENSE file.
###
-### $Id: com_lgg4015.py,v 1.7 2005/11/08 05:59:10 djpham Exp $
-"""Communicate with the LG G4015 cell phone
+"""Communicate with the LG T5100 cell phone
"""
# standard modules
@@ -23,16 +22,16 @@
import guihelper
import memo
import nameparser
-import p_lgg4015
+import p_lgt5100
import prototypes
import sms
class Phone(com_gsm.Phone):
- """ Talk to the LG G4015 Phone"""
+ """ Talk to the LG T5100 Phone"""
- desc='LG-G4015'
- protocolclass=p_lgg4015
- serialsname='lgg4015'
+ desc='LG-T5100'
+ protocolclass=p_lgt5100
+ serialsname='lgt5100'
def __init__(self, logtarget, commport):
com_gsm.Phone.__init__(self, logtarget, commport)
@@ -775,31 +774,32 @@
class Profile(parent_profile):
serialsname=Phone.serialsname
-
- WALLPAPER_WIDTH=128
- WALLPAPER_HEIGHT=128
- MAX_WALLPAPER_BASENAME_LENGTH=19
+ WALLPAPER_WIDTH=176
+ WALLPAPER_HEIGHT=220
+ #extern wallpaper 96x96
+ #TODO: check max lengths and wallpaper format
+ MAX_WALLPAPER_BASENAME_LENGTH=14
WALLPAPER_FILENAME_CHARS="abcdefghijklmnopqrstuvwxyz0123456789_ ."
WALLPAPER_CONVERT_FORMAT="jpg"
- MAX_RINGTONE_BASENAME_LENGTH=19
+ MAX_RINGTONE_BASENAME_LENGTH=14
RINGTONE_FILENAME_CHARS="abcdefghijklmnopqrstuvwxyz0123456789_ ."
RINGTONE_LIMITS= {
'MAXSIZE': 20480
}
# use for auto-detection
phone_manufacturer='LGE'
- phone_model='G4015'
+ phone_model='G7200'
- usbids=( ( 0x10AB, 0x10C5, 1),
+ usbids=( ( 0x1004, 0x6005, 1),
)
- deviceclasses=("serial",)
+ deviceclasses=("serial","modem",)
imageorigins={}
imageorigins.update(common.getkv(parent_profile.stockimageorigins, "images"))
imagetargets={}
imagetargets.update(common.getkv(parent_profile.stockimagetargets, "wallpaper",
- {'width': 128, 'height': 128, 'format': "JPEG"}))
+ {'width': 176, 'height': 220, 'format': "JPEG"}))
def GetImageOrigins(self):
# Note: only return origins that you can write back to the phone
@@ -825,7 +825,7 @@
('memo', 'read', None), # all memo list reading DJP
('memo', 'write', 'OVERWRITE'), # all memo list writing DJP
('sms', 'read', None), # all SMS list reading DJP
- ('call_history', 'read', None),
+ #('call_history', 'read', None),
)
def convertphonebooktophone(self, helper, data):