forked from nrfconnect/auto-pts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
overview.txt
117 lines (92 loc) · 3.49 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
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
0 Core Service
1 GAP Service
2 GATT Service (DEPRECATED)
3 L2CAP Service
4 Mesh Node Service
5 Mesh Model Service
6 GATT Client Service
7 GATT Server Service
8 VCS Service
9 IAS Service
10 AICS Service
11 VOCS Service
12 PACS Service
13 ASCS Service
14 BAP Service
15 HAS Service
16 MICP Service
17 CSIS Service
18 MICS Service
19 CCP Service
20 VCP Service
21 CAS Service
22 MCP Service
23 GMCS Service
24 HAP Service
25 CSIP Service
26 CAP Service
27 TBS Service
28 TMAP Service
29 OTS Service
# GENERATOR append 1