在S3C2410上移植bluetooth(蓝牙)(3)
发布时间:2021-06-07
发布时间:2021-06-07
在S3C2410上移植bluetooth(蓝牙)
TX bytes:313 acl:0 sco:0 commands:15 errors:0
Features: 0xff 0xff 0x8d 0x78 0x08 0x18 0x00 0x00
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF PARK
Link mode: SLAVE ACCEPT
Name: 'BlueZ (0)'
Class: 0x000100
Service Classes: Unspecified
Device Class: Computer, Uncategorized
HCI Ver: 1.2 (0x2) HCI Rev: 0x1ae LMP Ver: 1.2 (0x2) LMP Subver: 0x1ae
Manufacturer: Integrated System Solution Corp. (57)
可以看到目前设备的配置情况,有些是从hcid.conf中读取的,有些是从设备中读取的。
下面,打开手机上的蓝牙,启动蓝牙GPS
# hcitool scan
Scanning ...
00:0E:07:58:1A:33 T628
00:08:1B:C0:D1:3C HOLUX GR-231
这样就看到了两个设备了,我用的是索爱的T628和HOLUX的蓝牙GPS,前面的一串应该是蓝牙设备唯一的地址。 #sdptool browse 可以看到每个设备所提供的服务
Inquiring ...
Browsing 00:0E:07:58:1A:33 ...
Service Name: Dial-up Networking
Service RecHandle: 0x10000
Service Class ID List:
"Dialup Networking" (0x1103)
"Generic Networking" (0x1201)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 1
Profile Descriptor List:
"Dialup Networking" (0x1103)
Version: 0x0100
.............
Service Name: Serial Port 1
Service RecHandle: 0x10003
Service Class ID List:
"Serial Port" (0x1101)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 4