当前位置:   article > 正文

RK3568-ANDROID11-4G-EC20-系统篇(移远模块)_android.hardware.radio@1.1::iradio/slot1' from pid

android.hardware.radio@1.1::iradio/slot1' from pid: 158 (/system/bin/hwserv

首先,要先获得技术支持

步骤一,先在USB模块上完成4G

步骤二,移植到PCIE座子上

磨刀不费砍材功,请先拿到技术文档支持,我的参考是:Quectel_Android_RIL_Driver_V3.3.62_master_beta(支持EC200A).tgz

主要文件:Quectel_Android_RIL_Driver_V3.3.62_master_beta(支持EC200A)\libquectel-ril\arm64-v8a\libreference-ril.so

主要文档:Quectel_Android_RIL_Driver_User_Guide_V2.0.pdf

//##//##//##//##//##//##//##//##//##//##//##//##//##//##//##//##//##//##//##//##//##

系统部分:
1.添加rild库(\libquectel-ril\arm64-v8a\libreference-ril.so)

改名成:librk-ril.so

预制到:\device\rockchip\common\4g_modem\lib64\librk-ril.so

代码要清理重新编译,有遇到没有更新库的情况,更新后大编才可以

2.更新已下文件

  1. \vendor\rockchip\common\phone\bin\chat
  2. \vendor\rockchip\common\phone\etc\ppp\ip-down
  3. \vendor\rockchip\common\phone\etc\ppp\ip-up
  4. \vendor\rockchip\common\phone\etc\ql-ril.conf
  5. \vendor\rockchip\common\phone\lib\libreference-ril-ec20.so

 3.关闭SELINUX

  1. \device\rockchip\common\BoardConfig.mk
  2. -BOARD_SELINUX_ENFORCING ?= true
  3. +BOARD_SELINUX_ENFORCING ?= false

如果卡在android动画,建议看一下降频篇

4.打开BOARD_HAS_RK_4G_MODEM

  1. #enable 3g dongle
  2. BOARD_HAVE_DONGLE ?= false
  3. ifeq ($(BOARD_HAVE_DONGLE),true)
  4. PRODUCT_PACKAGES += \
  5. android.hardware.radio@1.2-radio-service \
  6. android.hardware.radio.config@1.0-service
  7. PRODUCT_PACKAGES += \
  8. rild \
  9. com.android.phone.common
  10. endif
  11. #for rk 4g modem
  12. BOARD_HAS_RK_4G_MODEM ?= false
  13. +BOARD_HAS_RK_4G_MODEM ?= true
  14. ifeq ($(strip $(BOARD_HAS_RK_4G_MODEM)),true)
  15. DEVICE_MANIFEST_FILE += device/rockchip/common/4g_modem/manifest.xml
  16. endif

5.去掉property:ro.boot.noril

如果存在电话这一项,就执行下面的内容

设置setprop ro.radio.noril 为true

暂停ril-daemon服务

  1. - a/device/rockchip/common/init.rk30board.rc
  2. + b/device/rockchip/common/init.rk30board.rc
  3. @@ -238,7 +238,7 @@ on property:sys.boot_completed=1
  4. # for telephony function
  5. -on property:ro.boot.noril=true
  6. - setprop ro.radio.noril true
  7. - stop ril-daemon
  8. +#on property:ro.boot.noril=true
  9. +# setprop ro.radio.noril true
  10. +# stop ril-daemon

6.修改\manifest.xml

  1. \device\rockchip\common\4g_modem\manifest.xml
  2. <manifest version="1.0" type="device">
  3. <hal format="hidl">
  4. <name>android.hardware.radio</name>
  5. <transport>hwbinder</transport>
  6. <fqname>@1.1::IRadio/slot1</fqname>
  7. <fqname>@1.1::IRadio/slot2</fqname>
  8. <fqname>@1.2::ISap/slot1</fqname>
  9. <fqname>@1.4::IRadio/slot1</fqname>
  10. </hal>
  11. <hal format="hidl">
  12. <name>android.hardware.radio.deprecated</name>
  13. <transport>hwbinder</transport>
  14. <version>1.0</version>
  15. <interface>
  16. <name>IOemHook</name>
  17. <instance>slot1</instance>
  18. </interface>
  19. </hal>
  20. <hal format="hidl">
  21. <name>android.hardware.radio</name>
  22. <transport>hwbinder</transport>
  23. <version>1.0</version>
  24. <interface>
  25. <name>IRadio</name>
  26. <instance>slot1</instance>
  27. </interface>
  28. </hal>
  29. </manifest>
  1. \device\rockchip\common\manifest.xml
  2. + <hal format="hidl">
  3. + <name>android.hardware.radio</name>
  4. + <transport>hwbinder</transport>
  5. + <fqname>@1.1::IRadio/slot1</fqname>
  6. + <fqname>@1.1::IRadio/slot2</fqname>
  7. + <fqname>@1.2::ISap/slot1</fqname>
  8. + </hal>

7.添加APN

  1. \vendor\rockchip\common\phone\etc\apns-full-conf.xml
  2. <apn carrier="IENTC"
  3. carrier_id = "2470"
  4. mcc="334"
  5. mnc="140"
  6. apn="ims"
  7. type="ims"
  8. user=""
  9. password=""
  10. mvno_type="spn"
  11. mvno_match_data="IENTC"
  12. />
  13. + <apn carrier="China Telecom" mcc="460" mnc="11" apn="ctnet" type="default,supl" />
  14. + <apn carrier="中国移动物联网4G" mcc="460" mnc="04" apn="cmiot" type="default,supl" />
  15. + <apn carrier="中国移动物联网2G" mcc="460" mnc="04" apn="cmmtm" type="default,supl" />
  16. + <apn carrier="中国联通物联网gzm2mapn" mcc="460" mnc="06" apn="unim2m.gzm2mapn" port="80" type="default,supl" />
  17. + <apn carrier="中国联通物联网njm2mapn" mcc="460" mnc="06" apn="unim2m.njm2mapn" type="default,supl" />
  18. + <apn carrier="中国电信物联网m2m" mcc="460" mnc="03" apn="CTNET" user="m2m" password="vnet.mobi" type="default" />
  19. </apns>

8.4G上网正常,但状态栏中没有4G图标(完全没有图标)

  1. device\rockchip\rk356x\overlay\frameworks\base\core\res\res\value\config.xml
  2. <!-- This string array should be overridden by the device to present a list of network
  3. attributes. This is used by the connectivity manager to decide which networks can coexist
  4. based on the hardware -->
  5. <!-- An Array of "[Connection name],[ConnectivityManager connection type],
  6. [associated radio-type],[priority],[restoral-timer(ms)],[dependencyMet] -->
  7. <!-- the 5th element "resore-time" indicates the number of milliseconds to delay
  8. before automatically restore the default connection. Set -1 if the connection
  9. does not require auto-restore. -->
  10. <!-- the 6th element indicates boot-time dependency-met value. -->
  11. <string-array translatable="false" name="networkAttributes">
  12. <item>"wifi,1,1,2,-1,true"</item>
  13. + <item>"mobile,0,0,0,-1,true"</item>
  14. + <item>"mobile_mms,2,0,2,60000,true"</item>
  15. + <item>"mobile_supl,3,0,2,60000,true"</item>
  16. + <item>"mobile_dun,4,0,2,60000,true"</item>
  17. + <item>"mobile_hipri,5,0,3,60000,true"</item>
  18. + <item>"mobile_fota,10,0,2,60000,true"</item>
  19. + <item>"mobile_ims,11,0,2,60000,true"</item>
  20. + <item>"mobile_cbs,12,0,2,60000,true"</item>
  21. <item>"bluetooth,7,7,0,-1,true"</item>
  22. <item>"ethernet,9,9,9,-1,true"</item>
  23. </string-array>

9.打开权限在device\rockchip\common\ueventd.rockchip.rc中增加    

  1. \device\rockchip\common\ueventd.rockchip.rc
  2. # for radio
  3. /dev/ttyUSB* 0666 radio radio
  4. #for uart
  5. /dev/ttyS3 0777 root system
  6. /dev/ttyS4 0777 root system
  7. /dev/ttyS5 0777 root system
  8. /dev/ttyS6 0777 root system
  9. /dev/ttyS9 0777 root system
  10. /dev/ttyS8 0777 root system
  11. /dev/ttyS9 0777 root system
  12. #for cdc-wdm0
  13. /dev/cdc-wdm* 0660 radio radio
  14. #for qcqmi0
  15. /dev/qcqmi* 0660 radio radio
  16. /dev/cdc-acm* 0660 radio radio
  17. /dev/ttyACM* 0660 radio radio
  18. #PCIe
  19. /dev/mhi_DUN 0660 radio radio
  20. /dev/mhi_DIAG 0660 radio radio
  21. /dev/mhi_BHI 0660 radio radio
  22. /dev/mhi_LOOPBACK 0660 radio radio
  23. /dev/mhi_QMI0 0660 radio radio

10.添加cdc-wdm0节点

  1. system\core\init\devices.cpp
  2. // Minors are broken up into groups of 128, starting at "001"
  3. int bus_id = uevent.minor / 128 + 1;
  4. int device_id = uevent.minor % 128 + 1;
  5. devpath = StringPrintf("/dev/bus/usb/%03d/%03d", bus_id, device_id);
  6. }
  7. +#if 1 //add by quectel for mknod /dev/cdc-wdmo
  8. + } else if (uevent.subsystem == "usbmisc" && !uevent.device_name.empty()) {
  9. + devpath = "/dev/" + uevent.device_name;
  10. +#endif
  11. } else if (StartsWith(uevent.subsystem, "usb")) {
  12. // ignore other USB events

11.应该实际上是使用的下面这个:   //这个本来就有的

  1. device\rockchip\common\device.mk
  2. ifeq ($(strip $(TARGET_ARCH)), arm64)
  3. PRODUCT_PROPERTY_OVERRIDES += \
  4. vendor.rild.libpath=/vendor/lib64/librk-ril.so
  5. PRODUCT_COPY_FILES += \
  6. $(LOCAL_PATH)/4g_modem/bin64/dhcpcd:$(TARGET_COPY_OUT_VENDOR)/bin/dhcpcd \
  7. $(LOCAL_PATH)/4g_modem/lib64/librk-ril.so:$(TARGET_COPY_OUT_VENDOR)/lib64/librk-ril.so
  8. else
  9. PRODUCT_PROPERTY_OVERRIDES += \
  10. vendor.rild.libpath=/vendor/lib/librk-ril.so
  11. PRODUCT_COPY_FILES += \
  12. $(LOCAL_PATH)/4g_modem/bin32/dhcpcd:$(TARGET_COPY_OUT_VENDOR)/bin/dhcpcd \
  13. $(LOCAL_PATH)/4g_modem/lib32/librk-ril.so:$(TARGET_COPY_OUT_VENDOR)/lib/librk-ril.so
  14. endif

12更新加载文件点

  1. \vendor\rockchip\common\phone\phone.mk
  2. CUR_PATH := vendor/rockchip/common
  3. #########################################################
  4. # 3G Dongle SUPPORT
  5. #########################################################
  6. #PRODUCT_COPY_FILES += \
  7. # $(CUR_PATH)/phone/etc/ppp/ip-down:system/etc/ppp/ip-down \
  8. # $(CUR_PATH)/phone/etc/ppp/ip-up:system/etc/ppp/ip-up \
  9. # $(CUR_PATH)/phone/etc/ppp/call-pppd:system/etc/ppp/call-pppd \
  10. # $(CUR_PATH)/phone/etc/operator_table:system/etc/operator_table
  11. PRODUCT_COPY_FILES += \
  12. + $(CUR_PATH)/phone/etc/ppp/ip-down:system/etc/ppp/ip-down \
  13. + $(CUR_PATH)/phone/etc/ppp/ip-up:system/etc/ppp/ip-up \
  14. + $(CUR_PATH)/phone/bin/chat:system/bin/chat \
  15. + $(CUR_PATH)/phone/lib/libreference-ril-ec20.so:vendor/lib64/libreference-ril-ec20.so \
  16. + $(CUR_PATH)/phone/etc/ppp/ql-ril.conf:system/etc/ql-ril.conf \
  17. + $(CUR_PATH)/etc/spn-conf.xml:system/etc/spn-conf.xml
  18. ifeq ($(strip $(BOARD_HAVE_DONGLE)),true)
  19. PRODUCT_PACKAGES += \
  20. rild \
  21. libril-rk29-dataonly \
  22. usb_dongle \
  23. usb_modeswitch \
  24. chat
  25. PRODUCT_PROPERTY_OVERRIDES +=ro.boot.noril=false
  26. else
  27. PRODUCT_PROPERTY_OVERRIDES +=ro.boot.noril=true
  28. endif
  29. PRODUCT_PROPERTY_OVERRIDES += \
  30. keyguard.no_require_sim=true \
  31. ro.com.android.dataroaming=true \
  32. ril.function.dataonly=1

.13.修改ril-daemon 

  1. - /hardware/ril/rild/rild.rc
  2. + /hardware/ril/rild/rild.rc
  3. @@ -1,5 +1,5 @@
  4. -service vendor.ril-daemon /vendor/bin/hw/rild
  5. +service ril-daemon /vendor/bin/hw/rild -l /vendor/lib64/libreference-ril-ec20.so
  6. class main
  7. - user radio
  8. - group radio cache inet misc audio log readproc wakelock
  9. - capabilities BLOCK_SUSPEND NET_ADMIN NET_RAW
  10. + user root
  11. + group radio cache inet misc audio sdcard_rw log
  12. + capabilities BLOCK_SUSPEND NET_ADMIN NET_RAW

14.指定使用的库,这里没有配,因为前面device.mk已经指定

  1. - a/device/rockchip/rk356x/device.mk
  2. + b/device/rockchip/rk356x/device.mk
  3. @@ -77,6 +77,9 @@ PRODUCT_PROPERTY_OVERRIDES += \
  4. ro.ril.ecclist=112,911 \
  5. ro.opengles.version=196610 \
  6. wifi.interface=wlan0 \
  7. ro.audio.monitorOrientation=true \
  8. debug.nfc.fw_download=false \
  9. debug.nfc.se=false \
  10. +# ro.telephony.default_network=9 \
  11. +# rild.libpath=/vendor/lib64/libquectel-ril-ec200t.so \
  12. +# rild.libargs=-d /dev/ttyUSB2 \

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/275241
推荐阅读
相关标签
  

闽ICP备14008679号