RIL Library not provided by quectel

Hi,

We Added RIL library provided by the quectel team to our Android 9.0 and we compiled.

Then we checked whether library is loaded or not, with command given in user guide.

It is loaded according to document.

Then we checked version of library loaded, but it is printing nothing.(According to document if nothing prints, then library not given by quectel team)

Can you suggest me how to overcome this problem.

RIL Library loaded

iwg34m_8mm:/ # cat /init*.rc | grep ril-daemon
service ril-daemon /vendor/bin/hw/rild -l /vendor/lib64/libreference-ril.so

Version of RIL library

iwg34m_8mm:/ # getprop gsm.version.ril-impl

iwg34m_8mm:/ #
iwg34m_8mm:/ #

Do you get any reault by using

getprop | grep ril

Did you set:

vendor.rild.libargs 
vendor.rild.libpath

You should have some similar to:

Hi,

Thank you for your valuable support.
I din't get such a result if i am using below command.

iwg34m_8mm:/ # getprop | grep ril
[init.svc.ril-daemon]: [running]
[init.svc.vendor.ril-daemon]: [running]
[ro.boottime.ril-daemon]: [9507228625]
[ro.boottime.vendor.ril-daemon]: [9686903375]
[ro.radio.noril]: [yes]
[ro.ril.wake_lock_timeout]: [300]
iwg34m_8mm:/ # 
iwg34m_8mm:/ # 
iwg34m_8mm:/ # 
iwg34m_8mm:/ # getprop | grep gsm                                              
[gsm.current.phone-type]: [1]
[gsm.network.type]: [Unknown]
[gsm.operator.alpha]: []
[gsm.operator.iso-country]: []
[gsm.operator.isroaming]: [false]
[gsm.operator.numeric]: []

Can you suggest me how to set below two things:

vendor.rild.libargs
vendor.rild.libpath

Thank You,
Regards,
Sudarshan

1 Like

it depends on your Build Structure, you need to add multiple Parameters.
lemme show your my way to do it:

i placed all my stuff in /vendor/quectel/ec25

vendor/quectel/ec25$ cat BoardConfigPartial.mk

BUILD_WITH_EC25 := true
BOARD_HAS_GPS := true
BOARD_HAVE_DONGLE := true

vendor/quectel/ec25$ cat device-partial.mk

ifeq ($(BUILD_WITH_EC25),true)

PRODUCT_PACKAGES += \
       rild \

## check if needed

PRODUCT_COPY_FILES += \
        vendor/quectel/ec25/ril/libreference-ril.so:vendor/lib64/libquectel-ril.so \
        vendor/quectel/ec25/ril/ql-ril.conf:system/etc/ql-ril.conf \
        vendor/quectel/ec25/ril/chat:system/bin/chat \
        vendor/quectel/ec25/tools/QAndroidLog:system/bin/QAndroidLog \
        vendor/quectel/ec25/tools/QFirehose:system/bin/QFirehose \
        vendor/quectel/ec25/ril/ip-up:system/etc/ppp/ip-up \
        vendor/quectel/ec25/ril/ip-down:system/etc/ppp/ip-down \
        vendor/quectel/ec25/ril/atinout:system/bin/atinout \
        vendor/quectel/ec25/apns-conf.xml:system/etc/apns-conf.xml \
        frameworks/native/data/etc/android.hardware.telephony.cdma.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.cdma.xml \
        frameworks/native/data/etc/android.hardware.telephony.gsm.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.gsm.xml \
        frameworks/native/data/etc/android.software.sip.voip.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.sip.voip.xml \
        frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml \
        frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml

# RILD Related
PRODUCT_PROPERTY_OVERRIDES += \
        hw.nophone=no \
        ro.boot.noril=no \
        ro.radio.noril=no \
        ro.telephony.default_network=10 \
        vendor.rild.libpath=/vendor/lib64/libquectel-ril.so \
        vendor.rild.libargs=-d/dev/ttyUSB2 \
        keyguard.no_require_sim=true \
        ril.function.dataonly=0
#       ril.subscription.types=NV,RUIM \

# Phone Related
PRODUCT_PROPERTY_OVERRIDES += \
        persist.telephony.support.ipv6=1 \
        persists.telephony.support.ipv4=1 \
        telephony.lteOnGsmDevice=1 \
        telephony.lteOnCdmaDevice=0 \
        ro.telephony.call_ring.delay=0 \
        ro.ril.enable.amr.wideband=1 \
        ring.delay=0 \
        ro.config.vc_call_steps=20 \
        persist.cust.tel.eons=1 \
        ro.config.hw_fast_dormancy=1 \
        ro.radio.networkmode=enable \
        persist.audio.fluence.voicecall=false

PRODUCT_PROPERTY_OVERRIDES += \
        ro.HOME_APP_ADJ=1 \
        persist.sys.use_dithering=1 \
        ro.config.nocheckin=1 \
        persist.adb.tcp.port=5555 \
        hw.nobattery=true \
        ro.com.android.dataroaming=false
        ro.telephony.get_imsi_from_sim=true \
        ro.telephony.ril.config=simactivation

endif ### BUILD_WITH_EC25 ###

ifeq ($(BOARD_HAS_GPS),true)

PRODUCT_PACKAGES += \
        android.hardware.gnss@1.0-impl \
        android.hardware.gnss@1.0-service

PRODUCT_COPY_FILES += \
        vendor/quectel/ec25/gps/gps.default.so:vendor/lib64/hw/gps.default.so \
        vendor/quectel/ec25/gps/gps_cfg.inf:system/etc/gps_cfg.inf \
        vendor/quectel/ec25/gps/gps.cfg:system/etc/gps.cfg \
        frameworks/native/data/etc/android.hardware.location.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.location.xml \
        frameworks/native/data/etc/android.hardware.location.gps.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.location.gps.xml

PRODUCT_PROPERTY_OVERRIDES += \
    ro.kernel.android.gps=ttyUSB1 \
    ro.kernel.android.gps.speed=115200 \
    ro.kernel.android.gps.max_rate=1

endif ### BUILD_WITH_EC25_GPS ###

in your BoardConfig.mk

-include vendor/quectel/ec25/BoardConfigPartial.mk

in your device.mk

$(call inherit-product-if-exists, vendor/quectel/ec25/device-partial.mk)

  ifeq ($(BUILD_WITH_EC25),true)
    PRODUCT_COPY_FILES += \
        $(LOCAL_PATH)/init.quectel.rc:root/init.quectel.rc
    endif

in your init.device.rc

import init.quectel.rc

init.quectel.rc make shure you comment all other rild due duplicates

service vendor.ril-daemon /vendor/bin/hw/rild -l /vendor/lib64/libquectel-ril.so
    class main
    user root
    group radio vpn cache inet misc audio log readproc wakelock
    capabilities BLOCK_SUSPEND NET_ADMIN NET_RAW

# hardware/interfaces/gnss/1.0/default/android.hardware.gnss@1.0-service.rc
service gnss_service /vendor/bin/hw/android.hardware.gnss@1.0-service
    class hal
    user gps
    group system gps radio

in your manifest.xml

    <hal format="hidl">
        <name>android.hardware.broadcastradio</name>
        <transport>hwbinder</transport>
        <version>1.0</version>
        <interface>
            <name>IBroadcastRadioFactory</name>
            <instance>default</instance>
        </interface>
    </hal>
    <hal format="hidl">
        <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.1</version>
        <interface>
            <name>IRadio</name>
            <instance>slot1</instance>
        </interface>
        <interface>
            <name>ISap</name>
            <instance>slot1</instance>
        </interface>
    </hal>

Regards,

Brian

Hi,

Thank you for valuable support.
I did the changes as your instruction, and it is worked for me.

Hi,

Thank you for valuable support.
I did the changes as your instruction and it is worked for me.

  1. We tested call feature with quectel 4G module.
    We are able to call and able to receive the call but not audible.

    Can you suggest me the implementation procedure for voice over a USB.

  2. Also, we are interested to test GPS in android with Quectel 4G module.
    Can you please share the GPS related libraries and implementation procedure.

Thank You,
Regards,
Sudarshan

Hi Sudarshan,

for GPS you need to add GNSS HAL to manifest.xml

 <hal format="hidl">
        <name>android.hardware.gnss</name>
        <transport>hwbinder</transport>
        <version>1.0</version>
        <interface>
            <name>IGnss</name>
            <instance>default</instance>
        </interface>
    </hal>

the rest is already attached above and you should be good to go
ifeq ($(BOARD_HAS_GPS),true)

make shure gps.default.so in Folder as shown above and in gps_cfg.inf use

NMEA_PORT_PATH=rild-nmea

you should receive GPS Info via cat /dev/ttyUSB1 as defined above and during rild-nmea in GPS Tracker

For USB Audio Routing/Mixing/UAC in Android i´m in the same situation as you are.
i´m still waiting for Feedback from Quectel since to point only to EVB kit Audio HW without sample under Android is kinda useless.

As requested here EC25 LTE Voice Audio | Android 9.x
At least you should check the USB AUDIO UAC Manual to enable Audio Device as Card(N) under

rk3399:/proc/asound # ls -la
total 0
dr-xr-xr-x   5 root root 0 2020-07-23 12:43 .
dr-xr-xr-x 276 root root 0 1970-01-01 01:00 ..
lrwxrwxrwx   1 root root 5 2020-07-23 12:43 Android -> card2

and

rk3399:/dev/snd # ls -la
total 0
drwxr-xr-x  2 root   root       220 2020-07-12 16:59 .
drwxr-xr-x 19 root   root      1840 2020-07-12 16:59 ..
........    
crw-rw----  1 system audio 116,   7 2020-07-12 16:59 controlC2
.........
crw-rw----  1 system audio 116,   9 2020-07-12 16:59 pcmC2D0c
crw-rw----  1 system audio 116,   8 2020-07-12 16:59 pcmC2D0p
crw-rw----  1 system audio 116,  33 2020-07-12 16:59 timer

shown here as Control2 / pcmC2D0c / pcmC2D0p devices.

Device ID´s can be different due multiple Audio Devices depending on your Board.

Regards,

Brian

Hi,

Thank you for your valuable support.
Can you please share the below 3 files related to GPS.

1.gps.default.so
2.gps_cfg.inf
3.gps.cfg

Thank You,
Regards,
Sudarshan

i´ve attached the files to

http://www.mediafire.com/file/dn24phxkjr6bwmq/gps.zip/file

gps.default.so is arm64-v8a

Regards,

Brian

Hi,

Thank you for your valuable support.
We added the changes for GSM as you instructed, but in boot log we are getting below prints continuously.
And GSM not working.

[ 77.493455] init: starting service ‘vendor.gnss_service’…
[ 77.539830] init: Service ‘vendor.gnss_service’ (pid 3267) exited with status 1
[ 77.547188] init: Sending signal 9 to service ‘vendor.gnss_service’ (pid 3267) process group…
[ 77.556045] libprocessgroup: Successfully killed process cgroup uid 1021 pid 3267 in 0ms
[ 82.157049] init: starting service ‘gnss_service’…
[ 82.500369] init: starting service ‘vendor.gnss_service’…
[ 82.609871] init: Service ‘gnss_service’ (pid 3272) exited with status 1
[ 82.617303] init: Sending signal 9 to service ‘gnss_service’ (pid 3272) process group…
[ 82.625684] libprocessgroup: Successfully killed process cgroup uid 1021 pid 3272 in 0ms
[ 82.634232] init: Service ‘vendor.gnss_service’ (pid 3277) exited with status 1
[ 82.641661] init: Sending signal 9 to service ‘vendor.gnss_service’ (pid 3277) process group…
[ 82.650666] libprocessgroup: Successfully killed process cgroup uid 1021 pid 3277 in 0ms

Can you suggest me to over come this problem.

Thank you,
Regards,
Sudarshan.

Wait GNSS service starts twice
‘vendor.gnss_service’
and
‘gnss_service’
So somewhere you have duplicate entry, besides this what did you changed also due gsm was working before.

Rgds,

Brian

Hi,

Thank you for your valuable support.
We did the changes as your instruction for testing GPS in android.

In boot log if we enter below command it will show like,

iwg34m_8mm:/ # getprop | grep gps
[persist.sys.gps.lpp]: [0]
[ro.kernel.android.gps]: [ttyUSB1]
[ro.kernel.android.gps.max_rate]: [1]
[ro.kernel.android.gps.speed]: [115200]
iwg34m_8mm:/ #
iwg34m_8mm:/ #
iwg34m_8mm:/ #
iwg34m_8mm:/ # getprop | grep gnss
[init.svc.gnss_service]: [running]
[init.svc.vendor.gnss_service]: [running]
[ro.boottime.gnss_service]: [11865840875]
[ro.boottime.vendor.gnss_service]: [12452596500]

  1. Whether same result you observed as above.? if not share your above two command prints?

  2. Can you please share me how you test GPS in android.?

  3. For EC25 quectel module which GPS antenna you are connected(part number)?

We tested with google map and GPS TEST v1.5.4.APK file, but we din’t get the expected behavior.

.

Thank you,
Regards,
Sudarshan

For my project i´m using this this GPS Antenna:

and that LTE Antenna:

the Android properties:

rk3399:/ # getprop | grep gps
[persist.sys.gps.lpp]: [0]
[ro.kernel.android.gps]: [ttyUSB1]
[ro.kernel.android.gps.max_rate]: [1]
[ro.kernel.android.gps.speed]: [115200]
rk3399:/ # getprop | grep gnss
[init.svc.vendor.gnss_service]: [running]
[ro.boottime.vendor.gnss_service]: [6167597595]
rk3399:/ #   

comment or remove 2nd gnss_service in init.quectel.rc (commented it in my latest code) since it is called in

hardware/interfaces/gnss/1.0/default/android.hardware.gnss@1.0-service.rc

rk3399:/ # cat init.quectel.rc
# hardware/ril/rild/rild.rc
service vendor.ril-daemon /vendor/bin/hw/rild -l /vendor/lib64/libquectel-ril.so
    class main
    user root
    group radio vpn cache inet misc audio log readproc wakelock
    capabilities BLOCK_SUSPEND NET_ADMIN NET_RAW

# hardware/interfaces/gnss/1.0/default/android.hardware.gnss@1.0-service.rc
#service gnss_service /vendor/bin/hw/android.hardware.gnss@1.0-service
#    class hal
#    user gps
#    group system gps radio
rk3399:/ #

for fixing you should check GPS Accuracy

https://ridewithgps.com/help/improving-gps-accuracy

Hi,

Thank you for your valuable support.
We aslo tested GPS, for us it is working.

Now we are testing voice over USB with AT command.
We are able to call and receive the call with AT command, but it is not audible.

  1. Have you tested voice over a USB with AT command.?

  2. If you are tested, Can you please share the changes.?

Thank You,
Regards,
Sudarshan

As i’ve already told you above that i’m also stuck at this point. I’m not related to quectel in any form and waiting also for reply from them.

Regards,

Brian

Hi,

Thank you for your valuable support.

One more question related to GPS.

Are you able to find the location with Google map?

For me with GPS TEST v1.5.4.APK file i am able to find the location, but with google map i am not able to find the location.

Thank You,
Regards,
Sudarshan

Post your code for gps implementation and I’ll look into it.

Rgds,
Brian

Hi,

Thank you for your valuable support.
Kindly check the attached GPS.png.

file.

Thank you,
Regards,
Sudarshan

what bout that stuff

frameworks/native/data/etc/android.hardware.location.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.location.xml \ frameworks/native/data/etc/android.hardware.location.gps.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.location.gps.xml

and

[ro.kernel.android.gps]: [ttyUSB1]
[ro.kernel.android.gps.max_rate]: [1]
[ro.kernel.android.gps.speed]: [115200]

and so on…

Hi,
Thank you for your valuable support.
Can you please recheck the below changes once.(Related to GPS)

with the below changes also i am not able to get the location in google map.(We are testing google map in browser not in GoogleMap Android application.)

Thank you,
Regards,
Sudarshan