EM12-G RIL integration with Android 10 NXP iMX8M

I’ve followed the Quectel_Android_RIL_Driver_User_Guide_V1.9.pdf and the referenced Quectek_Android_RIL_Driver_User_Guide_V1.9.pdf to integrate the RIL into our NXP iMX8M-based Android 10 device.

The AT commands and responses in the log indicate that it is mostly working:

  • It is registered on its home network.
  • It has a signal strength.
  • It has devices /dev/ttyUSB0…3 and /dev/cdc-wdm0.
  • It has a network interface “wwan0”.
  • It does not have an IP address.
  • There is no signal strength indicator in the top bar.
  • There is no mobile network UI under Settings.

The logs contain 4 remaining items of concern:

== ql-ril.conf ==

02-09 02:04:09.297 D/use-Rlog/RLOG-RIL RIL_READ_CONF( 3489): since ‘/system/etc/ql-ril.conf’ doesn’t exsits using ‘/vendor/etc/ql-ril.conf’ but it still doesn’t exsits program panic here!

Neither of these files exist, and they are not mentioned in the documentation.

== manifest.xml ==

02-09 02:04:09.297 E/use-Rlog/RLOG-RIL RILC( 3489): ‘/vendor/manifest.xml’ not exist.

This file does not exist. The changes which the RIL documentation instructed me to make:

chris@server:~/android/smarcimx8mq/q_1000_100/android_build$ diff ./device/embedian/imx8m/smarc_mx8mq/manifest.xml.orig ./device/embedian/imx8m/smarc_mx8mq/manifest.xml
2a3,20

<name>android.hardware.radio.deprecated</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
    <name>IOemHook</name>
    <instance>slot1</instance>
</interface>
</hal>
<hal format="hidl">
<name>android.hardware.radio</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
    <name>IRadio</name>
    <instance>slot1</instance>
</interface>
</hal>
<hal format="hidl">

are present in /vendor/ etc/vintf/ manifest.xml.

== /proc/cmdline ==

02-09 02:04:35.975 D/TelephonyManager( 3419): No /proc/cmdline exception=java.io.FileNotFoundException: /proc/cmdline: open failed: EACCES (Permission denied)

At a first glance, the permissions look OK. (I have stopped SE Linux from enforcing while I get the RIL working, so it’s not that.)

smarc_mx8mq:/ # ls -lA /proc/cmdline
-r–r----- 1 root radio 0 2021-02-09 02:04 /proc/cmdline

== IMSI error ==

02-09 02:04:36.700 E/TelephonyManager( 3663): IMSI error: Subscriber Info is null

A SIM is present in the correct slot, and I can get the IMSI with AT+CIMI.

Which of these are stopping the RIL for getting an address for wwan0?

Which of these, or otherwise what, is stopping the Android UI from displaying a signal strength indicator?

P.S. I cannot post the full log, as this site complains about the length. I cannot upload it as it doesn’t accept .txt, only .jpg, .pdf and others.

Hi,
Thanks for your query in Quectel forums.

  1. The signal strength does not mean that the module can access the Internet. You can try to use wwan0 to ping the website first to see if the packet can be pinged
  2. Use AT+COPS? and AT+CEREG? commands to query the betting network status.
    thanks.

HI Chrisdew,

Are you still facing this issue? I am facing the same issue.
Let me know if you have any workaround.

Thanks in advance,
Keval

I’ve fixed the first three issues, but have ended up with many AT command failures now.

== ql-ril.conf ==
== manifest.xml ==

These can be fixed by creating a /vendor/etc/ql-ril.conf file containing only:

manifest_path=/vendor/etc/vintf/manifest.xml

== /proc/cmdline ==

Fixed by prepending:

on late-init
    chmod a+r /proc/cmdline

to hardware/ril/rild/rild.rc.

Hi Keval, I’ve made some progress: EM12-G RIL integration with Android 10 NXP iMX8M, part 2

I’ve made some progress: EM12-G RIL integration with Android 10 NXP iMX8M, part 2

  • The signal strength does not mean that the module can access the Internet. You can try to use wwan0 to ping the website first to see if the packet can be pinged
smarc_mx8mq:/ # ip a | grep wwan0 -A5                                                                                                 
9: wwan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1358 qdisc pfifo_fast state UNKNOWN group default qlen 1000
    link/ether 36:99:50:80:ec:8c brd ff:ff:ff:ff:ff:ff
    inet 10.95.207.21/30 brd 10.95.207.23 scope global wwan0
       valid_lft forever preferred_lft forever
    inet6 fe80::3499:50ff:fe80:ec8c/64 scope link
       valid_lft forever preferred_lft forever

smarc_mx8mq:/ # ip route show
10.95.207.20/30 dev wwan0 proto kernel scope link src 10.95.207.21

We can add it:

smarc_mx8mq:/ # ip route add default via 10.95.207.22 dev wwan0                                                                       
smarc_mx8mq:/ # ip route show                                                                                                         
default via 10.95.207.22 dev wwan0
10.95.207.20/30 dev wwan0 proto kernel scope link src 10.95.207.21

but the far side doesn’t ping:

smarc_mx8mq:/ # ping 10.95.207.22
PING 10.95.207.22 (10.95.207.22) 56(84) bytes of data.
From 10.95.207.21: icmp_seq=1 Destination Host Unreachable
From 10.95.207.21: icmp_seq=2 Destination Host Unreachable
From 10.95.207.21: icmp_seq=3 Destination Host Unreachable
^C
--- 10.95.207.22 ping statistics ---
4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3071ms
pipe 4
  • Use AT+COPS? and AT+CEREG? commands to query the betting network status.
chris@cyan:~$ grep -i AT+COPS quectel_debug_log/*radio*
03-05 02:53:47.447 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS=3,0;+COPS?;+COPS=3,1;+COPS?;+COPS=3,2;+COPS?
03-05 02:53:47.450 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS?
03-05 02:53:47.453 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS=3,0;+COPS?;+COPS=3,1;+COPS?;+COPS=3,2;+COPS?
03-05 02:53:47.457 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS?
03-05 02:53:48.119 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS=3,0;+COPS?;+COPS=3,1;+COPS?;+COPS=3,2;+COPS?
03-05 02:53:48.125 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS?
03-05 02:53:48.133 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS=3,2;+COPS?
03-05 02:53:48.139 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS=3,2;+COPS?
03-05 02:53:48.237 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS=3,0;+COPS?;+COPS=3,1;+COPS?;+COPS=3,2;+COPS?
03-05 02:53:48.245 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS?
03-05 02:53:52.243 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS=3,0;+COPS?;+COPS=3,1;+COPS?;+COPS=3,2;+COPS?
03-05 02:53:52.246 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS?
03-05 02:53:52.293 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS?
03-05 02:53:53.680 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS=3,2;+COPS?
03-05 02:53:56.807 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS=3,0;+COPS?;+COPS=3,1;+COPS?;+COPS=3,2;+COPS?
03-05 02:53:56.814 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS?
03-05 02:54:06.935 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS=3,0;+COPS?;+COPS=3,1;+COPS?;+COPS=3,2;+COPS?
03-05 02:54:06.940 D/use-Rlog/RLOG-RIL ATC( 3426): AT> AT+COPS?
chris@cyan:~$ grep -i AT+CEREG quectel_debug_log/*radio*
chris@cyan:~$

AT+COPS?
+COPS: 0,2,"23420",7

OK

AT+CEREG?
+CEREG: 0,1

OK