Programmeren met FunMagic |
|
| 1.
Programming the card with a Fun programmer. 2. Programming the External Eeprom with a Phoenix Interface. 3. Manipulate your card through a Phoenix Interface. 4. Use the Fun card as a simple logger. Programming the card with a Fun programmer. I'm not sure if it should be possible to get FunMagic to work with a Fun programmer under Windows 2000 Professional, but I haven't been able to get it operational. I have the exact same problem with Funprom b.t.w. and that should be able to work, according to the Funprom authors. So it could have something to do with my configuration here. So for this occasion, I have used a Windows 98 PC, that works great. Of course, you can allso use other software like ChipCat, CardWriter, CardPro etc. to program your card. It all depends on the programmer you use. There is one big advantage though if you are using FunMagic: it will allow you to program Funcards 3 & 4 (with 128 & 256kb external Eeproms) To define the type of card you have, you need to go into the "Apollo Configuration". Click "Configuration" from the menu bar and select "Apollo". A popup window will open, allowing you to define the eeprom size on your card. You will need to do this configuration, even if you are going to program the external Eeprom via the Phoenix interface method.
Before you can start programming your card, you will of course need to tell FunMagic which files you want to put on your card. So press "Open" (Flash File) and select your Flash file.
Do the same with the External Eeprom.
And with the Internal Eeprom.
If you have loaded all 3 files, you are ready to program the card. Click the "Snail" icon to start programming.
On the right hand side of the screen, you can check out the progress of the stages of the programming process. Each correctly finished stage will produce a pint of beer in the right margin:) A popup window will appear at the end of the proces if the programming was successfull.
Programming the External Eeprom with a Phoenix Interface. If your card has been completely programmed before and you only want to update the external Eeprom, you don't have to rewrite the whole card again. If you have a Phoenix interface, you can update the external Eeprom only. You can even choose whether you want to rewrite the whole external Eeprom or only update the changed parts. If you have not saved all changes yet, then do so now. Save the changes to a file. Make sure you have loaded a external eeprom. You can tell if you have done that allready, by looking at the supported providers. If the provider area of the screen is empty, you haven't loaded the external Eeprom file yet. Now click "Configuration" in the menu bar and select "Phoenix".
A popup window will be opened. In that window you can edit the configuration settings for the Com port, your Phoenix interface is connected to. Just edit the configuration until it fits your situation. Click "Open Port". Now the "Reset" button should become active. Click "Reset" now.
You'll notice the ATR-string of your card being requested. If the communication is OK, the ATR will be displayed like in the screenshot below.
Now click the "Wilma" icon to write the selected external Eeprom data to the card.
As you can see, the popup window informs you about the progress of the programming process.
If the external Eeprom is programmed successfully, a popup window will inform you about that. Click the "OK" button.
Just for purpose of verification, you can see how many providers were involved and how many bytes it took. Now press "Exit".
That's all, as far as programming is concearned. But there is more.... Manipulate your card through a Phoenix Interface. FunMagic has some really nice features to offer. One of those features is the ability to "talk" to your card by using Seca INStructions. So, like with MKFind, you can control your card directly with FunMagic. You will need a Phoenix interface though. OK then, switch your programmer to Phoenix mode and open the COM port. If you don't know how to do that, click here for an explanation. When you have done all that, your screen should look like the one down here. Now click the "Logs Tool" button, just below the menu bar.
Below you see the empty FunMagic log window. As an example, I am now going to work out the example as described on the Seca page in the Coding chapter. In other words, we are going to ask the card 3 questions: - What is the serial number" - How many providers are supported?? - What is the name of provider 00?? OK then, let's do it. Click the Mask icon (Send to Phoenix).
In the popup window that is now opened, click "Open Port" followed by "Reset". I take it for granted that you know something about standard smart card communication behaviour. So it will come as no surprise to you that the card will start with making itself known by sending the ATR.
If your card has responded to the reset with the correct ATR, the communication may be started. So first we are going to request the serial number from the card. All INStructions to do this can be found in the Coding chapter -> Seca page. In Seca, the INStruction "C1 0E 00 00 08" is used to request the serial number. So type in this INS in the left middle area of the communication window and click "Send instruction". First the question is 'echoed' in the large log screen. The answer from the card will appear immediately after that. As you can see in this example, the serial number is "00 07 5B CD". Every answer is allways closed with the status of the reply. In this case, the status is "90 00" which means "OK" in Seca.
Well then, let's ask the card how many providers are supported. Type in the INStruction "C1 16 00 00 07" and press "Send instruction". Now the card answers "00 1F" followed by the status "90 00" or "OK".
If you look back, there were 5 providers on this card, so how come that the answer is "00 1F"?? Well, as explained on the Seca page, that is just simple arithmatic. In fact it's no more than just converting Hex to Bin and counting bits aftwards. Let's work out this example then: Start the Windows Calculator. Tick the option "Hex". Now enter the value that the card replied: "1F".
Tick the option "Bin". And voila, there is your binairy answer: "11111". Now just count the number of 1s and you have got your answer. There are 5 1s in this answer, so that means 5 providers on the card. It really is that easy:)
All clear so far?? If not, just go over this again and try reading/understanding the Seca page too. Reading and playing is the best way to master this technology. But I will asume that this is still easy enough for everybody to understand. So let's continue with our 3rd question: "the name for provider 00". Type in the appropriate INStruction "C1 12 00 00 19" and click "Send instruction". As was to be expected, the answer is again in hexadecimal notation. So in order to be able to read the answer (the name) we need to translate from HEX to ASCII.
Well then, let's decipher the name. - 53 is a capital S. - 45 is a capital E. Etc. Haven't got a ASCII tabel at hand?? No problem, just get your Windows calculator again. Start the Windows Calculator. Tick the option"Hex". Enter the hex codes byte by byte, so first start with "53".
Now tick the option "Dec".
Start Notepad. Keep the "Alt" key pressed while at the same time you enter (on the numeric keypad) the calculated decimal value. You need to use the numeric keypad for entering the decimal value. Now release the "Alt" key and the ASCII character is visible in your Notepad window, in this case an "S". Repeat this for all the Hex bytes found, and you have the name.
That's all I have to tell you about it. Have fun ;) | |