Discussion:
[Bitpim-devel] plz support sanyo 4900
Mr. Mailing List
2003-10-07 19:48:27 UTC
Permalink
Please oh please support sanyo 4900, thanks!

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
Roger Binns
2003-10-08 00:06:22 UTC
Permalink
Mr. Mailing List wrote:
> Please oh please support sanyo 4900, thanks!

http://bitpim.sourceforge.net/#otherphones

Roger
Stephen Wood
2003-10-08 00:50:16 UTC
Permalink
On Tue, 2003-10-07 at 15:48, Mr. Mailing List wrote:
> Please oh please support sanyo 4900, thanks!
>
> __________________________________

It's being worked on, albeit slowly. I am in the process of preparing a
sanitized trace to help with making a protocol description. I have a
perl script that will read (but not write) all the phonebook, calendar,
callhistory and messages from the phone. If anyone is interested, I'll
post or mail a copy of the script. There are some data fields in what
hte script gets that I don't understand, so maybe someone can help with
that.
Roger Binns
2003-10-08 02:29:43 UTC
Permalink
> There are some data fields in what
> hte script gets that I don't understand, so maybe someone can help with
> that.

Once we have your clean traces, we may be able to offer some
opinions :-)

Roger
Roger Binns
2003-10-29 23:45:16 UTC
Permalink
[Stephen asked this privately but I figured it should be documented for
all to see]

> For the existing phones in Bitpim, how does the code put the phone into
> DM mode? I believe this happens when one clicks on get phone data in
> the GUI and that _setmodebrew in com_brew.py actually does it, but due
> to my lack of Python and OO understanding, I don't understand how it
> gets from here to there.

Multiple inheritance and introspection :-)

Examine com_lgvx4400 and see how it inherits from generic phone, brew
and lg.

There is a function in generic phone called setmode. Generic phone
also has defines the constants for MODENONE (which is how things
start out) and MODEMODEM.

brew defines MODEBREW, and lg defines MODEPHONEBOOK.

vx4400 gets all of these because of the inheritance.

Then what happens is that any code that needs the phone to be in a
particular mode calls the setmode function. For example the sendbrewcommand
function calls setmode(MODEBREW)

The setmode function immediately returns if the desiredmode is the same
as the current mode. It then removes the front MODE and lowercases
the rest.

It looks for function named _setmodeoldtonew where old and new are
the old and new modes. If none is found, it looks for _setmodenew.

This lets you write code for specific mode changes, or just a
generic one ignoring the previous mode.

> It seems that one of the first communications with the phone is to get
> the ESN by retrieving the file nvm/$SYS.ESN. I read in some of your
> comments on the devel list, that the phone can be confused switching
> between brew commands and non brew commands. Should I avoid letting the
> Sanyo code make the filesystem call to get the ESN?

The 4400 phonebook does get confused if you keep reading it. Other sync
software actually reboots the phone after each read or write. I found
that forcing brew mode before going into phonebook mode solves that problem.

The ESN is read because I wanted a unique identifier per phone. Each entry
that is read in has a list of identifiers of the source device, as well as
some sort of serial for that device. This makes it really easy to match up
entries read in the future, especially if the user has altered the name
and/or some of the numbers.

Here is an actual test entry from my phone:

{
'categories': [{'category': 0}],
'emails': [{'email': 'email1 adadadadadadbdadadadaebdadadadadbdadadada'}],
'flags': [{'secret': True}],
'memos': [{'memo': ''}],
'names': [{'full': 'Nnadadadadadadadadadad'}],
'numbers': [{'type': 'home', 'number': '111111111111111111111111111111111111111111111111'},
{'type': 'office', 'number': '222222222222222222222222222222222222222222222222'}],
'ringtones': [{'use': 'call', 'ringtone': 0}, {'use': 'message', 'ringtone': 0}],
'serials': [{'serial2': 234, 'serial1': 234, 'sourcetype': 'lgvx4400',
'sourceuniqueid': '1aadcbb3d92021e92b614f326e2de9f3cb1f77d2'}],
'urls': [{'url': 'www.jmjmjmjmjmjmjmjmjmjmjmjmjmkmjmjnjmjmjmjmjmjm'}],
'wallpapers': [{'use': 'call', 'wallpaper': 12}],
}

On the 4400, Brew mode is also needed to turn wallpaper and ringtone indices back into
filenames. I haven't implemented that yet (as you can see above it still uses the
index numbers) but I will be doing so.

Roger
Stephen Wood
2003-10-30 02:33:49 UTC
Permalink
***@genrover><001b01c38d44$08afb010$***@rogersqyvr14d3><1065659987.1272.1
***@gen rover>
<006e01c38e05$8b158590$***@rogersqyvr14d3><***@gen
rover> <009201c392ff$08b48570$***@rogersqyvr14d3>
<***@genrover>
<004701c39e76$b460fb10$***@rogersqyvr14d3>
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-Mailer: Ximian Evolution 1.0.8 (1.0.8-9.7x.1)
Date: 29 Oct 2003 21:33:49 -0500
Message-Id: <***@genrover>
Mime-Version: 1.0
X-Spam-Score: 0.0 (/)
X-Spam-Report: Spam Filtering performed by sourceforge.net.
See http://spamassassin.org/tag/ for more details.
Report problems to https://sf.net/tracker/?func=add&group_id=1&atid=200001
Sender: bitpim-devel-***@lists.sourceforge.net
Errors-To: bitpim-devel-***@lists.sourceforge.net
X-BeenThere: bitpim-***@lists.sourceforge.net
X-Mailman-Version: 2.0.9-sf.net
Precedence: bulk
Reply-To: bitpim-***@lists.sourceforge.net
List-Help: <mailto:bitpim-devel-***@lists.sourceforge.net?subject=help>
List-Post: <mailto:bitpim-***@lists.sourceforge.net>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/bitpim-devel>,
<mailto:bitpim-devel-***@lists.sourceforge.net?subject=subscribe>
List-Id: <bitpim-devel.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/bitpim-devel>,
<mailto:bitpim-devel-***@lists.sourceforge.net?subject=unsubscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum=bitpim-devel>

Thanks for the explanations! I knew the thet _setmode methods were
being called, but couldn't figure out how.

>The 4400 phonebook does get confused if you keep reading it. Other
>sync software actually reboots the phone after each read or write. I
>found that forcing brew mode before going into phonebook mode solves
>that problem.

I just started trying out some snippets of code for my SCP4900. The
forcing of brew mode really helped speed up the debugging cycle. When I
was learning the protocol for the phone using C programs and Perl
scripts, I had to reboot my phone a lot. (Which I am convinced let to
OS crashes). Not having to reboot the phone, combined with protocol log
and tracebacks on exceptions really make developing and debugging fun!
Roger Binns
2003-10-30 04:02:44 UTC
Permalink
> OS crashes). Not having to reboot the phone, combined with protocol log
> and tracebacks on exceptions really make developing and debugging fun!

I'll take that as a compliment :-)

I am hoping that adding new phones should be very easy. I still need
to deal with the UI side of it though where things (except the phonebook)
map to how the 4400 does things with minimal abstraction.

Roger
Mr. Mailing List
2003-10-08 01:39:39 UTC
Permalink
i am interested in putting midi and images on there.
when do you think this functionality might be
implemented?
thanks





--- Stephen Wood <***@users.sourceforge.net> wrote:
> On Tue, 2003-10-07 at 15:48, Mr. Mailing List wrote:
> > Please oh please support sanyo 4900, thanks!
> >
> > __________________________________
>
> It's being worked on, albeit slowly. I am in the
> process of preparing a
> sanitized trace to help with making a protocol
> description. I have a
> perl script that will read (but not write) all the
> phonebook, calendar,
> callhistory and messages from the phone. If anyone
> is interested, I'll
> post or mail a copy of the script. There are some
> data fields in what
> hte script gets that I don't understand, so maybe
> someone can help with
> that.
>
>
>
>
-------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Bitpim-devel mailing list
> Bitpim-***@lists.sourceforge.net
>
https://lists.sourceforge.net/lists/listinfo/bitpim-devel


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
Loading...