views:

1837

answers:

3

Hello,

I'm writing an application which is able to communicate with my PC. I have used the Bluetooth functionalities of the SDK 2.1.

I can find devices, get their MAC address, create a RFCOMM socket, but when I start the connection, I get the following error message :

Service discovery failed.

1)Is it because of the UUID which is not the same on my application and on my PC ? 2)How can I get the correct UUID on my PC ?

If I write a such application, is my Nexus one the client or the server ?

Thanks a lot for your help !

A: 

Did you ever get the answer for this? I have a serial bluetooth dongle for my PC and I'm not seeing data on the serial port of the pc. Get the same error as you do.

Drew Kerwin
A: 

Ok I got the same problem but I think I can answer a few of your questions. If your PC opened a SPP Port e.g. by using "sdptool add --channel=3 SP" Your android would be the client opening a Socket and connecting with this socket to the server (your PC or any other bluetooth device e.g. GPS mouse etc.).

You can get this Information by reading this article, the definition of a client did I take out of this article.

If you are opening a SPP Port on the Server (your PC etc.) you are offering a standard service an there is a special UUID assigned to this service this would be: "00001101-0000-1000-8000-00805F9B34FB" if I'm not mistaken.

So I think we should get an qualified answer from an Android developer. Or ask this question on Thursday during the IRC office hours.

Greets

philDev

philDev
A: 

Although it could be your UUID, I would also suggest you make sure the bluetooth MAC is accurate and upper-case.

I would also suggest running hcidump -X in a terminal on the Linux box and see if you can see any 2-way traffic between your Linux machine and phone throughout the process.

Brad Hein