First proposal is, to use Append Record instead; If this fails, verify that the record size of the created file matches your data. I can't find any 12 in the file control information, so there may be a mismatch. If I read the SCOSTA specification correctly, the record size specified is 0x25. In that case you MUST pad. For a little while now I have been working on a utility to allow you to query and view the contents of the chip on your Chip & PIN / EMV smart card.
In the context of, an application protocol data unit ( APDU) is the communication unit between a and a smart card. The structure of the APDU is defined by -4 Organization, security and commands for interchange. APDU message command-response pair [ ] There are two categories of APDUs: command APDUs and response APDUs.
A command APDU is sent by the reader to the card – it contains a mandatory 4- header (CLA, INS, P1, P2) and from 0 to 65 535 bytes of data. A response APDU is sent by the card to the reader – it contains from 0 to 65 536 bytes of data, and 2 mandatory status bytes (SW1, SW2). Command APDU Field name Length (bytes) Description CLA 1 Instruction class - indicates the type of command, e.g.
![Apdu Apdu](https://saush.files.wordpress.com/2006/09/img3.png?w=300&h=241)
Apdu Commands Create File
Interindustry or proprietary INS 1 Instruction code - indicates the specific command, e.g. 'write data' P1-P2 2 Instruction parameters for the command, e.g.
Just any old GSM compatible SIM card (bonus for 3G USIM). I presume I need some hardware? Can anyone recommend something cheap for hobbyist, and something more professional? I presume that there will be full docs of an API with the h/w, so maybe this should be tagged 'no-programming-related'?
Sorry, if so. Any good URLs or books (I am conversant with the 3GPP standards). I'm not (black hat) hacking, don't worry, just not pleased with the likes of SIM Card Secretary, Data Doctor Recovery, etc, so would like to code my own, but might turn it commercial, or offer SIM card programming services (data recover from damaged card, etc) as a sideline.
Update: while I am primarily interested just reading my SMS for backup, it might be a bonus if someone knows of a cheap SIM card writer (so that I can back up all or part of the SIM and restore it later). You can do that with any PC/SC smart card reader (and writer, as others pointed out) and a program that can read and parse the data for you. You'll certainly need a smartcard reader and from what I've been able to find out, pretty much any one will do because they all have to support the standard functionality. They also happen to be pretty cheap. Mine is an OmniKey (not sure what model because I don't have it here right now).
Presuming that you're developing under Windows, the Windows API has functions that make it possible to access smartcards. Is an article on CodeProject that discussees this in greater detail as part of a set of several C# classes that give you access to a bunch of this stuff without having to tangle with the nuts and bolts.
I think that the guy's example app is specifically for SIM cards, so that'll probably help. • In the below example, we are changing the card’s IMSI to 03080 (option -i) and we are specifying a new set of -n NAME (Operator name), -t TYPE (Card type), -c CC (Country code), -x MCC (Mobile Country Code), -y MNC (Mobile Network Code) and -s ID (Integrated Circuit Card ID) values. $./pySim-prog.py -p 0 -n OpenBSC -t sysmosim-gr1 -i 03080 -c 001 -x 001 -y 02 -s 180000075 Is it enough just filling the new SIM card with new meta and will it working the same way as original?