在Android平板电脑上安装蓝牙SPP

在Android平板电脑上安装蓝牙SPP,android,bluetooth,bluez,spp,Android,Bluetooth,Bluez,Spp,我无法从Android JellyBean平板电脑中找到我的蓝牙打印机。但这两种设备都可以从我的macbook中发现。蓝牙打印机规格说明它使用SPP(串行端口配置文件)进行通信。sdptool输出低于 shell@android:/ # sdptool browse local Browsing FF:FF:FF:00:00:00 ... Service RecHandle: 0x10000 Service Class ID List: "PnP Information" (0x1200)

我无法从Android JellyBean平板电脑中找到我的蓝牙打印机。但这两种设备都可以从我的macbook中发现。蓝牙打印机规格说明它使用SPP(串行端口配置文件)进行通信。sdptool输出低于

shell@android:/ # sdptool browse local
Browsing FF:FF:FF:00:00:00 ...
Service RecHandle: 0x10000
Service Class ID List:
  "PnP Information" (0x1200)
Profile Descriptor List:
  "PnP Information" (0x1200)
    Version: 0x0102

Service Name: Audio Source
Service RecHandle: 0x10001
Service Class ID List:
  "Audio Source" (0x110a)
Protocol Descriptor List:
  "L2CAP" (0x0100)
    PSM: 25
  "AVDTP" (0x0019)
    uint16: 0x102
Profile Descriptor List:
  "Advanced Audio" (0x110d)
    Version: 0x0102

Service Name: AVRCP TG
Service RecHandle: 0x10002
Service Class ID List:
  "AV Remote Target" (0x110c)
Protocol Descriptor List:
  "L2CAP" (0x0100)
    PSM: 23
  "AVCTP" (0x0017)
    uint16: 0x103
Profile Descriptor List:
  "AV Remote" (0x110e)
    Version: 0x0100

Service Name: Voice Gateway
Service RecHandle: 0x10003
Service Class ID List:
  "Headset Audio Gateway" (0x1112)
  "Generic Audio" (0x1203)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 11
Profile Descriptor List:
  "Headset" (0x1108)
    Version: 0x0100

Service Name: OBEX Object Push
Service RecHandle: 0x10004
Service Class ID List:
  "OBEX Object Push" (0x1105)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 12
  "OBEX" (0x0008)
Profile Descriptor List:
  "OBEX Object Push" (0x1105)
    Version: 0x0100

Service Name: Network service
Service Description: Network service
Service RecHandle: 0x10005
Service Class ID List:
  "Network Access Point" (0x1116)
Protocol Descriptor List:
  "L2CAP" (0x0100)
    PSM: 15
  "BNEP" (0x000f)
    Version: 0x0100
    SEQ16: 800 806
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "Network Access Point" (0x1116)
    Version: 0x0100
试图添加SP

shell@android:/ # sdptool add SP
Serial Port service registered
添加SP后,使用sdptool浏览列表显示SP服务

Service Name: Serial Port
Service Description: COM Port
Service Provider: BlueZ
Service RecHandle: 0x10006
Service Class ID List:
  "Serial Port" (0x1101)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 1
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "Serial Port" (0x1101)
    Version: 0x0100
我尝试使用此设置进行查找,但它仍然找不到蓝牙打印机

我不确定SP是否安装在我的Android上的bluez堆栈上,因为我找不到hcitool或rfcomm可执行文件

这是我的/etc/bluetooth文件夹中的列表

shell@android:/ # ls /etc/bluetooth/                                           
BCM40183B2_26M.hcd
audio.conf
auto_pairing.conf
blacklist.conf
bt_addr.conf
input.conf
main.conf
network.conf

在本地设备中添加sdp记录使您的设备能够提供该服务,您能否执行“sdptool browse”并检查打印机支持的服务?我有mac,无法运行命令行工具来查询该服务。会去一个朋友的地方管理他们,然后回来。