tianmuting 发表于 2022-2-8 15:28:36

使用Android11的环境,添加GPS模块。

RK3568开发板使用默认固件0812版本,GPSiTset apk。使用贵公司发布的固件测试GPS模块,有报错。另外自己添加gps.default.so也有报错。
下面列出了两个报错,望高手指点,万分感谢。

(1)使用2021.8.12 发布的固件版本,gps有报错,如下
02-08 07:06:11.948   158   158 I hwservicemanager: getTransport: Cannot find entry android.hardware.gnss@2.1::IGnss/default in either framework or device manifest.
02-08 07:06:11.950   158   158 I hwservicemanager: getTransport: Cannot find entry android.hardware.gnss@2.0::IGnss/default in either framework or device manifest.
02-08 07:06:11.953   158   158 I hwservicemanager: getTransport: Cannot find entry android.hardware.gnss@1.1::IGnss/default in either framework or device manifest.
02-08 07:06:11.981   273   273 E GnssHAL_GnssInterface: getExtensionXtra: Gnss interface is unavailable
02-08 07:06:11.982   273   273 E GnssHAL_GnssInterface: getExtensionAGnssRil: Gnss interface is unavailable
02-08 07:06:11.982   273   273 E GnssHAL_GnssInterface: getExtensionAGnss: Gnss interface is unavailable
02-08 07:06:11.982   273   273 E GnssHAL_GnssInterface: getExtensionGnssNavigationMessage: Gnss interface is unavailable
02-08 07:06:11.982   273   273 E GnssHAL_GnssInterface: getExtensionGnssMeasurement: Gnss interface is unavailable
02-08 07:06:11.982   273   273 E GnssHAL_GnssInterface: getExtensionGnssDebug: Gnss interface is unavailable
02-08 07:06:11.982   273   273 E GnssHAL_GnssInterface: getExtensionGnssNi: Gnss interface is unavailable
02-08 07:06:11.982   273   273 E GnssHAL_GnssInterface: getExtensionGnssConfiguration: Gnss interface is unavailable
02-08 07:06:11.982   273   273 E GnssHAL_GnssInterface: getExtensionGnssGeofencing: Gnss interface is unavailable
02-08 07:06:11.983   273   273 E GnssHAL_GnssInterface: getExtensionGnssBatching: Gnss interface is unavailable
02-08 07:06:11.983   273   273 E GnssHAL_GnssInterface: setCallback: Gnss interface is unavailable
02-08 07:06:11.993   273   273 E GnssHAL_GnssInterface: setCallback: Gnss interface is unavailable
02-08 07:06:11.997   273   273 E GnssHAL_GnssInterface: setCallback: Gnss interface is unavailable
02-08 07:06:12.607   273   273 E GnssHAL_GnssInterface: setCallback: Gnss interface is unavailable

(2)新增gps.default.so文件。报错如下:
02-08 06:38:55.392   331   331 F DEBUG   :       #02 pc 000000000001405c/vendor/lib64/hw/android.hardware.gnss@1.0-impl.so (HIDL_FETCH_IGnss+44) (BuildId: 0a86f6c383349d66bee638c
268320615)
02-08 06:38:59.895   468   468 F DEBUG   :       #02 pc 000000000001405c/vendor/lib64/hw/android.hardware.gnss@1.0-impl.so (HIDL_FETCH_IGnss+44) (BuildId: 0a86f6c383349d66bee638c
268320615)
02-08 06:39:04.925   546   546 F DEBUG   :       #02 pc 000000000001405c/vendor/lib64/hw/android.hardware.gnss@1.0-impl.so (HIDL_FETCH_IGnss+44) (BuildId: 0a86f6c383349d66bee638c
268320615)
02-08 06:39:06.469   157   157 I hwservicemanager: getTransport: Cannot find entry android.hardware.gnss@2.1::IGnss/default in either framework or device manifest.
02-08 06:39:06.470   157   157 I hwservicemanager: getTransport: Cannot find entry android.hardware.gnss@2.0::IGnss/default in either framework or device manifest.
02-08 06:39:06.472   157   157 I hwservicemanager: getTransport: Cannot find entry android.hardware.gnss@1.1::IGnss/default in either framework or device manifest.
02-08 06:39:06.474   157   157 I hwservicemanager: Since android.hardware.gnss@1.0::IGnss/default is not registered, trying to start it as a lazy HAL.
02-08 06:39:06.475   157   157 I hwservicemanager: Since android.hardware.gnss@1.0::IGnss/default is not registered, trying to start it as a lazy HAL.
02-08 06:39:06.475   447   447 I HidlServiceManagement: getService: Trying again for android.hardware.gnss@1.0::IGnss/default...

luwy 发表于 2022-2-9 09:16:59

1.推荐更新到最新版的固件 https://www.t-firefly.com/doc/download/103.html
2.新增gps.default.so 位置是否正确,自己的gps.default.so 放到/vendor/lib/hw/和/vendor/lib64/hw/

tianmuting 发表于 2022-2-15 16:55:33

问题已经解决:
1. firefly 已经实现 GNSS1.0
2. 使用自己开发的gps.default.so文件,每个函数都要实现,不能为空。否则crash

songyachao 发表于 2022-4-27 20:11:43

luwy 发表于 2022-2-9 09:16
1.推荐更新到最新版的固件 https://www.t-firefly.com/doc/download/103.html
2.新增gps.default.so 位置 ...

请问是怎么添加自己的gsp.default.so的呢,新手不太懂这些,我现在编译出来一个gps.90.so,位置也在vendor目录下的对应位置,开机的时候没有进入这个判断, private void loadProvidersLocked() {
      // create a passive location provider, which is always enabled
      PassiveProvider passiveProvider = new PassiveProvider(this);
      addProviderLocked(passiveProvider);
      mEnabledProviders.add(passiveProvider.getName());
      mPassiveProvider = passiveProvider;
      Log.e(TAG, "in locationMS GnssLocationProvider.isSupported()=" +GnssLocationProvider.isSupported());
      if (GnssLocationProvider.isSupported()) {
            // Create a gps location provider
            Log.e(TAG, "in location MSloadProvidersLocked add GPS Provider");
            GnssLocationProvider gnssProvider = new GnssLocationProvider(mContext, this,
                  mLocationHandler.getLooper());
            mGnssSystemInfoProvider = gnssProvider.getGnssSystemInfoProvider();
            mGnssBatchingProvider = gnssProvider.getGnssBatchingProvider();
            mGnssMetricsProvider = gnssProvider.getGnssMetricsProvider();
            mGnssStatusProvider = gnssProvider.getGnssStatusProvider();
            mNetInitiatedListener = gnssProvider.getNetInitiatedListener();
            addProviderLocked(gnssProvider);
            mRealProviders.put(LocationManager.GPS_PROVIDER, gnssProvider);
            mGnssMeasurementsProvider = gnssProvider.getGnssMeasurementsProvider();
            mGnssNavigationMessageProvider = gnssProvider.getGnssNavigationMessageProvider();
            mGpsGeofenceProxy = gnssProvider.getGpsGeofenceProxy();
      },开机后无法使用GPS 测试没有provider

luwy 发表于 2022-4-29 16:29:19

可以参考一下这个帖子:https://blog.csdn.net/halazi100/article/details/107065326/

bzhao 发表于 2022-5-28 17:55:46

本帖最后由 bzhao 于 2022-5-28 18:00 编辑

楼主问题应该是这样 ,缺少hidl gnss的说明, 就像在Manifest.xml没有说明的类是不能被注册进去的,
device/rockchip/rk3399/manifest.xml:
it should have the section like:

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

yichangjiang 发表于 2024-6-27 14:37:18

请教下给开发板添加GPS模块有相关得教程吗?
页: [1]
查看完整版本: 使用Android11的环境,添加GPS模块。