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 

Basic ME - SIM flow

 
Post new topic   Reply to topic    bladox.com Forum Index -> Development
View previous topic :: View next topic  
Author Message
xufi
Guest





PostPosted: Sun Oct 14, 2007 8:25 pm    Post subject: Basic ME - SIM flow Reply with quote

Hi,
I´m trying to emulate some low level requests and responses between the ME and the SIM.
I´ve started looking at the fake_sim example to understand how does it work and there is something I don´t understand.
There are cases where the execuction ends calling "return" and some not.
For instance in the if clause:

if (fa->ins == ME_CMD_SELECT)
{
u16 ef = (fa->data[0] << Cool | fa->data[1];

if (ef == 0x6F07)
{
dbsp ("FAKE_IMSI_SELECT\n");
fa->data[0] = 0x9F;
fa->data[1] = 0x0F;
}
return;
}

in that case for every ME_CMD_SELECT we end with a "return".
what will happen when a ME_CMD_SELECT for a EF different than 0x6F07 is executed?
Will that call be passed to the SIM?

Why for any other "if" clause of the void fake_sim_file "return" is never called?
Thanks
Back to top
pz
Guest





PostPosted: Wed Oct 17, 2007 3:32 pm    Post subject: Reply with quote

It's maybe just not too clean code. It's for 0x6F07 because this is the only one registered by reg_file().

Can you be more specific what's the problem? Have you seen the ME-SIM communication? Is there anything wrong?
Back to top
xufi
Guest





PostPosted: Sat Oct 20, 2007 2:50 pm    Post subject: Reply with quote

Hi,
I?m not saying there is a problem, I?m just trying to program something similar as the fake_sim and I first need to understand how it works.

If I go it right the idea is that every time the ME tries to read some SIM content the action is intercepted:
* If the command was ME_CMD_SELECT and the EF is 0x6F07, we know the the SIM wants to SELECT the IMSI. We deliver the "fake" acknowledge and we exit (calling "return")
* When the command is ME_CMD_GET_RESPONSE, we deliver the fake IMSI but we don?t exit calling "return". I assume that in that case the call is forwarded to the SIM too. Is that correct? Why we don?t call "return" here?

What I´d like to have is a code that:
* For some combinations of commands and EF we deliver some "fake" content
* For the rest we ignore it and send the request to the SIM

Thanks for your help
Back to top
pz
Guest





PostPosted: Mon Oct 29, 2007 8:41 am    Post subject: Reply with quote

xufi wrote:
Hi,
I?m not saying there is a problem, I?m just trying to program something similar as the fake_sim and I first need to understand how it works.

If I go it right the idea is that every time the ME tries to read some SIM content the action is intercepted:
* If the command was ME_CMD_SELECT and the EF is 0x6F07, we know the the SIM wants to SELECT the IMSI. We deliver the "fake" acknowledge and we exit (calling "return")


Yes. As I wrote the code is not the cleanest/best you can imagine, it works only because there is only one file (EF_6F07 ) registered/faked.

Quote:

* When the command is ME_CMD_GET_RESPONSE, we deliver the fake IMSI but we don?t exit calling "return". I assume that in that case the call is forwarded to the SIM too. Is that correct? Why we don?t call "return" here?


This call returns void, i.e. "return" is not needed, the important is fa->data[...] = ...; part.

Quote:

What I´d like to have is a code that:
* For some combinations of commands and EF we deliver some "fake" content
* For the rest we ignore it and send the request to the SIM

Thanks for your help


See sim() call. I.e. do something like sim(fa->ins, fa->p1, fa->p2, fa->p3, fa->data) to pass it to SIM.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    bladox.com Forum Index -> Development All times are GMT
Page 1 of 1

 
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