Another alternative for developers to test and debug applications without using the emulator is to use the Bluetooth console. In facts it connects the PC directly to the Python environment on the phone. All is needed is to switch the Bluetooth on the phone and to have on the phone a HyperTerminal opened and listening to the COM port. Make sure you have the bluetooth settings of the PC's bluetooth software correctly set:
- right click on bluetooth icon -> choose open bluetooth settings to open them.
- choose Options tab, make sure "Turn discovery on" is selected
- choose COM ports tab, make sure an COM port as "incoming" direction available, if not click add and created an incoming COM port
Let us have a look at the steps needed to run the “Hello World!” script via Bluetooth Console:
- Open a HyperTerminal on the PC listening to the port assigned to the Bluetooth serial service:
- go to Accessories -> Communications -> HyperTerminal
- give a name and choose an icon, press ok, then choose in the "connect" field the COM port of your "incoming port", press ok
- make the HyperTerminal active by clicking the "call" button.
- Select the Python icon and click on it from the phone
- Start the Bluetooth Console on the phone: Options->Bluetooth console (see Figure 3)
- After the device discovery, connect to the PC
- On both the phone’s an HyperTerminal’s screen a message will appear (see Figure 4)
- Type on the HyperTerminal the following code as shown in Figure 5:
- On the phone’s screen will pop up the Hello World message as shown in the Figure 6.
Note: Click on the Figures to enlarge them!!!