lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/simtrace2/+/36980?usp=email )
Change subject: dissector: add support for sim polarity ...................................................................... dissector: add support for sim polarity Change-Id: If3ae350d0f4d737bc9e80c4f5d73cc1a39d076af --- M contrib/simtrace.lua 1 file changed, 24 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/80/36980/1 diff --git a/contrib/simtrace.lua b/contrib/simtrace.lua index 9015085..2a4a7bc 100644 --- a/contrib/simtrace.lua +++ b/contrib/simtrace.lua @@ -58,6 +58,7 @@ local hf_cemu_cfg_features = ProtoField.uint32("usb_simtrace.cemu_cfg.features.status_irq", "CardEm Features", base.HEX) local hf_cemu_cfg_slot_mux_nr = ProtoField.uint32("usb_simtrace.cemu_cfg.features.slot_mux_nr", "CardEm Slot Mux Nr", base.DEC) +local hf_cemu_cfg_presence_polarity = ProtoField.uint8("usb_simtrace.cemu_cfg.features.presence_polarity", "Sim presence polarity", base.DEC) local card_insert_types = { [0x00] = "not inserted", @@ -71,6 +72,9 @@ local CEMU_STATUS_F_CARD_INSERT = ProtoField.uint32("usb_simtrace.CEMU_STATUS.F_CARD_INSERT", "CARD_INSERT", base.HEX_DEC, NULL, 0x00000008) local CEMU_STATUS_F_RESET_ACTIVE = ProtoField.uint32("usb_simtrace.CEMU_STATUS.F_RESET_ACTIVE", "RESET_ACTIVE", base.HEX_DEC, NULL, 0x00000010) +local CEMU_CONFIG_PRES_POL_PRES_H = ProtoField.uint32("usb_simtrace.CEMU_CONFIG.PRES_POL_PRES_H", "PRESENCE_HIGH", base.HEX_DEC, NULL, 0x00000001) +local CEMU_CONFIG_PRES_POL_VALID = ProtoField.uint32("usb_simtrace.CEMU_CONFIG.PRES_POL_VALID", "PRESENCE_VALID", base.HEX_DEC, NULL, 0x00000002) + local modem_reset_types = { [0x00] = "de-assert", [0x01] = "assert", @@ -89,9 +93,10 @@ msgtype, seqnr, slotnr, reserved, payloadlen, payload, pb_and_rx, pb_and_tx, final, tpdu_hdr, rxtxdatalen, rxtxdata, CEMU_STATUS_F_VCC_PRESENT, CEMU_STATUS_F_CLK_ACTIVE, CEMU_STATUS_F_RCEMU_ACTIVE, CEMU_STATUS_F_CARD_INSERT, CEMU_STATUS_F_RESET_ACTIVE, + CEMU_CONFIG_PRES_POL_PRES_H, CEMU_CONFIG_PRES_POL_VALID, modem_reset_status, modem_reset_len, hf_pts_len, hf_pts_req, hf_pts_resp, - hf_cemu_cfg_features, hf_cemu_cfg_slot_mux_nr, + hf_cemu_cfg_features, hf_cemu_cfg_slot_mux_nr, hf_cemu_cfg_presence_polarity, hf_cemu_cardinsert, hf_modem_sim_select, } @@ -214,7 +219,15 @@ local subtree = tree:add(usb_simtrace_protocol, payload_data, "Card Emu Config") subtree:add(hf_cemu_cfg_features, payload_data(0,4)); - subtree:add(hf_cemu_cfg_slot_mux_nr, payload_data(4,1)); + if payload_data:len() >= 4 then + subtree:add(hf_cemu_cfg_slot_mux_nr, payload_data(4,1)); + end + if payload_data:len() >= 5 then + local pres = payload_data(5,1):le_uint(); + subtree:add(hf_cemu_cfg_presence_polarity, payload_data(5,1)); + headerSubtree:add(CEMU_CONFIG_PRES_POL_PRES_H, pres) + headerSubtree:add(CEMU_CONFIG_PRES_POL_VALID, pres) + end end function dissect_modem_sim_sel(payload_data, pinfo, tree) -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/36980?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: If3ae350d0f4d737bc9e80c4f5d73cc1a39d076af Gerrit-Change-Number: 36980 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus <lyn...@fe80.eu> Gerrit-MessageType: newchange