【android bluetooth 案例分析 03】【PTS 测试 】【PBAP/PCE/SGSIT/SERR/BV-01-C】

1. PBAP/PCE/SGSIT/OFFS/BV-01-C

1. 测试项说明:

Please initiate a GATT connection over BR/EDR to the PTS.

Description: Verify that the Implementation Under Test (IUT) can initiate GATT connect request over BR/EDR to PTS.

测试项名称
Please initiate a GATT connection over BR/EDR to the PTS.

测试项描述
验证被测设备(IUT)是否能够通过 BR/EDR(经典蓝牙)主动发起 GATT 连接请求到 PTS(Protocol Test System)

2. 基本概念

1. 什么是 GATT?

GATT(Generic Attribute Profile)是 BLE(低功耗蓝牙)中用于设备之间传输数据的通用协议,基于 ATT(Attribute Protocol)实现。

2. 什么是 BR/EDR?

BR/EDR 是“Basic Rate / Enhanced Data Rate”的缩写,也就是经典蓝牙。传统上,GATT 运行于 BLE(即 LE)上,但从 Bluetooth Core v4.1 起,GATT 也可以工作在 BR/EDR 上。

3. 为什么要测试 GATT over BR/EDR?

虽然 GATT 多用于 BLE,但有些场景或设备(比如某些老设备或兼容设备)需要在经典蓝牙上复用 GATT 协议。因此,Bluetooth SIG 定义了这个测试项来确保 IUT 能在 BR/EDR 上传输 GATT 协议。


3. 测试目的

验证被测设备(IUT)是否能够:

  1. 使用 BR/EDR(经典蓝牙)连接到 PTS
  2. 正确发起 GATT 连接请求(如发送 MTU 交换请求);
  3. 在 BR/EDR 信道上使用 ATT 协议通信
  4. 满足 GATT over BREDR 的规范要求

4. 测试流程简述

步骤动作
1IUT 与 PTS 建立配对(通过经典蓝牙)
2IUT 执行 SDP 查询,找到 PTS 提供的 GATT 服务(UUID: 0x1801
3IUT 通过 BR/EDR 打开 L2CAP 固定信道(通常为 0x0004)
4IUT 发送 ATT 请求(如 Exchange MTU Request)
5PTS 响应,连接建立成功
6记录测试结果(通过 / 失败)

5. 测试重点与注意事项

项目要点
✅ 连接方式必须是 BR/EDR(经典蓝牙),不能使用 BLE
✅ SDP 查询IUT 应能找到 GATT 服务的 SDP 记录(Generic Attribute Profile)
✅ L2CAP 信道使用固定信道 0x0004 建立 ATT 通道
✅ ATT 层IUT 应发送标准的 GATT 请求,如 MTU 交换、服务发现等
❌ 错误示范如果 IUT 走了 BLE 的 GATT 路径,则测试会被判为失败
⚠️ 蓝牙协议栈支持部分蓝牙协议栈(如 Android、BlueZ)默认不支持 GATT over BR/EDR,需要手动适配或扩展

6. 常见失败原因(SERR)

问题原因
GATT 请求未发出IUT 没有正确连接或协议栈不支持
使用了 LE 连接测试要求使用经典蓝牙,不能用 LE
SDP 查询失败未找到 GATT 服务 UUID
L2CAP 信道错误未使用 0x0004 或配置不当
没有发送 ATT 数据上层未触发 GATT 请求流程

7. 调试建议

  • 抓包工具:使用 Ellisys 或 Frontline 观察 HCI 层是否通过 BR/EDR 连接;

  • 确认 ACL 链路类型:应为 classic BR ACL 而非 LE;

  • 查看 SDP 记录:确认 PTS 是否发布了 GATT 服务 UUID;

  • 打印日志:开启协议栈日志,如 BlueZ 可查看 btmon,Android 可用 logcat


8. 总结

本测试项的关键是:

确保设备在 BR/EDR 上传输 GATT 协议,并能主动连接并通信。

由于很多现代蓝牙协议栈默认只支持 GATT over LE,若设备原生不支持,需要自行扩展协议栈才能通过此项测试。

2. 真实车机侧案例

我们 IUT 测试对象是车机。 android 的协议栈不支持,默认不支持 GATT over BR/EDR。 看到这里, 是不是有点担心。 如果要过这一项测试,是不是要 人为改代码, 来适配 GATT over BR/EDR。 我实际测试了一下。直接是可以通过的。

我这里 记录一下 车机侧的 btsnoop 日志。 看一下为何在协议栈不支持 GATT over BR/EDR 的情况下。还能测试通过。

在这里插入图片描述

  • 发现只有 sdp 的流程, 没有后续 连接 pbap 的流程。
  • 那我们重点看一下, 车机发起 sdp 后, pts. 回复的内容。
# 车机向 pts 查询 Phonebook Access Server 
975	2025-04-25 17:53:59.966042	22:22:96:de:b1:39 (leo 8295 chan)	Vencer_f4:b1:83 (PTS-PBAP-B183)	SDP	29	Sent Service Search Attribute Request : Phonebook Access Server: Attribute Range (0x0000 - 0xffff) 



# pts 回复如下:
980	2025-04-25 17:53:59.991359	Vencer_f4:b1:83 (PTS-PBAP-B183)	22:22:96:de:b1:39 (leo 8295 chan)	SDP	19	Rcvd Service Search Attribute Response 

Bluetooth SDP Protocol
    PDU: Service Search Attribute Response (0x07)
    Transaction Id: 0x0000
    Parameter Length: 5
    Attribute List Byte Count: 2
    Attribute Lists [count =  0]
        Data Element: Sequence uint8 0 bytes
            0011 0... = Data Element Type: Sequence (6)
            .... .101 = Data Element Size: uint8 (5)
            Data Element Var Size: 0
            Data Value: MISSING     # 这里看到 pts 返回的 数据内容是空的。
    Continuation State: no (00)

而我们 协议栈判断到, pts 的 返回的 sdp record 是空的后, 就没有继续发起 pbap 的连接。

04-25 17:53:59.140092  9393  9488 D PbapClientStateMachine: mCchPathUsed: false
04-25 17:53:59.140338  9393  9720 I PbapClientStateMachine: Enter Connecting: -2
04-25 17:53:59.140520  9393  9720 D PbapClientStateMachine: Connection state 00:1B:DC:F4:B1:83: 0->1
04-25 17:54:00.009577  9393  9393 I PbapClientStateMachine: onReceiveandroid.bluetooth.device.action.SDP_RECORD
04-25 17:54:00.009815  9393  9393 I PbapClientStateMachine: Received UUID: 0000112f-0000-1000-8000-00805f9b34fb
04-25 17:54:00.009968  9393  9393 I PbapClientStateMachine: expected UUID: 0000112f-0000-1000-8000-00805f9b34fb

// 直接返回错误了
04-25 17:54:00.010025  9393  9393 E PbapClientStateMachine: SDP Record fetched status isn't ok - Ignore. status=1
// android/app/src/com/android/bluetooth/pbapclient/PbapClientStateMachine.java

        private class SDPBroadcastReceiver extends BroadcastReceiver {
            @Override
            public void onReceive(Context context, Intent intent) {
                String action = intent.getAction();
                if (DBG) {
                    Log.i(TAG, "onReceive" + action);
                }
                if (action.equals(BluetoothDevice.ACTION_SDP_RECORD)) {
                    BluetoothDevice device =
                            intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
                    BluetoothDevice sm_device = getDevice();
                    if (sm_device !=null) {
                        if (!device.equals(getDevice())) {
                            Log.w(TAG, "SDP Record fetched for different device - Ignore");
                            return;
                        }
                    } else {
                        Log.d(TAG, "SDP Record get device is null - Ignore");
                        return;
                    }

                    ParcelUuid uuid = intent.getParcelableExtra(BluetoothDevice.EXTRA_UUID);
                    if (DBG) {
                        Log.i(TAG, "Received UUID: " + uuid.toString());
                        Log.i(TAG, "expected UUID: " + BluetoothUuid.PBAP_PSE.toString());
                    }
                    int search_status= intent.getIntExtra(BluetoothDevice.EXTRA_SDP_SEARCH_STATUS,-1);
                    if (search_status != AbstractionLayer.BT_STATUS_SUCCESS) {
                        // 直接在这里返回退出了。
                        Log.e(TAG, "SDP Record fetched status isn't ok - Ignore. status="+search_status);
                        return;
                    }
                    if (uuid.equals(BluetoothUuid.PBAP_PSE)) {
                        // 正常的逻辑,应该走到这里, sdp 完成后,会继续触发 后续连接操作。
                        sendMessage(MSG_SDP_COMPLETE,
                                intent.getParcelableExtra(BluetoothDevice.EXTRA_SDP_RECORD));
                    }
                }
            }
        }
    }

发现这一项, 由于 pts 返回的 sdp record 状态有问题。 后续车机干脆没有发起 pbap 的连接。 直接 pts软件 pass 了。


3. 正确的 sdp

这里对比分享一个 正常,可以建立 pbap 情况下的, sdp 的内容。

# 车机主动发起 sdp 请求
846	2025-04-25 14:08:32.468449	22:22:96:de:b1:39 (leo 8295 chan)	Vencer_f4:b1:83 (PTS-PBAP-B183)	SDP	29	Sent Service Search Attribute Request : Phonebook Access Server: Attribute Range (0x0000 - 0xffff) 



# pts 回复正确的 sdp record
849	2025-04-25 14:08:32.507350	Vencer_f4:b1:83 (PTS-PBAP-B183)	22:22:96:de:b1:39 (leo 8295 chan)	SDP	255	Rcvd Service Search Attribute Response 

Bluetooth SDP Protocol
    PDU: Service Search Attribute Response (0x07)
    Transaction Id: 0x0000
    Parameter Length: 241
    Attribute List Byte Count: 238
    Attribute Lists [count =  2]
        Data Element: Sequence uint8 236 bytes
            0011 0... = Data Element Type: Sequence (6)
            .... .101 = Data Element Size: uint8 (5)
            Data Element Var Size: 236
            Data Value
                Attribute List [count = 10] (Phonebook Access Server)
                    Data Element: Sequence uint8 119 bytes
                        0011 0... = Data Element Type: Sequence (6)
                        .... .101 = Data Element Size: uint8 (5)
                        Data Element Var Size: 119
                        Data Value
                            Service Attribute: Service Record Handle (0x0), value = 0x00090021 (589857)
                                Attribute ID: Service Record Handle
                                    Data Element: Unsigned Integer 2 bytes
                                        0000 1... = Data Element Type: Unsigned Integer (1)
                                        .... .001 = Data Element Size: 2 bytes (1)
                                        Data Value
                                            Attribute ID: Service Record Handle (0x0000)
                                Value
                                    Data Element: Unsigned Integer 4 bytes
                                        0000 1... = Data Element Type: Unsigned Integer (1)
                                        .... .010 = Data Element Size: 4 bytes (2)
                                        Data Value
                                            Service Record Handle: 0x00090021
                            Service Attribute: Service Class ID List (0x1), value = Phonebook Access Server
                                Attribute ID: Service Class ID List
                                    Data Element: Unsigned Integer 2 bytes
                                        0000 1... = Data Element Type: Unsigned Integer (1)
                                        .... .001 = Data Element Size: 2 bytes (1)
                                        Data Value
                                            Attribute ID: Service Class ID List (0x0001)
                                Value
                                    Data Element: Sequence uint8 3 bytes
                                        0011 0... = Data Element Type: Sequence (6)
                                        .... .101 = Data Element Size: uint8 (5)
                                        Data Element Var Size: 3
                                        Data Value
                                            Data Element: UUID 2 bytes
                                                0001 1... = Data Element Type: UUID (3)
                                                .... .001 = Data Element Size: 2 bytes (1)
                                                Data Value
                                                    Value: UUID: Phonebook Access Server (0x112f)
                            Service Attribute: Protocol Descriptor List (0x4), value = L2CAP -> RFCOMM:2 -> OBEX
                                Attribute ID: Protocol Descriptor List
                                    Data Element: Unsigned Integer 2 bytes
                                        0000 1... = Data Element Type: Unsigned Integer (1)
                                        .... .001 = Data Element Size: 2 bytes (1)
                                        Data Value
                                            Attribute ID: Protocol Descriptor List (0x0004)
                                Value
                                    Data Element: Sequence uint8 17 bytes
                                        0011 0... = Data Element Type: Sequence (6)
                                        .... .101 = Data Element Size: uint8 (5)
                                        Data Element Var Size: 17
                                        Data Value
                                            Protocol #1: L2CAP
                                                Data Element: Sequence uint8 3 bytes
                                                    0011 0... = Data Element Type: Sequence (6)
                                                    .... .101 = Data Element Size: uint8 (5)
                                                    Data Element Var Size: 3
                                                    Data Value
                                                        Protocol Entry: L2CAP
                                                            Data Element: UUID 2 bytes
                                                                0001 1... = Data Element Type: UUID (3)
                                                                .... .001 = Data Element Size: 2 bytes (1)
                                                                Data Value
                                                                    Value: UUID: L2CAP (0x0100)
                                            Protocol #2: RFCOMM, RFCOMM Channel: 2
                                                Data Element: Sequence uint8 5 bytes
                                                    0011 0... = Data Element Type: Sequence (6)
                                                    .... .101 = Data Element Size: uint8 (5)
                                                    Data Element Var Size: 5
                                                    Data Value
                                                        Protocol Entry: RFCOMM, RFCOMM Channel: 2
                                                            Data Element: UUID 2 bytes
                                                                0001 1... = Data Element Type: UUID (3)
                                                                .... .001 = Data Element Size: 2 bytes (1)
                                                                Data Value
                                                                    Value: UUID: RFCOMM (0x0003)
                                                            Data Element: Unsigned Integer 1 byte (0 bytes if Nil)
                                                                0000 1... = Data Element Type: Unsigned Integer (1)
                                                                .... .000 = Data Element Size: 1 byte (0 bytes if Nil) (0)
                                                                Data Value
                                                                    RFCOMM Channel: 2 (0x02)
                                            Protocol #3: OBEX
                                                Data Element: Sequence uint8 3 bytes
                                                    0011 0... = Data Element Type: Sequence (6)
                                                    .... .101 = Data Element Size: uint8 (5)
                                                    Data Element Var Size: 3
                                                    Data Value
                                                        Protocol Entry: OBEX
                                                            Data Element: UUID 2 bytes
                                                                0001 1... = Data Element Type: UUID (3)
                                                                .... .001 = Data Element Size: 2 bytes (1)
                                                                Data Value
                                                                    Value: UUID: OBEX (0x0008)
                            Service Attribute: Browse Group List (0x5), value = Public Browse Group
                                Attribute ID: Browse Group List
                                    Data Element: Unsigned Integer 2 bytes
                                        0000 1... = Data Element Type: Unsigned Integer (1)
                                        .... .001 = Data Element Size: 2 bytes (1)
                                        Data Value
                                            Attribute ID: Browse Group List (0x0005)
                                Value
                                    Data Element: Sequence uint8 3 bytes
                                        0011 0... = Data Element Type: Sequence (6)
                                        .... .101 = Data Element Size: uint8 (5)
                                        Data Element Var Size: 3
                                        Data Value
                                            Data Element: UUID 2 bytes
                                                0001 1... = Data Element Type: UUID (3)
                                                .... .001 = Data Element Size: 2 bytes (1)
                                                Data Value
                                                    Value: UUID: Public Browse Group (0x1002)
                            Service Attribute: Language Base Attribute ID List (0x6), value = (Lang: en, Encoding: UTF-8, Attribute Base: 0x0100)
                                Attribute ID: Language Base Attribute ID List
                                    Data Element: Unsigned Integer 2 bytes
                                        0000 1... = Data Element Type: Unsigned Integer (1)
                                        .... .001 = Data Element Size: 2 bytes (1)
                                        Data Value
                                            Attribute ID: Language Base Attribute ID List (0x0006)
                                Value
                                    Data Element: Sequence uint8 9 bytes
                                        0011 0... = Data Element Type: Sequence (6)
                                        .... .101 = Data Element Size: uint8 (5)
                                        Data Element Var Size: 9
                                        Data Value
                                            Language #1: Lang: en, Encoding: UTF-8, Attribute Base: 0x0100
                                                Data Element: Unsigned Integer 2 bytes
                                                    0000 1... = Data Element Type: Unsigned Integer (1)
                                                    .... .001 = Data Element Size: 2 bytes (1)
                                                    Data Value
                                                        Language Code: en
                                                Data Element: Unsigned Integer 2 bytes
                                                    0000 1... = Data Element Type: Unsigned Integer (1)
                                                    .... .001 = Data Element Size: 2 bytes (1)
                                                    Data Value
                                                        Language Encoding: UTF-8 (106)
                                                Data Element: Unsigned Integer 2 bytes
                                                    0000 1... = Data Element Type: Unsigned Integer (1)
                                                    .... .001 = Data Element Size: 2 bytes (1)
                                                    Data Value
                                                        Attribute Base: 0x0100
                            Service Attribute: Bluetooth Profile Descriptor List (0x9), value = Phonebook Access Profile 1.2
                                Attribute ID: Bluetooth Profile Descriptor List
                                    Data Element: Unsigned Integer 2 bytes
                                        0000 1... = Data Element Type: Unsigned Integer (1)
                                        .... .001 = Data Element Size: 2 bytes (1)
                                        Data Value
                                            Attribute ID: Bluetooth Profile Descriptor List (0x0009)
                                Value
                                    Data Element: Sequence uint8 8 bytes
                                        0011 0... = Data Element Type: Sequence (6)
                                        .... .101 = Data Element Size: uint8 (5)
                                        Data Element Var Size: 8
                                        Data Value
                                            Data Element: Sequence uint8 6 bytes
                                                0011 0... = Data Element Type: Sequence (6)
                                                .... .101 = Data Element Size: uint8 (5)
                                                Data Element Var Size: 6
                                                Data Value
                                                    Profile Descriptor List #1: Phonebook Access Profile, Version 1.2
                                                        Data Element: UUID 2 bytes
                                                            0001 1... = Data Element Type: UUID (3)
                                                            .... .001 = Data Element Size: 2 bytes (1)
                                                            Data Value
                                                                Value: UUID: Phonebook Access Profile (0x1130)
                                                        Data Element: Unsigned Integer 2 bytes
                                                            0000 1... = Data Element Type: Unsigned Integer (1)
                                                            .... .001 = Data Element Size: 2 bytes (1)
                                                            Data Value
                                                                Protocol Version: 0x0102
                            Service Attribute: Service Name (0x100), value = Phonebook Acccess PSE
                                Attribute ID: Service Name
                                    Data Element: Unsigned Integer 2 bytes
                                        0000 1... = Data Element Type: Unsigned Integer (1)
                                        .... .001 = Data Element Size: 2 bytes (1)
                                        Data Value
                                            Attribute ID: Service Name (0x0100)
                                Value
                                    Data Element: Text string uint8 22 bytes
                                        0010 0... = Data Element Type: Text string (4)
                                        .... .101 = Data Element Size: uint8 (5)
                                        Data Element Var Size: 22
                                        Data Value
                                            Service Name: Phonebook Acccess PSE
                            Service Attribute: (PBAP) GOEP L2CAP PSM (0x200), value = 4101 (0x1005)
                                Attribute ID: GOEP L2CAP PSM
                                    Data Element: Unsigned Integer 2 bytes
                                        0000 1... = Data Element Type: Unsigned Integer (1)
                                        .... .001 = Data Element Size: 2 bytes (1)
                                        Data Value
                                            Attribute ID: GOEP L2CAP PSM (0x0200)
                                Value
                                    Data Element: Unsigned Integer 2 bytes
                                        0000 1... = Data Element Type: Unsigned Integer (1)
                                        .... .001 = Data Element Size: 2 bytes (1)
                                        Data Value
                                            GOEP L2CAP PSM: 4101 (0x1005)
                            Service Attribute: (PBAP) Supported Repositories (0x314), value = LocalPhonebook SIM SpeedDial Favourites 
                                Attribute ID: Supported Repositories
                                    Data Element: Unsigned Integer 2 bytes
                                        0000 1... = Data Element Type: Unsigned Integer (1)
                                        .... .001 = Data Element Size: 2 bytes (1)
                                        Data Value
                                            Attribute ID: Supported Repositories (0x0314)
                                Value
                                    Data Element: Unsigned Integer 1 byte (0 bytes if Nil)
                                        0000 1... = Data Element Type: Unsigned Integer (1)
                                        .... .000 = Data Element Size: 1 byte (0 bytes if Nil) (0)
                                        Data Value
                                            Supported Repositories: 0x0f
                                                0000 .... = Reserved: 0x0
                                                .... 1... = Favourites: True
                                                .... .1.. = Speed Dial: True
                                                .... ..1. = SIM Card: True
                                                .... ...1 = Local Phonebook: True
                            Service Attribute: (PBAP) Supported Features (0x317), value = 
                                Attribute ID: Supported Features
                                    Data Element: Unsigned Integer 2 bytes
                                        0000 1... = Data Element Type: Unsigned Integer (1)
                                        .... .001 = Data Element Size: 2 bytes (1)
                                        Data Value
                                            Attribute ID: Supported Features (0x0317)
                                Value
                                    Data Element: Unsigned Integer 4 bytes
                                        0000 1... = Data Element Type: Unsigned Integer (1)
                                        .... .010 = Data Element Size: 4 bytes (2)
                                        Data Value
                                            Supported Features: 0x00000000
                                                0000 0000 0000 0000 0000 00.. .... .... = Reserved: 0x000000
                                                .... .... .... .... .... ..0. .... .... = Default Contact Image Format: False
                                                .... .... .... .... .... ...0 .... .... = Contact Referencing: False
                                                .... .... .... .... .... .... 0... .... = X-BT-UID vCard Property: False
                                                .... .... .... .... .... .... .0.. .... = X-BT-UCI vCard Property: False
                                                .... .... .... .... .... .... ..0. .... = Enhanced Missed Calls: False
                                                .... .... .... .... .... .... ...0 .... = vCard Selecting: False
                                                .... .... .... .... .... .... .... 0... = Folder Version Counters: False
                                                .... .... .... .... .... .... .... .0.. = Database Identifier: False
                                                .... .... .... .... .... .... .... ..0. = Browsing: False
                                                .... .... .... .... .... .... .... ...0 = Download: False
                Attribute List [count =  9] (Phonebook Access Server)
                    Data Element: Sequence uint8 113 bytes
                        0011 0... = Data Element Type: Sequence (6)
                        .... .101 = Data Element Size: uint8 (5)
                        Data Element Var Size: 113
                        Data Value
                            Service Attribute: Service Record Handle (0x0), value = 0x00090063 (589923)
                                Attribute ID: Service Record Handle
                                    Data Element: Unsigned Integer 2 bytes
                                        0000 1... = Data Element Type: Unsigned Integer (1)
                                        .... .001 = Data Element Size: 2 bytes (1)
                                        Data Value
                                            Attribute ID: Service Record Handle (0x0000)
                                Value
                                    Data Element: Unsigned Integer 4 bytes
                                        0000 1... = Data Element Type: Unsigned Integer (1)
                                        .... .010 = Data Element Size: 4 bytes (2)
                                        Data Value
                                            Service Record Handle: 0x00090063
                            Service Attribute: Service Class ID List (0x1), value = Phonebook Access Server
                                Attribute ID: Service Class ID List
                                    Data Element: Unsigned Integer 2 bytes
                                        0000 1... = Data Element Type: Unsigned Integer (1)
                                        .... .001 = Data Element Size: 2 bytes (1)
                                        Data Value
                                            Attribute ID: Service Class ID List (0x0001)
                                Value
                                    Data Element: Sequence uint8 3 bytes
                                        0011 0... = Data Element Type: Sequence (6)
                                        .... .101 = Data Element Size: uint8 (5)
                                        Data Element Var Size: 3
                                        Data Value
                                            Data Element: UUID 2 bytes
                                                0001 1... = Data Element Type: UUID (3)
                                                .... .001 = Data Element Size: 2 bytes (1)
                                                Data Value
                                                    Value: UUID: Phonebook Access Server (0x112f)
                            Service Attribute: Protocol Descriptor List (0x4), value = L2CAP -> RFCOMM:2 -> OBEX
                                Attribute ID: Protocol Descriptor List
                                    Data Element: Unsigned Integer 2 bytes
                                        0000 1... = Data Element Type: Unsigned Integer (1)
                                        .... .001 = Data Element Size: 2 bytes (1)
                                        Data Value
                                            Attribute ID: Protocol Descriptor List (0x0004)
                                Value
                                    Data Element: Sequence uint8 17 bytes
                                        0011 0... = Data Element Type: Sequence (6)
                                        .... .101 = Data Element Size: uint8 (5)
                                        Data Element Var Size: 17
                                        Data Value
                                            Protocol #1: L2CAP
                                                Data Element: Sequence uint8 3 bytes
                                                    0011 0... = Data Element Type: Sequence (6)
                                                    .... .101 = Data Element Size: uint8 (5)
                                                    Data Element Var Size: 3
                                                    Data Value
                                                        Protocol Entry: L2CAP
                                                            Data Element: UUID 2 bytes
                                                                0001 1... = Data Element Type: UUID (3)
                                                                .... .001 = Data Element Size: 2 bytes (1)
                                                                Data Value
                                                                    Value: UUID: L2CAP (0x0100)
                                            Protocol #2: RFCOMM, RFCOMM Channel: 2
                                                Data Element: Sequence uint8 5 bytes
                                                    0011 0... = Data Element Type: Sequence (6)
                                                    .... .101 = Data Element Size: uint8 (5)
                                                    Data Element Var Size: 5
                                                    Data Value
                                                        Protocol Entry: RFCOMM, RFCOMM Channel: 2
                                                            Data Element: UUID 2 bytes
                                                                0001 1... = Data Element Type: UUID (3)
                                                                .... .001 = Data Element Size: 2 bytes (1)
                                                                Data Value
                                                                    Value: UUID: RFCOMM (0x0003)
                                                            Data Element: Unsigned Integer 1 byte (0 bytes if Nil)
                                                                0000 1... = Data Element Type: Unsigned Integer (1)
                                                                .... .000 = Data Element Size: 1 byte (0 bytes if Nil) (0)
                                                                Data Value
                                                                    RFCOMM Channel: 2 (0x02)
                                            Protocol #3: OBEX
                                                Data Element: Sequence uint8 3 bytes
                                                    0011 0... = Data Element Type: Sequence (6)
                                                    .... .101 = Data Element Size: uint8 (5)
                                                    Data Element Var Size: 3
                                                    Data Value
                                                        Protocol Entry: OBEX
                                                            Data Element: UUID 2 bytes
                                                                0001 1... = Data Element Type: UUID (3)
                                                                .... .001 = Data Element Size: 2 bytes (1)
                                                                Data Value
                                                                    Value: UUID: OBEX (0x0008)
                            Service Attribute: Browse Group List (0x5), value = Public Browse Group
                                Attribute ID: Browse Group List
                                    Data Element: Unsigned Integer 2 bytes
                                        0000 1... = Data Element Type: Unsigned Integer (1)
                                        .... .001 = Data Element Size: 2 bytes (1)
                                        Data Value
                                            Attribute ID: Browse Group List (0x0005)
                                Value
                                    Data Element: Sequence uint8 3 bytes
                                        0011 0... = Data Element Type: Sequence (6)
                                        .... .101 = Data Element Size: uint8 (5)
                                        Data Element Var Size: 3
                                        Data Value
                                            Data Element: UUID 2 bytes
                                                0001 1... = Data Element Type: UUID (3)
                                                .... .001 = Data Element Size: 2 bytes (1)
                                                Data Value
                                                    Value: UUID: Public Browse Group (0x1002)
                            Service Attribute: Language Base Attribute ID List (0x6), value = (Lang: en, Encoding: UTF-8, Attribute Base: 0x0100)
                                Attribute ID: Language Base Attribute ID List
                                    Data Element: Unsigned Integer 2 bytes
                                        0000 1... = Data Element Type: Unsigned Integer (1)
                                        .... .001 = Data Element Size: 2 bytes (1)
                                        Data Value
                                            Attribute ID: Language Base Attribute ID List (0x0006)
                                Value
                                    Data Element: Sequence uint8 9 bytes
                                        0011 0... = Data Element Type: Sequence (6)
                                        .... .101 = Data Element Size: uint8 (5)
                                        Data Element Var Size: 9
                                        Data Value
                                            Language #1: Lang: en, Encoding: UTF-8, Attribute Base: 0x0100
                                                Data Element: Unsigned Integer 2 bytes
                                                    0000 1... = Data Element Type: Unsigned Integer (1)
                                                    .... .001 = Data Element Size: 2 bytes (1)
                                                    Data Value
                                                        Language Code: en
                                                Data Element: Unsigned Integer 2 bytes
                                                    0000 1... = Data Element Type: Unsigned Integer (1)
                                                    .... .001 = Data Element Size: 2 bytes (1)
                                                    Data Value
                                                        Language Encoding: UTF-8 (106)
                                                Data Element: Unsigned Integer 2 bytes
                                                    0000 1... = Data Element Type: Unsigned Integer (1)
                                                    .... .001 = Data Element Size: 2 bytes (1)
                                                    Data Value
                                                        Attribute Base: 0x0100
                            Service Attribute: Bluetooth Profile Descriptor List (0x9), value = Phonebook Access Profile 1.0
                                Attribute ID: Bluetooth Profile Descriptor List
                                    Data Element: Unsigned Integer 2 bytes
                                        0000 1... = Data Element Type: Unsigned Integer (1)
                                        .... .001 = Data Element Size: 2 bytes (1)
                                        Data Value
                                            Attribute ID: Bluetooth Profile Descriptor List (0x0009)
                                Value
                                    Data Element: Sequence uint8 8 bytes
                                        0011 0... = Data Element Type: Sequence (6)
                                        .... .101 = Data Element Size: uint8 (5)
                                        Data Element Var Size: 8
                                        Data Value
                                            Data Element: Sequence uint8 6 bytes
                                                0011 0... = Data Element Type: Sequence (6)
                                                .... .101 = Data Element Size: uint8 (5)
                                                Data Element Var Size: 6
                                                Data Value
                                                    Profile Descriptor List #1: Phonebook Access Profile, Version 1.0
                                                        Data Element: UUID 2 bytes
                                                            0001 1... = Data Element Type: UUID (3)
                                                            .... .001 = Data Element Size: 2 bytes (1)
                                                            Data Value
                                                                Value: UUID: Phonebook Access Profile (0x1130)
                                                        Data Element: Unsigned Integer 2 bytes
                                                            0000 1... = Data Element Type: Unsigned Integer (1)
                                                            .... .001 = Data Element Size: 2 bytes (1)
                                                            Data Value
                                                                Protocol Version: 0x0100
                            Service Attribute: Service Name (0x100), value = Phonebook Acccess PSE
                                Attribute ID: Service Name
                                    Data Element: Unsigned Integer 2 bytes
                                        0000 1... = Data Element Type: Unsigned Integer (1)
                                        .... .001 = Data Element Size: 2 bytes (1)
                                        Data Value
                                            Attribute ID: Service Name (0x0100)
                                Value
                                    Data Element: Text string uint8 22 bytes
                                        0010 0... = Data Element Type: Text string (4)
                                        .... .101 = Data Element Size: uint8 (5)
                                        Data Element Var Size: 22
                                        Data Value
                                            Service Name: Phonebook Acccess PSE
                            Service Attribute: (PBAP) Supported Repositories (0x314), value = LocalPhonebook SIM SpeedDial Favourites 
                                Attribute ID: Supported Repositories
                                    Data Element: Unsigned Integer 2 bytes
                                        0000 1... = Data Element Type: Unsigned Integer (1)
                                        .... .001 = Data Element Size: 2 bytes (1)
                                        Data Value
                                            Attribute ID: Supported Repositories (0x0314)
                                Value
                                    Data Element: Unsigned Integer 1 byte (0 bytes if Nil)
                                        0000 1... = Data Element Type: Unsigned Integer (1)
                                        .... .000 = Data Element Size: 1 byte (0 bytes if Nil) (0)
                                        Data Value
                                            Supported Repositories: 0x0f
                                                0000 .... = Reserved: 0x0
                                                .... 1... = Favourites: True
                                                .... .1.. = Speed Dial: True
                                                .... ..1. = SIM Card: True
                                                .... ...1 = Local Phonebook: True
                            Service Attribute: (PBAP) Supported Features (0x317), value = 
                                Attribute ID: Supported Features
                                    Data Element: Unsigned Integer 2 bytes
                                        0000 1... = Data Element Type: Unsigned Integer (1)
                                        .... .001 = Data Element Size: 2 bytes (1)
                                        Data Value
                                            Attribute ID: Supported Features (0x0317)
                                Value
                                    Data Element: Unsigned Integer 4 bytes
                                        0000 1... = Data Element Type: Unsigned Integer (1)
                                        .... .010 = Data Element Size: 4 bytes (2)
                                        Data Value
                                            Supported Features: 0x00000000
                                                0000 0000 0000 0000 0000 00.. .... .... = Reserved: 0x000000
                                                .... .... .... .... .... ..0. .... .... = Default Contact Image Format: False
                                                .... .... .... .... .... ...0 .... .... = Contact Referencing: False
                                                .... .... .... .... .... .... 0... .... = X-BT-UID vCard Property: False
                                                .... .... .... .... .... .... .0.. .... = X-BT-UCI vCard Property: False
                                                .... .... .... .... .... .... ..0. .... = Enhanced Missed Calls: False
                                                .... .... .... .... .... .... ...0 .... = vCard Selecting: False
                                                .... .... .... .... .... .... .... 0... = Folder Version Counters: False
                                                .... .... .... .... .... .... .... .0.. = Database Identifier: False
                                                .... .... .... .... .... .... .... ..0. = Browsing: False
                                                .... .... .... .... .... .... .... ...0 = Download: False
    Continuation State: no (00)



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值