dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/34152 )
Change subject: sim-rest-server: do not select ADF.USIM in connect_to_card ......................................................................
sim-rest-server: do not select ADF.USIM in connect_to_card
When the function connect_to_card is done, it selects ADF.USIM. This might be contraproductive in case someone needs to access files on MF level in one of the REST methods. Instead fo ADF.USIM, let's use MF as a common ground to start from.
At the moment the only existing REST (info, auth) immediately select ADF.USIM after calling connect_to_card already, so there are no further modifications necessary.
Related: RT#67094 Change-Id: I16e7f3c991c83f81989ecc4e4764bb6cc799c01d --- M contrib/sim-rest-server.py 1 file changed, 22 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/52/34152/1
diff --git a/contrib/sim-rest-server.py b/contrib/sim-rest-server.py index f2ed63e..ccf4430 100755 --- a/contrib/sim-rest-server.py +++ b/contrib/sim-rest-server.py @@ -46,7 +46,9 @@ scc.sel_ctrl = "0004"
card.read_aids() - card.select_adf_by_aid(adf='usim') + + # ensure that MF is selected when we are done. + card._scc.select_file('3f00')
return tp, scc, card