Using PuTools for PyS60 development

I started using pys60 since a few months ago for some simple quick prototyping on S60 smartphones. I realise the development can be tedious, when you have to type your codes on the desktop, then copy it via USB to the phone then run it. Therefore i searched a little and found the tool PUTools.

To get it running on an ubuntu system isn't really that difficult - the standard installation needs the package python-serial and you are ready to go. so do this before you download and unpack the software

wahlau:~/$ sudo apt-get install python-serial

download the package and unpack it where you want to run it. i suppose it will in your home directory, so following i will assume ~/putools to be where you should find it. After extracting the files, remember to modify the line COM_PORT in the file ~/putools/pcfiles/sync.config. Mine would be

COM_PORT = '/dev/rfcomm3'

Also you should define the rfcomm port and channel. i did this to my /etc/bluetooth/rfcomm.conf

rfcomm3 {
        bind no;
        device XX:XX:XX:XX:XX:XX;
        channel 9;
        comment "N95 8GB";
}

Replace the XX:XX:XX:XX:XX:XX with your bluetooth id of your phone. you can use hcitool scan to discover it.

To start using it i find the instruction mentioned here very good:

wahlau:~/putools/pfciles$ sudo rfcomm listen /dev/rfcomm3 9 ./push

when executed it will wait for the phone to initiate the communication. So once you ran the command above, it is time to start your pys60 shell on your phone, and select the file phpush.py and select your phone.

Once successfully connected, a simple console client will appear as follows:

now you can just test commands over the push console, or sync your python scripts (stored until the directory of PUTools you extracted above). For me i usually use sync follow by run myscript.py. I don't even need to start the script on the phone! :)

I will try to update somethings i have done as pys60 examples later, once i figure out whether if my stuffs are presentable or not :) have fun.