laforge has uploaded this change for review.

View Change

pySim.ts_51_011.EF_SMSP: Also permit UCS2 for the alpha_id

TS 51.011 Section 10.5.6 refers to clause 10.5.1 (EF.ADN),
and the latter permits UCS2 in addition to 7-bit GSM alphabet.

Change-Id: If10b3d6d8b34ece02dc0350ca9ea9c3f8fbf3c9e
---
M pySim/ts_51_011.py
1 file changed, 1 insertion(+), 1 deletion(-)

git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/73/41673/1
diff --git a/pySim/ts_51_011.py b/pySim/ts_51_011.py
index 7bd3380..cdab5de 100644
--- a/pySim/ts_51_011.py
+++ b/pySim/ts_51_011.py
@@ -280,7 +280,7 @@
def __init__(self, fid='6f42', sfid=None, name='EF.SMSP', desc='Short message service parameters', **kwargs):
super().__init__(fid, sfid=sfid, name=name, desc=desc, rec_len=(28, None), **kwargs)
ScAddr = Struct('length'/Int8ub, 'ton_npi'/TonNpi, 'call_number'/BcdAdapter(Rpad(Bytes(10))))
- self._construct = Struct('alpha_id'/COptional(GsmStringAdapter(Rpad(Bytes(this._.total_len-28)))),
+ self._construct = Struct('alpha_id'/COptional(GsmOrUcs2Adapter(Rpad(Bytes(this._.total_len-28)))),
'parameter_indicators'/InvertAdapter(FlagsEnum(Byte, tp_dest_addr=1, tp_sc_addr=2,
tp_pid=3, tp_dcs=4, tp_vp=5)),
'tp_dest_addr'/ScAddr,

To view, visit change 41673. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: If10b3d6d8b34ece02dc0350ca9ea9c3f8fbf3c9e
Gerrit-Change-Number: 41673
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge@osmocom.org>