RIL errors when android and modem already connected and communicate

Hi,
I want to integrate EC200S to our Android 9.0, 64-bit Qualcomm device.

getprop | grep ril
[gsm.version.ril-impl]: [Quectel_Android_RIL_Driver_V3.3.44]
[init.svc.vendor.ril-daemon]: [running]
[init.svc.vendor.ril-daemon2]: [running]
[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]: []
[ril.subscription.types]: [NV,RUIM]
[rild.libpath]: [/vedor/lib64/libquectel-ril.so]
[ro.boottime.vendor.ril-daemon]: [17603959732]
[ro.boottime.vendor.ril-daemon2]: [17607813326]
[ro.vendor.ril.mbn_copy_completed]: [1]
[vendor.qcrild.libpath]: [/vendor/lib4/libreference-ril.so]
[vendor.rild.libpath]: [/vendor/lib64/libquectel-ril.so]

getprop | grep gsm
[gsm.current.phone-type]: [1,1]
[gsm.network.type]: [Unknown,Unknown]
[gsm.operator.alpha]: [TELE2]
[gsm.operator.iso-country]: [ru]
[gsm.operator.isroaming]: [false]
[gsm.operator.numeric]: [25020]
[gsm.version.baseband]: [EC200SENAAR03A01M16]
[gsm.version.ril-impl]: [Quectel_Android_RIL_Driver_V3.3.44]

crw-rw---- 1 radio radio 188, 0 2021-11-19 18:16 ttyUSB0
crw-rw---- 1 radio radio 188, 1 2021-11-19 18:49 ttyUSB1

Also I have this errors:

RILJ setSignalStrengthReportingCriteria ignored. RadioProxy 1.2 is null

11-19 18:27:00.380 11111 11111 D UiccController: Received EVENT_GET_ICC_STATUS_DONE

RILJ RIL_REQUEST_GET_CELL_INFO_LIST error: com.android.internal.telephony.CommandException: INVALID_RESPONSE ret=[]

RILJ DATA_REGISTRATION_STATE error: com.android.internal.telephony.CommandException: INVALID_RESPONSE ret={.regState = NOT_REG_MT_NOT_SEARCHING_OP, .rat = 0, .reasonDataDenied = 0, .maxDataCalls = 0, .cellIdentity = {.cellInfoType = NONE, .cellIdentityGsm = [], .cellIdentityWcdma = [], .cellIdentityCdma = [], .cellIdentityLte = [], .cellIdentityTdscdma = []}}

RILJ VOICE_REGISTRATION_STATE error: com.android.internal.telephony.CommandException: INVALID_RESPONSE ret={.regState = NOT_REG_MT_NOT_SEARCHING_OP, .rat = 0, .cssSupported = false, .roamingIndicator = 0, .systemIsInPrl = 0, .defaultRoamingIndicator = 0, .reasonForDenial = 0, .cellIdentity = {.cellInfoType = NONE, .cellIdentityGsm = [], .cellIdentityWcdma = [], .cellIdentityCdma = [], .cellIdentityLte = [], .cellIdentityTdscdma = []}}

-Rlog/RLOG-RIL SIGNAL_STRENG: requestSignalStrength must never return an error when radio is on
11-19 18:27:53.174 12280 12281 E RILC : RIL_onRequestComplete: invalid RIL_Token

11-19 18:56:48.393 14314 14315 I use-Rlog/RLOG-RIL RILC: [setRadioState]:oldState=1, newState=2
11-19 18:56:48.393 14314 14315 E RILC : radioStateChangedInd: radioService[0]->mRadioIndication == NULL

11-19 18:56:48.860 15441 15443 I use-Rlog/RLOG-RIL RILC: Re-opening after close
all of this errors happend periodically

I cannot upload file, so, part of my logcat (right part) :
11-19 18:43:16.649 14300 14300 D RILD : RIL Daemon Started from rild.c
11-19 18:43:16.649 14300 14300 D RILD : RILd param count=3
11-19 18:43:16.649 14300 14300 D RILD : RIL Daemon libpath is /vendor/lib64/libquectel-ril.so
11-19 18:43:16.650 14300 14300 D RILD : RIL Daemon dlopen success
11-19 18:43:16.651 14300 14300 D RILD : RIL DAEMON event loop started
11-19 18:43:16.651 14300 14300 D RILD : RIL_Init argc = 3 clientId = 0
11-19 18:43:16.651 14300 14300 D use-Rlog/RLOG-RIL RILC: Quectel RIL Version: Quectel_Android_RIL_Driver_V3.3.44
11-19 18:43:16.652 14300 14300 D use-Rlog/RLOG-RIL RILC: libquectel-ril build info: On branch master Your branch is up to date with ‘origin/master’. 7ce2c0a57c4211cb88bc7b5f6936831b235ba168 06/03/21_17:00:09
11-19 18:43:16.652 14300 14300 D use-Rlog/RLOG-RIL RILC: Compiled date: Jun 3 2021 time: 17:00:14
11-19 18:43:16.652 14300 14300 E use-Rlog/RLOG-RIL RILC: ‘/vendor/manifest.xml’ not exist.
11-19 18:43:16.652 14300 14300 D use-Rlog/RLOG-RIL RILC: 1.2
11-19 18:43:16.660 14300 14300 D use-Rlog/RLOG-RIL RILC: t-prop_value is 1
11-19 18:43:16.660 14300 14300 D use-Rlog/RLOG-RIL RILC: before_dot is 9
11-19 18:43:16.660 14300 14300 D use-Rlog/RLOG-RIL RILC: [ro.build.version.release]: [9.0]
11-19 18:43:16.660 14300 14300 D use-Rlog/RLOG-RIL RILC: Android Version: 90, RIL_VERSION: 12 / 12
11-19 18:43:16.660 14300 14300 D use-Rlog/RLOG-RIL RILC: [ro.build.description]: [msm8953_64_a6001-userdebug 9 PKQ1.190202.001 20211116.135508 release-keys]
11-19 18:43:16.660 14300 14300 D use-Rlog/RLOG-RIL RILC: [ro.hardware]: [qcom]
11-19 18:43:16.660 14300 14300 D use-Rlog/RLOG-RIL RILC: selinux maybe set Enforcing mode, use command getenforce to check
11-19 18:43:16.660 14300 14300 D use-Rlog/RLOG-RIL RILC: selinux maybe set Enforcing mode, use command “setenforce 0” to disable
11-19 18:43:16.660 14300 14300 I use-Rlog/RLOG-RIL RILC: clientID = 0
11-19 18:43:16.660 14300 14302 I use-Rlog/RLOG-RIL RILC: mainLoop Start
11-19 18:43:16.663 14300 14302 D use-Rlog/RLOG-RIL RILU: find quectel module /sys/bus/usb/devices/1-1 idVendor=2c7c idProduct=6002
11-19 18:43:16.663 14300 14302 D use-Rlog/RLOG-RIL RILU: find_usb_device is 1
11-19 18:43:17.668 14300 14302 D use-Rlog/RLOG-RIL RILU: find /sys/bus/usb/devices/1-1:1.3/ttyUSB1
11-19 18:43:17.669 14300 14302 D use-Rlog/RLOG-RIL RILU: ttyAT = ttyUSB1
11-19 18:43:17.669 14300 14302 D use-Rlog/RLOG-RIL RILU: find /sys/bus/usb/devices/1-1:1.2/ttyUSB0
11-19 18:43:17.669 14300 14302 D use-Rlog/RLOG-RIL RILU: ttyDM = ttyUSB0
11-19 18:43:17.670 14300 14302 D use-Rlog/RLOG-RIL RILC: quectel at port is /dev/ttyUSB1
11-19 18:43:17.670 14300 14302 D use-Rlog/RLOG-RIL RILC: s_device_path is /dev/ttyUSB1
11-19 18:43:17.673 14300 14302 D use-Rlog/RLOG-RIL RILC: open device /dev/ttyUSB1 correctly
11-19 18:43:17.673 14300 14302 E use-Rlog/RLOG-RIL ATC: at_open s_tild_reader = 524071798000
11-19 18:43:17.674 14300 14301 D use-Rlog/RLOG-RIL ATC: AT> ATE0Q0V1
11-19 18:43:17.676 14300 14304 D use-Rlog/RLOG-RIL ATC: AT< OK
11-19 18:43:18.178 14300 14301 D use-Rlog/RLOG-RIL ATC: AT> ATI
11-19 18:43:18.180 14300 14304 D use-Rlog/RLOG-RIL ATC: AT< Quectel
11-19 18:43:18.180 14300 14304 D use-Rlog/RLOG-RIL ATC: AT< EC200S
11-19 18:43:18.180 14300 14304 D use-Rlog/RLOG-RIL ATC: AT< Revision: EC200SENAAR03A01M16
11-19 18:43:18.180 14300 14304 D use-Rlog/RLOG-RIL ATC: AT< OK
11-19 18:43:18.180 14300 14301 D use-Rlog/RLOG-RIL RILC: ql_product_version is EC200SENAAR03A01M16
11-19 18:43:18.180 14300 14301 D use-Rlog/RLOG-RIL RILC: Quectel Product Revision: EC200SENAAR03A01M16
11-19 18:43:18.180 14300 14301 D use-Rlog/RLOG-RIL RILC: ASR Platform
11-19 18:43:18.180 14300 14301 D use-Rlog/RLOG-RIL ATC: AT> AT+CSUB;+CVERSION
11-19 18:43:18.183 14300 14304 D use-Rlog/RLOG-RIL ATC: AT< SubEdition: V03
11-19 18:43:18.183 14300 14304 D use-Rlog/RLOG-RIL ATC: AT< VERSION: EC200SENAAR03A01M16
11-19 18:43:18.183 14300 14304 D use-Rlog/RLOG-RIL ATC: AT< Dec 7 2020 10:06:43
11-19 18:43:18.183 14300 14304 D use-Rlog/RLOG-RIL ATC: AT< Authors: QCT
11-19 18:43:18.183 14300 14304 D use-Rlog/RLOG-RIL ATC: AT< OK
11-19 18:43:18.183 14300 14301 D use-Rlog/RLOG-RIL ATC: AT> ATE0Q0V1
11-19 18:43:18.185 14300 14304 D use-Rlog/RLOG-RIL ATC: AT< OK
11-19 18:43:18.185 14300 14301 D use-Rlog/RLOG-RIL ATC: AT> ATS0=0
11-19 18:43:18.187 14300 14304 D use-Rlog/RLOG-RIL ATC: AT< OK
11-19 18:43:18.187 14300 14301 D use-Rlog/RLOG-RIL ATC: AT> AT+QURCCFG=“URCPORT”,“usbat”
11-19 18:43:18.194 14300 14304 D use-Rlog/RLOG-RIL ATC: AT< OK
11-19 18:43:18.194 14300 14301 D use-Rlog/RLOG-RIL ATC: AT> AT&D2
11-19 18:43:18.196 14300 14304 D use-Rlog/RLOG-RIL ATC: AT< OK
11-19 18:43:18.196 14300 14301 D use-Rlog/RLOG-RIL ATC: AT> AT+CMEE=1
11-19 18:43:18.199 14300 14304 D use-Rlog/RLOG-RIL ATC: AT< OK
11-19 18:43:18.200 14300 14301 D use-Rlog/RLOG-RIL ATC: AT> AT+CREG=2
11-19 18:43:18.202 14300 14304 D use-Rlog/RLOG-RIL ATC: AT< OK
11-19 18:43:18.202 14300 14301 D use-Rlog/RLOG-RIL ATC: AT> AT+CGREG=2
11-19 18:43:18.204 14300 14304 D use-Rlog/RLOG-RIL ATC: AT< OK
11-19 18:43:18.204 14300 14301 D use-Rlog/RLOG-RIL ATC: AT> AT^DSCI=1
11-19 18:43:18.206 14300 14304 D use-Rlog/RLOG-RIL ATC: AT< OK
11-19 18:43:18.206 14300 14301 D use-Rlog/RLOG-RIL ATC: AT> AT+CFUN?
11-19 18:43:18.208 14300 14304 D use-Rlog/RLOG-RIL ATC: AT< +CFUN: 1
11-19 18:43:18.208 14300 14304 D use-Rlog/RLOG-RIL ATC: AT< OK
11-19 18:43:18.209 14300 14301 D use-Rlog/RLOG-RIL ATC: AT> AT+CPIN?
11-19 18:43:18.211 14300 14304 D use-Rlog/RLOG-RIL ATC: AT< +CPIN: READY
11-19 18:43:18.211 14300 14304 D use-Rlog/RLOG-RIL ATC: AT< OK
11-19 18:43:18.211 14300 14301 D use-Rlog/RLOG-RIL ATC: AT> AT+CFUN?
11-19 18:43:18.214 14300 14304 D use-Rlog/RLOG-RIL ATC: AT< +CFUN: 1
11-19 18:43:18.214 14300 14304 D use-Rlog/RLOG-RIL ATC: AT< OK

Does anybody know why is this errors happend? Or maybe someone may explain what is this errors mean (I mean it is the problem of compatible Quectel ril library and IRadio android interface or what?)?

PS also as a problem Serial nuber and IMEI in Settings doesnt show and TelephonyManager doesn’t start and no one message in logcat from this

Thanks…

I can see some errors about kernel driver porting. There should be 3 ttyUSB port and one network inteface.
But I only see two ttyUSB.
I guess you follow the _Quectel_LTE&5G_Linux_USB_Driver_User_Guide_V2.0.pdf to port driver to your Android. There are some mistakes for EC200S.

You can follow this to porting Linux Kernel Drivers to your Android.
EC200S Linux Help - IoT Modules / LTE Standard Module - Quectel Forums

I’ll sent you the lastest RIL library .

Thanks so much for your support, you are absolutely right about Quectel_LTE&5G_Linux_USB_Driver_User_Guide_V2.0.pdf. I will change my kernel like you advice and report the result.
I will wait for latest RIL library.

May you please explain, what I need to do to start TelephonyManager? Should I edit config.xml?
May you also please explain, is it necessary to mention android.hardware.radio.depercated IOemHook in manifest.xml? I didn’t mention that, because if I mention, it restarts the radio interface every 5 minutes (wifi, ril-daemon and etc) I have no idea how to fix this.

Normally it is because there are some other ril daemon running in background or some other errors.
As far as I know, on most Qualcomm platform there is already an RIL daemon running which name might be QCRIL.
If possible , you can upload the system log and radio log.

logs_and_changes.zip (393.5 KB)

You are right, qcrild starts by default. I edit init.class_main.sh to start only qcrild or vendor.ril-daemon. And I never start the both at the same time.
I am also tried start qcrild with libquectel-ril.so and edited vendor/qcom/proprietary/qcril-hal/qcrild/qcrild/rild.c. I am not see difference now with vendor.ril-daemon.Do you know which idea is better it is start vendor.ril-daemon or vendor.qcrild with ec200s?

I am attached logs _and_changes. It is my old logs, when I am not yet follow Quectel_LTE&5G_Linux_USB_Driver_User_Guide_V2.0.pdf and just add vid and pid in option.c (all changes are described in zip). Too mush errors in this logs.
Tomorrow, on your advice, I will edit the kernel and send new logs.

I have sent you some patches for Quectel smart module based on Qualcomm platform integrated with Quectel 5G module, you can take it as reference.
I can see some errors about IMS registration.
Try the latest RIL library. Turn on Android CONFIG_USB_NET_CDCETHER and CONFIG_USB_NET_RNDIS_HOST in defconfig. On Android 10, PPP dial-up is not required, ECM or RNDis is required.

Thanks so mush Bean.Wang-Q, I will try to figure out the reference. Wish me good luck!)

Dear Bean.Wang-Q,
I made adjustments: follow Quectel_EC200S_Linux_USB_Driver_User_Guide_V1.0.pdf, turn on CONFIG_USB_NET_CDCETHER and CONFIG_USB_NET_RNDIS_HOST, add some changes in .java files from patch references. I still have the errors, logs and descriptions attached (build-37 is with IOemHook-no, IRadio1.2-yes, IRadio1.0-no, build-38 is with IOemHook-yes, IRadio1.2-yes, IRadio1.0-yes).

Spoiler:
build-37 logs still have this:
RIL_onUnsolicitedResponse called before RIL_register
setRadioPower: serial -1287152393 on 0
RadioProxy 1.2 is null
INVALID_RESPONSE
REQUEST_NOT_SUPPORTED
build-38 logs still have this:
GET_HARDWARE_CONFIG error
Re-opening after close
Could not find service hosting interface android.hardware.radio.deprecated@1.0::IOemHook/slot1
Radio interface restart every 5 min

Build-37 logs look better, but as far as I understand these are some IRadio compatibility bugs for Android 9 and modem. Does Quectel_Android_RIL_Driver_V3.3.44 support IRadio1.2? You give advice on using the latest RIL library, I don’t have that. Where can I find this?

Do you have any ideas how to fix these modem problems? I need a help…

Thank you

build-37.zip (159.5 KB) build-38.zip (324.3 KB)

The kernel driver is of no problem.

The RIL library version may be a little old, or the module firmware version may be too old, causing some AT instructions not to be recognized.

11-22 16:35:02.068 9363 9365 D use-Rlog/RLOG-RIL ATC: really time out
11-22 16:35:02.068 9363 9365 E use-Rlog/RLOG-RIL ATC: warnning - moderm no response, retry ATE0Q0V1

Hi Bean.Wang-Q, thank you for suppurt. I use Quectel_Android_RIL_Driver_V3.3.40 version of reference ril and I found out this in logs:
01-14 12:59:32.903 11866 11866 D use-Rlog/RLOG-RIL RILC: requestGetIccCardStatus() getIccCardStatus_1_4,
but in manifest.xml I declared IRadio 1.2. Do you have ideas about this situation? How is possible to use 1.2 IRadio on modem side? When I declare IRadio 1.1. modem side works great, but I need 1.2 IRadio.

At the same log I have this:
01-14 12:58:40.712 11603 11603 D use-Rlog/RLOG-RIL RILC: Quectel RIL Version: Quectel_Android_RIL_Driver_V3.3.40
01-14 12:58:40.712 11603 11603 D use-Rlog/RLOG-RIL RILC: libquectel-ril build info: On branch master Your branch is up to date with ‘origin/master’. 5c4876b335f341046c09135cfbd0a11f2932bb7e 04/16/21_09:44:30
01-14 12:58:40.712 11603 11603 D use-Rlog/RLOG-RIL RILC: Compiled date: Apr 16 2021 time: 09:44:40
01-14 12:58:40.713 11603 11603 E use-Rlog/RLOG-RIL RILC: ‘/vendor/manifest.xml’ not exist.
01-14 12:58:40.713 11603 11603 D use-Rlog/RLOG-RIL RILC: 1.2
01-14 12:58:40.725 11603 11603 D use-Rlog/RLOG-RIL RILC: t-prop_value is 1
01-14 12:58:40.725 11603 11603 D use-Rlog/RLOG-RIL RILC: before_dot is 9
01-14 12:58:40.725 11603 11603 D use-Rlog/RLOG-RIL RILC: [ro.build.version.release]: [9.0]
01-14 12:58:40.725 11603 11603 D use-Rlog/RLOG-RIL RILC: Android Version: 90, RIL_VERSION: 12 / 12

As I can understand, libquectel-ril started with right IRadio version, but after that, during communication start to use IRadio 1_4. Do you have ideas about this behavior? Look like its not okay.

On Android 9,IRadio 1.2 is Okey.
Android 10/11 would use 1.4

Dear Bean and Ekaterina,

can share the patches for Quectel smart module based on Qualcomm platform integrated with Quectel 5G module?

i develop the RG520N into SDM845 qualcomm platfrom, but i don`t know how to deal with qcril and rild-daemon, wait for your reply.
thanks.

Hi Have you resolved it?