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 

RUN_GSM_ALGORITHM

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



Joined: 24 May 2008
Posts: 6

PostPosted: Sat May 24, 2008 12:56 pm    Post subject: RUN_GSM_ALGORITHM Reply with quote

Hi,
I'm trying to catch RUN_GSM_ALGORITHM events.

It seems easy to intercept the event with reg_action (ACTION_RUN_GSM_ALGORITHM) but I don't know how to forward the request to the SIM (I don't want to spoof the reply). Is there any SIM command I can use ?

Many thanks in advance for your help.

Best regards.

Yves
Back to top
View user's profile Send private message
pz
Guest





PostPosted: Tue May 27, 2008 6:18 pm    Post subject: Reply with quote

Use sim() command. So you will use ACTION_RUN_GSM_ALGORITHM as you describe but instead faking return values (based on input) you will pass the input to SIM with sim() call and pass what you get back to ME. In fact it's even easier than faking it.
Back to top
ykerlou



Joined: 24 May 2008
Posts: 6

PostPosted: Wed May 28, 2008 4:47 pm    Post subject: Reply with quote

Ok, this is what I'm doing ... but with no success.

I trap ACTION_RUN_GSM_ALGORITHM with a reg_action.

My callback function is quite simple :

void run_gsm (File_apdu_data * fa)
{
sim (fa->ins, fa->p1, fa->p2, fa->p3, fa->data);
}

Should I have to add a retval at the end of the function ?

How could I capture the answer from the SIM and send it back to the ME ? Any idea ?

Many thanks in advance for your help.

Yves
Back to top
View user's profile Send private message
pz
Guest





PostPosted: Thu Jun 05, 2008 2:22 pm    Post subject: Reply with quote

ykerlou wrote:
Ok, this is what I'm doing ... but with no success.

I trap ACTION_RUN_GSM_ALGORITHM with a reg_action.

My callback function is quite simple :

void run_gsm (File_apdu_data * fa)
{
sim (fa->ins, fa->p1, fa->p2, fa->p3, fa->data);
}

Should I have to add a retval at the end of the function ?

How could I capture the answer from the SIM and send it back to the ME ? Any idea ?

Many thanks in advance for your help.

Yves


What you wrote should be enough, SIM answer is in fa->data and kernel will take it from there.
Back to top
ykerlou



Joined: 24 May 2008
Posts: 6

PostPosted: Mon Jun 09, 2008 1:57 pm    Post subject: Reply with quote

Sorry Pavel,
definitively it's not working ! The GPRS process seems to be blocked (the ME is freezed, not getting what he expects). Any suggestion ?

What I understand :
1) we trap the RUN_GSM_ALGORITHM commands with reg_action (ACTION_RUN_GSM_ALGORITHM)
2) we forward the command to the SIM through the sim (fa->ins, fa->p1, fa->p2, fa->p3, fa->data)
3) should we get the answer from the SIM ?
4) should we forward the answer to the ME ?

Please advice,

Best regards.

Yves
Back to top
View user's profile Send private message
pz
Guest





PostPosted: Mon Jun 09, 2008 7:25 pm    Post subject: Reply with quote

ykerlou wrote:
Sorry Pavel,
definitively it's not working ! The GPRS process seems to be blocked (the ME is freezed, not getting what he expects). Any suggestion ?

What I understand :
1) we trap the RUN_GSM_ALGORITHM commands with reg_action (ACTION_RUN_GSM_ALGORITHM)
2) we forward the command to the SIM through the sim (fa->ins, fa->p1, fa->p2, fa->p3, fa->data)
3) should we get the answer from the SIM ?
4) should we forward the answer to the ME ?

Please advice,

Best regards.

Yves


Do you handle GET_RESPONSE to get the actual answer of GSM_ALGO? GSM_ALGORITHM doesn't return the value itself, it's done in the next step with GET_RESPONSE.
Back to top
ykerlou



Joined: 24 May 2008
Posts: 6

PostPosted: Mon Jun 09, 2008 8:51 pm    Post subject: Reply with quote

Many thanks. Now it's crystal clear.

Regards.

Yves
Back to top
View user's profile Send private message
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