EM05-G Android Integration Problems / invalid ttyUSB used for AT

Hey,

we are trying to integrate the EM05-G 4G module into our android system.
Android Version 12.0
But we are facing problems.

ril version and status:

getprop | grep ril
[gsm.version.ril-impl]: [Quectel_Android_RIL_Driver_V3.5.13-20221027-tianqi_dirty]
[init.svc.ril-daemon]: [running]
[init.svc_debug_pid.ril-daemon]: [516]
[ril.function.dataonly]: [1]
[rild.libargs]: [-d]
[rild.libpath]: [/vendor/lib64/libquectel-ril.so]
[ro.boot.noril]: [false]
[ro.boottime.ril-daemon]: [10732597476]
[ro.ril.ecclist]: [112,911]
[vendor.rild.libpath]: [/vendor/lib64/librk-ril.so]

dmesg output shows the modem is discovered and the devices are created:

usb 5-1.4: new high-speed USB device number 3 using ehci-platform
usb 5-1.4: New USB device found, idVendor=2c7c, idProduct=030a, bcdDevice= 3.18
usb 5-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 5-1.4: Product: Quectel EM05-G
usb 5-1.4: Manufacturer: Quectel
option 5-1.4:1.3: GSM modem (1-port) converter detected
usb 5-1.4: GSM modem (1-port) converter now attached to ttyUSB0
option 5-1.4:1.2: GSM modem (1-port) converter detected
usb 5-1.4: GSM modem (1-port) converter now attached to ttyUSB1
option 5-1.4:1.5: GSM modem (1-port) converter detected
usb 5-1.4: GSM modem (1-port) converter now attached to ttyUSB2
cdc_mbim 5-1.4:1.0: cdc-wdm0: USB WDM device
cdc_mbim 5-1.4:1.0 wwan0: register 'cdc_mbim' at usb-fc880000.usb-1.4, CDC MBIM, 66:ad:99:88:e6:99

output of logcat -b radio -v time, this is cyclically printed

D/RILU    (  536): find quectel module /sys/bus/usb/devices/5-1.4 idVendor=2c7c idProduct=030a
D/RILU    (  536): find_usb_device is 1
D/RILU    (  536): find /sys/bus/usb/devices/5-1.4:1.2/ttyUSB2
D/RILU    (  536): ttyAT = ttyUSB2
D/RILU    (  536): find /sys/bus/usb/devices/5-1.4:1.5/ttyUSB3
D/RILU    (  536): ttyPPP = ttyUSB3
D/RILU    (  536): find /sys/bus/usb/devices/5-1.4:1.3/ttyUSB1
D/RILU    (  536): ttyDM = ttyUSB1
E/RILU    (  536): unknow bInterfaceClass=, bInterfaceSubClass=
D/ATC     (  536): AT> AT+CFUN=1,1
D/ATC     (  536): really time out

the EM05-g discoveres with 3 ttyUSB and one cdc-wbm0.
Shouldn’t the module come up with 4 ttyUSB ?

and i would guess:

ttyUSB1 (1.) → DM
ttyUSB2 (2.) → GPS NEMA
ttyUSB3 (3.) → AT

ttyUSB3 (4.) → PPP (but this device is missing)

but as we have the cdc-wdm0 i think we don’t need the PPP device is this correct ?

but somehow the ril discoveres the wrong ttyUSB for communication or ? its using ttyUSB1 but should use ttyUSB3

also i am missing ttyGPS = XXX the ril should also discover gps or ?

could someone give me a hint what we are dooing wrong ?

and could you please also send me the latest firmware for the em05-g module.

Thanks and best regards
Julian

we were able to get the modem up by fixing some parameters in the kenel.

option.c
wwan_qmi.c
wwan_qmi_q.c

As the modules comes up with 6 interfaces not 4 and the first 2 are missing in qmi mode.

but we are facing another problem now.

A-GPS is not working.

we “see” satelites but we can’t get a fix

also a-gps is not working

we created a gps.conf in /etc/ but this file is ignored …

regards

gps logs:

01-31 16:39:28.638 D/GPS ( 523): ql_gps_receive_cmd_from_gps_hal = {type=6, length=2}
01-31 16:39:28.638 D/GPS ( 523): onGPSStateChange = {type=6, length=2}
01-31 16:39:28.638 D/ATC ( 523): AT> AT+QGPS?
01-31 16:39:28.638 D/GPS ( 523): ql_gps_receive_cmd_from_gps_hal = {type=1, length=0}
01-31 16:39:28.642 D/ATC ( 523): AT< +QGPS: 0
01-31 16:39:28.642 D/GPS ( 523): ql_set_gnss_modle: the gnss mode is [Stand-alone] alerady.
01-31 16:39:28.642 D/GPS ( 523): onGPSStateChange = {type=1, length=0}
01-31 16:39:28.642 D/ATC ( 523): AT> AT+QGPS?
01-31 16:39:28.644 D/ATC ( 523): AT< +QGPS: 0
01-31 16:39:28.644 D/ATC ( 523): AT> AT+QGPS=1
01-31 16:39:28.652 D/ATC ( 523): AT> AT+QGPSXTRA=1
01-31 16:39:28.658 D/ATC ( 523): AT> AT+QGPSXTRADATA?
01-31 16:39:28.663 D/ATC ( 523): AT< +QGPSXTRADATA: 0,“1980/01/05,19:00:00”
01-31 16:39:28.663 E/GPS ( 523): ql_xtradata_inject_time :1980/1/5, 19:0:0
01-31 16:39:28.663 D/ATC ( 523): AT> AT+QGPSXTRA=0
01-31 16:39:28.671 E/GPS ( 523): start_xtra_expired ENTER
01-31 16:39:28.671 E/GPS ( 523): check_xtradata_file_durtime xtra_time :1980/1/5, 19:0:0
01-31 16:39:28.671 E/GPS ( 523): check_xtradata_file_durtime now_time:2023/1/31, 16:39:28
01-31 16:39:28.671 D/GPS ( 523): ql_send_to_gps_hal_thread start.
01-31 16:39:28.671 D/GPS ( 523): ql_send_to_gps_hal_thread end.
01-31 16:39:28.681 D/GPS ( 523): ql_gps_receive_cmd_from_gps_hal = {type=4, length=29}
01-31 16:39:28.771 E/GPS ( 523): start_xtra_expired EXIT
01-31 16:39:28.771 D/GPS ( 523): ql_send_to_gps_hal_thread start.
01-31 16:39:28.771 D/GPS ( 523): ql_send_to_gps_hal_thread end.
01-31 16:39:28.772 D/GPS ( 523): onGPSStateChange = {type=4, length=29}
01-31 16:39:28.772 D/GPS ( 523): ql_inject_time(time=1675182964431, timeReference=43716, uncertainty=10)
01-31 16:39:28.772 D/ATC ( 523): AT> AT+QGPSEND
01-31 16:39:28.776 D/ATC ( 523): AT> AT+QGPSXTRATIME=0, “2023/1/31,16:39:28”,1,1,10
01-31 16:39:28.781 D/ATC ( 523): AT> AT+QGPS=1

but supl host is not set and also xtra data is not pushed

also AT+QGPS = 1 shouldn’t this value be set to AT+QGPS=2 ?