Sylvain Munaut | 995c398 | 2009-12-27 09:43:51 +0100 | [diff] [blame] | 1 | This utility allows to : |
| 2 | |
| 3 | * Program customizable SIMs. Two modes are possible: |
| 4 | |
| 5 | - one where you specify every parameter manually : |
| 6 | |
Sylvain Munaut | 76504e0 | 2010-12-07 00:24:32 +0100 | [diff] [blame] | 7 | ./pySim-prog.py -n 26C3 -c 49 -x 262 -y 42 -i <IMSI> -s <ICCID> |
Sylvain Munaut | 995c398 | 2009-12-27 09:43:51 +0100 | [diff] [blame] | 8 | |
| 9 | |
| 10 | - one where they are generated from some minimal set : |
| 11 | |
Sylvain Munaut | 76504e0 | 2010-12-07 00:24:32 +0100 | [diff] [blame] | 12 | ./pySim-prog.py -n 26C3 -c 49 -x 262 -y 42 -z <random_string_of_choice> -j <card_num> |
Sylvain Munaut | 995c398 | 2009-12-27 09:43:51 +0100 | [diff] [blame] | 13 | |
| 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 Munaut | 76504e0 | 2010-12-07 00:24:32 +0100 | [diff] [blame] | 26 | from pySim.transport.serial import SerialSimLink |
| 27 | from pySim.commands import SimCardCommands |
Sylvain Munaut | 995c398 | 2009-12-27 09:43:51 +0100 | [diff] [blame] | 28 | |
Sylvain Munaut | 76504e0 | 2010-12-07 00:24:32 +0100 | [diff] [blame] | 29 | sl = SerialSimLink(device='/dev/ttyUSB0', baudrate=9600) |
| 30 | sc = SimCardCommands(sl) |
Sylvain Munaut | 995c398 | 2009-12-27 09:43:51 +0100 | [diff] [blame] | 31 | |
Sylvain Munaut | 76504e0 | 2010-12-07 00:24:32 +0100 | [diff] [blame] | 32 | # Print IMSI |
| 33 | print sc.read_binary(['3f00', '7f20', '6f07']) |
| 34 | |
| 35 | # Run A3/A8 |
| 36 | print sc.run_gsm('00112233445566778899aabbccddeeff') |