mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-16 18:38:32 +03:00
ara_m: use class byte of current lchan
The ara_m commands use APDUs with a fix class byte (0x80). This means that all ARA-M related features only work in the basic logical channel. To fix this, let's compute the class byte for the current logical channel dynamically inside the send_apdu methods of SimCardCommands. This will fix the problem globally. Related: OS#6531 Change-Id: Ie3e48678f178a488bfaea6cc2b9a3e18145a8d10
This commit is contained in:
@@ -252,9 +252,9 @@ Online manual available at https://downloads.osmocom.org/docs/pysim/master/html/
|
||||
# can be executed without the presence of a runtime state (self.rs) object. However, this also means that
|
||||
# self.lchan is also not present (see method equip).
|
||||
if opts.raw or self.lchan is None:
|
||||
data, sw = self.card._scc.send_apdu(opts.APDU)
|
||||
data, sw = self.card._scc.send_apdu(opts.APDU, apply_lchan = False)
|
||||
else:
|
||||
data, sw = self.lchan.scc.send_apdu(opts.APDU)
|
||||
data, sw = self.lchan.scc.send_apdu(opts.APDU, apply_lchan = False)
|
||||
if data:
|
||||
self.poutput("SW: %s, RESP: %s" % (sw, data))
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user