RFC: Generic (U)SIM software

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/simtrace@lists.osmocom.org/.

Harald Welte laforge at gnumonks.org
Sat Nov 26 18:12:45 UTC 2011


Hi all,

I'm thinking of starting a project that would allow us to
 * perform SIM and USIM card pre-personalization
 * read/dump and explore [U]SIM contents interactively
 * perform SIM card simulation

The idea is to start with some generic data structure that can represent
the filesystem tree (DFs, EFs) and their "external" properties, i.e.
file type, size, permissions, FID, SFID, etc.

This data structure could also have the actual file content associated
with each EF.

The second step would be some code that can take that data structure and
program a freely-programmable card (like sysmoSIM-GR1) and create the
files according to that structure.

Another module would implement card-simulation (via BT SAP, SIMtrace or
virtual PC/SC card).  After all, only a few instructions have to be
imilpemented if the filesystem and its content is already in a generic
data structure that the program can access..

Next step would be to associate parser and generator routines for the
content of each individual file as it is  specified in TS 11.11.

After that has been done, we could think of representing the FS tree and
the parsed contents of each file in some kind of graphical / user
friendly representation.  The idea here is that the UI code would be
generic and not know any of the actual ecnoding/decoding of the EF
content.

The biggest question is what language to use for this.  Some kind of
object orientation might very well resemble the idea of a 'file object'
in a tree, with many different file types, each having it's own
parser/encoder.

On the other hand, Erlang's bit field syntax would probably come very
handy in terms of encoding/decoding the various EF content.  However, at
least once we start to want some kidn of UI, Erlan really sucsk.  Also,
almost nobody here reads/writes Erlang [yet?].

Writing all this in C seems like a bit much of an effort, probably even
more so on the UI side.  However, we already have quite a bit of C code
for parsing/generating things like LAI, etc. which are stored like 04.08
inside the sim card files.

Python might be a good idea in terms of tons of available
libraries/modules, object orientation and good UI bindings.  The biggest
problem here is that my python skills are really limited so far, so my
productivity might not be as high as I expect.

The individual components could even be written in different
languages, but then we would have to have some common format for
exchanging data back and forth - which might not be worth it, given the
small scope of the project.

any ideas / comments / feedback?

-- 
- Harald Welte <laforge at gnumonks.org>           http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)




More information about the simtrace mailing list