changeset 58:871281cb0555

doc/Low-level-commands: apdu-checksw documented
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 23 Mar 2021 00:21:02 +0000
parents bccf028921bb
children 10bfdee30a68
files doc/Low-level-commands
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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.