PDA

View Full Version : Smart Card Emulation



ekonomi
05-08-2003, 02:23 PM
Hello,

I've seen in sim cloning forum that they use a pic based smart card to emulate the real one. They need to download to smart card the binary of the eeprom and the loader. My problem is how do they write this software ? ;-) I mean is it just pic assembly ? and how do they make the menus etc.. I've searched in google but haven't found any info about how to create such programs.

If any of you has any info please respond :-)
thanx in advance,

ekonomi.

wumpus
06-08-2003, 03:22 PM
Patching this kind of stuff kind of works like a computer virus:

- find free space in your flash (0xFF 0xFF 0xFF 0xFF ...)
- write functions to emulate a SIM and read/write the neccesary memory addresses to fake one being present, and relocate them to that free flash space
Basic SIM emulation source (in C) is probably findable on google.
- find the API calls the Nokia OS uses to access the SIM (those are quite known)
SIM handling is done in the tasks SIMUPL (high level) and SIML2 (low level). You probably need to replace the low level.
- replace those functions with calls to high flash memory where you placed your program

I haven't exactly done this but this should be a guide..

ekonomi
07-08-2003, 02:31 PM
Hello,

thanxx for the information, they cleared the "what I have to do" part :) However, you can consider me stupid or just a newbie, i can deal with the assembly in pic, but i still can't find any SIM emulation source (not in C or any other language) and the worst of all (for my integrity) I can't find the quite known API calls for the nokia OS to access the sim. I mean since nokia brought out the symbian and the java support on their phones all the documentation, api/sdk's and "How to make your games for xx50" i can find are about these two :(

So If you'd like to help me some more by giving me more info about where to find what you told me i need i would appreciate
it very much. If you don't feel like it i can understand.

thanxx again.

ekonomi.



EDIT> Well I think god (or google) smiled and gave me this link:
http://www.technojunkie.gr/gsm/dl/sim/SIM_sim.zip which is a sim emulator from the CCC. I think that's what I want, right? But the functions that emulates are the comp128 and a3a8 algorithms, so I keep on searching for a more complete emulator. As for nokia api's I've still found nothing.

g3gg0
07-08-2003, 11:36 PM
http://www.geocities.com/nok5rev/

get the n5110v524 fls/ifo and winarm
everything well commented ;)

pico
08-08-2003, 12:03 AM
hmm, you would have been best to search in the sim cloning forum i think. better than trying to learn how the Nokia firmware works :)

you can look on dejans page for sim read/write software/hardware: http://users.net.yu/~dejan/
and some sim emulatorsoft, SIM emu can be found: http://alf.di.fct.unl.pt/simemu6/

attached is some phase2 sim card structure, maybe it can be interesting for you in the future ;)

ekonomi
08-08-2003, 12:35 AM
Hello all,

I just want to thank you for sharing these info. I surely have something to begin with. Any other info is of course more than welcomed ;-)

talk to you soon with more questions ;-)

ekonomi.

wumpus
08-08-2003, 01:12 AM
Originally posted by pico
hmm, you would have been best to search in the sim cloning forum i think. better than trying to learn how the Nokia firmware works :)
Well, it depends on what you want what is better - he wants to emulate a SIM without a SIM card at all, not even a cloned one (silvercard etc)

I wish I could just give you addresses where the API functions live, I have them for 3310 5.28, but it depends on the phone and firmware version...
Even the task numbers are different (on each phone, not firmware version)
Maybe even the SIML2 message API is.. hell

pico
08-08-2003, 06:25 AM
he wants to emulate a SIM without a SIM card at all
i dont think thats what was said :)
just someone wants to play with the sim card, with some experience in PIC prog.
nothing too heavy with these firmware needed ;) just make the schemes, play with your silvercard/greencard. these are pic's just like the DIL packages you use, so do what ever you like with those :)

ekonomi
09-08-2003, 08:02 PM
Well, at first I'd just like to emulate a sim in a smart card, but my next step is arm and reverse engineering nokia phones, although it seems kind of difficult ;-)

So, these info are all helpfull. About the nokia reverse I hope I'll make some day functions that work like netmonitor (just an idea, I don't even know arm asm).

ekonomi.

g3gg0
11-08-2003, 02:35 AM
its not really difficult
nok5rev group commented the sim routines very good....
;)

phantom2002
22-08-2003, 01:40 AM
even if you guys could make it possible for some common models :)

3310 5210 5110 :) maybe even 3210 :)

WBR

wish you all well with this project as its a worthwhile thing