Skip to content
Success

Changes

Summary

  1. ts_102_222: correct encode FILE_ID (details)
Commit 7806249bd5763fd96e26619162a6dc487b07c913 by lynxis
ts_102_222: correct encode FILE_ID

Fix an exception with FILE_ID.
When creating ADF.USIM/DF.5GS:

> create_df  --ef-arr-record-nr 2  --ef-arr-file-id 2f06 5FC0
EXCEPTION of type 'StringError' occurred with message: Error in path (building)
given non-bytes value, perhaps unicode? '5fc0

[..]
  File "/home/lynxis/projects/osmocom/repos/pysim/pySim/ts_102_222.py", line 207, in do_create_df
    (_data, _sw) = self._cmd.lchan.scc.create_file(b2h(fcp.to_tlv()))
[..]
  File "/usr/lib/python3.13/site-packages/construct/core.py", line 191, in stream_write
    raise StringError("given non-bytes value, perhaps unicode? %r" % (data,), path=path)
construct.core.StringError: Error in path (building)
given non-bytes value, perhaps unicode? '5fc0'

Change-Id: I95c81f6793f1fdbaee5365355bab06a1c1107106
The file was modifiedpySim/ts_102_222.py