View previous topic :: View next topic |
Author |
Message |
ykerlou
Joined: 24 May 2008 Posts: 6
|
Posted: Sat May 24, 2008 12:56 pm Post subject: RUN_GSM_ALGORITHM |
|
|
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 |
|
|
pz Guest
|
Posted: Tue May 27, 2008 6:18 pm Post subject: |
|
|
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
|
Posted: Wed May 28, 2008 4:47 pm Post subject: |
|
|
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 |
|
|
pz Guest
|
Posted: Thu Jun 05, 2008 2:22 pm Post subject: |
|
|
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
|
Posted: Mon Jun 09, 2008 1:57 pm Post subject: |
|
|
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 |
|
|
pz Guest
|
Posted: Mon Jun 09, 2008 7:25 pm Post subject: |
|
|
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
|
Posted: Mon Jun 09, 2008 8:51 pm Post subject: |
|
|
Many thanks. Now it's crystal clear.
Regards.
Yves |
|
Back to top |
|
|
|