We released our software to program UICC/SIM/USIM cards.
We tested and support it only with our cards and our card reader, nevertheless it is GPL license open source.
Please provide us with enhancements source code, as per GPL license rules
We offer support as comments on this blog page, and a FAQ
(if your question is very confidential, send us a mail)
Hello,
I have your sim-card and sim-card reader. I want to know that how can I read or set values in the sim-card. In fact, I use Ubuntu 16.04. could you tell me in details.
Thanks
Hello,
Ubuntu 16 is fine, the instructions are on the page “uicc-software” (the link in blue).
Regards,
Laurent
sorry to bother you again.
In fact, I am not professional user in Linux.
in the aforementioned link, it explains about the commands. could you please tell me that how can I open the serial link in Ubuntu?
Many Thanks.
Hi Eshagh,
I may misunderstand your question.
The serial link is shown as /dev/ttyUSB0 (if it is the only serial interface in the Linux machine).
But you don’t have to manage this: just run the program as per the manual.
Let’s try to re-explain:
– compile, so type: make
– down load the source code: clic on “source code”
say “yes” to “open with archive manager”
clic on “extract” and put the directory where ever you prefer in your disk
– open a “terminal”: CRTL+ALT+T shortcut
– go to the directory: cd
– type: sudo ./program_uicc –help
will display the options
– type sudo ./program_uicc –adm
thank you. my problem was ./program_uicc. I did not use “adm”.
Sorry, My last question is:
Is there any possibility to change Mobile Country Code(MCC) of the sim-card? I mean the MCC of the sim-card is 208. can I change it to 232 for instance?
Hi,
yes of course.
You need only to define the IMSI, that starts by the MCC.
the other USIM files that are related to the MCC with be automatically computed by “program_uicc”
the next field in the IMSI is MNC: by default it is 2 digits.
If you set a 3 digits MNC, you have to specify this (see program_uicc –help)
BR,
Laurent
Hi,
If HSS has:
## HSS options
OPERATOR_key = “1006020f0a478bf6b699f15c062e42b3”; # OP key matching your database
and hss-dump-users has:
imsi | mmeidentity_idmmeidentity | hex(users.key) | sqn | hex(rand) | hex(OPc)
208920100001106 7 8BAF473F2F8FD09487CCCBD7097C6862 00000000000000000021 33353336363633303332333633313634 E734F8734007D6C5CE7A0508809E7E9C
Is it correct to set value for the SIM as:
./program_uicc –adm –key 8BAF473F2F8FD09487CCCBD7097C6862 –opc 1006020f0a478bf6b699f15c062e42b3
I’m confused with options –opc and –xx.
Thanks,
Thuy
Hi Thuy,
We updated the FAQ with the answer.
Regards,
Laurent
Hello,
I recently ordered a opencells SIM card and SIM reader.
When I run command: sudo ./program_uicc
I receive following values:
No adm code supplied, the USIM current values are:
ICCID: 89860061100000000001
WARNING: iccid luhn encoding of last digit not done
USIM IMSI: 208920100001101
USIM MSISDN: 00000001
USIM Service Provider Name: OpenCells01
I also ran sudo DEBUG=y ./program_uicc but did not help.
How do I read the other values burnt in SIM like Opc, Key, Op Key ??
Request you to please help at the earliest.
Dear Sumi,
3GPP defines key, OPc, … as write only files.
The values we have set are in the OAI HSS database example we deliver
You can overwrite these values if you provide –adm with the ADM value of your cards.
Be careful of not testing a lot (10) of wrong ADM: the cards will lock themselves considering you as a hacker.
You can also test milenage authentication (so test the Ki and the OPc values) with program_uicc
regards,
Laurent
Hello,
I am currently trying to write to one of my SIM cards. Unfortunately for some reason the card cannot be writed. The ADM key is the one that is printed on the card itself and starts with OC, correct? (8 digits)
I’m getting this issue:
./program_uicc –adm OC003617 –imsi 262802019092123 –opc cdc202d5123e20f62b6d676ac72cb318 –key 465b5ce8b199b49faa5f0a2ee238a6bc –spn ICN
Setting new values
WARNING: Non standard packet sent
ret is not right size
expect: 0x9000
answer: 0xfe
chv 0a Nok
BAD return code
Expected: : 0x9000
got answer: : 0x63c9
chv 0a Nok
Read new values in UICC
ICCID: 89860061100000000003
WARNING: iccid luhn encoding of last digit not done
USIM IMSI: 208920100001103
USIM MSISDN: 00000003
USIM Service Provider Name: OpenCells03
Hi,
The ADM code should be on each invoice.
In your case, we missed to add this code on the invoice.
We sent you new cards.
Regards,
Laurent
Hi,
I have entered the adm code correct, but when I ran the program
~/Downloads/uicc-v2.3$ sudo ./program_uicc –adm 80508050 –imsi 404010100000001 –key 0c0a34601d4f07677303652c0462535b –xx 63bfa50ee6523365ff14c1f45f88737d
Existing values in USIM
ICCID: 89860061100000000009
WARNING: iccid luhn encoding of last digit not done
USIM IMSI: 208920100001109
USIM MSISDN: 000000
USIM Service Provider Name: OpenCells09
Computed OPc from OP and Ki as: ba05688178e398bedc100674071002cb
Setting new values
Expected: : 0x9000
got answer: : 0x9840
BAD return code 9840
chv 0a Nok
Expected: : 0x9000
got answer: : 0x6983
BAD return code 6983
chv 0a Nok
Reading UICC values after uploading new values
ICCID: 89860061100000000009
WARNING: iccid luhn encoding of last digit not done
USIM IMSI: 208920100001109
USIM MSISDN: 000000
USIM Service Provider Name: OpenCells09
I got this error, why it is not able to set the imsi of our choice as we are testing in indian location.
Dear Ranjith,
It should work and the trace is clear: the adm code is not right.
This won’t occur with new firmware: what is the serial number of your card?
Laurent
I see: the dicussion started months ago.
I see you have probably put the serial number in the adm code months ago.
I guess you have tried about 10 times or more.
Reading manual before is always better.
The card is now blocked.
We can offer a new card, please write us by mail.
Laurent
No Sir,
We are using the 0c003 series one and we have the adm code as 80508050 on our invoice.
I am not able to understand what this means (
Setting new values
Expected: : 0x9000
got answer: : 0x9840
BAD return code 9840
chv 0a Nok
Expected: : 0x9000
got answer: : 0x6983
BAD return code 6983
chv 0a Nok
)
.
I used uicc-v2.3
Kindly Help us in resolving it.
Dear Ranjith,
A random generator was making these ADM for each order.
From you serial, I found the invoice.
80508050 is not the code š it doesn’t look like a randomized number
Please write me a mail explaining in private how you got the card.
If you try more that 8 consecutive times a wrong ADM password, the card will block forever. It will still work fine in a phone with existing values, but you will not be able to flash new values.
I think it is already the case: ‘9840’: CHV blocked
It is normalized retun codes, that you can find in smartcards (UICC) standard documents.
Best regards,
Laurent
Hi,
I want to connect OAI eNB and OAI UE according to this page :https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/HowToConnectOAIENBWithOAIUEWithoutS1Interface. After HW setup and building OAI eNB and OAI UE successfully, I try to run it with tunnel interfaces but something wrong happen.
I run eNB with this command:
sudo -E ./lte_build_oai/build/lte-softmodem -O /home/user/openairinterface5g/ci-scripts/conf_files/ enb.band7.tm1.25PRB.usrpb210.conf –nokrnmod 1 –noS1 –eNBs.[0].rrc_inactivity_threshold 0 2>&1 | tee ENB.log
I run UE with this command:
sudo ./lte-uesoftmodem -C 2680000000 -r 25 –ue-rxgain 117 āusrp-args āaddr=192.168.40.2ā –ue-txgain 0 –ue-max-power 0 –ue-scan-carrier –nokrnmod 1 –noS1 2>&1 | tee UE.log
In my caseļ¼after running OAI ENB and UEļ¼it can ping with each other. The first question is when I increased the ping packet size to about 300 Byte, the OAI UE would shutdown and show a lot of ābad DCI 1Aā,āretransmission but TBS differentā or āpreoblem in DCIā . Looks like something is wrong with PDSCH. The second question is that I could not be able to test my throughput with iperf and The server did not seem to be receiving even one packet!
Do you have any suggestions that can help me debug this problem?
Hi,
This is OAI issue, no relation with our products.
for bad DCI see hereafter.
For no IP packet at all, it seems your IP configuration is wrong.
We will not test or debug OAI wiki pages.
Laurent
Hiļ¼
I want to Connect OAI eNB with OAI UE without S1 Interface based on this page: https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/HowToConnectOAIENBWithOAIUEWithoutS1Interface;
In my caseļ¼after running OAI ENB and UEļ¼it can ping with each other with 5%-10% packet loss. The first question is when I increased the ping packet size to about 300 Byte, the OAI UE would shutdown and show a lot of ābad DCI 1Aā or āpreoblem in DCIā . Looks like something is wrong with PDSCH. The second question is that I could not be able to test my throughput with iperf and The server did not seem to be receiving any packet.
By the way
I use:
10gigabit ethernet to connect two USRP with 40 dB attenuation
Master v1.1.0
Ubuntu 16.04 4.4.0-170-lowlatency
Attenuator 40dB
USRP x310
Hi,
This is support page for the product we distribute, not for OAI.
Anyway:
*** bad DCI:
OAI official answer is the channel is noisy, so it is “normal”
On simulated channel, perfect I/Q sample, we can reproduce the same.
So, we think there are also bugs.
*** iperf fails
This is your IP configuration, or earlier defect.
Please follow our tutorial to heave first a working configuration.
Hello,
I’m attempting to configure a non-opencells SIM card using sudo ./program_uicc using uicc-v2.0. However I’m getting the following printout:
Existing values in USIM
Assertion ((fd=::open(portname, O_RDWR | O_NOCTTY | O_SYNC)) >=0) failed!
In open() ./uicc.h:331,
System error: No such file or directory
additional txt: Failed to open /dev/ttyUSB0
Exiting execution
I’m able to see the card and card reader info when I enter sudo pcsc_scan, as well as with ./pySim-read.py -p 0.
Thanks,
Adam
Dear Adam,
It seems you have not connected our reader (error: No such file or directory)
or maybe, you need to add “sudo” at beginning.
If you want to allow your curent user to use tty devices without sudo, in ubuntu:
sudo usermod -a -G dialout $USER
Regards,
Laurent
Laurent,
Thank you for the response. I tried adding myself to the dialout group and rebooting as well as running the command with sudo, however neither changes the output.
I am using a Dekart Sim Card Reader (1a1e:b100) , not the opencells one. Is it possible to use the program with a non-opencells reader?
Dear Adam,
See our product description: we use “raw” readers, not the M$ PC/SC protocol readers as the Dekart reader.
If you want to contribute, you could add PC/SC support to our program.
Else, any “raw” reader should work (we only select suppliers and test each reader before shipping).
Regards,
Laurent
Dear Adam,
I have trying write to my sim card but i doesn’t save my changes. I am doing the following:
sudo ./program_uicc –adm 05061670 –imsi 208920100001111 –opc 504F20634F6320504F50206363500A4F –key 6874736969202073796D4B2079650A73 –spn openair –authenticate
But I always get the above data
Not possible answer to milenage challenge: ffffff98, 62
UICC should answer the command but (6f,00)
terminate called after throwing an instance of ‘std::out_of_range’
what(): basic_string::substr: __pos (which is 18446744073709551614) > this->size() (which is 0)
Abortado
Dear Elisabeth,
Error 98,62 is: “Authentication Error, application specific (incorrect MAC)”
It should never append
Could you:
– retry with the latest program_uicc version on our web site
– if it doesn’t work, write us (contact@open-cells.com) with the card serial number and the information you can get to help in diagnosis
Best regards,
Laurent