# HG changeset patch # User Mychaela Falconia # Date 1616458862 0 # Node ID 871281cb05552c98d3ada4edc435ee1742dd652f # Parent bccf028921bb5f677e65414ddd69d620e147e7d4 doc/Low-level-commands: apdu-checksw documented diff -r bccf028921bb -r 871281cb0555 doc/Low-level-commands --- a/doc/Low-level-commands Mon Mar 22 23:58:11 2021 +0000 +++ b/doc/Low-level-commands Tue Mar 23 00:21:02 2021 +0000 @@ -194,3 +194,15 @@ the T=0 protocol: 5 bytes of header (including the length byte) followed by data bytes, if any. After executing the APDU exchange, the apdu command simply prints the SW response code from the SIM. + +A different form of the raw APDU command is provided for use in custom command +scripts: + +apdu-checksw "xx xx xx xx xx ..." YYZZ + +This command takes two arguments at the argv level: the first is the same string +of bytes as in the basic apdu command (will need to be quoted if it contains +spaces between bytes), and the second argument is the expected SW response from +the SIM. If the SW response from the SIM is exactly as expected, the execution +of the command is considered to be successful; if the SW response is different, +an error is reported and script execution is stopped.