0

我目前正在开发基于蓝牙聊天示例的 Android 应用程序。该代码似乎有效,但是当我尝试将我的安卓设备(三星 Ace GT-S5839i)与我的笔记本电脑配对时,一些驱动程序无法安装。在设备蓝牙服务列表中,我可以看到 BluetoothChatSecure 和 BluetoothChatInsecure 服务,但是当我尝试将手机连接到笔记本电脑时出现连接错误。

这是我第一次做任何蓝牙开发,我不知道会发生什么。

编辑:

其实我有几个错误:

08-11 01:34:49.140: E/BluetoothChat(29847): + ON RESUME +
08-11 01:34:49.187: E/BluetoothEventLoop.cpp(1510): onCreateDeviceResult: D-Bus error: org.bluez.Error.AlreadyExists (Device already exists)
08-11 01:34:49.203: E/DTUN_HCID4(29886): No device pointer found for peer! Ignore Error = true. Ignoring error...
08-11 01:34:49.421: E/(29869): ****************search UUID = 87fa***********
08-11 01:34:50.179: E/BluetoothEventLoop.cpp(1510): event_filter: Received signal org.bluez.Device:PropertyChanged from /org/bluez/29886/hci0/dev_70_F1_A1_B7_61_A8
08-11 01:34:54.304: E/BluetoothEventLoop.cpp(1510): event_filter: Received signal org.bluez.Device:PropertyChanged from /org/bluez/29886/hci0/dev_70_F1_A1_B7_61_A8

附言

有谁知道为什么当我使用默认 uuid 时 Windows 试图安装两个蓝牙外围设备而没有找到正确的驱动程序?

4

1 回答 1

0

我终于在手机和笔记本电脑之间建立了蓝牙安全连接。这些是必需的步骤:

  • 首先,我在笔记本电脑中设置了一个蓝牙 Icoming COM 端口
  • 其次,我根据[android文档][2]更改了我的uuid
Hint: If you are connecting to a Bluetooth serial board then try using the well-known SPP UUID 00001101-0000-1000-8000-00805F9B34FB.
  • 然后我在我的手机中启用了 SSP 服务,这样我就可以让标准串行蓝牙链接工作了
  • 最后,我通过超级终端(如腻子)打开与 Icoming COM 端口的串行连接

我希望这对某人有帮助。

于 2012-08-12T08:45:40.633 回答