My blog on life the universe and everything…

How to use the Bluetooth console of PyS60 from your computer.

Open a shell and type the following commands one at a time:

“hciconfig reset”

“rfcomm listen 0 3”

This last command will advertise an rfcomm connection on channel 3.

then on your PyS60 screen on the phone choose “Options ->Bluetooth Console” to connect to the computer.

Once this is done, open a new shell and type “screen /dev/rfcomm0″

whala! you can now type in commands on your PC and those are redirected to the phone. Commands that do not require UI access will be displayed on your computer screen, but UI based commands such as appuifw.note(u”hello world”,”info”) will be displayed on your phone as would happen if the script was running on your phone (which is what is happening actually).


If the above approach does not work for you, try the one below:

Plug-in your bluetooth adapter, and then from the shell:

hciconfig reset

Then check that the device exists by typing:

  • $ hcitool dev

Register a serial port (use channel 2. For some reason, channel 1 and channel 3 might not let the connection through)

  • $ sdptool add –channel=2 SP

Now listen to the channel:

  • $ rfcomm listen rfcomm2 2

In your phone, make sure bluetooth is on, then go to the Python application and then select the Bluetooth Console. Select from the list of available devices your computer’s bluetooth adapter (you might need to select search even if you think you have already defined the pairing). If the operation is successful, you should see something similar to the following on your computer’s shell:

  • Waiting for connection on channel 2
  • Connection from 00:11:9F:BE:47:CA to /dev/rfcomm2
  • Press CTRL-C for hangup

Now open a new shell terminal and execute:

  • $ cu -l /dev/rfcomm2



PyS60 Bluetooth console

bluetooth fun with my Nokia 6600


4 responses to “How to use the Bluetooth console of PyS60 from your computer.

  1. Manuel July 9, 2008 at 5:43 pm

    When I choose “Bluetooth Console” phone says “No serial ports found”, any idea? Thanks

  2. serk01 July 10, 2008 at 1:12 am

    I have added one more approach that might work for you. I have also added the sources of this information ( I am sorry, I should have done this before) in case you still have problems and want to look around for further solutions. cheers!

  3. Manuel July 10, 2008 at 7:34 am

    1st: sdptool add –channel=2 SP doesn’t work you have to put sdptool add –channel=2 SP

    2nd: doesn’t work for me. “No serial ports found” again.

  4. serk01 July 10, 2008 at 10:17 am

    The “–channel” is actually with two dashes but for some reason the wordpress editor turns it to one as you can see from your own comment which has the same end result.
    For the 2nd point I really don’t know what might be the problem. One of those two approaches has always worked for me. I suggest you use the links I provided to find your way around the problem in other resources.

%d bloggers like this: