Re: FW: New developer - Trying to add Kyocera K433L support
"Ed leNoir" <[email protected]>
| Newsgroups | gmane.comp.mobile.bitpim.devel |
|---|---|
| Message-ID | <00be01c517ab$5a0942d0$1b02a8c0@gonzalez> |
Peter,
I'm also new to this process so I'll reply along those lines...
>>1. The K433L phone has a special version of the Kyocera Firmware made for
Virgin Mobile, called NJ1000. Is it reasonable to expect that the Kyocera
K433L can be made to work with BitPim?
Sorry, can't help with that - you DO need someone with experience there!
>>2. I want to start by taking the LGVX6000 module (which seems to work
somewhat) and modifying it to work with the K433L. Is this the recommended
approach?
Since the vx6000 inheirits almost everything from the vx4400 I found it
better to start with the 4400. The 4400 uses the most base classes.
However, it does use specific LG classes that may not apply to you at all -
take a look at the media file handline, especially the .map files. If they
don't match what you see in the file system then you want to start from
another base class, or build a Kyocera base class and basically just copy
the structure you see in the vx4400 - in my humble, and unexperienced
opinion.
>>3. Are there any forms of encryption of security that would prevent me
>>from
being able to read or write to the device?
Haven't seen that yet on the LG PM-325 I'm working on. The brew interface
doesn't seem to care about the "secret" settings available on the phone to
hide numbers and values.
>>4. Why would the phone reset it's contact list after it I modified it with
BitPim (in the most trivial way - I changed the name of a contact without
altering the number of characters in the name)
Take a look at the save functionality in com_lgvx4400.py and you can see all
of the rewriting of entries for even a "trivial" change. Basically
everything is written back to the phone as far as I can see. And there are
comments that some of the calls cause a reset. What I found is if you start
the phone book update process and throw an exception early on then you end
up with an empty phone book on the phone. I made sure to get the read
processing working and storing data before I started on update because I
didn't want to have to key in a bunch of my phone entries. After I got read
working I exported to vCard format and now if I screw up I can easily
restore the phone book by re-importing the vCards and using that to get my
phone back to a "last known good" state.
>>Project
1. How do I turn on the debug self.log information? This looks like it will
be very useful to see what's going on.
I think the regular log is always on. But make sure you enable the protocol
logs using View/Protocol Logs, because they are your new best friend. There
is a paint problem with the log windows, you have to scroll up (or interact
with the scroll in any way) to get the log data to paint. That was my
newbee mistake yesterday. Also, when you get an exception be sure to click
on "continue" or BitPim will just shut down.
I didn't understand the protocol analyser when I first started on Friday,
and now it's where I spend all my time. Just reading a few of Roger's
recent posts sent me in the right direction.
You should already have created a file "p_KyoceraK433L.p" that is input to
the protocol generator (protogen.py). I copied/renamed p_lgvx4400.p to be
p_lgpm325.p in my case.
Then you have to generate the protocol classes by running "python
p_KyoceraK433L.p". This will generate the file "p_KyoceraK433L.py".
Next can also do as I did and copy "com_lgvx4400.py" to
"com_KyoceraK433L.py" to make the phone class(es). Change all references
from "lgvx4400" to "KyoceraK433L". Following the information in
"dev-doc/phonespecs.html" you need to add an entry to the configuration
dialog relating your new phone to the class file (com_KyoceraK433L.py).
From there I then debugged until I could successfully read at least the
first record from the phone book. The protocol log will show all of the
bytes sent/received. On the pm325 they were sent in 267 byte packets until
the full file is received. What you do then is highlight the packets you
want to analyse, or use Ctrl+A to select all of the text in the protocol log
window. Then press ctrl+alt+p to call up the protocol analyser from BitPim.
Select the line that represents the full assembled packet from the read of
the first phone book entry, and you will see in the lower panes a tree and
hex dump of the packet. The tree represents what the "protocol" control
thinks how the packet is layed out. You have to keep changing your
p_KyoceraK433L.p file until you have layed out all of the "schema" for the
phone book entry.
Easy way to work on the protocol analysis is to copy the protocol log data
into notepad, and save the file to disk - like "protocol.txt". Then, make
changes to your protocol definition file (p_KyoceraK433L.p) and run the
following commands:
python protogen.py p_KyoceraK433L.p
python analyser.py protocol.txt
You will get the same three pane analyser that is called up in BitPim, and
you can continue to try and hack your way thru the schema of the various
packets and file formats. It's taken me two days for the pm325, and I was
greatly aided by the fact that the media file formats and "map" files
matched the vx4400. The phone book on the pm325 is much more different,
which is why I wasn't able to do like the vx6000 and just inherit from the
4400.
>>2. After I've run the project once, it very often will not run a second
>>time
without crashing in an error having something to do with "Wallpaper". I
have to kill the WInPython process with Task Manager
I tried IDLE for a while, but now I just run Visual Studio as my editor and
then invoke Python on my own. I did run into problems with the background
thread which runs the phone communication wouldn't exit when told to by the
gui thread, but this was only in the early stages when I was throwing a lot
of exceptions and having to hack around in the exception handling. In those
cases I had to kill BitPim via the task manager. Once I undid my hacks to
the exception handler the threads were managed correctly and no problems
since.
>> WinPython questions
Sorry, can't help there. I tried IDLE because it seemed to offer debugging
support, but I finally stopped bucking the problem and did what was
recommended in the dev-doc's and put in logging statements and worked it out
from there. If you spend lots of time in the protocol analyser and get a
clean phone book schema layed out then a lot of the issues go away.
- Ed
----- Original Message -----
From: "Peter Akemann" <[email protected]>
To: <[email protected]>
Sent: Sunday, February 20, 2005 3:11 PM
Subject: [BitPim-devel] FW: New developer - Trying to add Kyocera K433L
support
My name is Peter Akemann and I am just getting started trying to add support
to BitPim for the Kyocera K433L (K9) phone.
I apologize in advance to Roger for sending him a duplicate of this
introduction. I was having trouble getting on to the mailing list earlier.
So here's my situation:
I am a programmer, until recently of video games, but this is my first
project in Python and my first serious project trying to interact with a
cel-phone. I am working in Windows XP.
As of now, I have downloaded the source of v0.7.27 with CVS, as well as the
other setup you recommend for getting started, and I am playing around with
the LG-VX6000 module to see how well it interacts with my K433L phone. It
seems like the easiest way to proceed will be to find the module which works
best with the phone already and modify it until it works properly.
At this point, I am able to read the file system of the phone, and I can
save/hexdump some of the files, while others give me CRC checksum errors.
Writing back modified files has produced strange results: Some files appear
to write back correctly, but the phone handset itself does not acknowledge
the changes (e.g. modifying the text in the UI of one of the game
applications). Others create odd behavior on the phone (e.g. Modifying the
name of a phonebook entry caused the phone to reset all phonebook entries.
Others do not work at all.
I am using WinPython, which seems pretty good, though I am having a few
issues with it
So this is my starting point. I would love to be in touch with others
working through similar issues, and with the experienced developers who can
provide guidance and insight.
Sumamrizing the above, I'd like to put the following questions to anyone who
may have insight on them:
General
1. The K433L phone has a special version of the Kyocera Firmware made for
Virgin Mobile, called NJ1000. Is it reasonable to expect that the Kyocera
K433L can be made to work with BitPim?
2. I want to start by taking the LGVX6000 module (which seems to work
somewhat) and modifying it to work with the K433L. Is this the recommended
approach?
3. Are there any forms of encryption of security that would prevent me from
being able to read or write to the device?
4. Why would the phone reset it's contact list after it I modified it with
BitPim (in the most trivial way - I changed the name of a contact without
altering the number of characters in the name)
Project
1. How do I turn on the debug self.log information? This looks like it will
be very useful to see what's going on.
2. After I've run the project once, it very often will not run a second time
without crashing in an error having something to do with "Wallpaper". I
have to kill the WInPython process with Task Manager
WinPython
1. How do I set breakpoints in modules that run in separate threads from the
main app, such as com_brew.py?
2. I keep getting stuck in some mode in the editor where ctrl-keys and
function keys are inserting weird text into the edit window, rather than
performing their usual shortcut functions. Any idea how this happens and
how to turn it off?
3. I am using print to look at debug info while running, but the output
seems to buffer only shows up in the "Interactive Window" in WinPython when
certain events happen in the program. E.g. Hexdump. How can I get debug
prints to show up immediately?
If anyone has any words of advice or direction, or answers to the above
questions, please let me know.
Thanks,
-Peter
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=ick
_______________________________________________
BitPim-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bitpim-devel
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click