开发者

Bluetooth Service Name not shown by HTC Wildfire

I'm working on an app that needs to provide a Bluetooth ServerSocket to some other device. The device I have to work with establishes the connection ignoring the uuid and only looking for devices with correct Service Name.

I open the BluetoothServerSocket with the following command:

UUID uuid = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB");
tmp = mBluetoothAdapter.listenUsingRfcommWithServiceRecord("PWAccesP", uuid);

My problem is, that the ServiceName is not published by the Android SDP. When I query the available services using sdptool, I get the following output:

...

Service RecHandle: 0x10008
Service Class ID List:
  UUID 128: 00001101-0000-1000-8000-00805F9B34FB
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
Channel: 6

So the Service is available, but the service name is not listed and so my device can't connect.

I'm working with an HTC Wildfire with Android 2.1.

My question now is, is this a problem of the HTC Bluetooth stack, is it a problem of the Wildfire or is it a problem of Android 2.1?

Unfortunately I have no other phones available to check so I ask the community to help me out here... Has anybody encountered this before or knows how to get the Service name to show up?

Btw: I was able to verify that the Bl开发者_C百科uetoothSocketServer connects using a different device that connects by uuid rather than by service name.

Thanks and regards, Michael


After updating my Wildfire device to Android 2.2, the Bluetooth Service Name is now connected correct. If the fix came from the Bluetooth stack or Android 2.2 is not clear to me but doesn't matter since it's working...


Just tried to work some more with the PWAccessP devices on Wildfire with 2.2 (and service name correctly shown in sdptool). Unfortunately I also wasn't able to establish a connection to the device.

I have two different PWAccessP devices here and both are not connecting to the Wildfire.

Additionally I tried to connect them to my laptop using a server socket perl script I found somewhere. I was able to connect to my laptop using a third device, but the PWAccessP's didn't. I have a short activity shown by my BT-manager but I guess that's only the sdp part, but no pairing/connection is established.

However, I have a running app for Blackberry that successfully co-operates with the PWAccessP-devices, so it must somehow be possible. (I have the source code but it's not really helping for android...)

If somebody finds a solution to this problem, please, please let us know.

Regards, Michael


And a final answer from my side (if somebody else is still working on this):

I tried it now on a Nexus S with Android 2.3.x and I finally was able to connect the PWAccessP devices. Took me some time to pair and the phone has to be visible all the time, but at least I got it working.

Regards, Michael


I suspect that the problem lies in the particular hardware below Android, as there are at least some Android phones known to work with these devices (e.g. Motorola Droid).

Anybody tried giving up on the Android API and just using Java with JSR-82 (Bluetooth extensions) to receive data from these devices on Android? It may be true that this hooks in differently than the Android APIs, and might just work...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜