From 7489947046fd10e503d774841f99a8d3b5ebc87b Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 2 Dec 2022 23:16:12 +0100 Subject: [PATCH] pySim-trace: Fix missing MANAGE CHANNEL decode old output: 00 MANAGE CHANNEL 01 9110 new output: 00 MANAGE CHANNEL 01 9110 {'mode': 'open_channel', 'created_channel': 1} Change-Id: Iac5b24c14d2b68d526ab347462b72548b8731b30 --- pySim/apdu/ts_102_221.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pySim/apdu/ts_102_221.py b/pySim/apdu/ts_102_221.py index fb2f375f..ea456021 100644 --- a/pySim/apdu/ts_102_221.py +++ b/pySim/apdu/ts_102_221.py @@ -393,10 +393,12 @@ class ManageChannel(ApduCommand, n='MANAGE CHANNEL', ins=0x70, cla=['0X', '4X', manage_channel = rs.get_lchan_by_cla(self.cla) manage_channel.add_lchan(created_channel_nr) self.col_id = '%02u' % created_channel_nr + return {'mode': mode, 'created_channel': created_channel_nr } elif mode == 'close_channel': closed_channel_nr = self.cmd_dict['p2'] rs.del_lchan(closed_channel_nr) self.col_id = '%02u' % closed_channel_nr + return {'mode': mode, 'closed_channel': closed_channel_nr } else: raise ValueError('Unsupported MANAGE CHANNEL P1=%02X' % self.p1)