aboutsummaryrefslogtreecommitdiff
path: root/src/mm-serial-parsers.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2018-01-08 13:37:24 +0100
committerDan Williams <dcbw@redhat.com>2018-09-12 17:17:36 +0000
commit02821232878d2a12bf248b7f2594c48076593810 (patch)
tree90a7d1cf0b0e204ac4b215f87a61c4c5cc971f49 /src/mm-serial-parsers.c
parent4c669d3bf46da3b4f924968e43fc2edfbfa0b5d7 (diff)
helpers: allow 19-digit reported ICCIDs
The mm_3gpp_parse_iccid() method does validation of the ICCID string and was originally implemented to handle +CRSM reported values. The implementation was looking for 20-digit strings, even for 19-digit ICCIDs (those finished with a trailing 'F'). We now extend the logic to also validate ICCID strings reported as 19-digit values directly, and when that happens we won't allow swapping of the digits (a +CRSM specific requirement) or trailing 'F' characters (as that is only required when reporting 19-digit ICCIDs with 20-digit strings). This change allows us to e.g. use the u-blox specific AT+CCID command and validate the returned ICCID with the same helper method, which currently fails: (ttyACM2): --> 'AT+CCID<CR>' (ttyACM2): <-- '<CR><LF>+CCID: 8934077700015848638<CR><LF><CR><LF>OK<CR><LF>' couldn't load SIM identifier: 'Invalid ICCID response size (was 19, expected 20)'
Diffstat (limited to 'src/mm-serial-parsers.c')
0 files changed, 0 insertions, 0 deletions