subash
October 9, 2024, 4:59am
1
Hi Quectel team,
I,m using IMX8qxp custom board, I added the following services in my init.rc file but i can’t able to confirm if the gps is working or not what are the further steps need to take to identitify its working or not?
init.rc file
service gnss_service /vendor/bin/hw/android.hardware.gnss@1.0-service
class hal
user gps
group system gps radio
xml file
<hal format="hidl">
<name>android.hardware.gnss</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IGnss</name>
<instance>default</instance>
</interface>
</hal>
device.mk file
PRODUCT_COPY_FILES += \
vendor/gps.default.so:vendor/lib64/hw/gps.default.so \
vendor/gps_cfg.inf:system/etc/gps_cfg.inf \
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
PRODUCT_PACKAGES += \
android.hardware.gnss@1.0-impl \
android.hardware.gnss@1.0-service
Thanks,
subash
Please check something on your device.
getprop | grep gnss
ps -efl | grep gnss
And show me the log
logcat -b all | grep gps
subash
October 9, 2024, 10:22am
3
Bean.Wang-Q:
logcat -b all | grep gps
getprop | grep gnss log
mek_8q:/dev # getprop | grep gnss
WARNING: linker: Warning: "[vdso]" unused DT entry: unknown processor-specific (type 0x70000001 arg 0x0) (ignoring)
WARNING: linker: Warning: "[vdso]" unused DT entry: unknown processor-specific (type 0x70000001 arg 0x0) (ignoring)
[init.svc.gnss_service]: [running]
[init.svc_debug_pid.gnss_service]: [406]
[ro.boottime.gnss_service]: [27308752875]
ps -efl | grep gnss
mek_8q:/dev # ps -efl | grep gnss
WARNING: linker: Warning: "[vdso]" unused DT entry: unknown processor-specific (type 0x70000001 arg 0x0) (ignoring)
WARNING: linker: Warning: "[vdso]" unused DT entry: unknown processor-specific (type 0x70000001 arg 0x0) (ignoring)
gps 406 1 52 13:41:47 ? 00:03:39 android.hardware.gnss@1.0-service
root 3387 651 3 13:48:50 ttyLP0 00:00:00 grep gnss
logcat -b all | grep gps log file attached below
gps_logcat.txt (434.3 KB)
Thanks,
subash
Line 76: 10-07 13:46:56.004 406 1169 D gps_ql : Unknow and ERROR GPS channel <>
It is because that you do not add the gps_cfg.inf or you do not set the right NEMA port.
Please check the gps_cfg.inf.
subash
October 9, 2024, 11:19am
5
Hi @Bean.Wang-Q
I will attach the gps_cfg.inf and where did i placed this file below
PRODUCT_COPY_FILES += \
vendor/gps.default.so:vendor/lib64/hw/gps.default.so \
vendor/gps_cfg.inf:system/etc/gps_cfg.inf \
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
gps.txt (1.8 KB)
Thanks,
subash
#you can modify this config file to adapt your demand.
#the line start with ';' means not support
#the line start with '#' means use default config
#if use gps only module via uart MODULE_TYPE must be configured
;MODULE_TYPE=
;NMEA_PORT_PATH=rild-nmea
;RMC_HZ=1
NMEA_PORT_PATH=/dev/ttyUSB1
BAUD_RATE=115200
;DATA_BITS=8
;STOP_BITS=1
;PARITY_TYPE=N
;FLOW_CONTROL=N
;LOG_LEVEL=LOG_DEBUG
;LOG_TYPE=
;LOG_PATH=
;FUNC_NMEA=
;FUNC_XTRA=
;FUNC_AGPS
;I2C_ADDR=
;NMEA_LOG_LEVEL=
;libcutils_path=
1 Like
subash
October 9, 2024, 12:29pm
7
Hi @Bean.Wang-Q
I think GPS is successfully enabled is it?
10-09 11:58:41.530 390 756 D gps_ql : open GPS channel </dev/ttyUSB1> successful!
What’s the next steps to know the lattitude and longitude ?
Thanks,
subash
You should enable the nmea output.
echo -ne "at+qgps=1\r" > /dev/ttyUSB2
Then if you open the gps apk you can see the nmea.
subash
October 9, 2024, 12:42pm
9
Can i use the google map APK for testing.
Thanks,
subash.
Yes. You can open the Google MAP.
subash
October 10, 2024, 2:19am
11
Hi @Bean.Wang-Q
Can i get the Coordinates, date and time from GPS in the logcat?
Thanks,
Subash
Yes. As I think.
But the GPS can open obtain the location outdoor.
1 Like
subash
October 10, 2024, 3:28am
13
Hi @Bean.Wang-Q
U mean it will print automatically latitude and longitude in logcat or need to send a AT command to print those things?
Thanks,
Subash
Please Provide the logcat -b all.
You can see it.
1 Like
subash
October 10, 2024, 5:16am
15
Hi @Bean.Wang-Q
Note : I didn’t install the MAP apk (i can’t able to access the screen)
logcat_all.txt (1.3 MB)
Thanks,
subash
Only when you open the gps apk, you can see the nmea log from the logcat.
For this modem, by default there is no nmea output, maybe you can add
#LTE_Is_Report_SignalStrength=1
At_Cmds_For_Customer_Initialize=AT+QGPS=1
#Icc_Constants=EF_ICCID
in the ql_ril.conf
to enable the modem nmea output.
1 Like
subash
October 10, 2024, 6:18am
17
Hi @Bean.Wang-Q
Thank you for your support i can see ttyUSB6 has been opened for nmea output I will share the logcat when i install the map apk.
Thanks,
subash.
I think what you tried is the EC200U but not the EC20. They are not the same.
For EC20 it is ttyUSB1 as GPS uart port.
subash
October 10, 2024, 6:37am
19
Hi @Bean.Wang-Q
Yes my module is EC200U-CN, I thought both are same.
Thanks,
subash
subash
October 10, 2024, 7:11am
20
Hi @Bean.Wang-Q
I will attach the log of logcat -b all | grep gps
below.
logcat_all.txt (10.4 KB)
Thanks,
subash