comparison doc/Simtool-command-shell @ 50:d73fddc64485

doc/Simtool-command-shell: update for new target selection
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 21 Mar 2021 06:42:29 +0000
parents da6e9d0b2ee6
children
comparison
equal deleted inserted replaced
49:831a224e182b 50:d73fddc64485
1 Our fc-simtool and fc-uicc-tool operate as interactive shells. When you run 1 Our fc-simtool and fc-uicc-tool operate as interactive shells. When you run
2 either program, it selects the "card reader" device it will use and connects to 2 either program, it selects (based on -d or -p options) the card access back end
3 the card via pcsc-lite facilities, and then it gives you an interactive command 3 it will use, and if the card connection is successful (ATR will be displayed),
4 shell. The communication session with the card (including vital volatile state 4 the program gives you an interactive command shell. The communication session
5 like PIN authentication and currently selected directory and EF) remains 5 with the card (including vital volatile state like PIN authentication and
6 unbroken until you exit the shell, at which point our tools tell pcsc-lite to 6 currently selected directory and EF) remains unbroken until you exit the shell,
7 power down the card. 7 at which point our tools clean up: in the case of PC/SC readers, we tell
8 pcsc-lite to power down the card; if you are using the Calypso back end
9 (fc-simint), the Calypso device will be commanded into soft power-off.
8 10
9 The actual useful commands available in fc-simtool and fc-uicc-tool are 11 The actual useful commands available in fc-simtool and fc-uicc-tool are
10 described in other documents; this document describes program invokation and 12 described in other documents; this document describes program invokation and
11 the command shell itself. 13 the command shell itself.
12 14
13 Program invokation 15 Program invokation
14 ================== 16 ==================
15 17
16 Both tools share the same command line structure: 18 Both tools share the same command line structure:
17 19
18 fc-simtool [-p num] [batch-command] 20 fc-simtool {-d /dev/ttyXXX | -p N} [batch-command]
19 fc-uicc-tool [-p num] [batch-command] 21 fc-uicc-tool {-d /dev/ttyXXX | -p N} [batch-command]
20 22
21 If you run either tool without any options or arguments, it will select the 23 The target selection option (-d or -p, see Back-end-selection article) is
22 first reader supported by pcsc-lite (reader number 0, same as if -p0 was 24 mandatory - there is no default. If you run fc-simtool or fc-uicc-tool with
23 specified), and if the card connection is successful, it will enter the 25 just the required -d or -p target selection option and no other arguments, the
24 interactive command shell. Use the -p num option to select a different reader 26 program will enter the interactive command shell.
25 number; to tell which reader number is which, use fc-pcsc-list to list all
26 available readers.
27 27
28 Aside from the -p num option, any arguments given on the command line suppress 28 Aside from target selection and other back end options, any arguments given on
29 the default interactive shell and select the tool's batch mode instead - the 29 the command line suppress the default interactive shell and select the tool's
30 arguments specify the command to be executed. For example, the following 30 batch mode instead - the arguments specify the command to be executed. For
31 invokation will read and display the inserted card's ICCID, and immediately 31 example, the following invokation will read and display the inserted card's
32 exit: 32 ICCID, and immediately exit:
33 33
34 fc-simtool iccid 34 fc-simtool -p0 iccid
35 35
36 This batch mode is particularly useful with the exec command described further 36 This batch mode is particularly useful with the exec command described further
37 in this document. 37 in this document.
38 38
39 Command shell basic features 39 Command shell basic features