blob: 7f45759e6afea0a4bc5dc0cbc8fcf4bc60fb855c [file] [log] [blame]
Sylvain Munaut995c3982009-12-27 09:43:51 +01001This utility allows to :
2
3 * Program customizable SIMs. Two modes are possible:
4
5 - one where you specify every parameter manually :
6
Sylvain Munaut76504e02010-12-07 00:24:32 +01007./pySim-prog.py -n 26C3 -c 49 -x 262 -y 42 -i <IMSI> -s <ICCID>
Sylvain Munaut995c3982009-12-27 09:43:51 +01008
9
10 - one where they are generated from some minimal set :
11
Sylvain Munaut76504e02010-12-07 00:24:32 +010012./pySim-prog.py -n 26C3 -c 49 -x 262 -y 42 -z <random_string_of_choice> -j <card_num>
Sylvain Munaut995c3982009-12-27 09:43:51 +010013
14 With <random_string_of_choice> and <card_num>, the soft will generate
15 'predictable' IMSI and ICCID, so make sure you choose them so as not to
16 conflict with anyone. (for eg. your name as <random_string_of_choice> and
17 0 1 2 ... for <card num>).
18
19 You also need to enter some parameters to select the device :
20 -t TYPE : type of card (supersim, magicsim, fakemagicsim or try 'auto')
21 -d DEV : Serial port device (default /dev/ttyUSB0)
22 -b BAUD : Baudrate (default 9600)
23
24 * Interact with SIMs from a python interactive shell (ipython for eg :)
25
Sylvain Munaut76504e02010-12-07 00:24:32 +010026from pySim.transport.serial import SerialSimLink
27from pySim.commands import SimCardCommands
Sylvain Munaut995c3982009-12-27 09:43:51 +010028
Sylvain Munaut76504e02010-12-07 00:24:32 +010029sl = SerialSimLink(device='/dev/ttyUSB0', baudrate=9600)
30sc = SimCardCommands(sl)
Sylvain Munaut995c3982009-12-27 09:43:51 +010031
Sylvain Munaut76504e02010-12-07 00:24:32 +010032 # Print IMSI
33print sc.read_binary(['3f00', '7f20', '6f07'])
34
35 # Run A3/A8
36print sc.run_gsm('00112233445566778899aabbccddeeff')