hci-decoder  1.0
Lightweight Bluetooth HCI decoder library parsing individually HCI frames into JSON format
hci_cmd_packet.h
Go to the documentation of this file.
1 /************************************************************************************
2  * The MIT License (MIT) *
3  * *
4  * Copyright (c) 2015 Bertrand Martel *
5  * *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy *
7  * of this software and associated documentation files (the "Software"), to deal *
8  * in the Software without restriction, including without limitation the rights *
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *
10  * copies of the Software, and to permit persons to whom the Software is *
11  * furnished to do so, subject to the following conditions: *
12  * *
13  * The above copyright notice and this permission notice shall be included in *
14  * all copies or substantial portions of the Software. *
15  * *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN *
22  * THE SOFTWARE. *
23  ************************************************************************************/
31 #ifndef HCICMDPACKET_H
32 #define HCICMDPACKET_H
33 
36 #include "hci_decoder/hci_global.h"
37 #include <json/json.h>
38 #include <iostream>
39 
40 /*HCI command which does not decode any additionnal data*/
41 typedef struct void_cmd : public IHciCommandFrame {
42 
43  void_cmd(const std::vector<char> &data,COMMAND_OGF_ENUM ogf,uint8_t ocf){
44  this->ogf = ogf;
45  this->ocf = ocf;
47  }
48 
49  Json::Value toJsonObj(){
50  Json::Value output;
51  init(output);
52  return output;
53  };
54 
55 } void_cmd_t;
56 
57 /*HCI vendor specific frame*/
58 typedef struct vendor_specific_cmd : public IHciCommandFrame {
59 
60  std::vector<uint8_t> parameters;
61 
62  vendor_specific_cmd(const std::vector<char> &data){
63  this->ogf = HCI_CMD_OGF_VENDOR_SPECIFIC;
65  for (unsigned int i = 0; i < parameter_total_length;i++){
66  this->parameters.push_back(data[COMMAND_FRAME_OFFSET+1+i]);
67  }
68  }
69 
70 
71  Json::Value toJsonObj(){
72  Json::Value output;
73  init(output);
74  Json::Value parametes_val;
75  Json::Value data_val(Json::arrayValue);
76  for (unsigned int i = 0; i < parameters.size();i++){
77  data_val.append(parameters[i]);
78  }
79  parametes_val["parameters_val"] = data_val;
80  output["parameters"] = parametes_val;
81  return output;
82  };
83 
85 
86 /*************************************************************************/
87 /*************************************************************************/
88 /*************** HCI LINK CONTROL COMMANDS *******************************/
89 /*************************************************************************/
90 /*************************************************************************/
91 
92 /*HCI Command : OGF=0x01 | OCF=0x0006 Disconnect Command*/
94 
95  uint16_t connection_handle; /* 2B | Connection_Handle for the connection being disconnected*/
96  uint8_t reason; /* 1B | Authentication Failure error code (0x05), Other End Terminated Connec-
97  tion error codes (0x13-0x15), Unsupported Remote Feature error code
98  (0x1A), Pairing with Unit Key Not Supported error code (0x29) and Unac-
99  ceptable Connection Parameters error code (0x3B)*/
100 
101  link_control_disconnect_cmd(const std::vector<char> &data){
102  this->ogf = HCI_CMD_OGF_LINK_CONTROL_COMMANDS;
103  this->ocf = HCI_CMD_OCF_LINK_CONTROL_DISCONNECT_COMMAND;
105  connection_handle = data[COMMAND_FRAME_OFFSET + 1 ] + (data[COMMAND_FRAME_OFFSET+2]<<8);
106  this->reason = data[COMMAND_FRAME_OFFSET +3];
107  }
108 
109 
110  Json::Value toJsonObj(){
111  Json::Value output;
112  init(output);
113 
114  Json::Value parameters;
115  parameters["connection_handle"] = connection_handle;
116  parameters["reason"] = reason;
117  output["parameters"] = parameters;
118 
119  return output;
120  };
121 
123 
124 /*HCI Command : OGF=0x01 | OCF=0x0001 Inquiry Command*/
126 
127  uint32_t lap;
128  uint8_t inquiry_length;
129  uint8_t num_responses;
130 
131  link_control_inquiry_cmd(const std::vector<char> &data){
132  this->ogf = HCI_CMD_OGF_LINK_CONTROL_COMMANDS;
133  this->ocf = HCI_CMD_OCF_LINK_CONTROL_INQUIRY_COMMAND;
135  lap = data[COMMAND_FRAME_OFFSET + 1 ];
136  inquiry_length = data[COMMAND_FRAME_OFFSET + 2 ];
137  num_responses = data[COMMAND_FRAME_OFFSET + 3 ];
138  }
139 
140 
141  Json::Value toJsonObj(){
142  Json::Value output;
143  init(output);
144 
145  Json::Value parameters;
146  parameters["lap"] = lap;
147  parameters["inquiry_length"] = inquiry_length;
148  parameters["num_responses"] = num_responses;
149  output["parameters"] = parameters;
150 
151  return output;
152  };
153 
155 
156 /*************************************************************************/
157 /*************************************************************************/
158 /********************* HCI LE COMMANDS ***********************************/
159 /*************************************************************************/
160 /*************************************************************************/
161 
162 /*HCI Command : OGF=0x08 | OCF=0x0016 LE Read remote used features Command*/
164 
165  uint8_t connection_handle; /* 2B | Connection_Handle to be used to identify a connection */
166 
167  le_read_remote_used_features_cmd(const std::vector<char> &data){
168  this->ogf = HCI_CMD_OGF_LE_CONTROLLER_COMMANDS;
169  this->ocf = HCI_CMD_OCF_LE_READ_REMOTE_USED_FEATURES_COMMAND;
171  this->connection_handle = data[COMMAND_FRAME_OFFSET+1] + (data[COMMAND_FRAME_OFFSET+2]<<8);
172  }
173 
174 
175  Json::Value toJsonObj(){
176  Json::Value output;
177  init(output);
178 
179  Json::Value parameters;
180  parameters["connection_handle"] = connection_handle;
181  output["parameters"] = parameters;
182 
183  return output;
184  }
185 
187 
188 /*HCI Command : OGF=0x08 | OCF=0x000D LE Create connection Command*/
190 
191  uint16_t scan_interval;
192  uint16_t scan_window;
199  uint16_t conn_latency;
203 
204  le_create_connection_cmd(const std::vector<char> &data){
205  this->ogf = HCI_CMD_OGF_LE_CONTROLLER_COMMANDS;
206  this->ocf = HCI_CMD_OCF_LE_CREATE_CONNECTION_COMMAND;
208  this->scan_interval = data[COMMAND_FRAME_OFFSET+1] + (data[COMMAND_FRAME_OFFSET+2]<<8);
209  this->scan_window = data[COMMAND_FRAME_OFFSET+3] + (data[COMMAND_FRAME_OFFSET+4]<<8);
210  this->initiator_filter_policy = data[COMMAND_FRAME_OFFSET+5];
211  this->peer_address_type = data[COMMAND_FRAME_OFFSET+6];
212  this->peer_address.address[0]=data[COMMAND_FRAME_OFFSET+12];
213  this->peer_address.address[1]=data[COMMAND_FRAME_OFFSET+11];
214  this->peer_address.address[2]=data[COMMAND_FRAME_OFFSET+10];
215  this->peer_address.address[3]=data[COMMAND_FRAME_OFFSET+9];
216  this->peer_address.address[4]=data[COMMAND_FRAME_OFFSET+8];
217  this->peer_address.address[5]=data[COMMAND_FRAME_OFFSET+7];
218  this->own_address_type = data[COMMAND_FRAME_OFFSET+13];
219  this->conn_interval_min = data[COMMAND_FRAME_OFFSET+14] + (data[COMMAND_FRAME_OFFSET+15]<<8);
220  this->conn_interval_max = data[COMMAND_FRAME_OFFSET+15] + (data[COMMAND_FRAME_OFFSET+16]<<8);
221  this->conn_latency = data[COMMAND_FRAME_OFFSET+17] + (data[COMMAND_FRAME_OFFSET+18]<<8);
222  this->supervision_timeout = data[COMMAND_FRAME_OFFSET+19] + (data[COMMAND_FRAME_OFFSET+20]<<8);
223  this->minimum_ce_length = data[COMMAND_FRAME_OFFSET+21] + (data[COMMAND_FRAME_OFFSET+22]<<8);
224  this->maximum_ce_length = data[COMMAND_FRAME_OFFSET+23] + (data[COMMAND_FRAME_OFFSET+24]<<8);
225  }
226 
227 
228  Json::Value toJsonObj(){
229  Json::Value output;
230  init(output);
231 
232  Json::Value parameters;
233  parameters["scan_interval"] = scan_interval;
234  parameters["scan_window"] = scan_window;
235  parameters["initiator_filter_policy"] = initiator_filter_policy;
236  parameters["peer_address_type"] = peer_address_type;
237  parameters["peer_address"] = peer_address.toString();
238  parameters["own_address_type"] = own_address_type;
239  parameters["conn_interval_min"] = conn_interval_min;
240  parameters["conn_interval_max"] = conn_interval_max;
241  parameters["conn_latency"] = conn_latency;
242  parameters["supervision_timeout"] = supervision_timeout;
243  parameters["minimum_ce_length"] = minimum_ce_length;
244  parameters["maximum_ce_length"] = maximum_ce_length;
245  output["parameters"] = parameters;
246 
247  return output;
248  }
249 
251 
252 /*HCI Command : OGF=0x08 | OCF=0x000B LE Set Scan Parameters Command*/
254 
255  uint8_t le_scan_type; /* 1B | 0x00 Passive Scanning. No SCAN_REQ packets shall be sent | 0x01 Active scanning. SCAN_REQ packets may be sent */
256  uint16_t le_scan_interval; /* 2B | This is defined as the time interval from when the Controller started its last LE scan until it begins the subsequent LE scan*/
257  uint16_t le_scan_window; /* 2B | The duration of the LE scan. LE_Scan_Window shall be less than or equal to LE_Scan_Interval*/
258  uint8_t own_address_type; /* 1B | */
259  uint8_t scanning_filter_policy; /* 1B | */
260 
261  le_set_scan_parameters_cmd(const std::vector<char> &data){
262  this->ogf = HCI_CMD_OGF_LE_CONTROLLER_COMMANDS;
263  this->ocf = HCI_CMD_OCF_LE_SET_SCAN_PARAMETERS_COMMAND;
265  this->le_scan_type = data[COMMAND_FRAME_OFFSET+1];
266  this->le_scan_interval = (data[COMMAND_FRAME_OFFSET+2]<<8) + data[COMMAND_FRAME_OFFSET+3];
267  this->le_scan_window = (data[COMMAND_FRAME_OFFSET+4]<<8) + data[COMMAND_FRAME_OFFSET+5];
268  this->own_address_type = data[COMMAND_FRAME_OFFSET+6];
269  this->scanning_filter_policy = data[COMMAND_FRAME_OFFSET+7];
270  }
271 
272 
273  Json::Value toJsonObj(){
274 
275  Json::Value output;
276  init(output);
277 
278  Json::Value parameters;
279  parameters["le_scan_type"] = le_scan_type;
280  parameters["le_scan_interval"] = le_scan_interval;
281  parameters["le_scan_window"] = le_scan_window;
282  parameters["own_address_type"] = own_address_type;
283  parameters["scanning_filter_policy"] = scanning_filter_policy;
284  output["parameters"] = parameters;
285 
286  return output;
287  }
288 
290 
291 /*HCI Command : OGF=0x08 | OCF=0x0001 LE Set Event Mask Command*/
292 typedef struct le_set_event_mask_cmd : public IHciCommandFrame {
293 
294  std::vector<uint8_t> event_mask; /*The Set_Event_Mask command is used to control which events are generated by the HCI for the Host*/
295 
296  le_set_event_mask_cmd(const std::vector<char> &data){
297  this->ogf = HCI_CMD_OGF_LE_CONTROLLER_COMMANDS;
298  this->ocf = HCI_CMD_OCF_LE_SET_EVENT_MASK_COMMAND;
300  for (unsigned int i = 0; i < 8;i++){
301  event_mask.push_back(data[COMMAND_FRAME_OFFSET+1+i]);
302  }
303  }
304 
305 
306  Json::Value toJsonObj(){
307  Json::Value output;
308  init(output);
309  Json::Value parameters;
310  Json::Value mask_vals(Json::arrayValue);
311  for (unsigned int i = 0; i < 8;i++){
312  mask_vals.append(event_mask[i]);
313  }
314  parameters["event_mask"] = mask_vals;
315  output["parameters"] = parameters;
316  return output;
317  }
318 
320 
321 /*HCI Command : OGF=0x08 | OCF=0x0008 LE Set Random Address Command*/
323 
324  bt_address random_address; /* 6B | Random Device Address */
325 
326  le_set_random_address_cmd(const std::vector<char> &data){
327  this->ogf = HCI_CMD_OGF_LE_CONTROLLER_COMMANDS;
328  this->ocf = HCI_CMD_OCF_LE_SET_RANDOM_ADDRESS_COMMAND;
330 
331  random_address.address[0]=data[COMMAND_FRAME_OFFSET+6];
332  random_address.address[1]=data[COMMAND_FRAME_OFFSET+5];
333  random_address.address[2]=data[COMMAND_FRAME_OFFSET+4];
334  random_address.address[3]=data[COMMAND_FRAME_OFFSET+3];
335  random_address.address[4]=data[COMMAND_FRAME_OFFSET+2];
336  random_address.address[5]=data[COMMAND_FRAME_OFFSET+1];
337  }
338 
339 
340  Json::Value toJsonObj(){
341  Json::Value output;
342  init(output);
343  Json::Value parameters;
344  parameters["random_address"] = random_address.toString();
345  output["parameters"] = parameters;
346  return output;
347  }
348 
350 
351 /*HCI Command : OGF=0x08 | OCF=0x001C LE Remove device from resolving list Command*/
353 
354  bt_address peer_address; /* 6B | Public or Random (static) Identity Address of the peer device */
355  uint8_t peer_identity_address_type; /* 1B | 0x00: Public Identity Address | 0x01 : Random (static) Identity Address*/
356 
357  le_remove_device_from_resolving_list_cmd(const std::vector<char> &data){
358  this->ogf = HCI_CMD_OGF_LE_CONTROLLER_COMMANDS;
359  this->ocf = HCI_CMD_OCF_LE_REMOVE_DEVICE_FROM_RESOLVING_LIST_COMMAND;
361 
362  peer_identity_address_type = data[COMMAND_FRAME_OFFSET+1];
363 
364  peer_address.address[0]=data[COMMAND_FRAME_OFFSET+7];
365  peer_address.address[1]=data[COMMAND_FRAME_OFFSET+6];
366  peer_address.address[2]=data[COMMAND_FRAME_OFFSET+5];
367  peer_address.address[3]=data[COMMAND_FRAME_OFFSET+4];
368  peer_address.address[4]=data[COMMAND_FRAME_OFFSET+3];
369  peer_address.address[5]=data[COMMAND_FRAME_OFFSET+2];
370  }
371 
372 
373  Json::Value toJsonObj(){
374  Json::Value output;
375  init(output);
376  Json::Value parameters;
377  parameters["peer_identity_address_type"] = peer_identity_address_type;
378  parameters["peer_address"] = peer_address.toString();
379  output["parameters"] = parameters;
380  return output;
381  }
382 
384 
385 /*HCI Command : OGF=0x08 | OCF=0x000C LE Set Scan Enable Command*/
386 typedef struct le_set_scan_enable_cmd : public IHciCommandFrame {
387 
388  uint8_t le_scan_enable; /* 1B | 0x00 : Scanning disabled | 0x01 : Scanning enabled */
389  uint8_t filter_duplicates; /* 1B | 0x00 : Duplicate filtering disabled | 0x01 : Duplicate filtering enabled */
390 
391  le_set_scan_enable_cmd(const std::vector<char> &data){
392  this->ogf = HCI_CMD_OGF_LE_CONTROLLER_COMMANDS;
393  this->ocf = HCI_CMD_OCF_LE_SET_SCAN_ENABLE_COMMAND;
395  this->le_scan_enable = data[COMMAND_FRAME_OFFSET+1];
396  this->filter_duplicates = data[COMMAND_FRAME_OFFSET+2];
397  }
398 
399 
400  Json::Value toJsonObj(){
401  Json::Value output;
402  init(output);
403  Json::Value parameters;
404  parameters["le_scan_enable"] = le_scan_enable;
405  parameters["filter_duplicates"] = filter_duplicates;
406  output["parameters"] = parameters;
407  return output;
408  }
409 
411 
412 /*HCI Command : OGF=0x08 | OCF=0x0008 LE Set advertising data Command*/
414 
415  uint8_t advertising_data_length; /* 1B : The number of significant octets in the Advertising_Data*/
416  std::vector<unsigned char> advertising_data; /* 31 bits*/
417 
418  le_set_advertising_data_cmd(const std::vector<char> &data){
419  this->ogf = HCI_CMD_OGF_LE_CONTROLLER_COMMANDS;
420  this->ocf = HCI_CMD_OCF_LE_SET_ADVERTISING_DATA_COMMAND;
422  advertising_data_length = data[COMMAND_FRAME_OFFSET+1];
423  for (unsigned int i = 0; i < advertising_data_length;i++){
424  advertising_data.push_back(data[COMMAND_FRAME_OFFSET + 2 + i]);
425  }
426  }
427 
428 
429  Json::Value toJsonObj(){
430  Json::Value output;
431  init(output);
432 
433  Json::Value parameters;
434  parameters["advertising_data_length"] = advertising_data_length;
435 
436  Json::Value data(Json::arrayValue);
437  for (unsigned int i = 0; i < advertising_data_length;i++){
438  data.append(advertising_data[i]);
439  }
440  parameters["advertising_data"] = data;
441 
442  output["parameters"] = parameters;
443  return output;
444  }
445 
447 
448 /*HCI Command : OGF=0x08 | OCF=0x0006 LE Set Advertising Parameters Command*/
450 
451  uint16_t advertising_interval_min; /* 2B | Minimum advertising interval for undirected and low duty cycle directed advertising */
452  uint16_t advertising_interval_max; /* 2B | Maximum advertising interval for undirected and low duty cycle directed advertising */
453  uint8_t advertising_type; /* 1B | */
454  uint8_t own_address_type; /* 1B | */
455  uint8_t peer_address_type; /* 1B | */
456  bt_address peer_address; /* 6B | Public Device Address, Random Device Address, Public Identity Address, or Random (static) Identity Address of the device to be connected*/
457  uint8_t advertising_channel_map; /* 1B | */
458  uint8_t advertising_filter_policy; /* 1B | */
459 
460  le_set_advertising_parameters_cmd(const std::vector<char> &data){
461  this->ogf = HCI_CMD_OGF_LE_CONTROLLER_COMMANDS;
462  this->ocf = HCI_CMD_OCF_LE_SET_ADVERTISING_PARAMETERS_COMMAND;
464  this->advertising_interval_min = (data[COMMAND_FRAME_OFFSET+1]<<8) + data[COMMAND_FRAME_OFFSET+2];
465  this->advertising_interval_max = (data[COMMAND_FRAME_OFFSET+3]<<8) + data[COMMAND_FRAME_OFFSET+4];
466  this->advertising_type = data[COMMAND_FRAME_OFFSET+5];
467  this->own_address_type = data[COMMAND_FRAME_OFFSET+6];
468  this->peer_address_type = data[COMMAND_FRAME_OFFSET+7];
469  peer_address.address[0]=data[COMMAND_FRAME_OFFSET+13];
470  peer_address.address[1]=data[COMMAND_FRAME_OFFSET+12];
471  peer_address.address[2]=data[COMMAND_FRAME_OFFSET+11];
472  peer_address.address[3]=data[COMMAND_FRAME_OFFSET+10];
473  peer_address.address[4]=data[COMMAND_FRAME_OFFSET+9];
474  peer_address.address[5]=data[COMMAND_FRAME_OFFSET+8];
475  this->advertising_channel_map = data[COMMAND_FRAME_OFFSET+14];
476  this->advertising_filter_policy = data[COMMAND_FRAME_OFFSET+15];
477  }
478 
479 
480  Json::Value toJsonObj(){
481  Json::Value output;
482  init(output);
483 
484  Json::Value parameters;
485  parameters["advertising_interval_min"] = advertising_interval_min;
486  parameters["advertising_interval_max"] = advertising_interval_max;
487  parameters["advertising_type"] = advertising_type;
488  parameters["own_address_type"] = own_address_type;
489  parameters["peer_address_type"] = peer_address_type;
490  parameters["peer_address"] = peer_address.toString();
491  parameters["advertising_channel_map"] = advertising_channel_map;
492  parameters["advertising_filter_policy"] = advertising_filter_policy;
493  output["parameters"] = parameters;
494 
495  return output;
496  }
497 
499 
500 /*************************************************************************/
501 /*************************************************************************/
502 /********************* HCI LINK POLICY COMMANDS **************************/
503 /*************************************************************************/
504 /*************************************************************************/
505 
506 /*HCI Command : OGF=0x02 | OCF=0x000F Write default link policy settings Command*/
508 
509  uint16_t default_link_policy_settings; /*2B : 0x0000 : Disable All LM Modes Default | 0x0001 : Enable Role Switch | 0x0002 : Enable Hold Mode | 0x0004 : Enable Sniff Mode | 0x0008: Enable Park State*/
510 
511  write_default_link_policy_settings_cmd(const std::vector<char> &data){
512  this->ogf = HCI_CMD_OGF_LINK_POLICY_COMMANDS;
513  this->ocf = HCI_CMD_OCF_LINK_POLICY_WRITE_DEFAULT_LINK_POLICY_SETTINGS_COMMAND;
515  default_link_policy_settings = data[COMMAND_FRAME_OFFSET+1] + (data[COMMAND_FRAME_OFFSET+2]<<8);
516  }
517 
518 
519  Json::Value toJsonObj(){
520  Json::Value output;
521  init(output);
522  Json::Value parameters;
523  parameters["default_link_policy_settings"] = default_link_policy_settings;
524  output["parameters"] = parameters;
525  return output;
526  }
527 
529 
530 /*************************************************************************/
531 /*************************************************************************/
532 /********************* HCI INFORMATIONAL COMMANDS ************************/
533 /*************************************************************************/
534 /*************************************************************************/
535 
536 /*HCI Command : OGF=0x04 | OCF=0x0004 Read local extended features Command*/
538 
539  uint8_t page_number; /*0x00: Requests the normal LMP features as returned by Read_Local_Supported_Features | 0x01-0xFF:Return the corresponding page of features*/
540 
541  informational_read_local_extended_features_cmd(const std::vector<char> &data){
542  this->ogf = HCI_CMD_OGF_INFORMATIONAL_PARAMETERS;
543  this->ocf = HCI_CMD_OCF_INFORMATIONAL_READ_LOCAL_EXTENDED_FEATURES_COMMAND;
545  page_number = data[COMMAND_FRAME_OFFSET];
546  }
547 
548 
549  Json::Value toJsonObj(){
550  Json::Value output;
551  init(output);
552  Json::Value parameters;
553  parameters["page_number"] = page_number;
554  output["parameters"] = parameters;
555  return output;
556  }
557 
559 
560 /*************************************************************************/
561 /*************************************************************************/
562 /********************* HCI CONTROL BASEBAND COMMANDS *********************/
563 /*************************************************************************/
564 /*************************************************************************/
565 
566 /*HCI Command : OGF=0x03 | OCF=0x0013 Write local name Command*/
568 
569  std::string local_name; /*max 248 bit null terminated */
570 
571  ctrl_bsb_write_local_name_cmd(const std::vector<char> &data){
572  this->ogf = HCI_CMD_OGF_CONTROLLER_BASEBAND_COMMANDS;
573  this->ocf = HCI_CMD_OCF_CTRL_BSB_WRITE_LOCAL_NAME_COMMAND;
575 
576  local_name="";
577  bool found = false;
578  for (unsigned int i = 0; i <248 && !found;i++){
579  if (data[COMMAND_FRAME_OFFSET+1+i]!='\0'){
580  local_name+=data[COMMAND_FRAME_OFFSET+1+i];
581  }
582  else{
583  found=true;
584  }
585  }
586  }
587 
588 
589  Json::Value toJsonObj(){
590  Json::Value output;
591  init(output);
592  Json::Value parameters;
593  parameters["local_name"] = local_name;
594  output["parameters"] = parameters;
595  return output;
596  }
597 
599 
600 /*HCI Command : OGF=0x03 | OCF=0x0005 Set event filter Command*/
602 
603  uint8_t filter_type;
605  //uint8_t connection_setup_filter_condition_type;
606 
607  ctrl_bsb_set_event_filter_cmd(const std::vector<char> &data){
608  this->ogf = HCI_CMD_OGF_CONTROLLER_BASEBAND_COMMANDS;
609  this->ocf = HCI_CMD_OCF_CTRL_BSB_WRITE_LOCAL_NAME_COMMAND;
611 
612  filter_type = data[COMMAND_FRAME_OFFSET + 1];
613  inquiry_result_filter_condition_type = data[COMMAND_FRAME_OFFSET + 2];
614  //connection_setup_filter_condition_type = data[COMMAND_FRAME_OFFSET + 3];
615 
616  }
617 
618 
619  Json::Value toJsonObj(){
620  Json::Value output;
621  init(output);
622  Json::Value parameters;
623  parameters["filter_type"] = filter_type;
624  parameters["inquiry_result_filter_condition_type"] = inquiry_result_filter_condition_type;
625  //parameters["connection_setup_filter_condition_type"] = connection_setup_filter_condition_type;
626  output["parameters"] = parameters;
627  return output;
628  }
629 
631 
632 
633 /*HCI Command : OGF=0x03 | OCF=0x0023 Read Class of Device Command*/
635 
636  ctrl_bsb_read_class_of_device_cmd(const std::vector<char> &data){
637  this->ogf = HCI_CMD_OGF_CONTROLLER_BASEBAND_COMMANDS;
638  this->ocf = HCI_CMD_OCF_CTRL_BSB_READ_CLASS_OF_DEVICE_COMMAND;
640  }
641 
642 
643  Json::Value toJsonObj(){
644  Json::Value output;
645  init(output);
646  return output;
647  }
648 
650 
651 /*HCI Command : OGF=0x03 | OCF=0x0024 Write Class of Device Command*/
653 
654  uint32_t device_class; /*3B : Class of Device for the device*/
655 
656  ctrl_bsb_write_class_of_device_cmd(const std::vector<char> &data){
657  this->ogf = HCI_CMD_OGF_CONTROLLER_BASEBAND_COMMANDS;
658  this->ocf = HCI_CMD_OCF_CTRL_BSB_WRITE_CLASS_OF_DEVICE_COMMAND;
660  device_class = data[COMMAND_FRAME_OFFSET+1] + (data[COMMAND_FRAME_OFFSET+2]<<8) + (data[COMMAND_FRAME_OFFSET+3]<<16);
661  }
662 
663 
664  Json::Value toJsonObj(){
665  Json::Value output;
666  init(output);
667  Json::Value parameters;
668  parameters["device_class"] = device_class;
669  output["parameters"] = parameters;
670  return output;
671  }
672 
674 
675 /*HCI Command : OGF=0x03 | OCF=0x0045 Write inquiry mode Command*/
677 
678  uint8_t inquiry_mode; /*1B : 0x00:Standard Inquiry Result event format | 0x01: Inquiry Result format with RSSI | 0x02: Inquiry Result with RSSI format or Extended Inquiry Result format*/
679 
680  ctrl_bsb_write_inquiry_mode_cmd(const std::vector<char> &data){
681  this->ogf = HCI_CMD_OGF_CONTROLLER_BASEBAND_COMMANDS;
682  this->ocf = HCI_CMD_OCF_CTRL_BSB_WRITE_INQUIRY_MODE_COMMAND;
683  inquiry_mode = data[COMMAND_FRAME_OFFSET];
685  }
686 
687 
688  Json::Value toJsonObj(){
689  Json::Value output;
690  init(output);
691  Json::Value parameters;
692  parameters["inquiry_mode"] = inquiry_mode;
693  output["parameters"] = parameters;
694  return output;
695  }
696 
698 
699 /*HCI Command : OGF=0x03 | OCF=0x006D Write LE host support Command*/
701 
702  uint8_t le_supported_host; /*1B*/
703  uint8_t simultaneous_le_host; /*1B*/
704 
705  ctrl_bsb_write_le_host_support_cmd(const std::vector<char> &data){
706  this->ogf = HCI_CMD_OGF_CONTROLLER_BASEBAND_COMMANDS;
707  this->ocf = HCI_CMD_OCF_CTRL_BSB_WRITE_LE_HOST_SUPPORT_COMMAND;
709  le_supported_host = data[COMMAND_FRAME_OFFSET+1];
710  simultaneous_le_host = data[COMMAND_FRAME_OFFSET+2];
711  }
712 
713 
714  Json::Value toJsonObj(){
715  Json::Value output;
716  init(output);
717  Json::Value parameters;
718  parameters["le_supported_host"] = le_supported_host;
719  parameters["simultaneous_le_host"] = simultaneous_le_host;
720  output["parameters"] = parameters;
721  return output;
722  }
723 
725 
726 /*HCI Command : OGF=0x03 | OCF=0x001E Write Inquiry Scan activity Command*/
728 
731 
732  ctrl_bsb_write_inquiry_scan_activity_cmd(const std::vector<char> &data){
733  this->ogf = HCI_CMD_OGF_CONTROLLER_BASEBAND_COMMANDS;
734  this->ocf = HCI_CMD_OCF_CTRL_BSB_WRITE_INQUIRY_SCAN_ACTIVITY_COMMAND;
736  inquiry_scan_interval = data[COMMAND_FRAME_OFFSET+1] + (data[COMMAND_FRAME_OFFSET+2]<<8);
737  inquiry_scan_window =data[COMMAND_FRAME_OFFSET+3] + (data[COMMAND_FRAME_OFFSET+4]<<8);
738  }
739 
740 
741  Json::Value toJsonObj(){
742  Json::Value output;
743  init(output);
744  Json::Value parameters;
745  parameters["inquiry_scan_interval"] = inquiry_scan_interval;
746  parameters["inquiry_scan_window"] = inquiry_scan_window;
747  output["parameters"] = parameters;
748  return output;
749  }
750 
752 
753 /*HCI Command : OGF=0x03 | OCF=0x0026 Write voice settings Command*/
755 
756  uint16_t voice_settings; /*2B : 10 Bits meaningful*/
757 
758  ctrl_bsb_write_voice_settings_cmd(const std::vector<char> &data){
759  this->ogf = HCI_CMD_OGF_CONTROLLER_BASEBAND_COMMANDS;
760  this->ocf = HCI_CMD_OCF_CTRL_BSB_WRITE_VOICE_SETTING_COMMAND;
762  voice_settings = data[COMMAND_FRAME_OFFSET+1] + (data[COMMAND_FRAME_OFFSET+2]<<8);
763  }
764 
765 
766  Json::Value toJsonObj(){
767  Json::Value output;
768  init(output);
769  Json::Value parameters;
770  parameters["voice_settings"] = voice_settings;
771  output["parameters"] = parameters;
772  return output;
773  }
774 
776 
777 /*HCI Command : OGF=0x03 | OCF=0x003A Write Inquiry Access Code (IAC) LAP (lower address part) Command*/
779 
780  uint8_t num_current_iac; /*Specifies the number of IACs (Inquiry Access Codes) which are currently in use by the local BR/
781  EDR Controller to simultaneously listen for during an Inquiry Scan*/
782 
783  std::vector<uint32_t> lap_iac; /*LAP(s) used to create IAC which is currently in use by the local BR/EDR
784  Controller to simultaneously listen for during an Inquiry Scan*/
785 
786  ctrl_bsb_write_iac_lap_cmd(const std::vector<char> &data){
787  this->ogf = HCI_CMD_OGF_CONTROLLER_BASEBAND_COMMANDS;
788  this->ocf = HCI_CMD_OCF_CTRL_BSB_WRITE_CURRENT_IAC_LAP_COMMAND;
790  num_current_iac = data[COMMAND_FRAME_OFFSET+1];
791  for (unsigned int i = 0 ; i< num_current_iac;i++){
792  uint32_t lap = data[COMMAND_FRAME_OFFSET+2+i] + (data[COMMAND_FRAME_OFFSET+3+i]<<8) + (data[COMMAND_FRAME_OFFSET+4+i]<<16);
793  lap_iac.push_back(lap);
794  }
795  }
796 
797 
798  Json::Value toJsonObj(){
799  Json::Value output;
800  init(output);
801  Json::Value parameters;
802  parameters["num_current_iac"] = num_current_iac;
803  Json::Value laps(Json::arrayValue);
804  for (unsigned int i = 0; i < num_current_iac;i++){
805  laps.append(lap_iac[i]);
806  }
807  parameters["lap_iac"] = laps;
808  output["parameters"] = parameters;
809  return output;
810  }
811 
813 
814 /*HCI Command : OGF=0x03 | OCF=0x0047 Write page scan type Command*/
816 
817  uint8_t page_scan_type; /*1B : 0x00:Mandatory: Standard Scan (default) | 0x01: Optional: Interlaced Scan*/
818 
819  ctrl_bsb_write_page_scan_type_cmd(const std::vector<char> &data){
820  this->ogf = HCI_CMD_OGF_CONTROLLER_BASEBAND_COMMANDS;
821  this->ocf = HCI_CMD_OCF_CTRL_BSB_WRITE_PAGE_SCAN_TYPE_COMMAND;
823  page_scan_type = data[COMMAND_FRAME_OFFSET+1];
824  }
825 
826 
827  Json::Value toJsonObj(){
828  Json::Value output;
829  init(output);
830  Json::Value parameters;
831  parameters["page_scan_type"] = page_scan_type;
832  output["parameters"] = parameters;
833  return output;
834  }
835 
837 
838 /*HCI Command : OGF=0x03 | OCF=0x0056 Write simple pairing mode Command*/
840 
841  uint8_t simple_pairing_mode; /*1B : 0x00:Simple Pairing disabled | 0x01:Simple pairing enabled*/
842 
843  ctrl_bsb_write_simple_pairing_mode_cmd(const std::vector<char> &data){
844  this->ogf = HCI_CMD_OGF_CONTROLLER_BASEBAND_COMMANDS;
845  this->ocf = HCI_CMD_OCF_CTRL_BSB_WRITE_SIMPLE_PAIRING_MODE_COMMAND;
847  simple_pairing_mode = data[COMMAND_FRAME_OFFSET+1];
848  }
849 
850 
851  Json::Value toJsonObj(){
852  Json::Value output;
853  init(output);
854  Json::Value parameters;
855  parameters["simple_pairing_mode"] = simple_pairing_mode;
856  output["parameters"] = parameters;
857  return output;
858  }
859 
861 
862 /*HCI Command : OGF=0x03 | OCF=0x0052 Write extended inquiry response Command*/
864 
865  uint8_t fec_required; /*1B : 0x00:FEC (Forward Error correction) is not required | 0x01:FEC is required*/
866  std::vector<uint8_t> extended_inquiry_response;
867 
868  ctrl_bsb_write_extended_inquiry_response_cmd(const std::vector<char> &data){
869  this->ogf = HCI_CMD_OGF_CONTROLLER_BASEBAND_COMMANDS;
870  this->ocf = HCI_CMD_OCF_CTRL_BSB_WRITE_EXTENDED_INQUIRY_RESPONSE_COMMAND;
872  fec_required = data[COMMAND_FRAME_OFFSET+1];
873  for (unsigned int i = 0;i < 240;i++){
874  extended_inquiry_response.push_back(data[COMMAND_FRAME_OFFSET+2+i]);
875  }
876  }
877 
878 
879  Json::Value toJsonObj(){
880  Json::Value output;
881  init(output);
882  Json::Value parameters;
883  parameters["fec_required"] = fec_required;
884  Json::Value extended_inquiry_response_val(Json::arrayValue);
885  for (unsigned int i = 0;i < 240;i++){
886  extended_inquiry_response_val.append(extended_inquiry_response[i]);
887  }
888  parameters["extended_inquiry_response"] = extended_inquiry_response_val;
889  output["parameters"] = parameters;
890  return output;
891  }
892 
894 
895 /*HCI Command : OGF=0x03 | OCF=0x001A Write scan enable Command*/
897 
898  uint8_t scan_enable; /*1B : 0x00:No Scans enabled | 0x01: Inquiry Scan enabled/Page Scan disabled | 0x02: Inquiry Scan disabled/Page Scan enabled | 0x03:Inquiry Scan enabled/Page Scan enabled*/
899 
900  ctrl_bsb_write_scan_enable_cmd(const std::vector<char> &data){
901  this->ogf = HCI_CMD_OGF_CONTROLLER_BASEBAND_COMMANDS;
902  this->ocf = HCI_CMD_OCF_CTRL_BSB_WRITE_SCAN_ENABLE_COMMAND;
904  scan_enable = data[COMMAND_FRAME_OFFSET+1];
905  }
906 
907 
908  Json::Value toJsonObj(){
909  Json::Value output;
910  init(output);
911  Json::Value parameters;
912  parameters["scan_enable"] = scan_enable;
913  output["parameters"] = parameters;
914  return output;
915  }
916 
918 
919 /*HCI Command : OGF=0x03 | OCF=0x0043 Write inquiry scan type Command*/
921 
922  uint8_t scan_type; /*1B : 0x00:Standard Scan | 0x01: Interlaced Scan*/
923 
924  ctrl_bsb_write_inquiry_scan_type_cmd(const std::vector<char> &data){
925  this->ogf = HCI_CMD_OGF_CONTROLLER_BASEBAND_COMMANDS;
926  this->ocf = HCI_CMD_OCF_CTRL_BSB_WRITE_INQUIRY_SCAN_TYPE_COMMAND;
928  scan_type = data[COMMAND_FRAME_OFFSET+1];
929  }
930 
931 
932  Json::Value toJsonObj(){
933  Json::Value output;
934  init(output);
935  Json::Value parameters;
936  parameters["scan_type"] = scan_type;
937  output["parameters"] = parameters;
938  return output;
939  }
940 
942 
943 
944 /*HCI Command : OGF=0x03 | OCF=0x0001 set event mask Command*/
946 
947  std::vector<uint8_t> event_mask; /*The Set_Event_Mask command is used to control which events are generated by the HCI for the Host*/
948 
949  ctrl_bsb_set_event_mask_cmd(const std::vector<char> &data){
950  this->ogf = HCI_CMD_OGF_CONTROLLER_BASEBAND_COMMANDS;
951  this->ocf = HCI_CMD_OCF_CTRL_BSB_SET_EVENT_MASK_COMMAND;
953  for (unsigned int i = 0; i < 8;i++){
954  event_mask.push_back(data[COMMAND_FRAME_OFFSET+1+i]);
955  }
956  }
957 
958 
959  Json::Value toJsonObj(){
960  Json::Value output;
961  init(output);
962  Json::Value parameters;
963  Json::Value mask_vals(Json::arrayValue);
964  for (unsigned int i = 0; i < 8;i++){
965  mask_vals.append(event_mask[i]);
966  }
967  parameters["event_mask"] = mask_vals;
968  output["parameters"] = parameters;
969  return output;
970  }
971 
973 
974 /*HCI Command : OGF=0x03 | OCF=0x0018 Write page timeout Command*/
976 
977  uint16_t page_timeout; /* 0:Illegal Page Timeout. Must be larger than 0 otherwise Page Timeout measured in Number of Baseband slots*/
978 
979  ctrl_bsb_write_page_timeout_cmd(const std::vector<char> &data){
980  this->ogf = HCI_CMD_OGF_CONTROLLER_BASEBAND_COMMANDS;
981  this->ocf = HCI_CMD_OCF_CTRL_BSB_WRITE_PAGE_TIMEOUT_COMMAND;
983  page_timeout = data[COMMAND_FRAME_OFFSET+1] + (data[COMMAND_FRAME_OFFSET+2]<<8);
984  }
985 
986 
987  Json::Value toJsonObj(){
988  Json::Value output;
989  init(output);
990  Json::Value parameters;
991  parameters["page_timeout"] = page_timeout;
992  output["parameters"] = parameters;
993  return output;
994  }
995 
997 
998 /*HCI Command : OGF=0x03 | OCF=0x0033 Host Buffer size Command*/
1000 
1001  uint16_t host_acl_data_packet_length; /*Maximum length (in octets) of the data portion of each HCI ACL Data packet that the Host is able to accept*/
1002  uint8_t host_synchronous_data_packet_length; /*Maximum length (in octets) of the data portion of each HCI synchronous Data Packet that the Host is able to accept.*/
1003  uint16_t host_total_num_acl_data_packet;/*Total number of HCI ACL Data Packets that can be stored in the data buffers of the Host*/
1004  uint16_t host_total_num_synchronous_data_packet;/*Total number of HCI synchronous Data Packets that can be stored in the data buffers of the Host*/
1005 
1006  ctrl_bsb_host_buffer_size_cmd(const std::vector<char> &data){
1007  this->ogf = HCI_CMD_OGF_CONTROLLER_BASEBAND_COMMANDS;
1008  this->ocf = HCI_CMD_OCF_CTRL_BSB_HOST_BUFFER_SIZE_COMMAND;
1010  host_acl_data_packet_length = data[COMMAND_FRAME_OFFSET+1] + (data[COMMAND_FRAME_OFFSET+2]<<8);
1011  host_synchronous_data_packet_length = data[COMMAND_FRAME_OFFSET+3];
1012  host_total_num_acl_data_packet = data[COMMAND_FRAME_OFFSET+4] + (data[COMMAND_FRAME_OFFSET+5]<<8);
1013  host_total_num_synchronous_data_packet = data[COMMAND_FRAME_OFFSET+6] + (data[COMMAND_FRAME_OFFSET+7]<<8);
1014  }
1015 
1016 
1017  Json::Value toJsonObj(){
1018  Json::Value output;
1019  init(output);
1020  Json::Value parameters;
1021  parameters["host_acl_data_packet_length"] = host_acl_data_packet_length;
1022  parameters["host_synchronous_data_packet_length"] = host_synchronous_data_packet_length;
1023  parameters["host_total_num_acl_data_packet"] = host_total_num_acl_data_packet;
1024  parameters["host_total_num_synchronous_data_packet"] = host_total_num_synchronous_data_packet;
1025  output["parameters"] = parameters;
1026  return output;
1027  }
1028 
1030 
1031 #endif // HCICMDPACKET_H
ctrl_bsb_write_class_of_device_cmd ctrl_bsb_write_class_of_device_cmd_t
Json::Value toJsonObj()
toStyledJson convert frame information to beautiful json format
Definition: hci_cmd_packet.h:1017
uint16_t supervision_timeout
Definition: hci_cmd_packet.h:200
Json::Value toJsonObj()
toStyledJson convert frame information to beautiful json format
Definition: hci_cmd_packet.h:688
ctrl_bsb_write_inquiry_scan_activity_cmd ctrl_bsb_write_inquiry_scan_activity_cmd_t
std::string toString()
Definition: hci_global.h:144
uint8_t filter_duplicates
Definition: hci_cmd_packet.h:389
uint8_t peer_address_type
Definition: hci_cmd_packet.h:455
uint8_t filter_type
Definition: hci_cmd_packet.h:603
Json::Value toJsonObj()
toStyledJson convert frame information to beautiful json format
Definition: hci_cmd_packet.h:49
Definition: hci_cmd_packet.h:41
Definition: hci_cmd_packet.h:386
uint16_t conn_latency
Definition: hci_cmd_packet.h:199
Json::Value toJsonObj()
toStyledJson convert frame information to beautiful json format
Definition: hci_cmd_packet.h:766
ctrl_bsb_write_iac_lap_cmd(const std::vector< char > &data)
Definition: hci_cmd_packet.h:786
le_create_connection_cmd(const std::vector< char > &data)
Definition: hci_cmd_packet.h:204
uint16_t le_scan_interval
Definition: hci_cmd_packet.h:256
Definition: hci_cmd_packet.h:863
uint16_t host_total_num_synchronous_data_packet
Definition: hci_cmd_packet.h:1004
ctrl_bsb_set_event_mask_cmd ctrl_bsb_set_event_mask_cmd_t
Definition: hci_cmd_packet.h:58
Definition: hci_cmd_packet.h:999
Definition: hci_cmd_packet.h:778
uint16_t inquiry_scan_window
Definition: hci_cmd_packet.h:730
ctrl_bsb_write_page_timeout_cmd ctrl_bsb_write_page_timeout_cmd_t
Json::Value toJsonObj()
toStyledJson convert frame information to beautiful json format
Definition: hci_cmd_packet.h:959
Json::Value toJsonObj()
toStyledJson convert frame information to beautiful json format
Definition: hci_cmd_packet.h:228
Json::Value toJsonObj()
toStyledJson convert frame information to beautiful json format
Definition: hci_cmd_packet.h:340
uint8_t connection_handle
Definition: hci_cmd_packet.h:165
Json::Value toJsonObj()
toStyledJson convert frame information to beautiful json format
Definition: hci_cmd_packet.h:714
informational_read_local_extended_features_cmd(const std::vector< char > &data)
Definition: hci_cmd_packet.h:541
bt_address peer_address
Definition: hci_cmd_packet.h:195
uint8_t page_scan_type
Definition: hci_cmd_packet.h:817
uint8_t address[6]
Definition: hci_global.h:138
Definition: hci_cmd_packet.h:815
uint8_t own_address_type
Definition: hci_cmd_packet.h:454
link_control_disconnect_cmd link_control_disconnect_cmd_t
le_remove_device_from_resolving_list_cmd(const std::vector< char > &data)
Definition: hci_cmd_packet.h:357
Definition: hci_cmd_packet.h:253
ctrl_bsb_write_simple_pairing_mode_cmd(const std::vector< char > &data)
Definition: hci_cmd_packet.h:843
std::vector< uint8_t > extended_inquiry_response
Definition: hci_cmd_packet.h:866
Json::Value toJsonObj()
toStyledJson convert frame information to beautiful json format
Definition: hci_cmd_packet.h:549
Json::Value toJsonObj()
toStyledJson convert frame information to beautiful json format
Definition: hci_cmd_packet.h:619
ctrl_bsb_write_scan_enable_cmd(const std::vector< char > &data)
Definition: hci_cmd_packet.h:900
uint8_t scan_enable
Definition: hci_cmd_packet.h:898
uint8_t host_synchronous_data_packet_length
Definition: hci_cmd_packet.h:1002
bt_address peer_address
Definition: hci_cmd_packet.h:354
Definition: hci_cmd_packet.h:652
Definition: hci_cmd_packet.h:449
uint8_t advertising_type
Definition: hci_cmd_packet.h:453
uint8_t advertising_channel_map
Definition: hci_cmd_packet.h:457
COMMAND_OGF_ENUM ogf
Definition: IHciCommandFrame.h:176
uint8_t simultaneous_le_host
Definition: hci_cmd_packet.h:703
le_set_random_address_cmd(const std::vector< char > &data)
Definition: hci_cmd_packet.h:326
uint8_t inquiry_result_filter_condition_type
Definition: hci_cmd_packet.h:604
uint8_t page_number
Definition: hci_cmd_packet.h:539
le_set_scan_enable_cmd le_set_scan_enable_cmd_t
uint16_t maximum_ce_length
Definition: hci_cmd_packet.h:202
ctrl_bsb_write_local_name_cmd ctrl_bsb_write_local_name_cmd_t
Definition: hci_cmd_packet.h:601
le_set_event_mask_cmd le_set_event_mask_cmd_t
uint16_t le_scan_window
Definition: hci_cmd_packet.h:257
uint8_t fec_required
Definition: hci_cmd_packet.h:865
le_read_remote_used_features_cmd le_read_remote_used_features_cmd_t
uint8_t scan_type
Definition: hci_cmd_packet.h:922
uint8_t initiator_filter_policy
Definition: hci_cmd_packet.h:193
uint16_t voice_settings
Definition: hci_cmd_packet.h:756
uint16_t inquiry_scan_interval
Definition: hci_cmd_packet.h:729
ctrl_bsb_write_voice_settings_cmd ctrl_bsb_write_voice_settings_cmd_t
Json::Value toJsonObj()
toStyledJson convert frame information to beautiful json format
Definition: hci_cmd_packet.h:480
Definition: hci_cmd_packet.h:567
uint8_t peer_address_type
Definition: hci_cmd_packet.h:194
le_set_event_mask_cmd(const std::vector< char > &data)
Definition: hci_cmd_packet.h:296
le_set_random_address_cmd le_set_random_address_cmd_t
Definition: hci_cmd_packet.h:896
uint16_t advertising_interval_min
Definition: hci_cmd_packet.h:451
uint16_t host_total_num_acl_data_packet
Definition: hci_cmd_packet.h:1003
std::vector< uint8_t > event_mask
Definition: hci_cmd_packet.h:294
Json::Value toJsonObj()
toStyledJson convert frame information to beautiful json format
Definition: hci_cmd_packet.h:589
uint8_t simple_pairing_mode
Definition: hci_cmd_packet.h:841
std::vector< uint32_t > lap_iac
Definition: hci_cmd_packet.h:783
Json::Value toJsonObj()
toStyledJson convert frame information to beautiful json format
Definition: hci_cmd_packet.h:827
Definition: hci_cmd_packet.h:634
IHciCommandFrame class Interface defining all a generic HCI Command Frame.
Definition: IHciCommandFrame.h:43
Json::Value toJsonObj()
toStyledJson convert frame information to beautiful json format
Definition: hci_cmd_packet.h:908
le_set_advertising_parameters_cmd(const std::vector< char > &data)
Definition: hci_cmd_packet.h:460
vendor_specific_cmd(const std::vector< char > &data)
Definition: hci_cmd_packet.h:62
uint32_t device_class
Definition: hci_cmd_packet.h:654
Definition: hci_cmd_packet.h:537
Definition: hci_cmd_packet.h:292
Definition: hci_cmd_packet.h:700
ctrl_bsb_write_iac_lap_cmd ctrl_bsb_write_iac_lap_cmd_t
Definition: hci_cmd_packet.h:754
Json::Value toJsonObj()
toStyledJson convert frame information to beautiful json format
Definition: hci_cmd_packet.h:664
Definition: hci_cmd_packet.h:975
ctrl_bsb_write_inquiry_scan_activity_cmd(const std::vector< char > &data)
Definition: hci_cmd_packet.h:732
Json::Value toJsonObj()
toStyledJson convert frame information to beautiful json format
Definition: hci_cmd_packet.h:987
uint8_t own_address_type
Definition: hci_cmd_packet.h:258
Definition: hci_cmd_packet.h:322
uint16_t host_acl_data_packet_length
Definition: hci_cmd_packet.h:1001
uint16_t conn_interval_min
Definition: hci_cmd_packet.h:197
Definition: hci_cmd_packet.h:352
ctrl_bsb_write_inquiry_mode_cmd(const std::vector< char > &data)
Definition: hci_cmd_packet.h:680
void_cmd void_cmd_t
Definition: hci_cmd_packet.h:163
link_control_inquiry_cmd link_control_inquiry_cmd_t
ctrl_bsb_write_class_of_device_cmd(const std::vector< char > &data)
Definition: hci_cmd_packet.h:656
uint8_t num_current_iac
Definition: hci_cmd_packet.h:780
Definition: hci_cmd_packet.h:945
ctrl_bsb_set_event_filter_cmd(const std::vector< char > &data)
Definition: hci_cmd_packet.h:607
Json::Value toJsonObj()
toStyledJson convert frame information to beautiful json format
Definition: hci_cmd_packet.h:306
ctrl_bsb_read_class_of_device_cmd ctrl_bsb_read_class_of_device_cmd_t
uint8_t parameter_total_length
Definition: IHciCommandFrame.h:182
le_read_remote_used_features_cmd(const std::vector< char > &data)
Definition: hci_cmd_packet.h:167
Definition: hci_cmd_packet.h:839
uint16_t conn_interval_max
Definition: hci_cmd_packet.h:198
uint8_t advertising_data_length
Definition: hci_cmd_packet.h:415
le_set_advertising_data_cmd le_set_advertising_data_cmd_t
std::vector< uint8_t > parameters
Definition: hci_cmd_packet.h:60
ctrl_bsb_write_extended_inquiry_response_cmd ctrl_bsb_write_extended_inquiry_response_cmd_t
uint16_t scan_window
Definition: hci_cmd_packet.h:192
le_set_scan_enable_cmd(const std::vector< char > &data)
Definition: hci_cmd_packet.h:391
uint8_t ocf
Definition: IHciCommandFrame.h:179
Json::Value toJsonObj()
toStyledJson convert frame information to beautiful json format
Definition: hci_cmd_packet.h:273
Json::Value toJsonObj()
toStyledJson convert frame information to beautiful json format
Definition: hci_cmd_packet.h:879
ctrl_bsb_write_page_scan_type_cmd(const std::vector< char > &data)
Definition: hci_cmd_packet.h:819
uint16_t advertising_interval_max
Definition: hci_cmd_packet.h:452
ctrl_bsb_write_extended_inquiry_response_cmd(const std::vector< char > &data)
Definition: hci_cmd_packet.h:868
Json::Value toJsonObj()
toStyledJson convert frame information to beautiful json format
Definition: hci_cmd_packet.h:798
ctrl_bsb_write_le_host_support_cmd(const std::vector< char > &data)
Definition: hci_cmd_packet.h:705
uint16_t scan_interval
Definition: hci_cmd_packet.h:191
Json::Value toJsonObj()
toStyledJson convert frame information to beautiful json format
Definition: hci_cmd_packet.h:851
ctrl_bsb_read_class_of_device_cmd(const std::vector< char > &data)
Definition: hci_cmd_packet.h:636
Json::Value toJsonObj()
toStyledJson convert frame information to beautiful json format
Definition: hci_cmd_packet.h:373
#define COMMAND_FRAME_OFFSET
Definition: hci_global.h:38
Json::Value toJsonObj()
toStyledJson convert frame information to beautiful json format
Definition: hci_cmd_packet.h:741
uint16_t minimum_ce_length
Definition: hci_cmd_packet.h:201
uint8_t inquiry_mode
Definition: hci_cmd_packet.h:678
ctrl_bsb_set_event_filter_cmd ctrl_bsb_set_event_filter_cmd_t
ctrl_bsb_write_local_name_cmd(const std::vector< char > &data)
Definition: hci_cmd_packet.h:571
std::vector< unsigned char > advertising_data
Definition: hci_cmd_packet.h:416
le_remove_device_from_resolving_list_cmd le_remove_device_from_resolving_list_cmd_t
void init(Json::Value &output)
Definition: IHciCommandFrame.h:93
uint16_t page_timeout
Definition: hci_cmd_packet.h:977
write_default_link_policy_settings_cmd write_default_link_policy_settings_cmd_t
le_set_advertising_parameters_cmd le_set_advertising_parameters_cmd_t
Json::Value toJsonObj()
toStyledJson convert frame information to beautiful json format
Definition: hci_cmd_packet.h:71
ctrl_bsb_write_page_timeout_cmd(const std::vector< char > &data)
Definition: hci_cmd_packet.h:979
ctrl_bsb_write_simple_pairing_mode_cmd ctrl_bsb_write_simple_pairing_mode_cmd_t
le_set_scan_parameters_cmd(const std::vector< char > &data)
Definition: hci_cmd_packet.h:261
vendor_specific_cmd vendor_specific_cmd_t
uint8_t le_supported_host
Definition: hci_cmd_packet.h:702
ctrl_bsb_set_event_mask_cmd(const std::vector< char > &data)
Definition: hci_cmd_packet.h:949
bt_address peer_address
Definition: hci_cmd_packet.h:456
ctrl_bsb_host_buffer_size_cmd ctrl_bsb_host_buffer_size_cmd_t
uint8_t le_scan_enable
Definition: hci_cmd_packet.h:388
ctrl_bsb_write_inquiry_mode_cmd ctrl_bsb_write_inquiry_mode_cmd_t
le_set_advertising_data_cmd(const std::vector< char > &data)
Definition: hci_cmd_packet.h:418
Json::Value toJsonObj()
toStyledJson convert frame information to beautiful json format
Definition: hci_cmd_packet.h:175
uint8_t peer_identity_address_type
Definition: hci_cmd_packet.h:355
COMMAND_OGF_ENUM
Definition: hci_global.h:116
ctrl_bsb_write_page_scan_type_cmd ctrl_bsb_write_page_scan_type_cmd_t
bt_address random_address
Definition: hci_cmd_packet.h:324
informational_read_local_extended_features_cmd informational_read_local_extended_features_cmd_t
uint8_t own_address_type
Definition: hci_cmd_packet.h:196
void_cmd(const std::vector< char > &data, COMMAND_OGF_ENUM ogf, uint8_t ocf)
Definition: hci_cmd_packet.h:43
Definition: hci_global.h:136
uint8_t le_scan_type
Definition: hci_cmd_packet.h:255
le_create_connection_cmd le_create_connection_cmd_t
uint8_t scanning_filter_policy
Definition: hci_cmd_packet.h:259
Json::Value toJsonObj()
toStyledJson convert frame information to beautiful json format
Definition: hci_cmd_packet.h:429
Json::Value toJsonObj()
toStyledJson convert frame information to beautiful json format
Definition: hci_cmd_packet.h:400
le_set_scan_parameters_cmd le_set_scan_parameters_cmd_t
Definition: hci_cmd_packet.h:727
Definition: hci_cmd_packet.h:920
ctrl_bsb_write_voice_settings_cmd(const std::vector< char > &data)
Definition: hci_cmd_packet.h:758
Definition: hci_cmd_packet.h:413
Json::Value toJsonObj()
toStyledJson convert frame information to beautiful json format
Definition: hci_cmd_packet.h:643
std::vector< uint8_t > event_mask
Definition: hci_cmd_packet.h:947
ctrl_bsb_write_le_host_support_cmd ctrl_bsb_write_le_host_support_cmd_t
uint8_t advertising_filter_policy
Definition: hci_cmd_packet.h:458
ctrl_bsb_host_buffer_size_cmd(const std::vector< char > &data)
Definition: hci_cmd_packet.h:1006
Definition: hci_cmd_packet.h:189
std::string local_name
Definition: hci_cmd_packet.h:569
Definition: hci_cmd_packet.h:676
Json::Value toJsonObj()
toStyledJson convert frame information to beautiful json format
Definition: hci_cmd_packet.h:932
ctrl_bsb_write_scan_enable_cmd ctrl_bsb_write_scan_enable_cmd_t
ctrl_bsb_write_inquiry_scan_type_cmd(const std::vector< char > &data)
Definition: hci_cmd_packet.h:924
ctrl_bsb_write_inquiry_scan_type_cmd ctrl_bsb_write_inquiry_scan_type_cmd_t