Skip to content

Commit

Permalink
wireshark/lwp3_dissector: drop port_ids
Browse files Browse the repository at this point in the history
Ports vary by hub so this doesn't really add any useful info.
  • Loading branch information
dlech committed Aug 30, 2021
1 parent 5291aaf commit 7ae36e0
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions wireshark/lwp3_dissector.lua
Original file line number Diff line number Diff line change
Expand Up @@ -116,26 +116,6 @@ local device_numbers = {
[0x81] = "Technic Large Hub",
}

-- https://lego.github.io/lego-ble-wireless-protocol-docs/index.html#port-id
-- TODO: figure out how to do ranges instead of listing all 256 possibile values
local port_ids = {
[0x00] = "Port 0",
[0x01] = "Port 1",
[0x02] = "Port 2",
[0x03] = "Port 3",
[0x32] = "Port 50",
[0x33] = "Port 51",
[0x34] = "Port 52",
[0x35] = "Port 53",
[0x36] = "Port 54",
[0x37] = "Port 55",
[0x38] = "Port 56",
[0x39] = "Port 57",
[0x3A] = "Port 58",
[0x3B] = "Port 59",
[0x3C] = "Port 60",
}

-- IO Type ID
-- https://lego.github.io/lego-ble-wireless-protocol-docs/index.html#io-type-id
local type_ids = {
Expand Down Expand Up @@ -276,7 +256,6 @@ function parse_port_id(range, offset, subtree, field)
local range = range:range(offset, 1)
local value = range:le_int()
local port_id_tree = subtree:add_le(field, range, value)
port_id_tree:append_text(" (" .. port_ids[value] .. ")")
end

-- parses a 2-byte type id
Expand Down

0 comments on commit 7ae36e0

Please sign in to comment.