GNSS HIDL service error EDGE, VIM1 & 2

@Terry @goenjoy
I added GNSS hidl service in Android 10 EDGE source, but if I add it in device\rockchip\rk3399\device.mk board does not boot on UI and reboots periodically.
I built Android Pie ROM for EDGE and added GNSS hidl service, board has “process system isn’t responding” error. It works perfect on old source.
ALSO I built Pie ROM for VIM1 and VIM2 from latest source with HIDL service. This boards have “process system isn’t responding” error too!!! But VIM3 works good…

How to fix it?

@davemf The system needs to have

/vendor/lib64/hw/gps.default.so

In addition, if not, you need to post the log directly here:
image

Yes, ROM has gps.default.so in /vendor/lib64/hw/gps.default.so and /vendor/lib/hw/gps.default.so

@davemf What about log???

Sorry, I’ll add it in the evening.

I have checked this issue. The HILD service needs to right gps library. If gps library is not work, service is crash. GNSS HIDL service works on EDGE now.
Your gps library does not work.
It sends messages: “could not open gps serial device : Bad file descriptor”

If I fix “file descriptor” issue, library crash after receive the second message from GPS receiver.

crash log

08-11 20:30:28.190 4483 4483 D gps_serial: GPS dev open_gps
08-11 20:30:28.191 4483 4483 D gps_serial: GPS dev get_hardware_interface
08-11 20:30:28.200 4483 4483 D gps_serial: serial_gps_init
08-11 20:30:28.200 4483 4483 D gps_serial: gps_state_init
08-11 20:30:28.200 4483 4483 I gps_serial: ro.kernel.android.gps = ttyUSB0
08-11 20:30:28.211 4483 4483 I gps_serial: USB GPS node path = /sys/class/tty/ttyUSB0/device/uevent
08-11 20:30:28.212 4483 4483 D gps_serial: GPS will read from DRIVER=pl2303
08-11 20:30:28.212 4483 4483 E gps_serial: Setting gps baud rate to 9600
08-11 20:30:28.212 4483 4483 D gps_serial: GPS state initialized
08-11 20:30:28.213 4483 4484 D gps_serial: GPS thread running
08-11 20:30:28.213 4483 4484 D gps_serial: GPS control fd event
08-11 20:30:28.213 4483 4484 D gps_serial: GPS thread quitting on demand
08-11 20:30:28.490 4483 4483 D gps_serial: serial_gps_init
08-11 20:30:28.491 4483 4483 D gps_serial: gps_state_init
08-11 20:30:28.491 4483 4483 I gps_serial: ro.kernel.android.gps = ttyUSB0
08-11 20:30:28.502 4483 4483 I gps_serial: USB GPS node path = /sys/class/tty/ttyUSB0/device/uevent
08-11 20:30:28.503 4483 4483 D gps_serial: GPS will read from DRIVER=pl2303
08-11 20:30:28.503 4483 4483 E gps_serial: Setting gps baud rate to 9600
08-11 20:30:28.504 4483 4483 D gps_serial: GPS state initialized
08-11 20:30:28.504 4483 4485 D gps_serial: GPS thread running
08-11 20:30:28.504 451 470 E GnssLocationProvider: android_location_GnssLocationProvider_set_agps_server: AGPS interface not supported
08-11 20:30:28.507 451 470 E GnssLocationProvider: android_location_GnssLocationProvider_set_agps_server: AGPS interface not supported
08-11 20:30:28.618 4483 4485 D gps_serial: Received: '$GPGGA,205909.000,5619.5564,N,04355.8068,E,1,9,1.22,94.7,M,9.4,M,5C
08-11 20:30:28.618 4483 4485 D gps_serial: ’
08-11 20:30:28.619 4483 4485 D gps_serial: Found 14 tokens
08-11 20:30:28.619 4483 4485 D gps_serial: 0: ‘GPGGA’
08-11 20:30:28.619 4483 4485 D gps_serial: 1: ‘205909.000’
08-11 20:30:28.620 4483 4485 D gps_serial: 2: ‘5619.5564’
08-11 20:30:28.620 4483 4485 D gps_serial: 3: ‘N’
08-11 20:30:28.620 4483 4485 D gps_serial: 4: ‘04355.8068’
08-11 20:30:28.620 4483 4485 D gps_serial: 5: ‘E’
08-11 20:30:28.620 4483 4485 D gps_serial: 6: ‘1’
08-11 20:30:28.620 4483 4485 D gps_serial: 7: ‘9’
08-11 20:30:28.620 4483 4485 D gps_serial: 8: ‘1.22’
08-11 20:30:28.620 4483 4485 D gps_serial: 9: ‘94.7’
08-11 20:30:28.620 4483 4485 D gps_serial: 10: ‘M’
08-11 20:30:28.620 4483 4485 D gps_serial: 11: ‘9.4’
08-11 20:30:28.620 4483 4485 D gps_serial: 12: ‘M’
08-11 20:30:28.620 4483 4485 D gps_serial: 13: ‘’
08-11 20:30:28.620 4483 4485 D gps_serial: Sending fix lat=56.3259 lon=43.9301 altitude=94.7 accuracy=1.22 time=Fri Aug 9 09:50:00 52582
08-11 20:30:28.620 4483 4485 D gps_serial:
08-11 20:30:28.674 4483 4485 D gps_serial: Received: '$GNGSA,A,3,18,13,30,07,05,27,1.55,1.22,0.94
1E
08-11 20:30:28.674 4483 4485 D gps_serial: ’
08-11 20:30:28.756 4488 4488 F DEBUG : #05 pc 0000000000003104 /vendor/lib64/hw/gps.default.so (gps_state_thread+2220) (BuildId: f33ab3998d104d5c55d60a313ba998d2)

it crashs on:

if (_gps_state->init)
_gps_state->callbacks->nmea_cb(tv.tv_sec*1000+tv.tv_usec/1000, r->in, r->pos);

@davemf You mean edge Android 10.0 is OK now, right?

Yes, EDGE works good.

@davemf VIM1 & 2 You can consult @jasonl Please follow up on the question here.

1 Like

@davemf what is the problem of vim2 $vim2 now ?

I’m not sure about VIM1,2. I just built ROM and sent it to users to test. And they sent to me this picture. I have not VIM1, 2 now. I think it is gps library issue.

+#gnss hal
+PRODUCT_PACKAGES += \

  • android.hardware.gnss@1.0 \
  • android.hardware.gnss@1.0-impl \
  • android.hardware.gnss@1.0-service

these so are you all added?

Yes, after that it has issue.
I’ll get Vim1 & 2 boards on new week.

your problem is “process system isn’t responding” ?

Yes. It happens when gps library does not work.

you can check * android.hardware.gnss@1.0 \

  • android.hardware.gnss@1.0-impl \
  • android.hardware.gnss@1.0-service and gps so