What is the best method to use for sending specific AT commands (APDU)

87 views
Skip to first unread message

GAYET Thierry

unread,
Aug 3, 2009, 12:14:11 PM8/3/09
to android-platform googlegroups.com
Hi,

I have written my APDU class in order to make an AT byte string (eg: A088000010.... and so on)

I am looking for the right method to use for sending my byte string. Maybe invokeOemRilRequestRaw() is the right one ? Is it okay to use this method from service such as TelephonyManager ?

Is there somebody who can comfirm it to me ?

Some of the methods from the RIL.java file :

    public void
    getCLIR(Message result)
    {
        RILRequest rr
                = RILRequest.obtain(RIL_REQUEST_GET_CLIR, result);
           
        if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));
       
        send(rr);
    }

    public void
    setCLIR(int clirMode, Message result)
    {
        RILRequest rr
                = RILRequest.obtain(RIL_REQUEST_SET_CLIR, result);

        // count ints
        rr.mp.writeInt(1);

        rr.mp.writeInt(clirMode);
           
        if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest)
                    + " " + clirMode);
       
        send(rr);
    }

    public void invokeOemRilRequestRaw(byte[] data, Message response)
    {
        RILRequest rr
                = RILRequest.obtain(RIL_REQUEST_OEM_HOOK_RAW, response);

        if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest)
               + "[" + SimUtils.bytesToHexString(data) + "]");

        rr.mp.writeByteArray(data);

        send(rr);

    }

    public void invokeOemRilRequestStrings(String[] strings, Message response)
    {
        RILRequest rr
                = RILRequest.obtain(RIL_REQUEST_OEM_HOOK_STRINGS, response);

        if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));

        rr.mp.writeStringArray(strings);

        send(rr);
    }
 
Regards

Thierry GAYET
NextInnovation.org
+33(0)663.849.589


Reply all
Reply to author
Forward
0 new messages