Discussion:
[Bitpim-devel] Calendar on VX4500 problem
Peter Dufault
2004-05-10 17:16:47 UTC
Permalink
BitPim CVSd at 13:00EST
Mac OS X 10.3.3
LG VX4500

I tried the calendar today, it is indeed under the Voice menu for some
reason.

First thing I noted is that though the entry I created at bitpim the
other day is sent back and forth to the phone, the phone doesn't see
it.

Secondly I created a simple entry on the phone (Text "test" from 2:00
to 3:00 PM today) and then tried to get the calendar using BitPim. I
received this message on the startup terminal screen:

calendar 2
wallpaper not requested
ringtone not requested
/Users/dufault/work/bitpim/prototypes.py:188:
FutureWarning: x<<y losing bits or changing sign will return a long in
Python 2.4 and up
res|=buf.getnextbyte()<<shift



And this exception:

An unexpected exception has occurred.
Please see the help for details on what to do.

Traceback (most recent call last):
File "/Users/dufault/work/bitpim/gui.py", line 152, in run
res=call()
File "/Users/dufault/work/bitpim/gui.py", line 92, in __call__
return apply(self.method, self.args+args, d)
File "/Users/dufault/work/bitpim/gui.py", line 1126, in getdata
i[1](results)
File "/Users/dufault/work/bitpim/com_lgvx4400.py", line 399, in
getcalendar
sc.readfrombuffer(buf)
File "/Users/dufault/work/bitpim/p_lgvx4400.py", line 2391, in
readfrombuffer
self.__field_events.readfrombuffer(buf)
File "/Users/dufault/work/bitpim/prototypes.py", line 676, in
readfrombuffer
x.readfrombuffer(buf)
File "/Users/dufault/work/bitpim/p_lgvx4400.py", line 2119, in
readfrombuffer
self.__field_start.readfrombuffer(buf)
File "/Users/dufault/work/bitpim/prototypes.py", line 188, in
readfrombuffer
res|=buf.getnextbyte()<<shift
File "/Users/dufault/work/bitpim/prototypes.py", line 855, in
getnextbyte
raise IndexError("trying to read one byte beyond end of
"+`len(self._data)`+" byte buffer")
IndexError: trying to read one byte beyond end of 66 byte buffer

Variables by last 8 frames, innermost last

Frame __call__ in /Users/dufault/work/bitpim/gui.py at line 92
self = <gui.Request instance at 0x5a4ddf0>
args = ()
d = {}
kwargs = {}

Frame getdata in /Users/dufault/work/bitpim/gui.py at line 1126
count = 1
i = (<bound method GetPhoneDialog.GetCalendarSetting of
<guiwidgets.GetPhoneDialog i
self = <WorkerThread(BitPim helper, started daemon)>
req = <guiwidgets.GetPhoneDialog instance; proxy of C++
wxDialog instance at _4939dc0_
willcall = [(<bound method GetPhoneDialog.GetCalendarSetting of
<guiwidgets.GetPhoneDialog
results = {'sync': {'calendar': 'OVERWRITE'},
'wallpaper-index': {1: {'origin': 'builtin',
sync = {'calendar': 'OVERWRITE'}
st = 0

Frame getcalendar in /Users/dufault/work/bitpim/com_lgvx4400.py at line
426
res = {}
self = <com_lgvx4500.Phone instance at 0x5c42878>
sc = <p_lgvx4400.schedulefile object at 0x5c470d0>
result = {'sync': {'calendar': 'OVERWRITE'},
'wallpaper-index': {1: {'origin': 'builtin',
exceptions = {}
buf = <prototypes.buffer instance at 0x5c42bc0>
ex = <p_lgvx4400.scheduleexceptionfile object at
0x5c47450>

Frame readfrombuffer in /Users/dufault/work/bitpim/p_lgvx4400.py at
line 2391
buf = <prototypes.buffer instance at 0x5c42bc0>
self = <p_lgvx4400.schedulefile object at 0x5c470d0>
dict = {'elementclass': <class 'p_lgvx4400.scheduleevent'>}

Frame readfrombuffer in /Users/dufault/work/bitpim/prototypes.py at
line 676
x = <p_lgvx4400.scheduleevent object at 0x5c47bd0>
self = <prototypes.LIST object at 0x5c477f0>
buf = <prototypes.buffer instance at 0x5c42bc0>

Frame readfrombuffer in /Users/dufault/work/bitpim/p_lgvx4400.py at
line 2119
buf = <prototypes.buffer instance at 0x5c42bc0>
self = <p_lgvx4400.scheduleevent object at 0x5c47bd0>
dict = {'sizeinbytes': 4}

Frame readfrombuffer in /Users/dufault/work/bitpim/prototypes.py at
line 188
shift = 0
self = <prototypes.LGCALDATE object at 0x5c47c50>
dummy = 0
buf = <prototypes.buffer instance at 0x5c42bc0>
res = 0

Frame getnextbyte in /Users/dufault/work/bitpim/prototypes.py at line
855
self = <prototypes.buffer instance at 0x5c42bc0>

Peter Dufault
HD Associates, Inc.
Roger Binns
2004-05-11 02:24:00 UTC
Permalink
Post by Peter Dufault
First thing I noted is that though the entry I created at bitpim the
other day is sent back and forth to the phone, the phone doesn't see
it.
Yes, that is because the calendar file is in a different format.
There is no sync protocol for the calendar. BitPim just reads
and writes a file on the filesystem. Being able to do so doesn't
mean the file is valid for the phone.
Post by Peter Dufault
Secondly I created a simple entry on the phone (Text "test" from 2:00
to 3:00 PM today) and then tried to get the calendar using BitPim. I
FutureWarning: x<<y losing bits or changing sign will return a long in
Python 2.4 and up
res|=buf.getnextbyte()<<shift
Ignore all warnings like that. They are very annoying but it is not
a bug in the code.

It looks like they have made each record one byte longer. Please
delete the calendar files as detailed in my earlier message
http://article.gmane.org/gmane.comp.mobile.bitpim.devel/229
and reboot the phone. Then make some events where the name is
as long as possible.

See if you can figure out where the extra byte(s) went.
The existing description is in p_lgvx4400 as
scheduleevent.

Roger
Peter Dufault
2004-05-11 18:14:45 UTC
Permalink
Post by Roger Binns
It looks like they have made each record one byte longer. Please
delete the calendar files as detailed in my earlier message
http://article.gmane.org/gmane.comp.mobile.bitpim.devel/229
and reboot the phone. Then make some events where the name is
as long as possible.
See if you can figure out where the extra byte(s) went.
The existing description is in p_lgvx4400 as
scheduleevent.
I've attached a hex dump of the sch/schedule.dat file. I'll look at
this more later, but this shows some of the ways it has changed. The
description is only 35 bytes long now. Hopefully the earlier fields
are the same. I'll decode this when I have some time.

Peter

Loading...