aboutsummaryrefslogtreecommitdiffstats
path: root/README
blob: 3629ef5aeba9b0cd7bd842d7169e296d33ab97fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Presentation :

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.

Overview :

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)

demo_client :
- it's purpose is to test the client implementation (just the basics)
- use the CLI to indicate the server
- it executes some common commands

demo_server.rb :
- it's purpose is to start the server implementations (sim,pcsc)
- use the CLI to configure it

pcsc_server.rb :
- this is a server implementation that uses a classic smart card reader
to connect to the SIM (smartcard gem used)

sim_server.rb :
- this provides a softSIM (software SIM)
- it is SIMOS
- the SIM files have to be provided in a xml file

apdu_forward :
- 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

Requirements :
- 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)

TODO :

SAP :
- it does not implement the functions for the proactive SIM : power_on/off,
reset , ...

sim_server :
- not all the commands are implemented (even the PIN verification)
- implement COMP128v1