pySim incorrectly detecting as OpenCells-SIM?

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Albert Franklin afranklin at mailfence.com
Fri Nov 6 17:14:27 UTC 2020


Hello

I tried to buy a sysmoISIM-SJA2 but it was not available to my region, so I acquired a Chinese writable sim card with adm keys (https://www.aliexpress.com/item/32813645415.html). With their software I can read PIN, PUK, ADM, ISMI, PLMN, EHPLMN, etc exactly as on the image on the link mentioned.

pcsc_scan detected it (even with a weird name) from a Chinese brand manufacture using https://github.com/LudovicRousseau/pcsc-tools/blob/master/smartcard_list.txt.

I tried pySim-read and it failed on the end saying that OpenCellsSim' object has no attribute 'read_ehplmn'. I'm sharing the full output if anyone is interested. It's weird because it fails to read ISMI and ICCID for example and other fields. I started recently studying this area, I took a look at pySim code and looks like that it's based on size of data to detect if it's OpenCells or not (which I believe is not my case). Is there a easy way to know if my Chinese card is OpenCells or whatever they are?

$ ./pySim-read.py -p 0
Using PC/SC reader interface
Reading ...
Autodetected card type: OpenCells-SIM
ICCID: 
IMSI: None
GID1: ffffffff
GID2: ffffffff
SMSP: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
SPN: CMCC
Display HPLMN: False
Display OPLMN: False
PLMNsel: 32d00032d01034f06045f08032f32212f020ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
PLMNwAcT:
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused

OPLMNwAcT:
        32d0004000 # MCC: 460 MNC: 000 AcT: E-UTRAN
        32d0008000 # MCC: 460 MNC: 000 AcT: UTRAN
        32d0000080 # MCC: 460 MNC: 000 AcT: GSM
        ...
        ffffff0000 # unused
        ffffff0000 # unused
        ffffff0000 # unused

HPLMNAcT:
        32d0004000 # MCC: 460 MNC: 000 AcT: E-UTRAN
        32d0008000 # MCC: 460 MNC: 000 AcT: UTRAN
        32d0000080 # MCC: 460 MNC: 000 AcT: GSM

ACC: ffff
MSISDN: Not available
Administrative data: 00000002
        MS operation mode: normal operation
        Ciphering Indicator: disabled
SIM Service Table: ff33ffff00003f033000f0c3
        Service 1 - CHV1 disable function
        Service 2 - Abbreviated Dialling Numbers (ADN)
        Service 3 - Fixed Dialling Numbers (FDN)
        Service 4 - Short Message Storage (SMS)
        Service 5 - Advice of Charge (AoC)
        Service 6 - Capability Configuration Parameters (CCP)
        Service 7 - PLMN selector
        Service 8 - RFU
        Service 9 - MSISDN
        Service 10 - Extension1
        Service 13 - Last Number Dialled (LND)
        Service 14 - Cell Broadcast Message Identifier
        Service 17 - Service Provider Name
        Service 18 - Service Dialling Numbers (SDN)
        Service 19 - Extension3
        Service 20 - RFU
        Service 21 - VGCS Group Identifier List (EFVGCS and EFVGCSS)
        Service 22 - VBS Group Identifier List (EFVBS and EFVBSS)
        Service 23 - enhanced Multi-Level Precedence and Pre-emption Service
        Service 24 - Automatic Answer for eMLPP
        Service 25 - Data download via SMS-CB
        Service 26 - Data download via SMS-PP
        Service 27 - Menu selection
        Service 28 - Call control
        Service 29 - Proactive SIM
        Service 30 - Cell Broadcast Message Identifier Ranges
        Service 31 - Barred Dialling Numbers (BDN)
        Service 32 - Extension4
        Service 49 - MExE
        Service 50 - Reserved and shall be ignored
        Service 51 - PLMN Network Name
        Service 52 - Operator PLMN List
        Service 53 - Mailbox Dialling Numbers
        Service 54 - Message Waiting Indication Status
        Service 57 - Multimedia Messaging Service (MMS)
        Service 58 - Extension 8

Traceback (most recent call last):
  File "./pySim-read.py", line 255, in <module>
    (res, sw) = card.read_ehplmn()
AttributeError: 'OpenCellsSim' object has no attribute 'read_ehplmn'

As I can't buy the sysmoISIM-SJA2  where I live, I searched for other sellers. I found this one (https://www.aliexpress.com/i/32272726951.html) where an user wrote 

"+ Devices work. + Use GRSIMWrite to program them initially. After you do this, you will know PIN-ADM so then pysim will work. - PsiWords could spend a little time pointing people at correct software to program cards. That would be, as they like to say, much more professional! (Especially if they want repeat business!)
21 Aug 2018 16:43".

I'm curious if this card sold by other user just have a different encoding / format to read/write data from mine, because the PIN + ADM keys I also can obtain from their software, however, since my card is in another format I don't believe that I will have success to write it. Am I wrong?

I saw the list of supported SIM cards and some of them are very limited. Someone already acquired a SIM card with great compatibility with pysim from China? I searched for supersim, fakemagicsim and some combinations and no success.

fakemagicsim
supersim
magicsim
grcardsim
sysmosim-gr1
sysmoSIM-GR2
sysmoUSIM-GR1
sysmoUSIM-SJS1
Fairwaves-SIM
OpenCells-SIM
Wavemobile-SIM
sysmoISIM-SJA2

Any help or advise is very welcome.

-- 
Sent with https://mailfence.com
Secure and private email



More information about the OpenBSC mailing list