mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-16 18:38:32 +03:00
Implement Generic SIM Access interface as per 3GPP TS 27.007
According to 3GPP TS 27.007, sections 8.17 and 8.18, the modem may *optionally* provide Generic and/or Restricted SIM Access to the TE (Terminal Equipment) by means of the AT commands. This basically means that a modem can act as a card reader. Generic SIM Access allows the TE to send raw PDUs in the format as described in 3GPP TS 51.011 directly to the SIM card, while Restricted SIM Access is more limited, and thus is not really interesting to us. This change implements a new transport called ModemATCommandLink, so using it a SIM card can be read and/or programmed without the need to remove it from the modem's socket. A downside of this approach is relatively slow I/O speed compared to PC/SC readers. Tested with Quectel EC20: $ ./pySim-read.py --modem-dev /dev/ttyUSB2 Change-Id: I20bc00315e2c7c298f46283852865c1416047bc6 Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
This commit is contained in:
committed by
Vadim Yanitskiy
parent
eb06b45d0e
commit
29ca8049d6
@@ -61,6 +61,14 @@ def parse_options():
|
||||
help="Which PC/SC reader number for SIM access",
|
||||
default=None,
|
||||
)
|
||||
parser.add_option("--modem-device", dest="modem_dev", metavar="DEV",
|
||||
help="Serial port of modem for Generic SIM Access (3GPP TS 27.007)",
|
||||
default=None,
|
||||
)
|
||||
parser.add_option("--modem-baud", dest="modem_baud", type="int", metavar="BAUD",
|
||||
help="Baudrate used for modem's port [default: %default]",
|
||||
default=115200,
|
||||
)
|
||||
parser.add_option("--osmocon", dest="osmocon_sock", metavar="PATH",
|
||||
help="Socket path for Calypso (e.g. Motorola C1XX) based reader (via OsmocomBB)",
|
||||
default=None,
|
||||
|
||||
Reference in New Issue
Block a user