AT+CRSM – reading files from the SIM
AT+CRSM – reading files from the SIM
Read files from the AnyNet Secure SIM. For precise formats and response details, refer to the modem provider documentation.
We recommend that you use AT+CRSM over the generic SIM access AT+CSIM. AT+CRSM provides easier access to the SIM file system, as the modem facilitates the SIM interface locking and file selection routines.
Command syntax
Use the following command:
AT+CRSM=<command>[,<fileid>[,<P1offset>,<P2offset>,<P3readlength>[,<data>[,"<pathid>"]]]]The command includes these parameters:
commandis passed to the SIM. Use176(READ BINARY) to extract security and identity information.fileidis the integer file identifier on the SIM. See Available files and sizes.P1offset,P2offset, andP3readlengthdefine the read offset and length.AT+CRSMreturns up to 255 bytes per read.P1offsetcontains the upper 8 bits of the 16-bit file offset.P2offsetcontains the lower 8 bits of the 16-bit file offset. It can include the modulus (MOD) operator.P3readlengthis the integer read length. Limit it to 255 bytes.
datais unused forREAD BINARY. Leave it empty.pathidis the elementary file path in hexadecimal. Use"3F007FEE"for AnyNet Secure SIM files.
You can use +, -, /, and * arithmetic operators in the offset parameters.
Returned result
A successful command returns:
A failed command returns:
The response fields are:
sw1andsw2describe command execution. They can indicate success or file-read errors.RETURNEDDATAcontains successful response data as an ASCII hexadecimal string.erris the error result when the command cannot pass to the SIM.
Last updated
Was this helpful?