Re: Re : Re : Re : [android-platform] SIM Access

302 views
Skip to first unread message

jaikumar Ganesh

unread,
Jul 1, 2009, 12:57:30 AM7/1/09
to GAYET Thierry, android-...@googlegroups.com
Hi Gayle:

Unfortunately, due to resource constraints we don't plan to expose TelephonyManager APIs for direct SIM access during Eclair time frame (end of 2009).
We do plan to expose some APIs but we we working on the specifics. It would be great if you could contribute and so send us a plan and we can work on the code using the open source system. http://source.android.com/submit-patches

Accessing the SIM - it would be better if its through the TelephonyManager API;  if done directly throught the RIL your app might not work in future releases due to changes in the framework.

I don't think anyone has used AT+APDU command directly. Again, please send a patch or a plan and we can work along with you to add a AT command module.

Thanks

On Tue, Jun 30, 2009 at 9:16 AM, GAYET Thierry <thierr...@yahoo.fr> wrote:
Hi, as i have explain few time ago on another android (the developper one) mailist, the actual API is not ready for my usage. As i told you before, i need a direct access to the sim card (through the baseband of course).

I wanted to know if it was better to communicate directly using a socket with the RIL deamon (RILD) or if i need to modify the framework by the telephony API ?

In order to used APDU (Application Protocol Data Unit) located on the sim (2G)/usim(3G) card, i am looking for some advice about the best way. Actually android through the STK support the common SIM functions. Next, USAT will provide a support for the 3G functions.

Is it more interesting to extend the public Telephony API through the TelephonyManager or maybe to communicate directly with the ril deamon (rild) ?

The AT commands are defined in the ril.h but may i add my own one (official AT command but not used in this implementation)  ; if so i didn't see any direct sim access in order to send those king of command ? Does anybody have tried to send AT-APDU command to a baseband module ? The APDU command i need to launch is called RUN_GSM_ALGORITHM in a 2G sim card (3gpp TS 11.11 - page 35).

I have read some source code that may help about my reasearch :

At the Application framework layer:
framework/base/telephony/java/android/telephony/
framework/base/telephony/java/android/telephony/gsm/
framework/base/telephony/java/com/android/internal/telephony/            -> simcard.java / phoneBase.java / Phone.java
framework/base/telephony/java/com/android/internal/telephony/gsm/    -> RIL.java / RILConstants.java / SIMRecords.java / SimIoResult.java
framework/base/telephony/java/com/android/internal/telephony/gsm/stk/

At the system libraries layers :
hardware/ril/include/ril.h
hardware/ril/libril/
hardware/ril/reference-ril/
hardware/ril/rild/

I have made a mix of all information about this point on my own wiki :
  1. http://www.nextinnovation.org/doku.php?id=android_ril
  2. http://www.nextinnovation.org/doku.php?id=android_telephony
 Regards

Thierry GAYET
NextInnovation.org
+33(0)663.849.589



De : GAYET Thierry <thierr...@yahoo.fr>
À : jaikumar Ganesh <jaik...@gmail.com>
Envoyé le : Mardi, 30 Juin 2009, 18h01mn 26s
Objet : Re : Re : [android-platform] SIM Access

Hi, some time ago you told me that you need time to reply two of my questions (1 and 2).

I am expected the description of the Telephony API because i need to develop one application with this one. I also need the date of their delivery in the roadmap.

Will you extend the number of AT command supported ? If so may we know which one ?

About my request i can help you to develop those points, because i will do it on my side so maybe i could be nice to work on the same way as yours but for that i need some more information.

Does this evolution will be available in the version 2.0 of Android ? when the 2.0 will be officially released ?
 
Regards

Thierry GAYET
NextInnovation.org
+33(0)663.849.589

----- Message transféré ----
De : jaikumar Ganesh <jaik...@gmail.com>
À : thierr...@yahoo.fr
Envoyé le : Mercredi, 24 Juin 2009, 1h21mn 39s
Objet : Fwd: Re : [android-platform] SIM Access

Hi Gayle,
   Sorry for the delay, I was out for a few days.

For 1, 2: I will get back to you after discussing with others.

3. USAT is on our radar, release dates are undecided.

Meanwhile, patches are welcome.

Thanks

---------- Forwarded message ----------
From: GAYET Thierry <thierr...@yahoo.fr>
Date: Wed, Jun 10, 2009 at 1:40 AM
Subject: Re : [android-platform] SIM Access
To: android-...@googlegroups.com


hello,

Maybe my previous email was not very accurate. I will try to use other words in order to be more understandable. Maybe mister Jaikumar may reply to me ?

So, here is a listing of my questions :

1. What's the roadmap for the evolution of the TelephonyManager's API (more precisely about the SIM access) ;

2. Because the TelephonyManager's API will include a direct sim access (through this module of course), is it possible to know the new functions of this API and maybe also some detail about their usage ; I need some of those information 'cos i will need to change this API by my own until your next release. So in order to implement something not so different than yours, some more accurate information about that topic may help me if i don't want to change too many things after your release.

3. what is the support for the Android framework with the 2G technology and also with the 3G technology. Is it a full access of the cryptographic functions include on the sim/usim card ? I ask this question because the SIM Application Toolkit (commonly referred to as STK for Sim ToolKits) is for a 2G access ? For 3G, there is a USIM Application Toolkit (USAT, the equivalent of STK for 3G networks). In fact i need to access the sim card not just for unlocking the usim/isim card, but to access some crypto function (need for a 3GPP Generic Bootstraping Architecture). Will you include sooner or later USAT on the thephony framework part ?
 
Thanks in advance for your reply.

Best regards

Thierry GAYET
NextInnovation.org
+33(0)663.849.589




De : GAYET Thierry <thierr...@yahoo.fr>
À : android-...@googlegroups.com
Envoyé le : Mardi, 9 Juin 2009, 12h08mn 43s
Objet : Re : SIM Access on ADP1

Hello,

I am really interested on the reply given. In fact, i have the same requirement that is to have an access to the SIM card by launching some AT commands.

At what date the API of the TelephonyManager will include an access to the SIM ? Because i need it and make an evolution now it it possible to have an idea of its future API ?

Furthermore, i have seen in the PhoneBase.java file that only a single thread must managed the communication with the sim card that is normal in a telephony architecture:

/**
 * (<em>Not for SDK use</em>)
 * A base implementation for the com.android.internal.telephony.Phone interface.
 *
 * Note that implementations of Phone.java are expected to be used
 * from a single application thread. This should be the same thread that
 * originally called PhoneFactory to obtain the interface.
 *
 *  {@hide}
 *

That's mean that the téléphony should include the sim manager.

Another important question : what is the SIM support for now and in your future evolution ? I mean does Android have a both a full 2G and 3G support ? I not do you have an idea of the time you will add this feature in the framework ? I mean in 2G / 3G, a full support on the buildin encryption function.
 
Thank You in advance for your reply.

Best regards

Thierry GAYET
NextInnovation.org
+33(0)663.849.589



De : jaikumar Ganesh <jaik...@gmail.com>
À : android-...@googlegroups.com
Envoyé le : Mercredi, 3 Juin 2009, 6h47mn 32s
Objet : Re: SIM Access on ADP1

Hey Meni:
   Currently there is no public API to access the SIM cards - we are planning to adding public APIs soon.

You can look at SimRecords.java and TelephonyManager code to see how to access the SIM.

Thanks
Jaikumar

On Sun, May 31, 2009 at 1:40 AM, meni <meni...@gmail.com> wrote:

Hi all,

I know there's no API to access the SIM card to run commands on it.
Nontheless, does anyone know if the SIM card can be accessible on the
low level on the ADP1 in any way, i.e. as some sort of device that
just needs a driver written for it or so?

I know that some HTC phone models do allow sending commands to the
SIM...

Is implementing Bluetooth SAP on the G1/ADP1 even remotely feasible?

(if this is not the right place to ask, could you tell me where would
the appropriate place be?)

Thanks.

--
Meni



















Zhihong GUO

unread,
Sep 10, 2009, 8:48:42 PM9/10/09
to android-...@googlegroups.com
Hi jaikumar,
You mean we can send AT command to SIM directly, right? Even the command is not registered in ril_commands.h? How to send AT command in application, how can I test it. 
Thank you so much!

James

2009/7/1 jaikumar Ganesh <jaik...@gmail.com>

Zhihong GUO

unread,
Sep 13, 2009, 11:00:03 PM9/13/09
to android-...@googlegroups.com
Hi all,
Any idea?

James

2009/9/11 Zhihong GUO <gzh...@gmail.com>

jaikumar Ganesh

unread,
Sep 17, 2009, 11:33:05 AM9/17/09
to android-...@googlegroups.com
Hi James:
    SIM records are read using AT commands. None of the APIs mentioned in telelphony layer deal with AT commands directly, the RIL translates the RIL commands to AT commands.

Currently, there is no way for applications to talk to the SIM directly. We are working on exposing telephony APIs soon.

Thanks
Jaikumar

G. L.

unread,
Oct 6, 2009, 8:18:16 AM10/6/09
to android-platform, jaikumar Ganesh
Hi Jaikumar,

First of all, thanks a lot for all your responses so far, it was also
very usefull for me.

For my part, I'm trying to perform a SIM access with AT commands. As
you advised, I used the RIL interface of the Telephony Manager
package.
Indeed I have no choice but to modify the Telephony Manager Java class
of the Android framework.

Here is a sample of my code included in my custom
TelephonyManager.java :


public String simAccess() {
String rand = "testrand";

// Check is the SIM card is ready to use
String prop = SystemProperties.get
(TelephonyProperties.PROPERTY_SIM_STATE);
if ( "READY".equals(prop) ) {

// Build RIL & Message objects
RIL rilInterface = new RIL(this.mContext);
Message APDUResponse = Message.obtain();

// My custom request
String[] ADPURequest = { APDU_CLA, APDU_INS, APDU_P1, APDU_P2,
APDU_SIZE_DATA, mRAND, APDU_SIZE_DATA_EXPECTED };

// Launch the request => this is where it fails !!
rilInterface.invokeOemRilRequestStrings(ADPURequest,
APDUResponse);

// Handle the results
return (String) APDUResponse.getData().getKey("mykey");
}
}
with :
private static final String APDU_CLA = "A0";
private static final String APDU_INS = "88";
private static final String APDU_P1 = "00";
private static final String APDU_P2 = "00";
private static final String APDU_SIZE_DATA = "10";
private static final String APDU_SIZE_DATA_EXPECTED = "";



=> This code doesn't work & raise an exception.
That is why I need to pick your brain ;-).

- Are the creation of RIL & Message objects correct or should I use
other constructor / factory ?
- I wonder how to properly handle the result "Message.getData()" ... ?


Could you please clarify those points, or forward to documentation on
this subject ?

Thanks & Regards,
Gildas.




On 17 sep, 17:33, jaikumar Ganesh <jaikum...@gmail.com> wrote:
> Hi James:
>     SIM records are read using AT commands. None of the APIs mentioned in
> telelphony layer deal with AT commands directly, the RIL translates the RIL
> commands to AT commands.
>
> Currently, there is no way for applications to talk to the SIM directly. We
> are working on exposing telephony APIs soon.
>
> Thanks
> Jaikumar
>
> On Thu, Sep 10, 2009 at 5:48 PM, Zhihong GUO <gzhh...@gmail.com> wrote:
> > Hi jaikumar,You mean we can send AT command to SIM directly, right? Even
> > the command is not registered in ril_commands.h? How to send AT command in
> > application, how can I test it.
> > Thank you so much!
>
> > James
>
> > 2009/7/1 jaikumar Ganesh <jaikum...@gmail.com>
>
> > Hi Gayle:
>
> >> Unfortunately, due to resource constraints we don't plan to expose
> >> TelephonyManager APIs for direct SIM access during Eclair time frame (end of
> >> 2009).
> >> We do plan to expose some APIs but we we working on the specifics. It
> >> would be great if you could contribute and so send us a plan and we can work
> >> on the code using the open source system.
> >>http://source.android.com/submit-patches
>
> >> Accessing the SIM - it would be better if its through the TelephonyManager
> >> API;  if done directly throught the RIL your app might not work in future
> >> releases due to changes in the framework.
>
> >> I don't think anyone has used AT+APDU command directly. Again, please send
> >> a patch or a plan and we can work along with you to add a AT command module.
>
> >> Thanks
>
> >>>    1.http://www.nextinnovation.org/doku.php?id=android_ril
> >>>    2.http://www.nextinnovation.org/doku.php?id=android_telephony
>
> >>>  Regards
>
> >>> Thierry GAYET
> >>> NextInnovation.org
> >>> +33(0)663.849.589
>
> >>> ------------------------------
> >>> *De :* GAYET Thierry <thierry_ga...@yahoo.fr>
> >>> *À :* jaikumar Ganesh <jaikum...@gmail.com>
> >>> *Envoyé le :* Mardi, 30 Juin 2009, 18h01mn 26s
> >>> *Objet :* Re : Re : [android-platform] SIM Access
>
> >>> Hi, some time ago you told me that you need time to reply two of my
> >>> questions (1 and 2).
>
> >>> I am expected the description of the Telephony API because i need to
> >>> develop one application with this one. I also need the date of their
> >>> delivery in the roadmap.
>
> >>> Will you extend the number of AT command supported ? If so may we know
> >>> which one ?
>
> >>> About my request i can help you to develop those points, because i will
> >>> do it on my side so maybe i could be nice to work on the same way as yours
> >>> but for that i need some more information.
>
> >>> Does this evolution will be available in the version 2.0 of Android ?
> >>> when the 2.0 will be officially released ?
>
> >>> Regards
>
> >>> Thierry GAYET
> >>> NextInnovation.org
> >>> +33(0)663.849.589
>
> >>> ----- Message transféré ----
> >>> *De :* jaikumar Ganesh <jaikum...@gmail.com>
> >>> *À :* thierry_ga...@yahoo.fr
> >>> *Envoyé le :* Mercredi, 24 Juin 2009, 1h21mn 39s
> >>> *Objet :* Fwd: Re : [android-platform] SIM Access
> >>> equivalent of *STK for 3G* networks). In fact i need to access the sim
> >>> card not just for unlocking the usim/isim card, but to access some crypto
> >>> function (need for a 3GPP Generic Bootstraping Architecture). Will you
> >>> include sooner or later USAT on the thephony framework part ?
>
> >>> Thanks in advance for your reply.
>
> >>> Best regards
>
> >>> Thierry GAYET
> >>> NextInnovation.org
> >>> +33(0)663.849.589
>
> >>> ------------------------------
> >>> *De :* GAYET Thierry <thierry_ga...@yahoo.fr>
> >>> *À :* android-...@googlegroups.com
> >>> *Envoyé le :* Mardi, 9 Juin 2009, 12h08mn 43s
> >>> *Objet :* Re : SIM Access on ADP1
> >>> ------------------------------
> >>> *De :* jaikumar Ganesh <jaikum...@gmail.com>
> >>> *À :* android-...@googlegroups.com
> >>> *Envoyé le :* Mercredi, 3 Juin 2009, 6h47mn 32s
> >>> *Objet :* Re: SIM Access on ADP1
>
> >>> Hey Meni:
> >>>    Currently there is no public API to access the SIM cards - we are
> >>> planning to adding public APIs soon.
>
> >>> You can look at SimRecords.java and TelephonyManager code to see how to
> >>> access the SIM.
>
> >>> Thanks
> >>> Jaikumar
>
> >>> On Sun, May 31, 2009 at 1:40 AM, meni <menili...@gmail.com> wrote:
>
> >>>> Hi all,
>
> >>>> I know there's no API to access the SIM card to run commands on it.
> >>>> Nontheless, does anyone know if the SIM card can be accessible on the
> >>>> low
>
> ...
>
> plus de détails »

G. L.

unread,
Oct 7, 2009, 12:32:22 PM10/7/09
to android-platform
Hi all,

Following my previous message, it seems that I missed the Handler
part, so here is the missing code :

RIL rilInterface = new RIL(this.mContext);
Message APDUResponse = Message.obtain();

HandlerThread mHandlerThread = new HandlerThread("MyThread");
mHandlerThread.start();
Looper looper = mHandlerThread.getLooper();

APDUResponse.setTarget(new MyHandler(looper));
rilInterface.invokeOemRilRequestStrings(ADPURequest, APDUResponse);


private class MyHandler extends Handler {
public synchronized void handleMessage(Message msg) {
AsyncResult res = (AsyncResult)msg.obj;
Bundle d = msg.getData();

Log.d(LOG_TAG, "INFO: handleMessage what is '" + msg.what + "'.");
Log.d(LOG_TAG, "INFO: handleMessage arg1 is '" + msg.arg1 + "'.");
Log.d(LOG_TAG, "INFO: handleMessage arg2 is '" + msg.arg2 + "'.");
Log.d(LOG_TAG, "INFO: handleMessage data has '"+ d.keySet().size()
+ "' keys.");
Log.d(LOG_TAG, "INFO: handleMessage data is empty '" + d.isEmpty() +
"' keys.");
Log.d(LOG_TAG, "INFO: handleMessage resp result is '" + res.result +
"' (" + res.result.getClass() + ").");
Log.d(LOG_TAG, "INFO: handleMessage resp userObj is '" + res.userObj
+ "' (" + res.userObj.getClass() + ").");
}
}



===> My problem is now that in the handleMessage(Message msg) method,
all attributes of msg param are either null, or set to 0.
I studied the code of GSMPhoneTest.java, in
http://www.google.com/codesearch/p?hl=fr&sa=N&cd=8&ct=rc#uX1GffpyOZk/tests/CoreTests/com/android/internal/telephony/gsm/GSMPhoneTest.java&q=invokeOemRilRequestStrings

... but there is no place where the message that get back from
RIL.invokeOemRilRequestStrings (through a custom Handler) is properly
used.

Has anyone ever used these methods and get a result ?


Thanks & Regards,
G.




On 6 oct, 14:18, "G. L." <android.dev.g...@gmail.com> wrote:
> Hi Jaikumar,
>
> First of all, thanks a lot for all your responses so far, it was also
> very usefull for me.
>
> For my part, I'm trying to perform aSIMaccess with AT commands. As
> you advised, I used the RIL interface of the Telephony Manager
> package.
> Indeed I have no choice but to modify the Telephony Manager Java class
> of the Android framework.
>
> Here is a sample of my code included in my custom
> TelephonyManager.java :
>
> public String simAccess() {
>   String rand = "testrand";
>
>   // Check is theSIMcard is ready to use
> >    SIMrecords are read using AT commands. None of the APIs mentioned in
> > telelphony layer deal with AT commands directly, the RIL translates the RIL
> > commands to AT commands.
>
> > Currently, there is no way for applications to talk to theSIMdirectly. We
> > are working on exposing telephony APIs soon.
>
> > Thanks
> > Jaikumar
>
> > On Thu, Sep 10, 2009 at 5:48 PM, Zhihong GUO <gzhh...@gmail.com> wrote:
> > > Hi jaikumar,You mean we can send AT command toSIMdirectly, right? Even
> > > the command is not registered in ril_commands.h? How to send AT command in
> > > application, how can I test it.
> > > Thank you so much!
>
> > > James
>
> > > 2009/7/1 jaikumar Ganesh <jaikum...@gmail.com>
>
> > > Hi Gayle:
>
> > >> Unfortunately, due to resource constraints we don't plan to expose
> > >> TelephonyManager APIs for directSIMaccess during Eclair time frame (end of
> > >> 2009).
> > >> We do plan to expose some APIs but we we working on the specifics. It
> > >> would be great if you could contribute and so send us a plan and we can work
> > >> on the code using the open source system.
> > >>http://source.android.com/submit-patches
>
> > >> Accessing theSIM- it would be better if its through the TelephonyManager
> > >> API;  if done directly throught the RIL your app might not work in future
> > >> releases due to changes in the framework.
>
> > >> I don't think anyone has used AT+APDU command directly. Again, please send
> > >> a patch or a plan and we can work along with you to add a AT command module.
>
> > >> Thanks
>
> > >> On Tue, Jun 30, 2009 at 9:16 AM, GAYET Thierry <thierry_ga...@yahoo.fr>wrote:
>
> > >>> Hi, as i have explain few time ago on another android (the developper
> > >>> one) mailist, the actual API is not ready for my usage. As i told you
> > >>> before, i need a direct access to thesimcard (through the baseband of
> > >>> course).
>
> > >>> I wanted to know if it was better to communicate directly using a socket
> > >>> with the RIL deamon (RILD) or if i need to modify the framework by the
> > >>> telephony API ?
>
> > >>> In order to used APDU (Application Protocol Data Unit) located on thesim
> > >>> (2G)/usim(3G) card, i am looking for some advice about the best way.
> > >>> Actually android through the STK support the commonSIMfunctions. Next,
> > >>> USAT will provide a support for the 3G functions.
>
> > >>> Is it more interesting to extend the public Telephony API through the
> > >>> TelephonyManager or maybe to communicate directly with the ril deamon (rild)
> > >>> ?
>
> > >>> The AT commands are defined in the ril.h but may i add my own one
> > >>> (official AT command but not used in this implementation)  ; if so i didn't
> > >>> see any directsimaccess in order to send those king of command ? Does
> > >>> anybody have tried to send AT-APDU command to a baseband module ? The APDU
> > >>> command i need to launch is called RUN_GSM_ALGORITHM in a 2Gsimcard (3gpp
> > >>> functions include on thesim/usim card ? I ask this question because theSIM
> > >>> Application Toolkit (commonly referred to as STK forSimToolKits) is for a
> > >>> 2G access ? For 3G, there is a USIM Application Toolkit (USAT, the
> > >>> equivalent of *STK for 3G* networks). In fact i need to access thesim
> > >>> card not just for unlocking the usim/isim card, but to access some crypto
> > >>> function (need for a 3GPP Generic Bootstraping Architecture). Will you
> > >>> include sooner or later USAT on the thephony framework part ?
>
> > >>> Thanks in advance for your reply.
>
> > >>> Best regards
>
> > >>> Thierry GAYET
> > >>> NextInnovation.org
> > >>> +33(0)663.849.589
>
> > >>> ------------------------------
> > >>> *De :* GAYET Thierry <thierry_ga...@yahoo.fr>
> > >>> *À :* android-...@googlegroups.com
> > >>> *Envoyé le :* Mardi, 9 Juin 2009, 12h08mn 43s
> > >>> *Objet :* Re :SIMAccess on ADP1
>
> > >>> Hello,
>
> > >>> I am really interested on the reply given. In fact, i have the same
> > >>> requirement that is to have an access to theSIM
>
> ...
>
> plus de détails »

Zhihong GUO

unread,
Oct 8, 2009, 1:59:06 AM10/8/09
to android-...@googlegroups.com
Hi, 
Have you read the code in ril package? It seem that the ril will filter out the AT command it doesn't understand. I get the information in a file named reference-ril.c, in the onRequest method. Do you try the code in emulator or on read device?



2009/10/8 G. L. <android....@gmail.com>

G. L.

unread,
Oct 8, 2009, 10:13:59 AM10/8/09
to android-platform
Hi James,

Thanks for your reply.

Indeed a look on "onRequest" method of "reference-ril.c" file seems to
confirm that.
There is a big switch on request type, that ends up with a "default"
that forwards an obivous "RIL_E_REQUEST_NOT_SUPPORTED", which is
defined to value "6" in hardware/ril/include/telephony/ril.h.

What I don't understand, though, is that this is not the values I get
in return, while testing on the HTC G1.
I only get 0 or empty values, where a "6" would have meant that my
request was not understood.

I keep on testing though ...

Again, thanks for your feedback.

Jaikumar, could you please confirm that this access to APDU command
"run gsm algorithm" is possible this way ?

Regards,
G.


On 8 oct, 07:59, Zhihong GUO <gzhh...@gmail.com> wrote:
> Hi, Have you read the code in ril package? It seem that the ril will filter
> out the AT command it doesn't understand. I get the information in a file
> named reference-ril.c, in the onRequest method. Do you try the code in
> emulator or on read device?
>
> 2009/10/8 G. L. <android.dev.g...@gmail.com>
> >http://www.google.com/codesearch/p?hl=fr&sa=N&cd=8&ct=rc#uX1GffpyOZk/...
> ...
>
> plus de détails »

Jean-Baptiste Queru

unread,
Oct 8, 2009, 10:20:52 AM10/8/09
to android-...@googlegroups.com
Beware that the G1 (or other HTC phones) do not run the reference ril.
HTC wrote their own, which is not open-source.

JBQ
--
Jean-Baptiste M. "JBQ" Queru
Software Engineer, Android Open-Source Project, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

G. L.

unread,
Oct 9, 2009, 6:15:03 AM10/9/09
to android-platform
Hi,

Now I tried to reproduce the test case defined in GSMPhoneTest.java :
http://www.google.com/codesearch/p?hl=fr&sa=N&cd=8&ct=rc#uX1GffpyOZk/tests/CoreTests/com/android/internal/telephony/gsm/GSMPhoneTest.java&q=invokeOemRilRequestStrings

And, indeed, while sending {"hello"} as first parameter of
invokeOemRilRequestStrings, I get a response of {"hello"} ... which is
quite interesting ...

Now, back in hardware/ril/reference-ril/reference-ril.c, I can see the
following code, which handle invokeOemRilRequestStrings :

case RIL_REQUEST_OEM_HOOK_STRINGS: {
int i;
const char ** cur;
LOGD("got OEM_HOOK_STRINGS: 0x%8p %lu", data, (long)datalen);

for (i = (datalen / sizeof (char *)), cur = (const char **)data ; i
> 0 ; cur++, i --) {
LOGD("> '%s'", *cur);
}

// echo back strings
RIL_onRequestComplete(t, RIL_E_SUCCESS, data, datalen);
break;
}


=> This code indeed only send back the given "data" parameter (String
[]).

My question is : what is it supposed to do ? To me, it doesn't seems
to perform any SIM access, through AT command !


Does anyone have a clue on this ??

Thanks a lot & Regards,
G.




On 8 oct, 16:20, Jean-Baptiste Queru <j...@android.com> wrote:
> Beware that the G1 (or other HTC phones) do not run the reference ril.
> HTC wrote their own, which is not open-source.
>
> JBQ
>
> ...
>
> plus de détails »

Joao MG

unread,
Oct 28, 2009, 7:02:07 PM10/28/09
to android-platform
Hi,

Have you managed to get some answers on this matter?

I believe each ril implementation (HTC's, Motorola, etc) can handle
the RIL_REQUEST_OEM_HOOK_STRINGS solicited command differently.

Some just might echo back the string.

I've come across a similar command / method:
RIL_REQUEST_OEM_HOOK_RAW / invokeOemRilRequestRaw.

I suspect HTC's FieldTest application (custom Android app available
only in HTC's Android mobiles) uses this command to interact with the
ril. In order to fetch specific GSM/UMTS network information.

I've started a thread on this subject (Low level network info?):
http://groups.google.com/group/android-platform/browse_thread/thread/b55c8d3275ed7042/89c065a6198b5313?lnk=gst&q=low+level+network#89c065a6198b5313,
there's a logcat of the HTC app sending OEM_HOOK_RAW requests and
responses.

My point: perhaps you can use this command instead, encoding the
string (a AT command) in a byte array. And send it over to the ril.

regards,

Joao MG

On Oct 9, 10:15 am, "G. L." <android.dev.g...@gmail.com> wrote:
> Hi,
>
> Now I tried to reproduce the test case defined in GSMPhoneTest.java :http://www.google.com/codesearch/p?hl=fr&sa=N&cd=8&ct=rc#uX1GffpyOZk/...
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages