Bluetooth: BTLE: Add BT5.0 command and event name parsing

Change-Id: I830551959965896451ddc08f3e843b61f22eed67
Reviewed-on: https://code.wireshark.org/review/19233
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Jakub Pawlowski 2016-12-12 17:56:32 -08:00 committed by Anders Broman
parent 9f9086c392
commit 809523433d
2 changed files with 74 additions and 1 deletions

View File

@ -929,7 +929,38 @@ value_string_ext bthci_cmd_ocf_testing_vals_ext = VALUE_STRING_EXT_INIT(bthci_cm
{ (base) | 0x02C, "LE Read Local Resolvable Address" }, \
{ (base) | 0x02D, "LE Set Address Resolution Enable" }, \
{ (base) | 0x02E, "LE Set Resolvable Private Address Timeout" }, \
{ (base) | 0x02F, "LE Read Maximum Data Length" }
{ (base) | 0x02F, "LE Read Maximum Data Length" }, \
{ (base) | 0x030, "LE Read PHY" }, \
{ (base) | 0x031, "LE Set Default PHY" }, \
{ (base) | 0x032, "LE Set PHY" }, \
{ (base) | 0x033, "LE Enhanced Receiver Test" }, \
{ (base) | 0x034, "LE Enhanced Transmitter Test" }, \
{ (base) | 0x035, "LE Set Advertising Set Random Address" }, \
{ (base) | 0x036, "LE Set Extended Advertising Parameters" }, \
{ (base) | 0x037, "LE Set Extended Advertising Data" }, \
{ (base) | 0x038, "LE Set Extended Scan Response Data" }, \
{ (base) | 0x039, "LE Set Extended Advertising Enable" }, \
{ (base) | 0x03A, "LE Read Maximum Advertising Data Length" }, \
{ (base) | 0x03B, "LE Read Number of Supported Advertising Sets" }, \
{ (base) | 0x03C, "LE Remove Advertising Set" }, \
{ (base) | 0x03D, "LE Clear Advertising Sets" }, \
{ (base) | 0x03E, "LE Set Periodic Advertising Parameters" }, \
{ (base) | 0x03F, "LE Set Periodic Advertising Data" }, \
{ (base) | 0x040, "LE Set Periodic Advertising Enable" }, \
{ (base) | 0x041, "LE Set Extended Scan Parameters" }, \
{ (base) | 0x042, "LE Set Extended Scan Enable" }, \
{ (base) | 0x043, "LE Extended Create Connection" }, \
{ (base) | 0x044, "LE Periodic Advertising Create Sync" }, \
{ (base) | 0x045, "LE Periodic Advertising Create Sync Cancel" }, \
{ (base) | 0x046, "LE Periodic Advertising Terminate Sync" }, \
{ (base) | 0x047, "LE Add Device To Periodic Advertiser List" }, \
{ (base) | 0x048, "LE Remove Device From Periodic Advertiser List" }, \
{ (base) | 0x049, "LE Clear Periodic Advertiser List" }, \
{ (base) | 0x04A, "LE Read Periodic Advertiser List Size" }, \
{ (base) | 0x04B, "LE Read Transmit Power" }, \
{ (base) | 0x04C, "LE Read RF Path Compensation" }, \
{ (base) | 0x04D, "LE Write RF Path Compensation" }, \
{ (base) | 0x04E, "LE Set Privacy Mode" }
static const value_string bthci_cmd_ocf_low_energy_vals[] = {
LOW_ENERGY_VALS(0x0),
@ -1016,6 +1047,10 @@ static const value_string bthci_cmd_status_vals[] = {
{0x3E, "Connection Failed to be Established"},
{0x3F, "MAC Connection Failed"},
{0x40, "Coarse Clock Adjustment Rejected but Will Try to Adjust Using Clock Dragging"},
{0x41, "Type0 Submap Not Defined"},
{0x42, "Unknown Advertising Identifier"},
{0x43, "Limit Reached"},
{0x44, "Operation Cancelled by Host"},
{0, NULL }
};
value_string_ext bthci_cmd_status_vals_ext = VALUE_STRING_EXT_INIT(bthci_cmd_status_vals);
@ -3369,6 +3404,14 @@ dissect_le_cmd(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
case 0x029: /* LE Clear Resolving List */
case 0x02A: /* LE Read Resolving List Size */
case 0x02F: /* LE Read Maximum Data Length */
case 0x03A: /* LE Read Maximum Advertising Data Length */
case 0x03B: /* LE Read Number of Supported Advertising Sets */
case 0x03D: /* LE Clear Advertising Sets */
case 0x045: /* LE Periodic Advertising Create Sync Cancel */
case 0x049: /* LE Clear Periodic Advertiser List */
case 0x04A: /* LE Read Periodic Advertiser List Size */
case 0x04B: /* LE Read Transmit Power */
case 0x04C: /* LE Read RF Path Compensation */
/* NOTE: No parameters */
break;

View File

@ -739,6 +739,15 @@ static const value_string evt_le_meta_subevent[] = {
{ 0x09, "LE Generate DHKey Complete" },
{ 0x0A, "LE Enhanced Connection Complete" },
{ 0x0B, "LE Direct Advertising Report" },
{ 0x0C, "LE PHY Update Complete" },
{ 0x0D, "LE Extended Advertising Report" },
{ 0x0E, "LE Periodic Advertising Sync Established" },
{ 0x0F, "LE Periodic Advertising Report" },
{ 0x10, "LE Periodic Advertising Sync Lost" },
{ 0x11, "LE Scan Timeout" },
{ 0x12, "LE Advertising Set Terminated" },
{ 0x13, "LE Scan Request Received" },
{ 0x14, "LE Channel Selection Algorithm" },
{ 0, NULL }
};
@ -2679,6 +2688,27 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset,
case 0x2014: /* LE Set Host Channel Classification */
case 0x201d: /* LE Receiver Test */
case 0x201e: /* LE Transmitter Test */
case 0x2031: /* LE Set Default PHY */
case 0x2033: /* LE Enhanced Receiver Test */
case 0x2034: /* LE Enhanced Transmitter Test */
case 0x2035: /* LE Set Advertising Set Random Address */
case 0x2037: /* LE Set Extended Advertising Data */
case 0x2038: /* LE Set Extended Scan Response Data */
case 0x2039: /* LE Set Extended Advertising Enable */
case 0x203C: /* LE Remove Advertising Set */
case 0x203D: /* LE Clear Advertising Sets */
case 0x203E: /* LE Set Periodic Advertising Parameters */
case 0x203F: /* LE Set Periodic Advertising Data */
case 0x2040: /* LE Set Periodic Advertising Enable */
case 0x2041: /* LE Set Extended Scan Parameters */
case 0x2042: /* LE Set Extended Scan Enable */
case 0x2045: /* LE Periodic Advertising Create Sync Cancel */
case 0x2046: /* LE Periodic Advertising Terminate Sync */
case 0x2047: /* LE Add Device To Periodic Advertiser List */
case 0x2048: /* LE Remove Device From Periodic Advertiser List */
case 0x2049: /* LE Clear Periodic Advertiser List */
case 0x204D: /* LE Write RF Path Compensation */
case 0x204E: /* LE Set Privacy Mode */
proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data);
offset += 1;