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 | |
| 7 | ./pySim.py -n 26C3 -c 49 -x 262 -y 42 -i <IMSI> -s <ICCID> |
| 8 | |
| 9 | |
| 10 | - one where they are generated from some minimal set : |
| 11 | |
| 12 | ./pySim.py -n 26C3 -c 49 -x 262 -y 42 -z <random_string_of_choice> -j <card_num> |
| 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 | |
| 26 | import pySim |
| 27 | sl = pySim.SerialSimLink(device='/dev/ttyUSB0', baudrate=9600) |
| 28 | print sl.read_binary(['3f00', '7f20', '6f07']) # Print IMSI |
| 29 | print sl.run_gsm('00112233445566778899aabbccddeeff') # Run A3/A8 |
| 30 | |
| 31 | |