forked from auto-pts/auto-pts
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathoverview.txt
118 lines (93 loc) · 3.59 KB
/
overview.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
Tester protocol for Bluetooth stack
***********************************
Copyright (C) 2021 Codecoup
Copyright (C) 2015 Intel Corporation
Overview
========
This document describes the format of data used for communicating between tester
and implementation under test (IUT).
The protocol is SOCK_STREAM based and follows a strict PDU specification
with a generic header and initial registration exchange. The communication is
driven from tester with commands/response exchange. The protocol is single PDU
exchanged based, meaning every command requires a response. IUT will use events
to signal notifications.
Commands and events use single socket. All services are multi-plexed over same
socket.
.-- IUT --. .--Tester--.
| | | |
| | Command | |
| | <-------------------------- | |
| | | |
| | Response | |
| | --------------------------> | |
| | | |
| | Event | |
| | --------------------------> | |
| | | |
'-----------' '----------'
Packet Structures
=================
Every packet will follow the basic header to support simple multi-plexing
over the same socket. It will also support a basic control channel with service
id 0. Due to use of single socket for command/response and events it is
possible that event(s) will be received before response to command.
0 8 16 24 40
+------------+--------+------------------+-------------+
| Service ID | Opcode | Controller Index | Data Length |
+------------+--------+------------------+-------------+
| |
The unique service ID is assigned by this specification for each service
supported by tester.
As general rule of thumb, the opcode for command matches the opcode for a
response. Or the opcode 0x00 for an error is returned.
Events opcodes start from 0x80.
All fields are in little-endian byte order (least significant byte first).
Controller Index can have a special value <non-controller> to indicate that
command or event is not related to any controller. Possible values:
<controller id> 0x00 to 0xFE
<non-controller> 0xFF
Error response is common for all services and has fixed structure:
Opcode 0x00 - Error response
Response parameters: Status (1 octet)
Valid status values: 0x01 = Fail
0x02 = Unknown Command
0x03 = Not ready
0x04 = Invalid Index
BTP Services
============
Each service commands and events are defined in separate text file named
btp_SERVICE_NAME.txt. The currently defined services are listed below. Core Service
is mandatory to be supported by IUT.
ID Name
0x00 Core Service
0x01 GAP Service
0x02 GATT Service (DEPRECATED)
0x03 L2CAP Service
0x04 Mesh Node Service
0x05 Mesh Model Service
0x06 GATT Client Service
0x07 GATT Server Service
0x08 VCS Service
0x09 IAS Service
0x0a AICS Service
0x0b VOCS Service
0x0c PACS Service
0x0d ASCS Service
0x0e BAP Service
0x0f HAS Service
0x10 MICP Service
0x11 CSIS Service
0x12 MICS Service
0x13 CCP Service
0x14 VCP Service
0x15 CAS Service
0x16 MCP Service
0x17 GMCS Service
0x18 HAP Service
0x19 CSIP Service
0x1a CAP Service
0x1b TBS Service
0x1c TMAP Service
0x1d OTS Service
0x1e PBP Service
# GENERATOR append 1