1 /*
2  * Copyright 2018 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
19 #include <vector>
20 
21 // AVRCP packets pulled from wireshark
22 namespace {
23 
24 // AVRCP Get Capabilities Request packet
25 std::vector<uint8_t> get_capabilities_request = {0x01, 0x48, 0x00, 0x00, 0x19, 0x58,
26                                                  0x10, 0x00, 0x00, 0x01, 0x03};
27 
28 // AVRCP Get Capabilities Request packet with Company ID
29 std::vector<uint8_t> get_capabilities_request_company_id = {0x01, 0x48, 0x00, 0x00, 0x19, 0x58,
30                                                             0x10, 0x00, 0x00, 0x01, 0x02};
31 
32 // AVRCP Get Capabilities Request packet with Unknown
33 std::vector<uint8_t> get_capabilities_request_unknown = {0x01, 0x48, 0x00, 0x00, 0x19, 0x58,
34                                                          0x10, 0x00, 0x00, 0x01, 0x7f};
35 
36 // AVRCP Get Capabilities Response to Company ID request
37 std::vector<uint8_t> get_capabilities_response_company_id = {0x0c, 0x48, 0x00, 0x00, 0x19, 0x58,
38                                                              0x10, 0x00, 0x00, 0x08, 0x02, 0x02,
39                                                              0x00, 0x19, 0x58, 0x00, 0x23, 0x45};
40 
41 // AVRCP Get Capabilities Response to Events Supported request
42 std::vector<uint8_t> get_capabilities_response_events_supported = {
43         0x0c, 0x48, 0x00, 0x00, 0x19, 0x58, 0x10, 0x00, 0x00, 0x05, 0x03, 0x03, 0x01, 0x02, 0x05};
44 
45 // AVRCP Get Element Attributes request for current playing song and attribute
46 // Title
47 std::vector<uint8_t> get_element_attributes_request_partial = {
48         0x01, 0x48, 0x00, 0x00, 0x19, 0x58, 0x20, 0x00, 0x00, 0x0d, 0x00, 0x00,
49         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01};
50 
51 // AVRCP Get Element Attributes request for current playing song and attributes
52 // Title, Artist, Album, Media Number, Playing Time, Total Number of Media, and
53 // Genre
54 std::vector<uint8_t> get_element_attributes_request_full = {
55         0x01, 0x48, 0x00, 0x00, 0x19, 0x58, 0x20, 0x00, 0x00, 0x25, 0x00, 0x00,
56         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x01, 0x00,
57         0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00,
58         0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06};
59 
60 // AVRCP Get Element Attributes request for current playing song and attributes
61 // Title, Artist, Album, Media Number, Playing Time, Total Number of Media,
62 // Genre, and Cover Art
63 std::vector<uint8_t> get_element_attributes_request_full_cover_art = {
64         0x01, 0x48, 0x00, 0x00, 0x19, 0x58, 0x20, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00,
65         0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
66         0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07,
67         0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08};
68 
69 // AVRCP Get Element Attributes response with attribute values as follows
70 // Title: "Test Song"
71 // Artist: "Test Artist"
72 // Album: "Test Album"
73 // Track Number: "1"
74 // Number of Tracks: "2"
75 // Genre: "Test Genre"
76 // Duration: "1000"
77 std::vector<uint8_t> get_elements_attributes_response_full = {
78         0x0c, 0x48, 0x00, 0x00, 0x19, 0x58, 0x20, 0x00, 0x00, 0x67, 0x07, 0x00, 0x00, 0x00, 0x01,
79         0x00, 0x6a, 0x00, 0x09, 0x54, 0x65, 0x73, 0x74, 0x20, 0x53, 0x6f, 0x6e, 0x67, 0x00, 0x00,
80         0x00, 0x02, 0x00, 0x6a, 0x00, 0x0b, 0x54, 0x65, 0x73, 0x74, 0x20, 0x41, 0x72, 0x74, 0x69,
81         0x73, 0x74, 0x00, 0x00, 0x00, 0x03, 0x00, 0x6a, 0x00, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x20,
82         0x41, 0x6c, 0x62, 0x75, 0x6d, 0x00, 0x00, 0x00, 0x04, 0x00, 0x6a, 0x00, 0x01, 0x31, 0x00,
83         0x00, 0x00, 0x05, 0x00, 0x6a, 0x00, 0x01, 0x32, 0x00, 0x00, 0x00, 0x06, 0x00, 0x6a, 0x00,
84         0x0a, 0x54, 0x65, 0x73, 0x74, 0x20, 0x47, 0x65, 0x6e, 0x72, 0x65, 0x00, 0x00, 0x00, 0x07,
85         0x00, 0x6a, 0x00, 0x04, 0x31, 0x30, 0x30, 0x30};
86 
87 // AVRCP Get Play Status Request
88 std::vector<uint8_t> get_play_status_request = {0x01, 0x48, 0x00, 0x00, 0x19,
89                                                 0x58, 0x30, 0x00, 0x00, 0x00};
90 
91 // AVRCP Get Play Status Response
92 std::vector<uint8_t> get_play_status_response = {0x0c, 0x48, 0x00, 0x00, 0x19, 0x58, 0x30,
93                                                  0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00,
94                                                  0xff, 0xff, 0xff, 0xff, 0x00};
95 
96 // AVRCP List Player Application Setting Attributes Request
97 std::vector<uint8_t> list_player_application_setting_attributes_request = {
98         0x01, 0x48, 0x00, 0x00, 0x19, 0x58, 0x11, 0x00, 0x00, 0x00};
99 
100 // AVRCP List Player Application Setting Attributes Response
101 std::vector<uint8_t> list_player_application_setting_attributes_response = {
102         0x0c, 0x48, 0x00, 0x00, 0x19, 0x58, 0x11, 0x00, 0x00, 0x03, 0x02, 0x02, 0x03};
103 
104 // AVRCP List Player Application Setting Attribute Values Request
105 std::vector<uint8_t> list_player_application_setting_attribute_values_request = {
106         0x01, 0x48, 0x00, 0x00, 0x19, 0x58, 0x12, 0x00, 0x00, 0x01, 0x02};
107 
108 // AVRCP List Player Application Setting Attribute Values - Invalid Setting
109 // Request
110 std::vector<uint8_t> invalid_setting_list_player_application_setting_attribute_values_request = {
111         0x01, 0x48, 0x00, 0x00, 0x19, 0x58, 0x12, 0x00, 0x00, 0x01, 0xff};
112 
113 // AVRCP List Player Application Setting Attribute Values - Invalid Length
114 // Request
115 std::vector<uint8_t> invalid_length_list_player_application_setting_attribute_values_request = {
116         0x01, 0x48, 0x00, 0x00, 0x19, 0x58, 0x12, 0x00, 0x00, 0x00};
117 
118 // AVRCP List Player Application Setting Attribute Values Response
119 std::vector<uint8_t> list_player_application_setting_attribute_values_response = {
120         0x0c, 0x48, 0x00, 0x00, 0x19, 0x58, 0x12, 0x00, 0x00, 0x05, 0x04, 0x01, 0x02, 0x03, 0x04};
121 
122 // AVRCP Get Current Player Application Setting Value Request
123 std::vector<uint8_t> get_current_player_application_setting_value_request = {
124         0x01, 0x48, 0x00, 0x00, 0x19, 0x58, 0x13, 0x00, 0x00, 0x03, 0x02, 0x02, 0x03};
125 
126 // AVRCP Get Current Player Application Setting Value - Invalid Setting
127 // Request
128 std::vector<uint8_t> invalid_setting_get_current_player_application_setting_value_request = {
129         0x01, 0x48, 0x00, 0x00, 0x19, 0x58, 0x13, 0x00, 0x00, 0x03, 0x02, 0x02, 0x7f};
130 
131 // AVRCP Get Current Player Application Setting Value - Invalid Length
132 // Request
133 std::vector<uint8_t> invalid_length_get_current_player_application_setting_value_request = {
134         0x01, 0x48, 0x00, 0x00, 0x19, 0x58, 0x13, 0x00, 0x00, 0x00};
135 
136 // AVRCP Get Current Player Application Setting Value Response
137 std::vector<uint8_t> get_current_player_application_setting_value_response = {
138         0x0c, 0x48, 0x00, 0x00, 0x19, 0x58, 0x13, 0x00, 0x00, 0x05, 0x02, 0x02, 0x01, 0x03, 0x01};
139 
140 // AVRCP Set Player Application Setting Value Request
141 std::vector<uint8_t> set_player_application_setting_value_request = {
142         0x00, 0x48, 0x00, 0x00, 0x19, 0x58, 0x14, 0x00, 0x00, 0x05, 0x02, 0x02, 0x01, 0x03, 0x01};
143 
144 // AVRCP Set Player Application Setting Value Request - Invalid Setting
145 // Request
146 std::vector<uint8_t> invalid_setting_set_player_application_setting_value_request = {
147         0x00, 0x48, 0x00, 0x00, 0x19, 0x58, 0x14, 0x00, 0x00, 0x05, 0x02, 0x02, 0x01, 0x7f, 0x01};
148 
149 // AVRCP Set Player Application Setting Value Request - Invalid Value
150 // Request
151 std::vector<uint8_t> invalid_value_set_player_application_setting_value_request = {
152         0x00, 0x48, 0x00, 0x00, 0x19, 0x58, 0x14, 0x00, 0x00, 0x05, 0x02, 0x02, 0x01, 0x03, 0x7f};
153 
154 // AVRCP Set Player Application Setting Value Request - Invalid Length
155 // Request
156 std::vector<uint8_t> invalid_length_set_player_application_setting_value_request = {
157         0x00, 0x48, 0x00, 0x00, 0x19, 0x58, 0x14, 0x00, 0x00, 0x00};
158 
159 // AVRCP Set Player Application Setting Value Response
160 std::vector<uint8_t> set_player_application_setting_value_response = {0x09, 0x48, 0x00, 0x00, 0x19,
161                                                                       0x58, 0x14, 0x00, 0x00, 0x00};
162 
163 // AVRCP Pass Through Command Play Pushed Request
164 std::vector<uint8_t> pass_through_command_play_pushed = {0x00, 0x48, 0x7c, 0x44, 0x00};
165 
166 // AVRCP Pass Through Command Play Pushed Response
167 std::vector<uint8_t> pass_through_command_play_released = {0x09, 0x48, 0x7c, 0xc4, 0x00};
168 
169 // AVRCP Register Playback Status Notification
170 std::vector<uint8_t> register_play_status_notification = {
171         0x03, 0x48, 0x00, 0x00, 0x19, 0x58, 0x31, 0x00, 0x00, 0x05, 0x01, 0x00, 0x00, 0x00, 0x05};
172 
173 // AVRCP Register Volume Changed Notification
174 std::vector<uint8_t> register_volume_changed_notification = {
175         0x03, 0x48, 0x00, 0x00, 0x19, 0x58, 0x31, 0x00, 0x00, 0x05, 0x0d, 0x00, 0x00, 0x00, 0x00};
176 
177 // AVRCP Register Notification without any parameter
178 std::vector<uint8_t> register_notification_invalid = {0x03, 0x48, 0x00, 0x00, 0x19, 0x58, 0x31,
179                                                       0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00};
180 
181 // AVRCP Interim Playback Status Notification
182 std::vector<uint8_t> interim_play_status_notification = {0x0f, 0x48, 0x00, 0x00, 0x19, 0x58,
183                                                          0x31, 0x00, 0x00, 0x02, 0x01, 0x00};
184 
185 // AVRCP Interim Track Changed Notification
186 std::vector<uint8_t> interim_track_changed_notification = {0x0f, 0x48, 0x00, 0x00, 0x19, 0x58, 0x31,
187                                                            0x00, 0x00, 0x09, 0x02, 0x01, 0x02, 0x03,
188                                                            0x04, 0x05, 0x06, 0x07, 0x08};
189 
190 // AVRCP Changed Playback Position Notification
191 std::vector<uint8_t> changed_play_pos_notification = {
192         0x0d, 0x48, 0x00, 0x00, 0x19, 0x58, 0x31, 0x00, 0x00, 0x05, 0x05, 0x00, 0x00, 0x00, 0x00};
193 
194 // AVRCP Interim Changed Player Setting Notification
195 std::vector<uint8_t> interim_changed_player_setting_notification = {
196         0x0f, 0x48, 0x00, 0x00, 0x19, 0x58, 0x31, 0x00, 0x00, 0x0a,
197         0x08, 0x04, 0x01, 0x01, 0x02, 0x01, 0x03, 0x01, 0x04, 0x01};
198 
199 // AVRCP Changed Player Setting Notification
200 std::vector<uint8_t> changed_player_setting_notification = {0x0d, 0x48, 0x00, 0x00, 0x19, 0x58,
201                                                             0x31, 0x00, 0x00, 0x06, 0x08, 0x02,
202                                                             0x02, 0x01, 0x03, 0x02};
203 
204 // AVRCP Interim Now Playing Changed Notification
205 std::vector<uint8_t> interim_now_playing_notification = {0x0f, 0x48, 0x00, 0x00, 0x19, 0x58,
206                                                          0x31, 0x00, 0x00, 0x01, 0x09};
207 
208 // AVRCP Interim Available Players Changed Notification
209 std::vector<uint8_t> interim_available_players_notification = {0x0f, 0x48, 0x00, 0x00, 0x19, 0x58,
210                                                                0x31, 0x00, 0x00, 0x01, 0x0a};
211 
212 // AVRCP Interim Addressed Player Changed Notification with active
213 // player ID 1
214 std::vector<uint8_t> interim_addressed_player_notification = {
215         0x0f, 0x48, 0x00, 0x00, 0x19, 0x58, 0x31, 0x00, 0x00, 0x05, 0x0b, 0x00, 0x01, 0x00, 0x00};
216 
217 // AVRCP Interim UIDs Changed Notification
218 std::vector<uint8_t> interim_uids_notification = {0x0f, 0x48, 0x00, 0x00, 0x19, 0x58, 0x31,
219                                                   0x00, 0x00, 0x03, 0x0c, 0x00, 0x00};
220 
221 // AVRCP Interim Volume Changed Notification with volume at 55% (0x47)
222 std::vector<uint8_t> interim_volume_changed_notification = {0x0f, 0x48, 0x00, 0x00, 0x19, 0x58,
223                                                             0x31, 0x00, 0x00, 0x02, 0x0d, 0x47};
224 
225 // AVRCP Rejected Volume Changed Notification with volume at 0%
226 std::vector<uint8_t> rejected_volume_changed_notification = {0x0a, 0x48, 0x00, 0x00, 0x19, 0x58,
227                                                              0x31, 0x00, 0x00, 0x02, 0x0d, 0x00};
228 
229 // AVRCP Changed Volume Changed Notification with volume at 55% (0x47)
230 std::vector<uint8_t> changed_volume_changed_notification = {0x0d, 0x48, 0x00, 0x00, 0x19, 0x58,
231                                                             0x31, 0x00, 0x00, 0x02, 0x0d, 0x47};
232 
233 // AVRCP Reject List Player Application Settings Response
234 std::vector<uint8_t> reject_player_app_settings_response = {0x0a, 0x48, 0x00, 0x00, 0x19, 0x58,
235                                                             0x11, 0x00, 0x00, 0x01, 0x00};
236 
237 // AVRCP Browse General Reject packet for invalid PDU ID
238 std::vector<uint8_t> general_reject_invalid_command_packet = {0xa0, 0x00, 0x01, 0x00};
239 
240 // AVRCP Browse Get Folder Items Request packet for media players with
241 // the following data:
242 //    scope = 0x00 (Media Player List)
243 //    start_item = 0x00
244 //    end_item = 0x03
245 //    attributes_requested: all
246 std::vector<uint8_t> get_folder_items_request = {0x71, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00,
247                                                  0x00, 0x00, 0x00, 0x00, 0x03, 0x00};
248 
249 // AVRCP Browse Get Folder Items Request packet for media players with
250 // the following data:
251 //    scope = 0x01 (VFS)
252 //    start_item = 0x00
253 //    end_item = 0x09
254 //    attributes_requested: none
255 std::vector<uint8_t> get_folder_items_request_no_attrs = {0x71, 0x00, 0x0a, 0x01, 0x00, 0x00, 0x00,
256                                                           0x00, 0x00, 0x00, 0x00, 0x09, 0xff};
257 
258 // AVRCP Browse Get Folder Items Request packet for media players with
259 // the following data:
260 //    scope = 0x01 (VFS)
261 //    start_item = 0x00
262 //    end_item = 0x09
263 //    attributes_requested: Title
264 std::vector<uint8_t> get_folder_items_request_title = {0x71, 0x00, 0x0e, 0x01, 0x00, 0x00,
265                                                        0x00, 0x00, 0x00, 0x00, 0x00, 0x09,
266                                                        0x01, 0x00, 0x00, 0x00, 0x1};
267 
268 // AVRCP Browse Get Folder Items Request packet for vfs with
269 // the following data:
270 //    scope = 0x01 (VFS)
271 //    start_item = 0x00
272 //    end_item = 0x05
273 //    attributes_requested: TITLE
274 std::vector<uint8_t> get_folder_items_request_vfs = {0x71, 0x00, 0x0e, 0x01, 0x00, 0x00,
275                                                      0x00, 0x00, 0x00, 0x00, 0x00, 0x05,
276                                                      0x01, 0x00, 0x00, 0x00, 0x01};
277 
278 // AVRCP Browse Get Folder Items Request packet for now playing with
279 // the following data:
280 //    scope = 0x03 (Now Playing)
281 //    start_item = 0x00
282 //    end_item = 0x05
283 //    attributes_requested: All Items
284 std::vector<uint8_t> get_folder_items_request_now_playing = {
285         0x71, 0x00, 0x0a, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00};
286 
287 // AVRCP Browse Get Folder Items Response packet with range out of bounds error
288 std::vector<uint8_t> get_folder_items_error_response = {0x71, 0x00, 0x01, 0x0b};
289 
290 // AVRCP Browse Get Folder Items Response packet for media players
291 // Contains one media player with the following fields:
292 //    id = 0x0001
293 //    name = "com.google.android.music"
294 //    browsing_supported = true
295 std::vector<uint8_t> get_folder_items_media_player_response = {
296         0x71, 0x00, 0x3c, 0x04, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x34, 0x00, 0x01,
297         0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x01,
298         0x0c, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6a, 0x00, 0x18,
299         0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x6e,
300         0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x6d, 0x75, 0x73, 0x69, 0x63};
301 
302 // AVRCP Browse Get Folder Items Response packet with one folder
303 // with the following fields:
304 //    uid = 0x0000000000000001
305 //    type = 0x00 (Mixed);
306 //    name = "Test Folder"
307 //    is_playable = true
308 std::vector<uint8_t> get_folder_items_folder_response = {
309         0x71, 0x00, 0x21, 0x04, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x19, 0x00,
310         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x6a, 0x00,
311         0x0b, 0x54, 0x65, 0x73, 0x74, 0x20, 0x46, 0x6f, 0x6c, 0x64, 0x65, 0x72};
312 
313 // AVRCP Browse Get Folder Items Response packet with one song
314 // with the following fields:
315 //    uid = 0x0000000000000002
316 //    name = "Test Title"
317 //    attribute[TITLE] = "Test Title"
318 std::vector<uint8_t> get_folder_items_song_response = {
319         0x71, 0x00, 0x32, 0x04, 0x00, 0x00, 0x00, 0x01, 0x03, 0x00, 0x2a, 0x00, 0x00, 0x00,
320         0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x6a, 0x00, 0x0a, 0x54, 0x65, 0x73, 0x74,
321         0x20, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x6a, 0x00,
322         0x0a, 0x54, 0x65, 0x73, 0x74, 0x20, 0x54, 0x69, 0x74, 0x6c, 0x65};
323 
324 // AVRCP Browse Change Path Request down to folder with UID 0x0000000000000002
325 std::vector<uint8_t> change_path_request = {0x72, 0x00, 0x0b, 0x00, 0x00, 0x01, 0x00,
326                                             0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02};
327 
328 // AVRCP Browse Change Path Request up
329 std::vector<uint8_t> change_path_up_request = {0x72, 0x00, 0x0b, 0x00, 0x00, 0x00, 0xFF,
330                                                0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
331 
332 // AVRCP Browse Change Path Response with two items in current folder
333 std::vector<uint8_t> change_path_response = {0x72, 0x00, 0x05, 0x04, 0x00, 0x00, 0x00, 0x02};
334 
335 // AVRCP Browse Change Path Response with an error of invalid direction
336 std::vector<uint8_t> change_path_error_response = {0x72, 0x00, 0x01, 0x07};
337 
338 // AVRCP Get Item Attributes request with all attributes requested
339 // with the following fields:
340 //    scope = 0x03 (Now Playing List)
341 //    uid_counter = 0x0000
342 //    uid = 0x0000000000000001
343 std::vector<uint8_t> get_item_attributes_request_all_attributes = {
344         0x73, 0x00, 0x28, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x07,
345         0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
346         0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07};
347 
348 // AVRCP Get Item Attributes request with all attributes requested
349 // with the following fields:
350 //    scope = 0x03 (Now Playing List)
351 //    uid_counter = 0x0000
352 //    uid = 0x0000000000000001
353 //    attributes = Title, Artist, Album, Media Number, Playing Time,
354 //                 Total Number of Media, Genre, and Cover Art
355 std::vector<uint8_t> get_item_attributes_request_all_attributes_with_cover_art = {
356         0x73, 0x00, 0x2C, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
357         0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00,
358         0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00,
359         0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x08};
360 
361 // AVRCP Get Item Attributes request with all attributes requested
362 // with the following fields:
363 //    scope = 0x03 (Now Playing List)
364 //    uid_counter = 0x0001
365 //    uid = 0x0000000000000001
366 std::vector<uint8_t> get_item_attributes_request_all_attributes_invalid = {
367         0x73, 0x00, 0x28, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x07,
368         0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
369         0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07};
370 
371 // AVRCP Get Item Attributes Response with the following attributes:
372 //    title = "Test Song"
373 //    artist = "Test Artist"
374 //    album = "Test Album"
375 std::vector<uint8_t> get_item_attributes_song_response = {
376         0x73, 0x00, 0x38, 0x04, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x6a, 0x00, 0x09, 0x54, 0x65,
377         0x73, 0x74, 0x20, 0x53, 0x6f, 0x6e, 0x67, 0x00, 0x00, 0x00, 0x02, 0x00, 0x6a, 0x00, 0x0b,
378         0x54, 0x65, 0x73, 0x74, 0x20, 0x41, 0x72, 0x74, 0x69, 0x73, 0x74, 0x00, 0x00, 0x00, 0x03,
379         0x00, 0x6a, 0x00, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x20, 0x41, 0x6c, 0x62, 0x75, 0x6d};
380 
381 // AVRCP Set Addressed Player Request with player_id = 0
382 std::vector<uint8_t> set_addressed_player_request = {0x00, 0x48, 0x00, 0x00, 0x19, 0x58,
383                                                      0x60, 0x00, 0x00, 0x02, 0x00, 0x00};
384 
385 // AVRCP Set Addressed Player Request with player_id = 1
386 std::vector<uint8_t> set_addressed_player_id_1_request = {0x00, 0x48, 0x00, 0x00, 0x19, 0x58,
387                                                           0x60, 0x00, 0x00, 0x02, 0x00, 0x01};
388 
389 // AVRCP Set Addressed Player Response with status success
390 std::vector<uint8_t> set_addressed_player_response = {0x09, 0x48, 0x00, 0x00, 0x19, 0x58,
391                                                       0x60, 0x00, 0x00, 0x01, 0x04};
392 
393 // AVRCP Set Browsed Player Request with player_id = 2
394 std::vector<uint8_t> set_browsed_player_request = {0x70, 0x00, 0x02, 0x00, 0x02};
395 
396 // AVRCP Set Browsed Player Request with player_id = 0
397 std::vector<uint8_t> set_browsed_player_id_0_request = {0x70, 0x00, 0x02, 0x00, 0x00};
398 
399 // AVRCP Set Browsed Player Response with num items = 4 and depth = 0
400 std::vector<uint8_t> set_browsed_player_response = {0x70, 0x00, 0x0a, 0x04, 0x00, 0x00, 0x00,
401                                                     0x00, 0x00, 0x04, 0x00, 0x6a, 0x00};
402 
403 // AVRCP Get Total Number of Items Request with Scope = Media Player List
404 std::vector<uint8_t> get_total_number_of_items_request_media_players = {0x75, 0x00, 0x01, 0x00};
405 
406 // AVRCP Get Total Number of Items Request with Scope = VFS
407 std::vector<uint8_t> get_total_number_of_items_request_vfs = {0x75, 0x00, 0x01, 0x01};
408 
409 // AVRCP Get Total Number of Items Request with Scope = Now Playing List
410 std::vector<uint8_t> get_total_number_of_items_request_now_playing = {0x75, 0x00, 0x01, 0x03};
411 
412 // AVRCP Get Total number of Items Response with 5 items in folder
413 std::vector<uint8_t> get_total_number_of_items_response = {0x75, 0x00, 0x07, 0x04, 0x00,
414                                                            0x00, 0x00, 0x00, 0x00, 0x05};
415 
416 // AVRCP Play Item Request with scope = Now Playing and
417 // UID = 0x0000000000000003
418 std::vector<uint8_t> play_item_request = {0x00, 0x48, 0x00, 0x00, 0x19, 0x58, 0x74,
419                                           0x00, 0x00, 0x0b, 0x03, 0x00, 0x00, 0x00,
420                                           0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00};
421 
422 // AVRCP Play Item Response
423 std::vector<uint8_t> play_item_response = {0x09, 0x48, 0x00, 0x00, 0x19, 0x58,
424                                            0x74, 0x00, 0x00, 0x01, 0x04};
425 
426 // AVRCP Set Absolute Volume Request with volume at 56% (0x48)
427 std::vector<uint8_t> set_absolute_volume_request = {0x00, 0x48, 0x00, 0x00, 0x19, 0x58,
428                                                     0x50, 0x00, 0x00, 0x01, 0x48};
429 
430 // AVRCP Set Absolute Volume Response with voume at 52% (0x43)
431 std::vector<uint8_t> set_absolute_volume_response = {0x09, 0x48, 0x00, 0x00, 0x19, 0x58,
432                                                      0x50, 0x00, 0x00, 0x01, 0x43};
433 
434 // Invalid Packets
435 // Short Vendor Packet
436 std::vector<uint8_t> short_vendor_packet = {0x01, 0x48, 0x00, 0x00, 0x19,
437                                             0x58, 0x10, 0x00, 0x00, 0x01};
438 
439 // Short Get Capabilities Request Packet
440 std::vector<uint8_t> short_get_capabilities_request = {0x01, 0x48, 0x00, 0x00, 0x19,
441                                                        0x58, 0x10, 0x00, 0x00, 0x00};
442 
443 // Short Get Element Attributes Request Packet
444 std::vector<uint8_t> short_get_element_attributes_request = {0x01, 0x48, 0x00, 0x00, 0x19,
445                                                              0x58, 0x20, 0x00, 0x00, 0x00};
446 
447 // Short Play Item Request Packet
448 std::vector<uint8_t> short_play_item_request = {0x00, 0x48, 0x00, 0x00, 0x19,
449                                                 0x58, 0x74, 0x00, 0x00, 0x00};
450 
451 // Short Set Addressed Player Request Packet
452 std::vector<uint8_t> short_set_addressed_player_request = {0x00, 0x48, 0x00, 0x00, 0x19,
453                                                            0x58, 0x60, 0x00, 0x00, 0x00};
454 
455 // Short Browse Packet
456 std::vector<uint8_t> short_browse_packet = {0x71, 0x00, 0x0a};
457 
458 // Short Get Folder Items Request Packet
459 std::vector<uint8_t> short_get_folder_items_request = {0x71, 0x00, 0x00};
460 
461 // Short Get Total Number of Items Request Packet
462 std::vector<uint8_t> short_get_total_number_of_items_request = {0x75, 0x00, 0x00};
463 
464 // Short Change Path Request Packet
465 std::vector<uint8_t> short_change_path_request = {0x72, 0x00, 0x00};
466 
467 // Short Get Item Attributes Request Packet
468 std::vector<uint8_t> short_get_item_attributes_request = {0x73, 0x00, 0x00};
469 
470 }  // namespace
471