Search code examples
androidserial-portrfcomm

Android 2.2. How to set up serial port(com,rfcomm) port?


I a trying to connect my Nexus One with Android version 2.2.1 with my pc and use a terminal program such as windows terminal or hyper terminal to communicate. To do this I believe I need to set up an outgoing serial com port. I have paired the devices. When I go on my PC to Bluetooth -> settings -> "add com port" the android device does not display.

What am I missing?

Does android 2.2.1 support spp? The documentation says it does.

Do I need to root the android to add spp?

Has anyone succeeded in this?

My final goal is to write an android app that communicates with an old school bluetooth device that requires com ports? Getting the android to communicate with the pc is an interim step.

I have tried everything I can think of in my android app to connect to my pc and android device but have not been successful. My android app is essentially the same as Serial over Bluetooth submitted by xCaffeniated but with fewer comments. Any suggestions?


Solution

  • Try beginning with the BluetoothChat sample application. You will then have to alter the UUID used to the generic SPP UUID,

    00001101-0000-1000-8000-00805F9B34FB

    From this point you pretty much have everything you need.

    I have had issues pairing in the BluetoothChat program. So I was required to pair to my computer using the settings menu and then entering the BluetoothChat Program. In BTChat go to the menu and hit connect to a device, choose your computer. I can only speak for windows XP SP3 which is what I'm using. At this point on my machine I receive a task bar pop up asking me if I would like to allow my device to connect as a serial port. I allow it to. Now your phone is associated as the serial port profile on the computer, which you can associate with a specific com port.