Skip to content

Repository files navigation

Overview

RIL structure



Telephony App/Service

packages/services/Telephony

packages/services/Telecomm


Telephony Provider

packages/providers/TelephonyProvider


// e.g. APN conf file, database
imx8mp_evk:/ # system/etc/apn-conf.xml
imx8mp_evk:/ # data/user_de/0/com.android.providers.telephony/databases
$ ls -al
total 1100
drwxr-xr-x 1 ting 1049089 0 Mar 17 13:06 ./
drwxr-xr-x 1 ting 1049089 0 Mar 17 13:06 ../
-r--r--r-- 1 ting 1049089 20480 Mar 17 12:06 CarrierInformation.db
-r--r--r-- 1 ting 1049089 0 Mar 17 12:06 CarrierInformation.db-journal
-r--r--r-- 1 ting 1049089 57344 Mar 17 12:06 HbpcdLookup.db
-r--r--r-- 1 ting 1049089 0 Mar 17 12:06 HbpcdLookup.db-journal
-r--r--r-- 1 ting 1049089 229376 Mar 17 12:06 carrierIdentification.db
-r--r--r-- 1 ting 1049089 0 Mar 17 12:06 carrierIdentification.db-journal
-r--r--r-- 1 ting 1049089 118784 Mar 17 12:06 mmssms.db
-r--r--r-- 1 ting 1049089 0 Mar 17 12:06 mmssms.db-journal
-r--r--r-- 1 ting 1049089 696320 Mar 17 12:06 telephony.db
-r--r--r-- 1 ting 1049089 0 Mar 17 12:06 telephony.db-journal

Android:一篇就够!全面&详细解析APN(涉及内容:GGSN,authtype,MVNO,pdp,Apns-conf,supl,hipri,dun)


Telephony Framework

frameworks/opt/telephony/
frameworks/base/telephony/

// frameworks/opt/telephony/src/java/com/android/internal/telephony/RIL.java39importandroid.hardware.radio.V1_0.IRadio;
190volatileIRadiomRadioProxy = null;
351/** Returns a {@link IRadio} instance or null if the service is not available. */352@VisibleForTesting353publicIRadiogetRadioProxy(Messageresult) {
354if (!mIsMobileNetworkSupported) {
355if (RILJ_LOGV) riljLog("getRadioProxy: Not calling getService(): wifi-only");
356if (result != null) {
357AsyncResult.forMessage(result, null,
358CommandException.fromRilErrno(RADIO_NOT_AVAILABLE));
359result.sendToTarget();
360 }
361returnnull;
362 }
363364if (mRadioProxy != null) {
365returnmRadioProxy;
366 }
367368try {
369mRadioProxy = IRadio.getService(HIDL_SERVICE_NAME[mPhoneId == null ? 0 : mPhoneId],
370true);
371if (mRadioProxy != null) {
372mRadioProxy.linkToDeath(mRadioProxyDeathRecipient,
373mRadioProxyCookie.incrementAndGet());
374mRadioProxy.setResponseFunctions(mRadioResponse, mRadioIndication);
375 } else {
376riljLoge("getRadioProxy: mRadioProxy == null");
377 }
378 } catch (RemoteException | RuntimeExceptione) {
379mRadioProxy = null;
380riljLoge("RadioProxy getService/setResponseFunctions: " + e);
381 }
382383if (mRadioProxy == null) {
384// getService() is a blocking call, so this should never happen385riljLoge("getRadioProxy: mRadioProxy == null");
386if (result != null) {
387AsyncResult.forMessage(result, null,
388CommandException.fromRilErrno(RADIO_NOT_AVAILABLE));
389result.sendToTarget();
390 }
391 }
392393returnmRadioProxy;
394 }
527@Override528publicvoidgetIccCardStatus(Messageresult) {
529IRadioradioProxy = getRadioProxy(result);
530if (radioProxy != null) {
531RILRequestrr = obtainRequest(RIL_REQUEST_GET_SIM_STATUS, result,
532mRILDefaultWorkSource);
533534if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));
535536try {
537radioProxy.getIccCardStatus(rr.mSerial);
538 } catch (RemoteException | RuntimeExceptione) {
539handleRadioProxyExceptionForRR(rr, "getIccCardStatus", e);
540 }
541 }
542 }
// frameworks/opt/telephony/src/java/com/android/internal/telephony/RadioConfig.java26importandroid.hardware.radio.config.V1_0.IRadioConfig;
56privatevolatileIRadioConfigmRadioConfigProxy = null;
152/** Returns a {@link IRadioConfig} instance or null if the service is not available. */153publicIRadioConfiggetRadioConfigProxy(Messageresult) {
154if (!mIsMobileNetworkSupported) {
155if (VDBG) logd("getRadioConfigProxy: Not calling getService(): wifi-only");
156if (result != null) {
157AsyncResult.forMessage(result, null,
158CommandException.fromRilErrno(RADIO_NOT_AVAILABLE));
159result.sendToTarget();
160 }
161returnnull;
162 }
163164if (mRadioConfigProxy != null) {
165returnmRadioConfigProxy;
166 }
167168try {
169mRadioConfigProxy = IRadioConfig.getService(true);
170if (mRadioConfigProxy != null) {
171mRadioConfigProxy.linkToDeath(mServiceDeathRecipient,
172mRadioConfigProxyCookie.incrementAndGet());
173mRadioConfigProxy.setResponseFunctions(mRadioConfigResponse,
174mRadioConfigIndication);
175 } else {
176loge("getRadioConfigProxy: mRadioConfigProxy == null");
177 }
178 } catch (RemoteException | RuntimeExceptione) {
179mRadioConfigProxy = null;
180loge("getRadioConfigProxy: RadioConfigProxy getService/setResponseFunctions: " + e);
181 }
182183if (mRadioConfigProxy == null) {
184// getService() is a blocking call, so this should never happen185loge("getRadioConfigProxy: mRadioConfigProxy == null");
186if (result != null) {
187AsyncResult.forMessage(result, null,
188CommandException.fromRilErrno(RADIO_NOT_AVAILABLE));
189result.sendToTarget();
190 }
191 }
192193returnmRadioConfigProxy;
194 }
240/**241 * Wrapper function for IRadioConfig.getSimSlotsStatus().242 */243publicvoidgetSimSlotsStatus(Messageresult) {
244IRadioConfigradioConfigProxy = getRadioConfigProxy(result);
245if (radioConfigProxy != null) {
246RILRequestrr = obtainRequest(RIL_REQUEST_GET_SLOT_STATUS, result, mDefaultWorkSource);
247248if (DBG) {
249logd(rr.serialString() + "> " + requestToString(rr.mRequest));
250 }
251252try {
253radioConfigProxy.getSimSlotsStatus(rr.mSerial);
254 } catch (RemoteException | RuntimeExceptione) {
255resetProxyAndRequestList("getSimSlotsStatus", e);
256 }
257 }
258 }
259

frameworks/opt/telephony/src/java/com/android/internal/telephony/RadioConfigResponse.java

// frameworks/opt/telephony/src/java/com/android/internal/telephony/RadioConfigResponse.java40/**41 * Response function for IRadioConfig.getSimSlotsStatus().42 */43publicvoidgetSimSlotsStatusResponse(RadioResponseInforesponseInfo,
44ArrayList<SimSlotStatus> slotStatus) {
45RILRequestrr = mRadioConfig.processResponse(responseInfo);
4647if (rr != null) {
48ArrayList<IccSlotStatus> ret = RadioConfig.convertHalSlotStatus(slotStatus);
49if (responseInfo.error == RadioError.NONE) {
50// send response51RadioResponse.sendMessageResponse(rr.mResult, ret);
52Rlog.d(TAG, rr.serialString() + "< "53 + mRadioConfig.requestToString(rr.mRequest) + " " + ret.toString());
54 } else {
55rr.onError(responseInfo.error, ret);
56Rlog.e(TAG, rr.serialString() + "< "57 + mRadioConfig.requestToString(rr.mRequest) + " error "58 + responseInfo.error);
59 }
6061 } else {
62Rlog.e(TAG, "getSimSlotsStatusResponse: Error " + responseInfo.toString());
63 }
64 }

Radio HIDL

HIDL Interface of Radio

ting@ting-pc:~/aosp/android-9/hardware/interfaces/radio
$ ls -altotal 48drwxr-xr-x 1 ting 197121 0 十二月 25 17:53 ./drwxr-xr-x 1 ting 197121 0 十二月 25 17:53 ../drwxr-xr-x 1 ting 197121 0 十二月 25 17:53 1.0/drwxr-xr-x 1 ting 197121 0 十二月 25 17:53 1.1/drwxr-xr-x 1 ting 197121 0 十二月 25 17:53 1.2/drwxr-xr-x 1 ting 197121 0 十二月 25 17:53 1.3/drwxr-xr-x 1 ting 197121 0 十二月 25 17:53 1.4/drwxr-xr-x 1 ting 197121 0 十二月 25 17:53 1.5/drwxr-xr-x 1 ting 197121 0 十二月 25 17:53 1.6/drwxr-xr-x 1 ting 197121 0 十二月 25 17:53 config/drwxr-xr-x 1 ting 197121 0 十二月 25 17:53 deprecated/
  • IRadio

    IRadio is implemented by libril

    # e.g. java: android.hardware.radio.1.1.IRadio
    # e.g. c/C++: android::hardware::radio::1.1::IRadioting@ting-pc:~/aosp/android-9/hardware/interfaces/radio/1.0
    $ ls -altotal 289drwxr-xr-x 1 ting 197121 0 十二月 25 17:53 ./drwxr-xr-x 1 ting 197121 0 十二月 25 17:53 ../-rw-r--r-- 1 ting 197121 413 十二月 25 17:53 Android.bp-rw-r--r-- 1 ting 197121 59221 十二月 25 17:53 IRadio.hal-rw-r--r-- 1 ting 197121 17849 十二月 25 17:53 IRadioIndication.hal-rw-r--r-- 1 ting 197121 92745 十二月 25 17:53 IRadioResponse.hal-rw-r--r-- 1 ting 197121 2961 十二月 25 17:53 ISap.hal-rw-r--r-- 1 ting 197121 6189 十二月 25 17:53 ISapCallback.hal-rw-r--r-- 1 ting 197121 97551 十二月 25 17:53 types.haldrwxr-xr-x 1 ting 197121 0 十二月 25 17:53 vts/ting@ting-pc:~/aosp/android-9/hardware/interfaces/radio/1.1
    $ ls -altotal 41drwxr-xr-x 1 ting 197121 0 十二月 25 17:53 ./drwxr-xr-x 1 ting 197121 0 十二月 25 17:53 ../-rw-r--r-- 1 ting 197121 423 十二月 25 17:53 Android.bp-rw-r--r-- 1 ting 197121 4899 十二月 25 17:53 IRadio.hal-rw-r--r-- 1 ting 197121 2013 十二月 25 17:53 IRadioIndication.hal-rw-r--r-- 1 ting 197121 3355 十二月 25 17:53 IRadioResponse.hal-rw-r--r-- 1 ting 197121 778 十二月 25 17:53 ISap.hal-rw-r--r-- 1 ting 197121 8644 十二月 25 17:53 types.haldrwxr-xr-x 1 ting 197121 0 十二月 25 17:53 vts/
  • IRadioConfig

    IRadioConfig is the optional implementation by modem vendor.

    ting@ting-pc:~/aosp/android-9/hardware/interfaces/radio/config
    $ ls -al
    total 16
    drwxr-xr-x 1 ting 197121 0 十二月 25 17:53 ./
    drwxr-xr-x 1 ting 197121 0 十二月 25 17:53 ../
    drwxr-xr-x 1 ting 197121 0 十二月 25 17:53 1.0/
    drwxr-xr-x 1 ting 197121 0 十二月 25 17:53 1.1/
    drwxr-xr-x 1 ting 197121 0 十二月 25 17:53 1.2/
    ting@ting-pc:~/aosp/android-9/hardware/interfaces/radio/config/1.0
    $ ls -al
    total 25
    drwxr-xr-x 1 ting 197121 0 十二月 25 17:53 ./
    drwxr-xr-x 1 ting 197121 0 十二月 25 17:53 ../
    -rw-r--r-- 1 ting 197121 427 十二月 25 17:53 Android.bp
    drwxr-xr-x 1 ting 197121 0 十二月 25 17:53 default/
    -rw-r--r-- 1 ting 197121 3875 十二月 25 17:53 IRadioConfig.hal
    -rw-r--r-- 1 ting 197121 1419 十二月 25 17:53 IRadioConfigIndication.hal
    -rw-r--r-- 1 ting 197121 1847 十二月 25 17:53 IRadioConfigResponse.hal
    -rw-r--r-- 1 ting 197121 1905 十二月 25 17:53 types.hal
    drwxr-xr-x 1 ting 197121 0 十二月 25 17:53 vts/
    

RIL Daemon

◤ For Android versions prior to Android 8.0, RIL daemon use Socket to communicate with Anroid phone framework.

◤ On Android 8.0 or later versions, the communication interface between Android phone framework and ril-daemon service has been changed from socket to HIDL.

ting@ting-pc:~/aosp/android-9/hardware/ril$ ls -altotal 36drwxrwxr-x 7 ting ting 4096 Nov 12 21:23 ./drwxrwxr-x 12 ting ting 4096 Dec 15 17:14 ../-rw-rw-r-- 1 ting ting 2850 Nov 12 21:23 CleanSpec.mk-rw-rw-r-- 1 ting ting 152 Nov 12 21:23 OWNERSdrwxrwxr-x 4 ting ting 4096 Nov 12 21:23 include/drwxrwxr-x 2 ting ting 4096 Nov 12 21:23 libril/ // Radio HIDL Impl.drwxrwxr-x 3 ting ting 4096 Nov 12 21:23 librilutils/drwxrwxr-x 2 ting ting 4096 Nov 12 21:23 reference-ril/ // Vendor RILdrwxrwxr-x 2 ting ting 4096 Nov 12 21:23 rild/ // RIL Daemon
  • rild

    The RIL Daemon talks to the telephony services and dispatches "solicited commands" to the Vendor RIL.

    ting@ting-pc:~/aosp/android-9/hardware/ril/rild$ ls -altotal 40drwxrwxr-x 2 ting ting 4096 Nov 12 21:23 ./drwxrwxr-x 7 ting ting 4096 Nov 12 21:23 ../-rw-rw-r-- 1 ting ting 788 Nov 12 21:23 Android.mk-rw-rw-r-- 1 ting ting 0 Nov 12 21:23 MODULE_LICENSE_APACHE2-rw-rw-r-- 1 ting ting 10695 Nov 12 21:23 NOTICE-rw-rw-r-- 1 ting ting 7101 Nov 12 21:23 rild.c-rw-rw-r-- 1 ting ting 191 Nov 12 21:23 rild.legacy.rc-rw-rw-r-- 1 ting ting 198 Nov 12 21:23 rild.rc
    ting@ting-pc:~/aosp/android-9/hardware/ril/rild$ cat rild.rcservice vendor.ril-daemon /vendor/bin/hw/rild class main user radio disabled group radio cache inet misc audio log readproc wakelock capabilities BLOCK_SUSPEND NET_ADMIN NET_RAW
    ting@ting-pc:~/aosp/android-9/hardware/ril/rild$catrild.cintmain(intargc, char**argv) {
    // vendor ril lib path either passed in as -l parameter, or read from rild.libpath propertyconstchar*rilLibPath=NULL;
    // ril arguments either passed in as -- parameter, or read from rild.libargs propertychar**rilArgv;
    ...
    // ril/socket id received as -c parameter, otherwise set to 0constchar*clientId=NULL;
    RLOGD("**RIL Daemon Started**");
    RLOGD("**RILd param count=%d**", argc);
    ...
    dlHandle=dlopen(rilLibPath, RTLD_NOW);	// indicate to Vendor RIL, libreference-ril.so
  • libreference-ril.so

    The Vendor RIL is specific to a particular radio implementation, and dispatches "unsolicited commands" up to the RIL Daemon.

    Modem module vendor needs to implement this shared library that coding modem specific AT commands.

    ting@ting-pc:~/aosp/android-9/hardware/ril/reference-ril
    $ ls -altotal 198drwxr-xr-x 1 ting 197121 0 十二月 25 17:52 ./drwxr-xr-x 1 ting 197121 0 十二月 25 17:52 ../-rw-r--r-- 1 ting 197121 1157 十二月 25 17:52 Android.mk-rw-r--r-- 1 ting 197121 3850 十二月 25 17:52 at_tok.c-rw-r--r-- 1 ting 197121 1004 十二月 25 17:52 at_tok.h-rw-r--r-- 1 ting 197121 24710 十二月 25 17:52 atchannel.c-rw-r--r-- 1 ting 197121 4381 十二月 25 17:52 atchannel.h-rw-r--r-- 1 ting 197121 1309 十二月 25 17:52 misc.c-rw-r--r-- 1 ting 197121 904 十二月 25 17:52 misc.h-rw-r--r-- 1 ting 197121 0 十二月 25 17:52 MODULE_LICENSE_APACHE2-rw-r--r-- 1 ting 197121 10885 十二月 25 17:52 NOTICE-rw-r--r-- 1 ting 197121 177 十二月 25 17:52 OWNERS-rw-r--r-- 1 ting 197121 122720 十二月 25 17:52 reference-ril.c-rw-r--r-- 1 ting 197121 26 十二月 25 17:52 ril.h
    ting@ting-pc:~/aosp/android-9/hardware/ril/reference-ril$catreference-ril.cstaticvoidrequestSignalStrength(void*data__unused, size_tdatalen__unused, RIL_Tokent)
    {
    ATResponse*p_response=NULL;
    interr;
    char*line;
    intcount=0;
    // Accept a response that is at least v6, and up to v10intminNumOfElements=sizeof(RIL_SignalStrength_v6)/sizeof(int);
    intmaxNumOfElements=sizeof(RIL_SignalStrength_v10)/sizeof(int);
    intresponse[maxNumOfElements];
    memset(response, 0, sizeof(response));
    err=at_send_command_singleline("AT+CSQ", "+CSQ:", &p_response);
    if (err<0||p_response->success==0) {
    RIL_onRequestComplete(t, RIL_E_GENERIC_FAILURE, NULL, 0);
    goto error;
    }
    line=p_response->p_intermediates->line;
    err=at_tok_start(&line);
    if (err<0) goto error;
    for (count=0; count<maxNumOfElements; count++) {
    err=at_tok_nextint(&line, &(response[count]));
    if (err<0&&count<minNumOfElements) goto error;
    }
    RIL_onRequestComplete(t, RIL_E_SUCCESS, response, sizeof(response));
    at_response_free(p_response);
    return;
    error:
    RLOGE("requestSignalStrength must never return an error when radio is on");
    RIL_onRequestComplete(t, RIL_E_GENERIC_FAILURE, NULL, 0);
    at_response_free(p_response);
    }
  • libril.so

    The library of rild that implement Radio HIDL service, e.g. android::hardware::radio::V1_1::IRadio.

    ting@ting-pc:~/aosp/android-9/hardware/ril/libril
    $ ls -altotal 560drwxr-xr-x 1 ting 197121 0 十二月 25 17:52 ./drwxr-xr-x 1 ting 197121 0 十二月 25 17:52 ../-rw-r--r-- 1 ting 197121 1138 十二月 25 17:52 Android.mk-rw-r--r-- 1 ting 197121 0 十二月 25 17:52 MODULE_LICENSE_APACHE2-rw-r--r-- 1 ting 197121 10885 十二月 25 17:52 NOTICE-rw-r--r-- 1 ting 197121 49496 十二月 25 17:52 ril.cpp-rw-r--r-- 1 ting 197121 11316 十二月 25 17:52 ril_commands.h-rw-r--r-- 1 ting 197121 10484 十二月 25 17:52 ril_event.cpp-rw-r--r-- 1 ting 197121 1517 十二月 25 17:52 ril_event.h-rw-r--r-- 1 ting 197121 3112 十二月 25 17:52 ril_internal.h-rw-r--r-- 1 ting 197121 343787 十二月 25 17:52 ril_service.cpp-rw-r--r-- 1 ting 197121 34538 十二月 25 17:52 ril_service.h-rw-r--r-- 1 ting 197121 4791 十二月 25 17:52 ril_unsol_commands.h-rw-r--r-- 1 ting 197121 8980 十二月 25 17:52 RilSapSocket.cpp-rw-r--r-- 1 ting 197121 6491 十二月 25 17:52 RilSapSocket.h-rw-r--r-- 1 ting 197121 1714 十二月 25 17:52 RilSocket.h-rw-r--r-- 1 ting 197121 3906 十二月 25 17:52 rilSocketQueue.h-rw-r--r-- 1 ting 197121 39253 十二月 25 17:52 sap_service.cpp-rw-r--r-- 1 ting 197121 1093 十二月 25 17:52 sap_service.h
    // impl. of android::hardware::radio::V1_1::IRadio
    ting@ting-pc:~/aosp/android-9/hardware/ril/libril
    $ cat ril_service.cpp
    structRadioImpl : publicV1_1::IRadio {
    int32_tmSlotId;
    sp<IRadioResponse> mRadioResponse;
    sp<IRadioIndication> mRadioIndication;
    sp<V1_1::IRadioResponse> mRadioResponseV1_1;
    sp<V1_1::IRadioIndication> mRadioIndicationV1_1;
    Return<void> setResponseFunctions(
    const ::android::sp<IRadioResponse>& radioResponse,
    const ::android::sp<IRadioIndication>& radioIndication);
    Return<void> getIccCardStatus(int32_t serial);
    ...

Stop/Start RIL daemon

Usually it needs to stop ril daemon before testing AT command with modem module

setprop ctl.start vendor.ril-daemonsetprop ctl.stop vendor.ril-daemon

Runtime @ device

console:/vendor # find | grep -w "rild"	./etc/init/rild.rc	./bin/hw/rild console:/vendor # cat ./etc/init/rild.rc service vendor.ril-daemon /vendor/bin/hw/rild -l /vendor/lib64/libreference-ril.so class main user radio group radio cache inet misc audio sdcard_rw log readproc wakelock capabilities BLOCK_SUSPEND NET_ADMIN NET_RAW console:/vendor #console:/vendor # find | grep -w "ril.so"	./lib64/libreference-ril.soconsole:/ # getprop | grep -i -E "ril|radio"	[gsm.version.ril-impl]: [Quectel_Android_RIL_Driver_V3.1.8]	[init.svc.vendor.ril-daemon]: [running]	[persist.radio.multisim.config]: [ssss]	[persist.rild.nitz_long_ons_0]: []	[persist.rild.nitz_long_ons_1]: []	[persist.rild.nitz_long_ons_2]: []	[persist.rild.nitz_long_ons_3]: []	[persist.rild.nitz_plmn]: []	[persist.rild.nitz_short_ons_0]: []	[persist.rild.nitz_short_ons_1]: []	[persist.rild.nitz_short_ons_2]: []	[persist.rild.nitz_short_ons_3]: []	[persist.vendor.radio.apm_sim_not_pwdn]: [1]	[persist.vendor.radio.atfwd.start]: [false]	[persist.vendor.radio.custom_ecc]: [1]	[persist.vendor.radio.rat_on]: [combine]	[persist.vendor.radio.sib16_support]: [1]	[ril.subscription.types]: [NV,RUIM]	[rild.libargs]: [-d /dev/ttyUSB2]	[rild.libpath]: [/vendor/lib64/libreference-ril.so]	[ro.boottime.vendor.ril-daemon]: [17157893326]	[vendor.rild.libpath]: [/vendor/lib64/libreference-ril.so]console:/ # ps -A | grep -E -i "radio|ril" system 559 1 16180 4824 binder_thread_read 0 S android.hardware.radio.config@1.0-service radio 1312 1 2132928 6752 binder_thread_read 0 S rild radio 1321 1 5084 1868 __skb_wait_for_more_packets 0 S ssgqmigd radio 1526 1 22500 5368 futex_wait_queue_me 0 S ipacm radio 2003 1259 3712124 84148 SyS_epoll_wait 0 S com.qualcomm.qti.telephonyservice radio 3065 1259 3699680 77996 SyS_epoll_wait 0 S com.qualcomm.qcrilmsgtunnel radio 4375 1259 3695368 78876 SyS_epoll_wait 0 S com.qualcomm.qti.lpa radio 4390 1259 3697792 81464 SyS_epoll_wait 0 S com.qualcomm.qti.modemtestmode radio 4442 1259 3698524 80652 SyS_epoll_wait 0 S com.qualcomm.simcontacts radio 5480 1259 3714564 95160 futex_wait_queue_me 0 S com.android.phone

 ☛ 無線介面層 - 維基百科,自由的百科全書


Modem Device Node, Driver Node

  • Take modem module Quectel EC25 for example, it's the USB serial device.
console:/ # ls -l /dev/ttyUSB*	crw-rw---- 1 radio radio 188, 0 1970-01-01 00:00 /dev/ttyUSB0	crw-rw---- 1 radio radio 188, 1 1970-01-01 00:00 /dev/ttyUSB1	crw-rw---- 1 radio radio 188, 2 2020-12-02 09:59 /dev/ttyUSB2	crw-rw---- 1 radio radio 188, 3 1970-01-01 00:00 /dev/ttyUSB3ls -al /sys/bus/usb/drivers	drwxr-xr-x 32 root root 0 2020-12-07 08:06 .	drwxr-xr-x 4 root root 0 1970-01-01 00:00 ..	drwxr-xr-x 2 root root 0 2020-12-07 08:06 asix	drwxr-xr-x 2 root root 0 2020-12-07 08:06 ax88179_178a	drwxr-xr-x 2 root root 0 2020-12-07 08:06 cdc_ether	drwxr-xr-x 2 root root 0 2020-12-07 08:06 cdc_ncm	drwxr-xr-x 2 root root 0 2020-12-07 08:06 cdc_subset	drwxr-xr-x 2 root root 0 2020-12-07 08:06 cdc_wdm	drwxr-xr-x 2 root root 0 2020-12-07 08:06 hub	drwxr-xr-x 2 root root 0 2020-12-07 08:06 lvs	drwxr-xr-x 2 root root 0 2020-12-07 08:06 net1080	drwxr-xr-x 2 root root 0 2020-12-07 08:06 option	drwxr-xr-x 2 root root 0 2020-12-07 08:06 qmi_wwan_q	drwxr-xr-x 2 root root 0 2020-12-07 08:06 snd-usb-audio	drwxr-xr-x 2 root root 0 2020-12-07 08:06 ums-alauda	drwxr-xr-x 2 root root 0 2020-12-07 08:06 ums-cypress	drwxr-xr-x 2 root root 0 2020-12-07 08:06 ums-datafab	drwxr-xr-x 2 root root 0 2020-12-07 08:06 ums-freecom	drwxr-xr-x 2 root root 0 2020-12-07 08:06 ums-isd200	drwxr-xr-x 2 root root 0 2020-12-07 08:06 ums-jumpshot	drwxr-xr-x 2 root root 0 2020-12-07 08:06 ums-karma	drwxr-xr-x 2 root root 0 2020-12-07 08:06 ums-onetouch	drwxr-xr-x 2 root root 0 2020-12-07 08:06 ums-sddr09	drwxr-xr-x 2 root root 0 2020-12-07 08:06 ums-sddr55	drwxr-xr-x 2 root root 0 2020-12-07 08:06 ums-usbat	drwxr-xr-x 2 root root 0 2020-12-07 08:06 usb	drwxr-xr-x 2 root root 0 2020-12-07 08:06 usb-storage	drwxr-xr-x 2 root root 0 2020-12-07 08:06 usb_ehset_test	drwxr-xr-x 2 root root 0 2020-12-07 08:06 usbfs	drwxr-xr-x 2 root root 0 2020-12-07 08:06 usbhid	drwxr-xr-x 2 root root 0 2020-12-07 08:06 usbserial	drwxr-xr-x 2 root root 0 2020-12-07 08:06 zaurus

Use case of AT command

console:/ #
	cat /dev/ttyUSB2 &	echo "ati;+csub" > /dev/ttyUSB2	echo -e 'AT+CPIN?\r\n' > /dev/ttyUSB2	echo -e 'at+qsimdet=1,0\r\n' > /dev/ttyUSB2	echo -e 'AT+QSIMDET=?\r\n' > /dev/ttyUSB2	echo -e 'AT+QSIMDET?\r\n' > /dev/ttyUSB2	echo -e 'AT+QSIMSTAT=1\r\n' > /dev/ttyUSB2	echo -e 'AT+QSIMSTAT=?\r\n' > /dev/ttyUSB2	echo -e 'AT+QSIMSTAT?\r\n' > /dev/ttyUSB2

Glossary

Telephony 术语 缩写 Acronyms


Appendix

  • 中華電信 mcc/mnc 466/92

  • restart zygote

    setprop ctl.stop zygote
    setprop ctl.start zygote
    



Ref. LTE 4G module Quectel EC25-E, based on AOSP Android 9 / Android 10





More porting cases :

About

Android Telephony, RIL, Radio of Modem module

Topics

Resources

Stars

27 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages