views:

35

answers:

1

Hi,

I'm developing an application which serves as bluetooth server for a bluetooth external device (the communication is started by the external device). This external device request from the bluetooth service I'm deploying a concrete service name ("PWAccessP"), so I initiate the serversocket by the following instruction:

serversocket = Activa.myBluetoothAdapter.listenUsingRfcommWithServiceRecord("PWAccessP", UUID.fromString("00001101-0000-1000-8000-00805F9B34FB"));

But when with a test application which search the bluetooth services offered by my phone, I get the following log:

search services on 38E7D82E98F8 HTC Desire
service Unknown found btspp://38E7D82E98F8:22;authenticate=false;encrypt=false;master=false

With "Unknown" as service name, indicating that the name of the offered service is unknown. I've checked this service is the one I'm deploying.

The phone I'm working is a HTC Desire.

Does anybody know what can be the problem?

Thanks in advance.

A: 

Hi user365610, do you still encountered the problem? I have another problem related to 'PWAccessP' devices. my android phone is nexus one 2.2.1.

I am having alot of issues: 1. Eventhough PWAccessP device and the nexusone is already paired, the android phone still needs to be discoverable in order for the PWAccessP device to connect and send data. and this is something intermitent.. sometime android doesnt receive socket connection eventhough it is already discoverable. 2. and it takes very long time (1-2 minutes) for android to receive measurement result from PWAccessP. sometime, no connection at all..

do you face similar issues?

cwrx
Hi cwrx, unfortunately I don't get ever to set my service name to "PWaccessP", and as I don't get this, I don't get ever to pair my sensor with the mobile. If you can pass me the code you use for deploying the service I'd be very pleased. I though it could be a problem about HTC Bluetooth stack implementation (they have commited some faults on this), but maybe I'm commiting some mistakes.
i see. i dont have that problem. my PWAccessp devices (BP and SC) are able to pair, connect and transmit data to the android app. im using nexus one 2.2.1. and using Bluetooth Chat code as my base. my problem is that the next time the android app starts again, BP and SC is not able to connect back to to the android app and android needs to be discoverable again. the devices then is able to connect back to anrdoid (this process takes more than 1 minute). and the android app is able to receive data and subsequent ones (as long as the app is not restarted).
cwrx