Monday, August 31, 2009

Bluetooth interactive console using pyS60

Nowadays, text messages via mobile phones are shortening to small, but difficult to understand language. I don't think whether the major reason behind this shortening is economic, but most people feel tedious to type text through a 4*3 panel. Typing a program like, C or python in correct syntax is again a tedious work. You can use bluetooth console, in order to avoid this problem effectively. Here I describe how to setup bluetooth consloe communcation in your MS Windows XP platform. For beginners, this procedure may feel ambigous. So I tried my maximum to describe it with screenshots.

If you are not aware of pyS60 please read this.

You can find some other tutorials here:
s60python
nokia wiki
pys60 Library Referance
Yet another tutorial
Lecture

The above links were extremely useful to me. The procedure is repeated here, but I tried to describe it in rather simple way. If you feel any difficulties, please inform me.

Setting up bluetooth interactive console in winXP

step1: Plug your bluetooth device into your PC (any USB port). Then Run your bluetooth driver program which you installed from the CD/DVD when you buy your bluetooth dongle.
Then automatically a serial port is assigned for it. In my PC, it is COM6. You can do step 5 in case you don't know the COM port your PC supported.

step2: Run command 'hypertrm' in your run window. Run window can be opened by clicking Run option from the start menu.

step3:You will get hyperterminal opened like this:

Enter any valid name for your connection and select a suitable icon and forward.

step4:Then you will get another box like this:

Type any 3 digit area code and phone number.Your country or region may be automatically filled. If not, do it manually. Select COM6 from 'connection using' lineEdit tab. It may be changed. You will get which COM port your computer assigned (If you didn't get it, notice first screenshot)

step5:Take your symbian smart phone with pys60 installed. Turn your bluetooth ON and open pys60 application. From 'options' menu, select 'bluetooth console'. Your application then searches for blutooth device. You can optionally select it as your default connection.

step6 (Error Debugging): You are now probably connected successfully. Not yet? Check your connections. Check whether you run your bluetooth driver.If your bluetooth driver is running, a symbol of bluetooth will appear on the panel (see screenshot 1). I used Enter blutooth dongle (part number:E-UBTV) from entermultimedia. and it's driver(BlueSoleil). The driver is downloadable in case you lost the CD/DVD with your dongle. If you can type anythong on the white blank screen of hyperterminal, you are probably done everything. Else, you should check the whole procedure.
In any case, you should plug out the dongle and replug.
Didn't connected yet? Some mysterious powers are playing around you ;-)
I am happy to help if you can't find any way to connect.


step7: If you are successful in connecting your mobile, you are done.

step8:You can do anythong with python. Try these

step9: While you close application, you get a dialogue box and click yes.

You can save hyperterminal settings for the future use. Then when you run 'hypertrm' command, you will get a window like screenshot 2. simply close the box named 'Connection Description' and then you can open the saved file (here, pybluetooth.ht). Again there is an option to save the connection in your mobile and make it as default connection.

8 comments:

Anonymous said...

Thanks! Very useful!

Anonymous said...

What is pyS60? Is it python? I am using nokia 6300. Can I use it?
Please give an introduction. It will be very useful for beginners.

Tom Varghese Konikkara said...

Reply:
PyS60 is a minimal python for Symbian S60 powered mobile phones. Currently PyS60 supports S60 3rd edition OS. Check whether your phone has the same OS.

Anonymous said...

What if I run on Vista :/? I don't have the HyperTerminal...

Tom Varghese Konikkara said...

Reply:
Since I am not a Vista user, I cant say clearly about it. Wait for a while

Anonymous said...

On Vista you can use PuttyTel, available at
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Anonymous said...

Hey hi,
I bought same dongle. But after installing it says it will run on evaluation version which will transfer only 2 mb data, and connection gets lost after 2 or 3 min automatically.
I have installed drivers from CD already.
Please help;

Tom Varghese Konikkara said...

Reply to Anonymous
Are you successful in transferring any kind of data to any BT device like mobile phone? If yes, it will work.
Most probably, your need to register your device while connected to internet to make your driver valid