tomasz-lisowski / swsim

A software SIM card.
BSD 3-Clause "New" or "Revised" License
300 stars 34 forks source link

Problem when MS attempts short READ BINARY (less bytes than file length) #7

Closed laf0rge closed 1 year ago

laf0rge commented 1 year ago
DLGLOBAL INFO => DATA: flags=0x01 (HDR ), a0 a4 00 00 02 
 DLINP DEBUG [0] <= osmo_st2_cardem_request_pb_and_rx(pb=a4, le=2)
DLGLOBAL INFO => DATA: flags=0x02 (FINAL ), 7f 20 
 DLINP DEBUG [0] <= osmo_st2_cardem_request_sw_tx(sw=9f17)
DLGLOBAL INFO => DATA: flags=0x01 (HDR ), a0 f2 00 00 17 
 DLINP DEBUG [0] <= osmo_st2_cardem_request_pb_and_tx(pb=f2, tx=00 00 00 00 7f 20 02 00 00 00 00 00 0a b3 01 13 04 00 83 8a 83 8a 00 , len=23)
DLINP DEBUG [0] <= osmo_st2_cardem_request_sw_tx(sw=9000)
DLGLOBAL INFO => DATA: flags=0x01 (HDR ), a0 a4 00 00 02 
 DLINP DEBUG [0] <= osmo_st2_cardem_request_pb_and_rx(pb=a4, le=2)
DLGLOBAL INFO => DATA: flags=0x02 (FINAL ), 6f ae 
 DLINP DEBUG [0] <= osmo_st2_cardem_request_sw_tx(sw=9f0f)
DLGLOBAL INFO => DATA: flags=0x01 (HDR ), a0 b0 00 00 01 
 DLINP DEBUG [0] <= osmo_st2_cardem_request_sw_tx(sw=9f01)
DLGLOBAL NOTICE => IRQ STATUS: flags=0x13, fi=1, di=1, wi=10 wtime=9600 (RESET VCC CLK )
DLGLOBAL NOTICE => IRQ STATUS: flags=0x12, fi=1, di=1, wi=10 wtime=9600 (RESET CLK )
DLGLOBAL NOTICE => IRQ STATUS: flags=0x10, fi=1, di=1, wi=10 wtime=9600 (RESET )

so what happens here

this is how it looks like with a real SIM:

DLGLOBAL INFO => DATA: flags=0x01 (HDR ), a0 a4 00 00 02 
 DLINP DEBUG [0] <= osmo_st2_cardem_request_pb_and_rx(pb=a4, le=2)
DLGLOBAL INFO => DATA: flags=0x02 (FINAL ), 7f 20 
 DLINP DEBUG [0] <= osmo_st2_cardem_request_sw_tx(sw=9f20)
DLGLOBAL INFO => DATA: flags=0x01 (HDR ), a0 f2 00 00 20 
 DLINP DEBUG [0] <= osmo_st2_cardem_request_pb_and_tx(pb=f2, tx=00 00 00 00 7f 20 02 00 00 00 00 00 13 b3 00 1e 04 00 83 8a 83 8a 00 03 00 00 3b 71 00 00 00 00 , len=32)
DLINP DEBUG [0] <= osmo_st2_cardem_request_sw_tx(sw=9000)
DLGLOBAL INFO => DATA: flags=0x01 (HDR ), a0 a4 00 00 02 
 DLINP DEBUG [0] <= osmo_st2_cardem_request_pb_and_rx(pb=a4, le=2)
DLGLOBAL INFO => DATA: flags=0x02 (FINAL ), 6f ae 
 DLINP DEBUG [0] <= osmo_st2_cardem_request_sw_tx(sw=9f0f)
DLGLOBAL INFO => DATA: flags=0x01 (HDR ), a0 b0 00 00 01 
 DLINP DEBUG [0] <= osmo_st2_cardem_request_pb_and_tx(pb=b0, tx=03 , len=1)
DLINP DEBUG [0] <= osmo_st2_cardem_request_sw_tx(sw=9000)
laf0rge commented 1 year ago

Nevermind, I was using a slightly older git clone, this is fixed in 5d951aebae683c98f9632145b2b05d5b327aeadd