PyS60: PUTools, Advanced Python Console From Your Nokia Phone on Your Mac (OSX 10.4 Tiger)




Use PUTools to connect to give your phone from your mac giving you an advanced bluetooth console with syntax highlight, auto file syncronization, etc.

Start by completeling the steps in this instructable to setup a simple bluetooth console.

I did it on my Nokia E70, but it should work equally well for all S60v2 and S60v3 phones as well. (E50, E60, E61, E62, E70, E90, n70, n80, n95, 6820, 6822, etc)

View this instructable on all one page it's easier to see that way.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Setup and Test the Basic Console.

Setup a basic Python console over bluetooth.
Follow my other instructable: PyS60: Python console from your Nokia phone on your Mac.

Make sure the simple console is working, cause if it doesn't, this won't work either.
Once you have that working, continue to the next step.

Step 2: Install Python and Related Prerequisites on Your Mac

Download/update Python:
Download and install Python 2.5 from the download page (I used Python 2.5.1 python-2.5.1-macosx.dmg

Download and install the Unicode OSX build of wxPython for Python 2.5 from the wxPython download page (I used wxPython2.8-osx-unicode-

Download pySerial from the PySeial SourceForge download page (I downloaded

Open terminal and go into the pyserial directory.
Run "python install" (see screenshot).

Step 3: Download and Modify PUTools

Download PUTools. (I downloaded putools.tgz Changelog version Dec 3, 2006, md5sum: bf1862632e261aff277451ac5abc07d8)

Extract this archive.
Edit putools\ adding the following two lines at the top (see screenshot 1):
import sys

Open the 'Bluetooth File Exchange' application. Press cancel to the file selection box.
Go to File->Browse Device.
Copy the modified putools\ to E:\Python.
Browse to E:\Python and create a 'libs' directory.
Copy putools\libs\*.py to E:\Python\libs\ on the phone (,,,

Edit putools\pcfiles\sync.config
Set COM_PORT = '/dev/tty.bt_console'
Or whatever the name of the serial port was that you created in Step 3 of the Prerequisite Instructables guide. You did follow that guide, right?

These assume you have a memory card in your phone which mounts at E:\. Adjust accordingly if you do not.

Step 4: Connect PUTools!

On your mac, open a Terminal.
cd into putools/pcfiles/
chmod +x push

Go to your phone and run the python shell.
Select Run Script and select
Select Other...
Select your Mac
Select 'bt_console' from the 'Choose port:' dialog.

Back on the mac,
kill push (CTRL-C)
wait a couple seconds and a 2nd time, run:

Again, thats:
run push (OSX)
run phpush (phone)
CTRL-C push (OSX)
rerun push (OSX)

This should launch a wxpython window (seperate dock item) and give you a pretty nice shell. If not, move on to the next step for troubleshooting.

Step 5: Troubleshooting

Here are some suggestions to try if you have issues:

From the bluetooth menu, disable and renable bluetooth.
Restart your phone.
Don't use the 'Default' when selecting the serial port to connect to.

If that doesn't work, try deleting the pairing from your phone and OSX, pair them again, restart and try again.

And remember, the order is:
push on OSX (from terminal)
phpush on the phone.
CTRL-C push on OSX
relaunch push on OSX.

More links that might help:,_tools,_and_support



    • Indoor Lighting Contest

      Indoor Lighting Contest
    • Metal Contest

      Metal Contest
    • Make It Fly Challenge

      Make It Fly Challenge