Howdy,
Thank you for the response.
Sorry I should of been more descriptive, I am getting the error "Card was not found in SIM card reader... Terminating program..." when a card is inserted and I choose the proper card type form the drop down menu.
What is frustrating is that even when I get that error, it appear to still access the card to at least erase it.
I have done the following:
I connect the Gemalto card reader and place a SuperSim inside.
To make sure the device is connected properly, I run the command:
pcsc_scanThe output:
PC/SC device scanner
V 1.4.18 (c) 2001-2011, Ludovic Rousseau <
ludovic.rousseau@free.fr>
Compiled with PC/SC lite version: 1.7.4
Using reader plug'n play mechanism
Scanning present readers...
0: Gemalto GemPC Twin 00 00
Fri Jul 18 08:58:21 2014
Reader 0: Gemalto GemPC Twin 00 00
Card state: Card inserted,
ATR: 3B 9A 94 00 92 02 75 93 11 00 01 02 02 21
ATR: 3B 9A 94 00 92 02 75 93 11 00 01 02 02 21
+ TS = 3B --> Direct Convention
+ T0 = 9A, Y(1): 1001, K: 10 (historical bytes)
TA(1) = 94 --> Fi=512, Di=8, 64 cycles/ETU
62500 bits/s at 4 MHz, fMax for Fi = 5 MHz => 78125 bits/s
TD(1) = 00 --> Y(i+1) = 0000, Protocol T = 0
-----
+ Historical bytes: 92 02 75 93 11 00 01 02 02 21
Category indicator byte: 92 (proprietary format)
Possibly identified card (using /home/user/.smartcard_list.txt):
3B 9A 94 00 92 02 75 93 11 00 01 02 02 21
3B 9A 94 00 92 02 75 93 11 00 01 02 02 ..
SuperSIM
Then I will do a write from command line like I have previously with command:
./pySim-prog.py -p 0 -e -n YateBTS -c 1 -x 001 -y 01 -s 1546258756489513589 -i 001011146783289 -k eef88cc11fdeabb472911ff22009944b -o e420447561751ce9be34272c9e0c4d45With this command the type of card is set to auto.
The output is:
Failed to load symbol for: SCardCancelTransaction, /lib/x86_64-linux-gnu/libpcsclite.so.1: undefined symbol: SCardCancelTransaction!
Insert card now (or CTRL-C to cancel)
Autodetected card type fakemagicsim
Formatting ...
Generated card parameters :
> Name : YateBTS
> SMSP : e1ffffffffffffffffffffffff0581005155f5ffffffffffff000000
> ICCID : 1546258756489513589
> MCC/MNC : 1/1
> IMSI : 001011146783289
> Ki : eef88cc11fdeabb472911ff22009944b
> OPC : e420447561751ce9be34272c9e0c4d45
> ACC : None
Programming ...
Done !
According to what I've read online the, "Failed to load symbol..." message is just a warning and can be ignored.
To confirm the write. I run
./pySim-read.py -p 0The output:
Failed to load symbol for: SCardCancelTransaction, /lib/x86_64-linux-gnu/libpcsclite.so.1: undefined symbol: SCardCancelTransaction!
Reading ...
ICCID: 1546258756489513589
IMSI: 001011146783289
SMSP: ffffffffffffffffffffffffe1ffffffffffffffffffffffff0581005155f5ffffffffffff000000
ACC: ffff
MSISDN: Not available
Done !
I reran the same write command as before, but this time I just put all 1's as the imsi. This is to just confirm change. I read the card to confirm that all1's was written as the imsi.
Now I ran the write command while declaring the type:
./pySim-prog.py -p 0 -e -n YateBTS -c 1 -x 001 -y 01 -s 1546258756489513589 -i 001011146783289 -k eef88cc11fdeabb472911ff22009944b -o e420447561751ce9be34272c9e0c4d45 -t supersimThis write takes longer than the previous write. The output:
Failed to load symbol for: SCardCancelTransaction, /lib/x86_64-linux-gnu/libpcsclite.so.1: undefined symbol: SCardCancelTransaction!
Insert card now (or CTRL-C to cancel)
Formatting ...
Generated card parameters :
> Name : YateBTS
> SMSP : e1ffffffffffffffffffffffff0581005155f5ffffffffffff000000
> ICCID : 1546258756489513589
> MCC/MNC : 1/1
> IMSI : 001011146783289
> Ki : eef88cc11fdeabb472911ff22009944b
> OPC : e420447561751ce9be34272c9e0c4d45
> ACC : None
Programming ...
Done !
The read is as expected:
Failed to load symbol for: SCardCancelTransaction, /lib/x86_64-linux-gnu/libpcsclite.so.1: undefined symbol: SCardCancelTransaction!
Reading ...
ICCID: 1546258756489513589
IMSI: 001011146783289
SMSP: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ACC: ffff
MSISDN: Not available
Done !
Now if I go to the Nib web interface. I leave everything to default except that I choose Supersim from the card type drop down menu.
I click save and I get the error message: Card was not found in SIM card reader... Terminating program...
The kicker is that now if I try to read the sim , I get the output:
Failed to load symbol for: SCardCancelTransaction, /lib/x86_64-linux-gnu/libpcsclite.so.1: undefined symbol: SCardCancelTransaction!
Reading ...
Traceback (most recent call last):
File "./pySim-read.py", line 90, in <module>
(res, sw) = scc.read_binary(['3f00', '2fe2'])
File "/usr/src/pysim/pySim/commands.py", line 42, in read_binary
r = self.select_file(ef)
File "/usr/src/pysim/pySim/commands.py", line 35, in select_file
data, sw = self._tp.send_apdu_checksw("a0a4000002" + i)
File "/usr/src/pysim/pySim/transport/__init__.py", line 87, in send_apdu_checksw
raise RuntimeError("SW match failed ! Expected %s and got %s." % (sw.lower(), rv[1]))
RuntimeError: SW match failed ! Expected 9000 and got 6700.
So, NIB is at least accessing the sim long enough to erase/corrupt it in some way.
I have also tried to write to the sim through NIB, with turning off "Generate random IMSI" and "Insert subscribers"
I then put in the IMSI info manually. It was the same info I used for the command line write that worked.
I have iterated through all the sim type option in NIB just to see any of them would write.
They all give me the "Card was not found..." error or something close to "RuntimeError: SW match failed ! Expected 9000 and got 9804."
Sometimes the "Expected/got" numbers are different, but its the same error.
Through out the experiments, I kept the card in and reader plugged in the whole time.
After any errors/failures to write, I would go back to the manual command line read/write to make sure the device/card is working properly.
I only see the errors through NIB.
Cards that I write manually and insert manually into NIB will connect properly and make call/SMS correctly but both Msisdn and short number.
I really would like to be able to write Sims through the NIB though.
Does anyone know of a particular sim that they have had success on with NIB.
I was going to try to find the brand of sim that is included in the YateBTS LabKit.
Any help/guidance is much appropriated.
Thank you Again.