mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-10-02 06:14:36 +03:00
cat: properly decode IMEI/IMEISV IE
Currently BcdAdapter(GreedyBytes), i.e. a plain swapped nibble digit string, which is wrong, the IMEI IE is not a bcd string. See TS 124.008 10.5.1.4 figure 10.5.4 + table 10.5.4 It currently - decodes framing nibble as digit - encodes a 15 digit IMEI as 7 bytes, wrong len, dropped last digit Fix this, while at it add the 8.74 IMEISV as well + tests for the framing because the current round trip missed all of this. Change-Id: Iad7aea77513d413c338edc18ef1bcc37488ae849
This commit is contained in:
@@ -21,6 +21,7 @@ import logging
|
||||
from osmocom.utils import b2h, h2b, all_subclasses
|
||||
from osmocom.tlv import *
|
||||
|
||||
import pySim.cat
|
||||
import pySim.iso7816_4
|
||||
import pySim.ts_102_221
|
||||
import pySim.ts_102_222
|
||||
|
||||
Reference in New Issue
Block a user