bladox.com Forum Index bladox.com
Turbo SIM Toolkit Adapter Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SIM ToolKit Application Development
Goto page 1, 2  Next
 
Post new topic   Reply to topic    bladox.com Forum Index -> Development
View previous topic :: View next topic  
Author Message
Nand Kumar
Guest





PostPosted: Tue Jan 10, 2006 6:40 am    Post subject: SIM ToolKit Application Development Reply with quote

Hi All,
I am new to the group. I have Turbo Programmer Kit and want to do development in SIM ToolKit but I don't know how to start. I am able to install the binutils and gcc for avr as mentioned on the site. I am also able to compile and load the helloworld.trb on the kit.

The command "prog_apps -a app_nr -x 128" doesn't return the "helloworld!" string but instead it returns the hexequivalent of the string.

Can anybody guide me how to start for SIM ToolKit Application development.


Thanks & Regards
Nand Kumar
Back to top
pz
Guest





PostPosted: Wed Jan 11, 2006 9:05 am    Post subject: Reply with quote

Could you post what exactly are you doing, e.g.. screenshot, redirect you cmd to a log file? Thank you.
Back to top
Nand Kumar
Guest





PostPosted: Wed Jan 11, 2006 10:54 am    Post subject: Reply with quote

Hi pz

Thanks for the quick response. I have to develop SIM Application Toolkit for mobile. That should be able to take the information of the service provider and able to display on the screen according to our wish.
For that I have Turbo Programmer and all the softwares required for the same. I dont have any fake sim or Turbo Sim. I also don't have the Turbo adapter too. Is it possible to develop the same.

How to procede and what are the other hardware required for the same.
I also dont know how to use the debugger.

Thanks in Advance
Nand.
Back to top
pz
Guest





PostPosted: Wed Jan 11, 2006 3:54 pm    Post subject: Reply with quote

Nand Kumar wrote:
Hi pz

Thanks for the quick response. I have to develop SIM Application Toolkit for mobile. That should be able to take the information of the service provider and able to display on the screen according to our wish.


You are to develop SIM Application Toolikt itself, i.e. you are phone firmware developer, or you want to develop application for SIM card? Service provider is a 3rd party or operator? In case 3rd party and you would like to deploy the application in realm of some operator then you need to know more on technology the operator uses, e.g. is it JavaCard or something else? How much memory can I use? Who is the SIM vendor (not all javacards are the same - it's just theory). Etc.

Or do you want to develop app for our turbo device, e.g. turbo sim?

Quote:

For that I have Turbo Programmer and all the softwares required for the same. I dont have any fake sim or Turbo Sim. I also don't have the Turbo adapter too. Is it possible to develop the same.

How to procede and what are the other hardware required for the same.
I also dont know how to use the debugger.

Thanks in Advance
Nand.


In case you wanted to develop and test your application then Turbo Lite 2 and Turbo Programmer is the best (and cheapest) combo. For deployment Turbo SIM is fine. For debugging ME<->SIM Turbo Lite 2 with Programmer is the best option - we can send you the (free) L1 debug and raw kernels (for the Lite 2).
Or do you want to use just the programmer to analyze SIM card you have?
Back to top
Nand Kumar
Guest





PostPosted: Thu Jan 12, 2006 5:15 am    Post subject: Reply with quote

Hi pz

In India like Idea service provider provides "Idea Power" on therir sim and Hutch Service provider provides "Hutch Alive". When you insert the sim in you mobile phone it display in the menu that "Idea Power" or "Hutch Alive".
Now I have to write an application for "Turbo Programmer 2" so that I will be able to see the "Idea Power" or "Hutch Alive" and the list of subactivities inside that menu. Is it possible ?
If yes then what are the steps and what are all required in software, Hardware for the same.

I didn't find any document that how to use the "Turbo Programmer 2" for application development. There is one document for the Hardware specification for the same.


Thanks
Nand.
Back to top
pz
Guest





PostPosted: Fri Jan 13, 2006 7:25 am    Post subject: Reply with quote

Nand Kumar wrote:
Hi pz

In India like Idea service provider provides "Idea Power" on therir sim and Hutch Service provider provides "Hutch Alive". When you insert the sim in you mobile phone it display in the menu that "Idea Power" or "Hutch Alive".
Now I have to write an application for "Turbo Programmer 2" so that I will be able to see the "Idea Power" or "Hutch Alive" and the list of subactivities inside that menu. Is it possible ?


It is not possible to upload your apps on the operator SIM card unless you are allowed by operator (service provider). Even then it may be technically impossible - can be done only by vendor producing the sim card.

Quote:

If yes then what are the steps and what are all required in software, Hardware for the same.


If you wanted to deploy your own STK application then you can use our Turbo SIM. For application development the Turbo Lite 2 with Turbo Programmer is the best option.

Quote:

I didn't find any document that how to use the "Turbo Programmer 2" for application development. There is one document for the Hardware specification for the same.


Thanks
Nand.


There is also http://www.bladox.com/tprog-devel-doc/index.html
Back to top
Nand Kumar
Guest





PostPosted: Fri Jan 13, 2006 8:38 am    Post subject: Reply with quote

Hi pz
If I am not wrong then "SIM Application Toolkit ( SAT )" is provided by Service provider. And I am working for Mobile phone. Presently Mobile hardware is capable for SAT but there is no software written to access that list like "Idea Power" and "Hutch Alive".

Now I have to write application for that so that it will communicate with the SIM card through "wavecom AT Commands" to enable that list and show as an activity or subactivity.

As there were no method to debug on the phone. So we have taken TP2 and write code and debug here and then similar code will be written for the mobile.


Thanks
Nand
Back to top
pz
Guest





PostPosted: Fri Jan 13, 2006 3:45 pm    Post subject: Reply with quote

Nand Kumar wrote:
Hi pz
If I am not wrong then "SIM Application Toolkit ( SAT )" is provided by Service provider.


Well to be precise SAT is a technology that enables applications running on SIM card to use means of ME (phone) to do something. On SIM there is an application and ME does what application wants to.

Quote:

And I am working for Mobile phone. Presently Mobile hardware is capable for SAT but there is no software written to access that list like "Idea Power" and "Hutch Alive".


I'm getting to understand. You are writing the ME (phone) side - SAT implementation and want to test SIM applications to see what's your phone (hardware) doing. Am I right?

Quote:

Now I have to write application for that so that it will communicate with the SIM card through "wavecom AT Commands" to enable that list and show as an activity or subactivity.

As there were no method to debug on the phone. So we have taken TP2 and write code and debug here and then similar code will be written for the mobile.


Thanks
Nand


So are you trying to wtite an application for SIM to see how your phone behaves or you want to see communication between phone<->SIM? In both cases I would recommend to use also Turbo Lite 2 - this is the very STK engine.

But you can use programmer to communicate with SIM for developing ME side, just look at sim_dump and cemu applications - these do APDU's and could be easily modified to emulate ME STK, i.e. TERMINAL PROFILE, FETCH, TERMINAL RESPONSE, ENVELOPE.
Back to top
Nand Kumar
Guest





PostPosted: Mon Jan 16, 2006 8:49 am    Post subject: Reply with quote

Hi pz
Thanks for your reply. And now the things are getting much clear but still many of the things are still not clear.

pz wrote:
Well to be precise SAT is a technology that enables applications running on SIM card to use means of ME (phone) to do something. On SIM there is an application and ME does what application wants to.

Ok Now I understand that SAT is technology and applicaiton resides on the SIM card. And through APDU we can see what's on the SIM.

Quote:
I'm getting to understand. You are writing the ME (phone) side - SAT implementation and want to test SIM applications to see what's your phone (hardware) doing. Am I right?

Yes, This is what I was trying to make you understand. Yes we are writing ME (phone) side - SAT implementaion. The are not using Turbo SIM but the SIM provided by "HUTCH or IDEA" GSM service providers. Now you guide me how to procede. As you know that I have only TP2 at the moment and no TL2.

Quote:
So are you trying to wtite an application for SIM to see how your phone behaves or you want to see communication between phone<->SIM? In both cases I would recommend to use also Turbo Lite 2 - this is the very STK engine.

Yes we are trying to write the application for ME. Yes we want to see the communincation beetween the ME<->SIM. Here the SIM is not Turbo SIM but GSM service provider SIM. Can we see whats goin on between ME<->SIM.

Quote:
But you can use programmer to communicate with SIM for developing ME side, just look at sim_dump and cemu applications - these do APDU's and could be easily modified to emulate ME STK, i.e. TERMINAL PROFILE, FETCH, TERMINAL RESPONSE, ENVELOPE.

I found the sim_dump.c and cemu.c file and trying to understand it. Bui dont know how to use this applications i.e. sim_dump and cemu. We have TP2 and connected to my computer through USB port. In the TP2 I have inserted one SIM from Idea GSM service provider.
When the TP2 is in RUN mode and I give the command sim_dump > idea.tmp then the content of the file is as follows:-
------------------------------------------
SIM mode initialized, sim.trb
SIM_ATR: 3B 18 94 49 44 50 14 03 48 02 00

FILE: MF 3F00
SELECT 3F00
GET_RESPONSE 00 00 13 B3 3F 00 01 00 FF F0 FF 00 15 9B 03 0D 04 00 8F 8A 83 8A 00 00 00 00 00 00 00 00 00 00 00 00
Free: 5043
#DF: 3
#EF: 13
C13s: 155
#CHVs: 04
CHV1 STS: 8F
UNBL CHV1 STS: 8A
CHV2 STS: 83
UNBL CHV1 STS: 8A
Admin: 00 00 00 00 00 00 00 00 00 00 00

FILE: DF 7F10 TELECOM
SELECT 3F00:7F10
GET_RESPONSE 00 00 13 B3 7F 10 02 00 FF F0 FF 00 15 9B 00 0A 04 00 8F 8A 83 8A 00 00 00 00 00 00 00 00 00 00 00 00
Free: 5043
#DF: 0
#EF: 10

FILE: DF 5F50 GRAPHICS
SELECT 3F00:7F10:5F50
File Does Not Exist

FILE: EF 6F3A ADN
SELECT 3F00:7F10:6F3A
GET_RESPONSE 00 00 1D E2 6F 3A 04 00 11 F0 22 01 02 01 1E
Linear file
Size: 7650
Access: 11 F0 22
Status: 01
Record len: 30
Nr. records: 255
Record 1:
56 6F 69 63 65 20 4D 61 69 6C FF FF FF FF FF FF
07 91 19 89 19 00 74 74 FF FF FF FF FF FF
Record 2:
50 6F 77 65 72 20 53 65 72 76 69 63 65 73 FF FF
04 81 1A 12 FB FF FF FF FF FF FF FF FF FF
Record 3:
49 64 65 61 20 56 6F 69 63 65 FF FF FF FF FF FF
03 81 34 23 FF FF FF FF FF FF FF FF FF FF
Record 4:
49 64 65 61 20 43 61 72 65 FF FF FF FF FF FF FF
04 81 21 43 F5 FF FF FF FF FF FF FF FF FF
Record 5:
50 69 7A 7A 61 2D 6F 6E 2D 63 61 6C 6C FF FF FF
------------------------------------------
I am not able to understand the hex values what they mean. How to understand these values. Is there any mechanish to get these values as string so that it is easy to understand.

Can you send me the sequence of commands and the corresponding output what it should give the output and what does it mean?

Also I tried using sim_dump for the Elementary file SUME i.e 6F54 and the output i got is as below. Please suggest how to acess the this Elementary file "SUME"?
-------------------------------------
SIM mode initialized, sim.trb
SIM_ATR: 3B 18 94 49 44 50 14 03 48 02 00

FILE: EF 6F54 SUME
SELECT 6F54
File Does Not Exist
------------------------------------

Thanks in Advance
Nand.
Back to top
pz
Guest





PostPosted: Tue Jan 17, 2006 12:17 pm    Post subject: Reply with quote

Nand Kumar wrote:
Hi pz
Quote:
But you can use programmer to communicate with SIM for developing ME side, just look at sim_dump and cemu applications - these do APDU's and could be easily modified to emulate ME STK, i.e. TERMINAL PROFILE, FETCH, TERMINAL RESPONSE, ENVELOPE.

I found the sim_dump.c and cemu.c file and trying to understand it. Bui dont know how to use this applications i.e. sim_dump and cemu. We have TP2 and connected to my


Look for function sim() - this one does the APDU. Now you have to use appropriate STK commands - TERMINAL PROFILE, FETCH, TERMINAL RESPONSE and ENVELOPE.

Look for 11.11 and 11.14 at www.etsi.org - these standards are must read. All you need is described there.

Anyway you will start with TERMINAL PROFILE command to inform SIM that your fake handest support SIM Toolkit and then you will use FETCH/TERMINAL RESPONSE to get commands to process. Use ENVELOPE if you want to trigger ad hoc action, e.g. simulate user selected menu item.

Quote:

computer through USB port. In the TP2 I have inserted one SIM from Idea GSM service provider.
When the TP2 is in RUN mode and I give the command sim_dump > idea.tmp then the content of the file is as follows:-
------------------------------------------
SIM mode initialized, sim.trb
SIM_ATR: 3B 18 94 49 44 50 14 03 48 02 00

FILE: MF 3F00
SELECT 3F00
GET_RESPONSE 00 00 13 B3 3F 00 01 00 FF F0 FF 00 15 9B 03 0D 04 00 8F 8A 83 8A 00 00 00 00 00 00 00 00 00 00 00 00
Free: 5043
#DF: 3
#EF: 13
C13s: 155
#CHVs: 04
CHV1 STS: 8F
UNBL CHV1 STS: 8A
CHV2 STS: 83
UNBL CHV1 STS: 8A
Admin: 00 00 00 00 00 00 00 00 00 00 00

FILE: DF 7F10 TELECOM
SELECT 3F00:7F10
GET_RESPONSE 00 00 13 B3 7F 10 02 00 FF F0 FF 00 15 9B 00 0A 04 00 8F 8A 83 8A 00 00 00 00 00 00 00 00 00 00 00 00
Free: 5043
#DF: 0
#EF: 10

FILE: DF 5F50 GRAPHICS
SELECT 3F00:7F10:5F50
File Does Not Exist

FILE: EF 6F3A ADN
SELECT 3F00:7F10:6F3A
GET_RESPONSE 00 00 1D E2 6F 3A 04 00 11 F0 22 01 02 01 1E
Linear file
Size: 7650
Access: 11 F0 22
Status: 01
Record len: 30
Nr. records: 255
Record 1:
56 6F 69 63 65 20 4D 61 69 6C FF FF FF FF FF FF
07 91 19 89 19 00 74 74 FF FF FF FF FF FF
Record 2:
50 6F 77 65 72 20 53 65 72 76 69 63 65 73 FF FF
04 81 1A 12 FB FF FF FF FF FF FF FF FF FF
Record 3:
49 64 65 61 20 56 6F 69 63 65 FF FF FF FF FF FF
03 81 34 23 FF FF FF FF FF FF FF FF FF FF
Record 4:
49 64 65 61 20 43 61 72 65 FF FF FF FF FF FF FF
04 81 21 43 F5 FF FF FF FF FF FF FF FF FF
Record 5:
50 69 7A 7A 61 2D 6F 6E 2D 63 61 6C 6C FF FF FF
------------------------------------------
I am not able to understand the hex values what they mean. How to understand these values. Is there any mechanish to get these values as string so that it is easy to understand.


Uf, that's long read, see 11.11.

Quote:

Can you send me the sequence of commands and the corresponding output what it should give the output and what does it mean?

Also I tried using sim_dump for the Elementary file SUME i.e 6F54 and the output i got is as below. Please suggest how to acess the this Elementary file "SUME"?
-------------------------------------
SIM mode initialized, sim.trb
SIM_ATR: 3B 18 94 49 44 50 14 03 48 02 00

FILE: EF 6F54 SUME
SELECT 6F54
File Does Not Exist
------------------------------------

Thanks in Advance
Nand.


It just means that EF_SUME is not available on the SIM card, optional file.
Back to top
Nand Kumar
Guest





PostPosted: Thu Jan 19, 2006 10:29 am    Post subject: sysinfo.trb Reply with quote

Hi pz
Many many thanks for your reply. Now I am undergoing the 11.11 and 11.14 documents.

Meanwhile I am trying something with the given examples. I have loades the sysinfo.trb with the following command :
prog_apps -u sysinfo.trb
And with the prog_apps command I get the following output.
--------------------------------------------
[root@localhost src]# prog_apps
Programmer application list:
0: avrprog.trb
1: df.trb
2: sim.trb
3: turboadapter.trb
4: sysinfo.trb
[root@localhost src]#
---------------------------------------------
It hangs after giving this command, the LED goes to PRG mode and then we have to kill it.
[root@localhost src]# prog_apps -a 4 -x 10
Send action 10 to app 4
---------------------------------------------

Bui I am unable to do anything with it. How to get the information and what all can we do with this. Can you give write the sequence of command to for sysinfo.trb and what output if should provide.
Also how to use the dbg utility with TP2.

Thanks a lot
Nand.
Back to top
pz
Guest





PostPosted: Thu Jan 19, 2006 4:09 pm    Post subject: Re: sysinfo.trb Reply with quote

Nand Kumar wrote:
Hi pz
Many many thanks for your reply. Now I am undergoing the 11.11 and 11.14 documents.

Meanwhile I am trying something with the given examples. I have loades the sysinfo.trb with the following command :
prog_apps -u sysinfo.trb
And with the prog_apps command I get the following output.
--------------------------------------------
[root@localhost src]# prog_apps
Programmer application list:
0: avrprog.trb
1: df.trb
2: sim.trb
3: turboadapter.trb
4: sysinfo.trb
[root@localhost src]#
---------------------------------------------
It hangs after giving this command, the LED goes to PRG mode and then we have to kill it.
[root@localhost src]# prog_apps -a 4 -x 10
Send action 10 to app 4
---------------------------------------------

Bui I am unable to do anything with it. How to get the information and what all can we do with this. Can you give write the sequence of command to for sysinfo.trb and what output if should provide.
Also how to use the dbg utility with TP2.

Thanks a lot
Nand.


sysinfo.trb is app for turbo not programmer. It doesn about the same as sim_dump. For your purpose you don't need to upload/devel anything for programmer itself, the loaded sim.trb does the job. You just need to write the front to this module, take sim_dump.c and use sim() function from there. Then just do what you need, i.e. issu TERMINAL PROFILE etc.
Back to top
Nand Kumar
Guest





PostPosted: Mon Jan 23, 2006 6:47 am    Post subject: Reply with quote

Hi pz

Thanks a lot. Now with your help & guidance I am able to communicate with the SIM and able to get the "Hutch Alive" and list of SubActivities.

My work has just started and in future if I face any problem then again I will take your help.

Once again very-very thanks to you. Very Happy

Regards
Nand.
Back to top
Nand Kumar
Guest





PostPosted: Tue Feb 07, 2006 10:49 am    Post subject: Writing files on the SIM provided by the service Provider. Reply with quote

Hi all

Can anybody tell me that can I write any file on the SIM card provided by the service provider. Or what are the possible way in which I can write my own file on to the SIM card.
Is the file stored on the SIM are binary file or Hex file or any other file format.


Thanks in Advance
Nand.
Back to top
magic
Guest





PostPosted: Wed Mar 21, 2007 9:43 am    Post subject: Applets on regular SIM - short Howto Reply with quote

Hi

I had the same problem to find out how to put own Applets on the SIM Card. Finally I've found this out.

So:
1) To put your Applet on the SIM Card.
a) Write your applet in you favorite editor. Note! You have to do it in Jave (I hate Java, but JavaCard is very similar to C - at least this).
Under http://java.sun.com/products/javacard/dev_kit.html you'll find documentation for the
import sim.access.*;
import sim.toolkit.*;
import javacard.framework.*;

files, as well the include files itself. This is a must to compile the applet!
b) next step is to download the Applet to the SIM Card. For this I'm using Interportable Applet Loader form SimAlliance. you can get this tool for free from www.simalliance.org. In the package you'll find as well some demo applets - it is very usefull for beginners.

Notes:
- To upload an Applet on the SIM Card you have to have the KID and KIC key's to your SIM Card. Without them you can do nothing! To get them you have to ask your Mobile provider, but as far I know you'll never get them if you do not know any insiders there.
- Writing Java applet - remember that each declared variable is allocated in EEPROM. all variables that are very often used (for ex. for loops, counters etc). should be allocated in RAM! otherwise you'll decrease the liftime of the SIM Card.
- Instead of declaring 10 Variables (for example 1 byte) use an Array of bytes. For each allocated variable system will consume 1 or 2 extra bytes. In first example the real memory used will be 30 bytes, in second only 12 bytes.

2) Creating new Files / Directories on the SIM Card.
Generally it depends on your SIM Card Chip (and COS). I've 2 generations of SIM Cards from Axalto. On the old generation it is not possible to create new Files, on the new generation you can dynamically create/delete/resize files on the SIM Card.
To do this you need:
- SIM Card Documentation (especially the F0 class APDU's which are used for programming the SIM Card).
- if you want to "talk" with the sim directly with APDU's - you need the Admin key _or_ you can encapsulate all APDU commands into SMS - for this option you have to know the KID and KIC (as well the indexes).

Generally if you have these Admin keys you can do everuything with the sim card, even chage the PUK/PUK2 as well the number of retries (from 10 to 99) etc.

3) Development
At the beginning I was using Bladox as Tracer ME <-> SIM - it is very good tool for beginning, but after some hour's spent on swapping The SIM from Reader into ME, booting the ME etc. I've decided to buy an ME Simulator. Here you do not need to work with hardware, you can completly develop and test your applet on your PC. you can see as well all SIM<->ME Traces and in better Simulators - internal memory of the SIM Card!
(on google you'll find some)

Hope this will give you some idea about writing applets to the SIM Card.


Cheers
Magic
Back to top
Display posts from previous:   
Post new topic   Reply to topic    bladox.com Forum Index -> Development All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group