适配前理清楚一下调试的流程:
1.该模块为LGA封装,需要控制上电时序模块才能正常上电工作:
2.模块供电正常后,读取模组的PID 和VID 并将其ID添加到内核里面,确保USB转Serial端口能够正常生成:
3.生成ttyUSB0~ttyUSB2端口后,确保rild进程正常启动,能够正常加载ril库;
4.查看一下AT命令集,善于捕捉ril log,熟练使用 logcat -b radio,移远方案,可以通过创建文件
/data/quectel_debug_log 来存储RIL 加载信息,同时瑞芯微对应4G模块这方面的资料也是比较完善的,可以阅读一下
RKDocs/common/mobile-net/Rockchip_Introduction_4G_Module_Configuration_CN\&EN.pdf。流程理清楚了,我们就可以在我们的硬件平台上来移植4G模组了。
//偷个懒,将EC200A的module PWR RK0_PB4和reset脚RK0_PB1 控制添加到LED灯的控制驱动里面,
//将 module PWR RK0_PB4 置高,将reset脚RK0_PB1置低#include "rk3566-box.dtsi"/ {model = "Rockchip RK3566 BOX DM35 Project";compatible = "rockchip,rk3568-box-demo-v10", "rockchip,rk3566";gpio-leds {compatible = "gpio-leds";// ir-led {
// gpios = <&gpio4 RK_PC5 GPIO_ACTIVE_HIGH>;
// default-state = "off";
// };//MODULE_PWR GPIO0_B4+ modem-resetled {
+ gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };+ modem-led {
+ gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
+ };work-led { /*led GPIO0_C3_d*/gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;//linux,default-trigger = "timer";default-state = "on";};};-------------------------------------------------------------wireless_bluetooth: wireless-bluetooth {compatible = "bluetooth-platdata";clocks = <&pmucru CLK_RTC_32K>;clock-names = "ext_clock";//wifi-bt-power-toggle;uart_rts_gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_LOW>;pinctrl-names = "default", "rts_gpio";pinctrl-0 = <&uart1m0_rtsn>;pinctrl-1 = <&uart1_gpios>;BT,reset_gpio = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;BT,wake_gpio = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;BT,wake_host_irq = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;status = "okay";};
+//添加4G模块的上电初始化时序,以确保模块能够正常上电工作+rk_modem: rk-modem {+ compatible="4g-modem-platdata";+ pinctrl-names = "default";+ pinctrl-0 = <<e_vbat <e_power_en /*<e_reset*/>;+ 4G,vbat-gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>; //VBUS_CTRL+ 4G,power-gpio = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>; //MODULE_PWRKEY+ //4G,reset-gpio = <&gpio0 RK_PB1 GPIO_ACTIVE_LOW>; //MODULE_RESET_N+ //MODULE_PWR GPIO0_B4+ status = "okay";+};wireless-wlan {wifi_host_wake_irq: wifi-host-wake-irq {rockchip,pins = <2 RK_PB2 RK_FUNC_GPIO &pcfg_pull_down>;};};wireless-bluetooth {uart1_gpios: uart1-gpios {rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;};};+ rk-modem {
+ lte_vbat: lte-vbat {
+ rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ lte_power_en: lte-power-en {
+ rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+// lte_reset: lte-reset {
+// rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
+// };};修改完这些之后,使用lsusb命令查看模块的PID和VID
Bus 005 Device 001: ID 1d6b:0002
Bus 003 Device 001: ID 1d6b:0001
Bus 001 Device 001: ID 1d6b:0002
Bus 008 Device 001: ID 1d6b:0003
Bus 006 Device 001: ID 1d6b:0003
Bus 001 Device 004: ID 2c7c:6005
Bus 004 Device 001: ID 1d6b:0001
Bus 002 Device 001: ID 1d6b:0002
Bus 007 Device 001: ID 1d6b:0002上面显示的2c7c:6005就是我们4G模块的VID和PID,这说明我们的上电时序已经修改成了,接下来修改内核,添加模块的VID和PIDgit diff arch/arm64/configs/rockchip_defconfig
diff --git a/kernel/arch/arm64/configs/rockchip_defconfig b/kernel/arch/arm64/configs/rockchip_defconfig
index 3c1008aab5..66a6cc02a9 100644
--- a/kernel/arch/arm64/configs/rockchip_defconfig
+++ b/kernel/arch/arm64/configs/rockchip_defconfig
@@ -776,6 +776,7 @@ CONFIG_USB_UAS=yCONFIG_USB_DWC3=yCONFIG_USB_DWC2=yCONFIG_USB_SERIAL=y
+CONFIG_USB_SERIAL_WWAN=yCONFIG_USB_SERIAL_GENERIC=yCONFIG_USB_SERIAL_OPTION=yCONFIG_USB_SERIAL_CH341=ykernel$ git diff drivers/usb/serial/option.c
diff --git a/kernel/drivers/usb/serial/option.c b/kernel/drivers/usb/serial/option.c
index ff67562572..497ca259de 100644
--- a/kernel/drivers/usb/serial/option.c
+++ b/kernel/drivers/usb/serial/option.c
@@ -2126,6 +2126,23 @@ static const struct usb_device_id option_ids[] = {{ USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1404, 0xff) }, /* GosunCn GM500 RNDIS */{ USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1405, 0xff) }, /* GosunCn GM500 MBIM */{ USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1406, 0xff) }, /* GosunCn GM500 ECM/NCM */
+#if 1 //Added by Quectel
+#if 1 //Added by Quectel
diff --git a/kernel/drivers/usb/serial/option.c b/kernel/drivers/usb/serial/option.c
index ff67562572..497ca259de 100644
--- a/kernel/drivers/usb/serial/option.c
+++ b/kernel/drivers/usb/serial/option.c
@@ -2126,6 +2126,23 @@ static const struct usb_device_id option_ids[] = {{ USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1404, 0xff) }, /* GosunCn GM500 RNDIS */{ USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1405, 0xff) }, /* GosunCn GM500 MBIM */{ USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1406, 0xff) }, /* GosunCn GM500 ECM/NCM */
+#if 1 //Added by Quectel
+ { USB_DEVICE(0x05C6, 0x9090) }, /* Quectel UC15 */
+ { USB_DEVICE(0x05C6, 0x9003) }, /* Quectel UC20 */
+ { USB_DEVICE(0x2C7C, 0x0125) }, /* Quectel EC25 */
+ { USB_DEVICE(0x2C7C, 0x0121) }, /* Quectel EC21 */
+ { USB_DEVICE(0x05C6, 0x9215) }, /* Quectel EC20 */
+ { USB_DEVICE(0x2C7C, 0x0191) }, /* Quectel EG91 */
+ { USB_DEVICE(0x2C7C, 0x0195) }, /* Quectel EG95 */
+ { USB_DEVICE(0x2C7C, 0x0306) }, /* Quectel EG06/EP06/EM06 */
+ { USB_DEVICE(0x2C7C, 0x0296) }, /* Quectel BG96 */
+ { USB_DEVICE(0x2C7C, 0x0435) }, /* Quectel AG35 */
+ { USB_DEVICE(0x2C7C, 0x0512) }, /* Quectel EG12/EG18 */
+ { USB_DEVICE(0x2C7C, 0x6026) }, /* Quectel EC200 */
+ { USB_DEVICE(0x2C7C, 0x6120) }, /* Quectel UC200 */
+ { USB_DEVICE(0x2C7C, 0x6000) }, /* Quectel EC200/UC200 */
+ { USB_DEVICE(0x2C7C, 0x6005) }, /* Quectel EC200A-CN*/
+#endif{ } /* Terminating entry */};MODULE_DEVICE_TABLE(usb, option_ids);
@@ -2183,7 +2200,21 @@ static int option_probe(struct usb_serial *serial,struct usb_interface_descriptor *iface_desc =&serial->interface->cur_altsetting->desc;unsigned long device_flags = id->driver_info;
-
+#if 1 //Added by Quectel
+ if(serial->dev->descriptor.idVendor == cpu_to_le16(0x2C7C)) {
+ __u16 idProduct = le16_to_cpu(serial->dev->descriptor.idProduct);
+ struct usb_interface_descriptor *intf = &serial->interface->cur_altsetting->desc;
+ if (intf->bInterfaceClass != 0xFF || intf->bInterfaceSubClass == 0x42) {
+ //ECM, RNDIS, NCM, MBIM, ACM, UAC, ADB
+ return -ENODEV;
+ }
+ if ((idProduct&0xF000) == 0x0000) {
+ //MDM interface 4 is QMI
+ if (intf->bInterfaceNumber == 4 && intf->bNumEndpoints == 3 && intf->bInterfaceSubClass == 0xFF &&intf->bInterfaceProtocol == 0xFF)
+ return -ENODEV;
+ }
+ }
+#endif/* Never bind to the CD-Rom emulation interface */if (iface_desc->bInterfaceClass == USB_CLASS_MASS_STORAGE)return -ENODEV;
(END)kernel$ git diff drivers/usb/serial/usb_wwan.c
diff --git a/kernel/drivers/usb/serial/usb_wwan.c b/kernel/drivers/usb/serial/usb_wwan.c
index c604ff4546..19fe9838de 100644
--- a/kernel/drivers/usb/serial/usb_wwan.c
+++ b/kernel/drivers/usb/serial/usb_wwan.c
@@ -509,11 +509,14 @@ static struct urb *usb_wwan_setup_urb(struct usb_serial_port *port,if (intfdata->use_zlp && dir == USB_DIR_OUT)urb->transfer_flags |= URB_ZERO_PACKET;+ #if 1 //Added by Quectel for zero packetif (dir == USB_DIR_OUT) {
- if ((desc->idVendor == cpu_to_le16(0x1286) &&
- desc->idProduct == cpu_to_le16(0x4e3c)))
- urb->transfer_flags |= URB_ZERO_PACKET;
+ struct usb_device_descriptor *desc = &serial->dev->descriptor;
+
+ if (desc->idVendor == cpu_to_le16(0x2C7C))
+ urb->transfer_flags |= URB_ZERO_PACKET;}
+#endifreturn urb;}修改以上内核配置后,打开内核log,
[ 10.646867] usb 1-1: new high-speed USB device number 4 using ehci-platform
[ 10.794964] usb 1-1: New USB device found, idVendor=2c7c, idProduct=6005, bcdDevice= 3.18
[ 10.794999] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 10.795007] usb 1-1: Product: Android
[ 10.795013] usb 1-1: Manufacturer: Android
[ 10.795019] usb 1-1: SerialNumber: 0000
[ 10.797366] cdc_ether 1-1:1.0 usb0: register 'cdc_ether' at usb-fd800000.usb-1, CDC Ethernet Device, 02:0c:29:a3:9b:6d
[ 10.798340] option 1-1:1.2: GSM modem (1-port) converter detected
[ 10.798917] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
[ 10.799720] option 1-1:1.3: GSM modem (1-port) converter detected
[ 10.800241] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
[ 10.800938] option 1-1:1.4: GSM modem (1-port) converter detected
[ 10.801414] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
这段log说明我们内核部分已经修改OK了。-------------------------------------------------------
接下来一直和修改RIL部分:git diff device/rockchip/common/device.mk
diff --git a/device/rockchip/common/device.mk b/device/rockchip/common/device.mk
index c79fd21d6b..c1741daefe 100644
--- a/device/rockchip/common/device.mk
+++ b/device/rockchip/common/device.mk
@@ -273,17 +273,17 @@ PRODUCT_PROPERTY_OVERRIDES += \ro.telephony.default_network=9ifeq ($(strip $(TARGET_ARCH)), arm64)
-PRODUCT_PROPERTY_OVERRIDES += \
+#PRODUCT_PROPERTY_OVERRIDES += \vendor.rild.libpath=/vendor/lib64/librk-ril.soPRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/4g_modem/bin64/dhcpcd:$(TARGET_COPY_OUT_VENDOR)/bin/dhcpcd \
- $(LOCAL_PATH)/4g_modem/lib64/librk-ril.so:$(TARGET_COPY_OUT_VENDOR)/lib64/librk-ril.so
+ $(LOCAL_PATH)/4g_modem/bin64/dhcpcd:$(TARGET_COPY_OUT_VENDOR)/bin/dhcpcd
+# $(LOCAL_PATH)/4g_modem/lib64/librk-ril.so:$(TARGET_COPY_OUT_VENDOR)/lib64/librk-ril.soelse
-PRODUCT_PROPERTY_OVERRIDES += \
+#PRODUCT_PROPERTY_OVERRIDES += \vendor.rild.libpath=/vendor/lib/librk-ril.so-PRODUCT_COPY_FILES += \
+#PRODUCT_COPY_FILES += \$(LOCAL_PATH)/4g_modem/bin32/dhcpcd:$(TARGET_COPY_OUT_VENDOR)/bin/dhcpcd \$(LOCAL_PATH)/4g_modem/lib32/librk-ril.so:$(TARGET_COPY_OUT_VENDOR)/lib/librk-ril.soamediatech@amediatech-Super-Server:~/DISK1/qhq/rk/RK_Android_11.0_sdk$ git diff device/rockchip/rk356x_box/rk356x_box/rk356x_box.mk
diff --git a/device/rockchip/rk356x_box/rk356x_box/rk356x_box.mk b/device/rockchip/rk356x_box/rk356x_box/rk356x_box.mk
index 0866c945a4..74dd85ed4c 100755
--- a/device/rockchip/rk356x_box/rk356x_box/rk356x_box.mk
+++ b/device/rockchip/rk356x_box/rk356x_box/rk356x_box.mk
@@ -110,6 +110,7 @@ PRODUCT_COPY_FILES += \BOARD_HS_ETHERNET := true+BOARD_HAS_RK_4G_MODEM := true##add Rockchip properties here#git diff device/rockchip/rk356x_box/rk356x_box/system.prop
diff --git a/device/rockchip/rk356x_box/rk356x_box/system.prop b/device/rockchip/rk356x_box/rk356x_box/system.prop
index 5b2b456f50..c3602fef4f 100644
--- a/device/rockchip/rk356x_box/rk356x_box/system.prop
+++ b/device/rockchip/rk356x_box/rk356x_box/system.prop
@@ -2,13 +2,13 @@# system.prop#-#rild.libpath=/system/lib/libreference-ril.so
-#rild.libargs=-d /dev/ttyUSB2
+rild.libpath=/system/lib64/libreference-ril.so
+rild.libargs=-d /dev/ttyUSB2# Default ecclistro.ril.ecclist=112,911wifi.interface=wlan0
-rild.libpath=/system/lib/libril-rk29-dataonly.so
-rild.libargs=-d /dev/ttyACM0
+#rild.libpath=/system/lib/libril-rk29-dataonly.so
+#rild.libargs=-d /dev/ttyACM0persist.tegra.nvmmlite = 1persist.sys.boot.check=falsero.audio.monitorOrientation=truegit diff hardware/ril/rild/rild.rc
diff --git a/hardware/ril/rild/rild.rc b/hardware/ril/rild/rild.rc
index f6beb5468f..6f48e28323 100644
--- a/hardware/ril/rild/rild.rc
+++ b/hardware/ril/rild/rild.rc
@@ -1,5 +1,6 @@
-service vendor.ril-daemon /vendor/bin/hw/rild
+#service vendor.ril-daemon /vendor/bin/hw/rild
+service ril-daemon /vendor/bin/hw/rild -l /vendor/lib64/libreference-ril.soclass main
- user radio
+ user rootgroup radio cache inet misc audio log readproc wakelockcapabilities BLOCK_SUSPEND NET_ADMIN NET_RAWgit diff device/rockchip/rk356x_box/rk356x_box/overlay/frameworks/base/core/res/res/values/config.xml
diff --git a/device/rockchip/rk356x_box/rk356x_box/overlay/frameworks/base/core/res/res/values/config.xml b/device/rockchip/rk356x_box/rk356x_box/overlay/frameworks/base/core/res/res/values/config.xml
index 6021354c69..4150b15aca 100755
--- a/device/rockchip/rk356x_box/rk356x_box/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/device/rockchip/rk356x_box/rk356x_box/overlay/frameworks/base/core/res/res/values/config.xml
@@ -35,6 +35,14 @@<!-- the 6th element indicates boot-time dependency-met value. --><string-array translatable="false" name="networkAttributes"><item>"wifi,1,1,1,-1,true"</item>
+ <item>"mobile,0,0,0,-1,true"</item>
+ <item>"mobile_mms,2,0,2,60000,true"</item>
+ <item>"mobile_supl,3,0,2,60000,true"</item>
+ <item>"mobile_dun,4,0,2,60000,true"</item>
+ <item>"mobile_hipri,5,0,3,60000,true"</item>
+ <item>"mobile_fota,10,0,2,60000,true"</item>
+ <item>"mobile_ims,11,0,2,60000,true"</item>
+ <item>"mobile_cbs,12,0,2,60000,true"</item><item>"ethernet,9,9,9,-1,true"</item></string-array>@@ -49,7 +57,7 @@</string-array><bool name="config_ui_enableFadingMarquee">true</bool>
-
+ <bool name="config_mobile_data_capable">true</bool><!-- Device configuration adjusting the minfree tunable in the lowmemorykiller in thekernel. A high value will cause the lowmemorykiller to fire earlier, keeping morememory in the file cache and preventing I/O thrashing, but allowing fewer processes-------------------------------------------------------------
//添加移远4G 模块的device/rockchip/rk356x_box/rk356x_box/4g_modem.mk
PRODUCT_PACKAGES += \Dialer \TeleService \phone \TelephonyProvider#PRODUCT_PROPERTY_OVERRIDES += \hw.nophone=false \ro.radio.noril=falsePRODUCT_PROPERTY_OVERRIDES += \rild.libpath=/vendor/lib64/libreference-ril.so \rild.libargs=-d /dev/ttyUSB2
#enable vendor ril
#ENABLE_VENDOR_RIL_SERVICE := trueQUECTEL_PATH := device/rockchip/rk356x_box/rk356x_box/quectel_4g
#PRODUCT_COPY_FILES += \
#$(QUECTEL_PATH)/apns-conf.xml:system/etc/apns-conf.xml \PRODUCT_COPY_FILES += \$(QUECTEL_PATH)/chat:system/bin/chat \$(QUECTEL_PATH)/ip-down:system/etc/ppp/ip-down \$(QUECTEL_PATH)/ip-up:system/etc/ppp/ip-upPRODUCT_COPY_FILES += \$(QUECTEL_PATH)/libreference-ril.so:vendor/lib64/libreference-ril.so#PRODUCT_COPY_FILES += \$(QUECTEL_PATH)/dhcpcd:$(TARGET_COPY_OUT_VENDOR)/bin/dhcpcd4G模块相关的库文件和SHELL执行文件,可以找移远FAE提供:
------------------------------------------
接下来查看RIL Log
console:/ # logcat -b radio--------- beginning of radio
01-01 01:00:06.689 441 441 D RILD : **RIL Daemon Started**
01-01 01:00:06.700 441 441 D RILD : **RILd param count=3**
01-01 01:00:06.738 441 441 D RILD : RIL_Init argc = 3 clientId = 0
01-01 01:00:06.738 441 441 D RILC : Quectel RIL Version: Quectel_Android_RIL_Driver_V3.6.14_master_Release_20231013_10_54
01-01 01:00:06.738 441 441 D RILC : Compiled date: Oct 13 2023 time: 05:57:48
01-01 01:00:06.738 441 441 D RIL_READ_CONF: since '/system/etc/ql-ril.conf' doesn't exsits using '/vendor/etc/ql-ril.conf' but it still doesn't exsits program panic here!
01-01 01:00:06.738 441 441 D NDK : Default libnetutils.so path:/system/lib64/libnetutils.so
01-01 01:00:06.739 441 441 D NDK : ql_find_libpath:/apex/com.android.vndk.v30/lib64/libnetutils.so
01-01 01:00:06.749 441 441 D NDK : Default libcutils.so path:/system/lib64/libcutils.so
01-01 01:00:06.750 441 441 D NDK : Found libcutils.so path:/apex/com.android.vndk.v30/lib64/libcutils.so
01 441 D RILC : [ro.build.version.release]: [11]
01-01 01:00:0RILC : Android Version: 110, RIL_VERSION: 12 / 12
01-01 01:0 E RILC : '/vendor/manifest.xml' not exist.
01-01 01:00:06.7 : __getIRadioVersion:663 IRadioVersion:1
01-01 01:00:06.751 : [ro.build.description]: [rk356x_box-userdebug 11 RD2A.211001.22.142232 release-keys]
01-01 01:00:06.751 441 441 D RILC k30board]
01-01 01:00:06.751 441 441 D RILC : selinux mae, use command getenforce to check
01-01 01:00:06.751 441 4ux maybe set Enforcing mode, use command "setenforce 0" to disab 441 441 I RILC : clientID = 0
01-01 01:00:06.751 441 _Init rilInit completed
01-01 01:00:06.751 441 441 I RILC 01:00:06.751 441 441 E RILC : RIL_register: RIL version 51 441 441 I RILC : s_registerCalled flag set, 1
01-01 0441 D RILC : registerService: starting android::hardware::rad
01-01 01:00:06.756 441 453 I RILC : mainLoop Start
01-1 453 D RILU : find_pci_device is 0
01-01 01:00:06.757 4 : PCI can't find at device
01-01 01:00:06.761 441 441 I R registerService
01-01 01:00:06.761 441 441 D RILD : RILpleted
01-01 01:00:06.761 441 441 D RILD : RIL_register_01 01:00:06.761 441 441 D RIL_UIM_SOCKET: Adding socket with.761 441 441 I RILC : RIL_register_socket: calling regist00:06.761 441 441 D RIL_SAP : registerService: starting ISap00:06.766 441 441 D RIL_SAP : registerService: started ISap 8
01-01 01:00:06.766 441 441 D RILD : RIL_register_socke1:00:06.774 441 453 D RILC : USB can't find at device
018 288 D TelephonyManager: No /proc/cmdline exception=java.io.F /proc/cmdline: open failed: EACCES (Permission denied)
01-01 0288 D TelephonyManager: /proc/cmdline=
01-01 01:00:09.774 441d_pci_device is 0
01-01 01:00:09.774 441 453 D RILC : PC
01-01 01:00:09.776 441 453 D RILC : USB can't find at d777 441 453 D RILU : find_pci_device is 0
01-01 01:00:12 : PCI can't find at device
01-01 01:00:12.779 441 453 D l module /sys/bus/usb/devices/1-1 idVendor=2c7c idProduct=6005441 453 D RILU : find_usb_device is 1
01-01 01:00:13.780 find /sys/bus/usb/devices/1-1:1.3/ttyUSB1
01-01 01:00:13.781 : ttyAT = ttyUSB1
01-01 01:00:13.781 441 453 D RILU : fices/1-1:1.4/ttyUSB2
01-01 01:00:13.781 441 453 D RILU : 1-01 01:00:13.781 441 453 D RILU : find /sys/bus/usb/devi
01-01 01:00:13.781 441 453 D RILU : ttyDM = ttyUSB0
01- 453 D RILU : find /sys/bus/usb/devices/1-1:1.0/net/usb0
01-1 453 D RILU : usbnet_adapter = usb0
01-01 01:00:13.782 : netcard driver: cdc_ether, driver version: 22-Aug-2005
01-01 53 D RILU : ECM = usb0
01-01 01:00:13.782 441 453 D RILU: 4.19.232
01-01 01:00:13.782 441 453 D RILC : quectel aB1
01-01 01:00:13.782 441 453 D RILU : ql_set_autosuspen00:13.782 441 453 D RILU : ro_hardware:rk30board
01-01 053 D RILU : ----------------------------------------------2:r:13.782 441 453 D RILU : --------------------------------1-01 01:00:13.782 441 453 D RILU : --------------------------3:2
01-01 01:00:13.802 441 453 D RILU : echo on > /s-1/power/control
01-01 01:00:13.802 441 453 D RILU : ql_
01-01 01:00:13.802 441 453 D RILU : --------------------------3:3
01-01 01:00:13.802 441 453 D RILU : ------------------------3:1
01-01 01:00:13.802 441 453 D RILU : --------------------------3:3
01-01 01:00:13.802 441 453 D RI---------------------------------3:1
01-01 01:00:13.802 441 ----------------------------------------3:3
01-01 01:00:13.802 : ----------------------------------------------3:1
01-01 01:0----------3:3
01-01 01:00:13.802 441 453 D RILU : -------------------------4
01-01 01:00:13.803 441 453 D RILC :dev/ttyUSB1
01-01 01:00:13.803 441 453 D RILC : open devrectly
01-01 01:00:13.804 441 453 E ATC : at_open s_til4
01-01 01:00:13.804 441 451 D ATC : AT> ATE0
01-01 01587 D ATC : AT< ATE0
01-01 01:00:13.805 441 587 D ATC 01:00:13.805 441 451 D ATC : AT> AT+CMEE=1
01-01 01:00:ATC : AT< OK
01-01 01:00:13.807 441 451 D ATC : AT>.807 441 587 D ATC : AT< Quectel
01-01 01:00:13.807 4: AT< EC200A
01-01 01:00:13.808 441 587 D ATC : AT< Rev2M08
01-01 01:00:13.808 441 587 D ATC : AT< OK
01-01 0 451 D RILC : ql_product_version is EC200ACNLFR01A02M08
01-0451 D RILC : Quectel Product Revision: EC200ACNLFR01A02M08
0 441 451 D RILU : ql_set_autosuspend, enter...
01-01 01:00 D RILU : ro_hardware:rk30board
01-01 01:00:13.808 441 4---------------------------------------2:rk30board
01-01 01:00: RILU : ----------------------------------------------3:1
01441 451 D RILU : ------------------------------------------3.825 441 451 D RILU : echo on > /sys/bus/usb/devices/1-101 01:00:13.825 441 451 D RILU : ql_set_autosuspend off
441 451 D RILU : ------------------------------------------13.825 441 451 D RILU : ---------------------------------1 01:00:13.825 441 451 D RILU : -------------------------
01-01 01:00:13.825 441 451 D RILU : ------------------------3:1
01-01 01:00:13.825 441 451 D RILU : --------------------------3:3
01-01 01:00:13.825 441 451 D RILU : -------------------------3:1
01-01 01:00:13.825 441 451 D RIL-------------------------------3:3
01-01 01:00:13.825 441 4---------------------------------------4
01-01 01:00:13.826 4 Platform
01-01 01:00:13.826 441 451 D ATC : AT> AT+CSU:00:13.831 441 587 D ATC : AT< SubEdition: V04
01-01 0187 D ATC : AT< VERSION: EC200ACNLFR01A02M08
01-01 01:00:13. : AT< Sep 11 2023 11:11:34
01-01 01:00:13.832 441 587 Dors: QCT
01-01 01:00:13.832 441 587 D ATC : AT< OK
01- D ATC : AT> ATE0
01-01 01:00:13.832 441 587 D ATC :13.832 441 451 D ATC : AT> at+cmee=1
01-01 01:00:13.83 : AT< OK
01-01 01:00:13.833 441 451 D ATC : AT> ATS 441 587 D ATC : AT< OK
01-01 01:00:13.834 441 451 QURCCFG="URCPORT","usbat"
01-01 01:00:13.843 441 587 D ATC :00:13.843 441 451 D ATC : AT> AT&D2
01-01 01:00:13.844 : AT< OK
01-01 01:00:13.844 441 451 D ATC : AT> AT+CM3.844 441 587 D ATC : AT< OK
01-01 01:00:13.845 441 > AT+QCFG="ims",1
01-01 01:00:13.845 441 587 D ATC : AT 01:00:13.845 441 451 D ATC : AT> AT+CREG=2
01-01 01:00D ATC : AT< OK
01-01 01:00:13.846 441 451 D ATC : A1:00:13.847 441 587 D ATC : AT< OK
01-01 01:00:13.847 : AT> AT+CGREG=2
01-01 01:00:13.848 441 587 D ATC : AT848 441 451 D ATC : AT> AT+CEREG=2
01-01 01:00:13.848 : AT< OK
01-01 01:00:13.848 441 451 D ATC : AT> AT+C5GR.849 441 587 D ATC : AT< ERROR
01-01 01:00:13.849 441T> AT+QENDC=1
01-01 01:00:13.850 441 587 D ATC : AT< ER50 441 451 D ATC : AT> AT^DSCI=1
01-01 01:00:13.851 4AT< ERROR
01-01 01:00:13.851 441 451 D ATC : AT> AT+CFU52 441 587 D ATC : AT< +CFUN: 1
01-01 01:00:13.852 44< OK
01-01 01:00:13.853 441 451 D ATC : AT> AT+CPIN?
0441 587 D ATC : AT< +CPIN: READY
01-01 01:00:13.853 441OK
01-01 01:00:13.854 441 451 D ATC : AT> AT+CFUN?
01-01 01:00:13.854 441 587 D ATC : AT< +CFUN: 1
01-01 01:00:13.854 441 587 D ATC : AT< OK
01-01 01:00:13.855 4451 I RILC : [setRadioState]:oldState=1, newState=2
01-01 01:1 E RILC : radioStateChangedInd: radioService[0]->mRadioIndic:00:13.857 441 451 D ATC : AT> AT+CPIN?
01-01 01:00:13.C : AT< +CPIN: READY
01-01 01:00:13.857 441 587 D ATC 1:00:13.857 441 451 I RILC : [setRadioState]:oldState=2, 0:13.858 441 451 E RILC : radioStateChangedInd: radioServion == NULL
01-01 01:00:13.858 441 451 D ATC : AT> AT+Qodem/mmode/ue_usage_setting"
01-01 01:00:13.858 441 587 D A1 01:00:13.858 441 451 D RILC : ue_function check failed 01:00:13.858 441 451 D ATC : AT> AT+QINISTAT
01-01 01:0ATC : AT< +QINISTAT: 1
01-01 01:00:13.859 441 587 D ATC00:13.859 441 451 D ATC : AT> AT+CSMS=1
01-01 01:00:13. : AT< +CSMS: 1,1,1
01-01 01:00:13.860 441 587 D ATC 3.860 441 451 D ATC : AT> AT+CNMI=2,2
01-01 01:00:13.861-01 01:00:13.861 441 451 D ATC : AT> AT+CMGF=0
01-01 07 D ATC : AT< OK
01-01 01:00:13.862 441 451 D ATC :01 01:00:13.862 441 587 D ATC : AT< OK
01-01 01:00:13.8 : AT> AT+CMOD=0
01-01 01:00:13.864 441 587 D ATC : 13.864 441 451 D ATC : AT> AT+CMUT=0
01-01 01:00:13.864 AT< +CME ERROR: 4
01-01 01:00:13.865 441 451 D ATC : A01 01:00:13.865 441 587 D ATC : AT< OK
01-01 01:00:13.8C : AT> AT+COLP=0
01-01 01:00:13.866 441 587 D ATC 13.866 441 451 D ATC : AT> AT+CSCS="UCS2"
01-01 01:00:1 ATC : AT< OK
01-01 01:00:13.867 441 451 D ATC : AT1:00:13.867 441 587 D ATC : AT< OK
01-01 01:00:13.867 : AT> AT+CGEREP=0
01-01 01:00:13.868 441 587 D ATC : AT.868 441 451 D ATC : AT> AT+CGEREP=0
01-01 01:00:13.869 : AT< OK
01-01 01:00:13.869 441 451 D ATC : AT> AT+C.870 441 587 D ATC : AT< OK
01-01 01:00:13.870 441 +CTZR=2
01-01 01:00:13.871 441 587 D ATC : AT< OK
01-0451 E RILC : simStatusChangedInd: radioService[0]->mRadioIndi01 01:00:13.872 441 451 D ATC : AT> at+qcfg=nat
01-01 0587 D ATC : AT< +QCFG: "nat",1
01-01 01:00:13.873 441 501-01 01:00:13.873 441 451 D ATC : AT> AT+QCFG="speed"
441 587 D ATC : AT< +CME ERROR: 4
01-01 01:00:13.874 44AT> AT+QNWCFG="lte_pco",2
01-01 01:00:13.875 441 587 D ATC 1 01:00:13.875 441 451 D ATC : AT> AT+QIMSCFG="ims_statu5 441 587 D ATC : AT< ERROR
01-01 01:00:13.876 441 H: requestSignalStrength:720 iradio_version = 1
01-01 01:00:13. : AT> AT+COPS=3,0;+COPS?;+COPS=3,1;+COPS?
01-01 01:00:13.8C : AT< +COPS: 0
01-01 01:00:13.877 441 587 D ATC :01:00:13.877 441 587 D ATC : AT< OK
01-01 01:00:13.877 : AT> AT+QENG="servingcell"
01-01 01:00:13.880 441 587 DG: "servingcell","LIMSRV","LTE","FDD",460,00,D6F7750,220,3590,8,,0,0
01-01 01:00:13.880 441 587 D ATC : AT< OK
01-01 0 451 D CELL_INFO: parseServingCell_234G:699 Enter...
01-01 01:01 D ATC : AT> AT+COPS=3,0;+COPS?;+COPS=3,1;+COPS?
01-01 01: D ATC : AT< +COPS: 0
01-01 01:00:13.882 441 587 D ATC 01-01 01:00:13.882 441 587 D ATC : AT< OK
01-01 01:00:1INFO: parseServingCell_234G:767 LTE RSRP=-106
01-01 01:00:13.8L_INFO: parseServingCell_234G:802 *count = 1
01-01 01:00:13.882 : AT> AT+CSQ
01-01 01:00:13.883 441 587 D ATC : AT< 0:13.883 441 587 D ATC : AT< OK
01-01 01:00:13.883 44urrentSignalStrengthInd: radioService[0]->mRadioIndication == NU59 441 587 D ATC : AT< +QIND: SMS DONE
01-01 01:00:13.9 : AT> AT+CPIN?
01-01 01:00:13.960 441 587 D ATC : AT< 01:00:13.960 441 587 D ATC : AT< OK
01-01 01:00:13.960 : [setRadioState]:oldState=4, newState=4
01-01 01:00:13.960 T> AT+QINISTAT
01-01 01:00:13.961 441 587 D ATC : AT< +1:00:13.961 441 587 D ATC : AT< OK
01-01 01:00:13.961 : AT> AT+CSMS=1
01-01 01:00:13.962 441 587 D ATC : AT< 01:00:13.962 441 587 D ATC : AT< OK
01-01 01:00:13.962 : AT> AT+CNMI=2,2
01-01 01:00:13.963 441 587 D ATC ::13.963 441 451 D ATC : AT> AT+CMGF=0
01-01 01:00:13.96 : AT< OK
12-22 06:19:28.037 441 587 D ATC : AT< +QI6:19:28.037 441 587 E RILC : RDY !!!
12-22 06:19:28.037 : AT> AT+CPIN?
12-22 06:19:28.041 441 587 D ATC : AT< +6:19:28.042 441 587 D ATC : AT< OK
12-22 06:19:28.042 : [setRadioState]:oldState=4, newState=4
12-22 06:19:29.343 anager: No /proc/cmdline exception=java.io.FileNotFoundExceptionn failed: EACCES (Permission denied)------------------------------
发现出现权限异常问题,修改权限接口:git diff device/rockchip/rk356x_box/rk356x_box/manifest.xml
diff --git a/device/rockchip/rk356x_box/rk356x_box/manifest.xml b/device/rockchip/rk356x_box/rk356x_box/manifest.xml
index 6f8b05b446..96fd27d630 100644
--- a/device/rockchip/rk356x_box/rk356x_box/manifest.xml
+++ b/device/rockchip/rk356x_box/rk356x_box/manifest.xml
@@ -26,6 +26,31 @@<instance>default</instance></interface></hal>
+ <hal format="hidl">
+ <name>android.hardware.radio</name>
+ <transport>hwbinder</transport>
+ <fqname>@1.1::IRadio/slot1</fqname>
+ <fqname>@1.1::IRadio/slot2</fqname>
+ <fqname>@1.2::ISap/slot1</fqname>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.radio.deprecated</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IOemHook</name>
+ <instance>slot1</instance>
+ </interface>
+ </hal>
+ <hal format="hidl">
+ <name>android.hardware.radio.config</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IRadioConfig</name>
+ <instance>default</instance>
+ </interface>
+ </hal><hal format="hidl"><name>android.hardware.graphics.composer</name><transport>hwbinder</transport>-----------------------------------------
到此4G 模块调试完毕,正常实现上网!