FreeCalypso > hg > freecalypso-hwlab
changeset 139:6c6e8705dc70
fc-uicc-tool: select-usim and select-isim implemented
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 04 Feb 2021 05:00:12 +0000 |
parents | baf5bd698764 |
children | 062141ce5755 |
files | uicc/dispatch.c uicc/select.c |
diffstat | 2 files changed, 27 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/uicc/dispatch.c Thu Feb 04 04:51:08 2021 +0000 +++ b/uicc/dispatch.c Thu Feb 04 05:00:12 2021 +0000 @@ -17,6 +17,8 @@ extern int cmd_readrec(); extern int cmd_select(); extern int cmd_select_aid(); +extern int cmd_select_isim(); +extern int cmd_select_usim(); extern int cmd_telecom_sum(); extern int display_sim_resp_in_hex(); @@ -39,6 +41,8 @@ {"readrec", 2, 2, cmd_readrec}, {"select", 1, 1, cmd_select}, {"select-aid", 1, 1, cmd_select_aid}, + {"select-isim", 1, 1, cmd_select_isim}, + {"select-usim", 1, 1, cmd_select_usim}, {"sim-resp", 0, 0, display_sim_resp_in_hex}, {"telecom-sum", 0, 0, cmd_telecom_sum}, {0, 0, 0, 0}
--- a/uicc/select.c Thu Feb 04 04:51:08 2021 +0000 +++ b/uicc/select.c Thu Feb 04 05:00:12 2021 +0000 @@ -8,6 +8,9 @@ #include <winscard.h> #include "globals.h" +u_char std_aid_usim[7] = {0xA0, 0x00, 0x00, 0x00, 0x87, 0x10, 0x02}; +u_char std_aid_isim[7] = {0xA0, 0x00, 0x00, 0x00, 0x87, 0x10, 0x04}; + select_op(file_id) unsigned file_id; { @@ -217,6 +220,26 @@ return parse_and_display_select_response(); } +cmd_select_usim() +{ + int rc; + + rc = select_aid_op(std_aid_usim, 7); + if (rc < 0) + return(rc); + return parse_and_display_select_response(); +} + +cmd_select_isim() +{ + int rc; + + rc = select_aid_op(std_aid_isim, 7); + if (rc < 0) + return(rc); + return parse_and_display_select_response(); +} + u_char * extract_select_resp_tag(sought_tag) unsigned sought_tag;