Change in pysim[master]: commands, ts_102_221: replace pytlv with uttlv

laforge gerrit-no-reply at
Sat Mar 27 18:37:23 UTC 2021

laforge has posted comments on this change. ( )

Change subject: commands, ts_102_221: replace pytlv with uttlv

Patch Set 3:

(1 comment) 
File pySim/ 
PS3, Line 36: 		from u
there's at least 5 instances of "... = TLV() tag_size=1, len_size=1" in the code.  That's copy+paste and it will only grow more.

WE could simply inherit our own class from TLV() and set the right kind of defaults.

btw: tag_size=1 is default in uttlv, so we can skip it

Finally, even while uttlv might be much nicer: I doubt it really implements the BER-TLV semantics that are required in many parts of smart cards.  For example, the length is not a fixed one byte length, but it's a variable-length length field.

So sooner or later we will have to (write if we cannot find) and switch to a proper implementation that really implements what we require.  WE shoud study tools like cyberflex-shell, mitshell, pycrate, etc. and see if there really isn't anything that implements what's needed.

To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I971b818836aff2fbeb6769f819d496cee4bfa7cf
Gerrit-Change-Number: 23483
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier at>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at>
Gerrit-Reviewer: laforge <laforge at>
Gerrit-Comment-Date: Sat, 27 Mar 2021 18:37:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list