This article records the android 7.1 version, Sim7600CE module, A7600C1 module driver migration process and application test record:
Kernel version: linux-4.15.
Brief description:
The foundation of this driver migration is based on the Android 3G Internet framework, and the corresponding processes are all android standards; the modules involved in the framework are as follows:
hardware/ril/ril-rk29-dataonly: Android RIL wireless communication library
external/ppp/chat : ppp dial tool
external/ppp/pppd: pppd dial daemon thread
system/vold: vold Android system ril service
common/phone/etc/usb_modeswitch.d: open source usb_modeswitch mode switch tool.
Module transplantation: The
first step: Linux kernel driver supports these two modules, please refer to my linux porting part 4G/5G module driver porting article for specific configuration;
second step: in vendor/rockchip/common/phone/etc/usb_modeswitch. d/ Add PID/VID information under the file, so that usb_modeswitch can switch the ME909S device to a USB-serial device, the file name: 12d1_15c1 is as follows
DefaultVendor= 0x12d1
DefaultProduct= 0x15c1
TargetClass= 0xff
MessageContent="55534243123456780000000000000011060000000000000000000000000000"
CheckSuccess=20
Step 3: In the device/rockchip/common/BoardConfig.mk file, configure the Android system to support 3G module functions.
The configuration content is as follows
#for rk 4g modem
BOARD_HAVE_4G_EC20 := false
BOARD_HAS_RK_4G_MODEM ?= false
#enable 3g dongle 打开 3G dongle
BOARD_HAVE_DONGLE ?= true
Step 4: Modify the device/rockchip/rk3288/device.mk file to add content to the solution provider, as follows
#BOARD_HAVE_4G_EC20 := true 关闭此选项
ifeq ($(strip $(BOARD_HAVE_DONGLE)), true)
PRODUCT_COPY_FILES += device/rockchip/rk3288/4G/apns-conf.xml:system/etc/apns-conf.xml
ifeq ($(strip $(BOARD_HAVE_4G_EC20)), true)
$(call inherit-product-if-exists, device/rockchip/rk3288/4G/EC20/ec20.mk)
endif
endif
Step 5 Modify the following content in device/rockchip/common/system.prop
#修改此2条内容如下
rild.libpath=/system/lib/libreference-ril.so
rild.libargs=-d /dev/ttyUSB0
# Default ecclist
ro.ril.ecclist=112,911
ro.opengles.version = 131072
wifi.interface=wlan0
#关闭此2条内容
#rild.libpath=/system/lib/libril-rk29-dataonly.so
#rild.libargs=-d /dev/ttyACM0
persist.tegra.nvmmlite = 1
ro.audio.monitorOrientation=true
The sixth step is to modify the configuration files related to SELinux, add the following code to external/sepolicy/file_contexts:
/dev/ttyUSB[0-9]* u:object_r:tty_device:s0
/system/bin/rild u:object_r:rild_exec:s0
/system/socket/rild u:object_r:rild_socket:s0
/system/socket/rild-debug u:object_r:rild_debug_socket:s0
/system/bin/pppd u:object_r:pppd_exec:s0
/dev/ppp u:object_r:ppp_device:s0
The experimental test record is as follows
The verification process to be continued...