softSIM is a collection of tools to play with SIM.
It mainly relies on SAP, as abstraction layer to access SIM.
SAP is a implementation of the BTSAP (Bluetooth SIM Access Profile) spec.
client and server share common contsants, functions, message queue handling.
this common part is defined in common.rb
client.rb is a child of common.rb, it implements the client state machine of SAP
You mainly have to provide an IO to connect to the server.
You can then connect, get the ATR, send some APDU, and disconnect.
server.rb is a child of common.rb, it implements the server state machine of SAP
server.rb does not work on it's own, but is an abstract class (it has abstract methods).
You have to implement the connect,disconnect,atr,apdu functions.
You also have to provide an IO for the server to listen to.
apdu.rb contains general method to abstract SIM commands.
Tools & Demo :
bluetooth_sap_serial searches for bluetooth SAP servers, connects to it,
and return the serial port path (bluez and dbus are used)
- it's purpose is to test the client implementation (just the basics)
- use the CLI to indicate the server
- it executes some common commands
- it's purpose is to start the server implementations (sim,pcsc)
- use the CLI to configure it
- this is a server implementation that uses a classic smart card reader
to connect to the SIM (smartcard gem used)
- this provides a softSIM (software SIM)
- it is SIMOS
- the SIM files have to be provided in a xml file
- it's just a APDU to SAP wrapped
- it take APDu from a IO, acts as a SAP client, connects to a SAP server,
gets the response, return the response APDU
- it has been used do use external SIM (or softSIM) with osmocomBB
- ruby 1.8.7
- rubygems and ruby-dev to build some gems
- libdbus-ruby (for bluetooth_sap_serial)
- serialport gem (to use bluetooth_sap_serial, http://rubygems.org/gems/serialport)
- smartcard gem (for pcsc_server, http://www.rubygems.org/gems/smartcard, requires libpcsclite1 libpcsclite-dev libruby)
- libxml-ruby (for sim server)
- it does not implement the functions for the proactive SIM : power_on/off,
reset , ...
- not all the commands are implemented (even the PIN verification)
- implement COMP128v1