PC Phone Sync

From MoDe

Table of contents

Developing and debugging Symbian 60 Python using a PC


Main Source

[PC -- Phone Sync (http://people.csail.mit.edu/kapu/symbian/python.html)]   Kari Puli's bluetooth PC to Phone file sync and execute.

PC/Phone Sync Issues (as of March 2006; newer version from April onwards probably has new issues; would like to phase that this link and only keep live issues here)

Mac <-> Phone Sync

These notes work on my Mac OS X, 10.4.6 (tiger) It kinda works but lots of things to install. wxpython (which is pythonw).

First must install the [framework verison of python (http://undefined.org/python/)].

Then can install the wxpython version: Get it from this [wxpython site (http://www.wxpython.org/download.php)]. I used the Universal Binaries, unicode version (called osx-unicode-py2.4).

Then one needs [pyserial (http://sourceforge.net/project/showfiles.php?group_id=46487)]. There is some darwinports version, but I did not want to install that stuff, so I downloaded the platform independent version from sourceforge. Then, after unzipping, did "su pythonw2.4 setup.py install" -- earlier, I did not use pythonw2.4, but just did python and then had problems.

Now, I setup a com port, I called it SerialPort1. Then editted sync.config in the putools/pcfiles directory. Then comes the silly part. "pythonw2.4 push" starts up, then I start up phpush on the phone under the python scripts. At this point, the Pythonw2.4 on the Mac seems to hand. Kill it (cntl-c) then restart it, and a window pops up connected to the phone. I then usually do a "sync" to upload/download the files. Then a "cd" to get to "e:/system/apps/python" and then "cd my" to get to the right directory. finally, I type a "run test.py" to actually start the python script running on the phone.

New Issues -- Things that need fixing

Currently, when running under push, initially placed in a Z: direcotry on the phone. Got to get to the python directory to run scripts. 'cd' will do this (without parameter) as will 'cd e:System/Apps/python'

General confusion as to '/' or '\' or '\\' Within python application on phone, '\\' work; have not tried the others.

If run out of memory, phone will reboot. When that happens, have to kill push on PC side and restart. Otherwise no new connection will be made.

On PC, the bluetooth com ports seem to be tied to the exact usb plug -- at least on my thinkpad. So if I put the bluetooth dongle into a different slot, I have to change com port in config file.

The new push, puts phpush.py in the python directory and not in the "python/my' directory. I kept launching the old version (in python/my) and got all messed up.

Handy Tip

Sometimes, my application disables all the buttons and then hangs on the phone. An easy way to kill the python (or any other app running on the symbian OS phone), is to hold down the "menu" button -- the weird recycle like key -- and a list of running applications pops up in the upper left corner of the screen. Scroll to the python app. (select to bring it to foreground) Hit the "C" button to kill the application.

Back (and Misc)

Spring 2006 Class