一、驱动配置:
修改kernel/drivers/usb/serial/option.c,添加:
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9090)}, //UC-15
5v_power_en {
compatible = "5v_en";
3gpower,pin =<&gpio2 GPIO_A2 GPIO_ACTIVE_LOW>;
3gen,pin =<&gpio0 GPIO_D6 GPIO_ACTIVE_HIGH>;
status = "okay";//okay
};
然后添加misc驱动以便在开机时上电和使能模块。
Device Drivers --->
[*] USB support --->
<*> USB Modem (CDC ACM) support
<*> USB Serial Converter support --->
[*] USB Generic Serial Driver
<*> USB driver for GSM and CDMA modems
Device Drivers --->
[*] Network device support --->
<*> PPP (point-to-point protocol) support
<*> PPP Deflate compression
<*> PPP support for async serial ports
<*> PPP support for sync tty ports
1、修改system/core/rootdir/init.rc,添加:
service ril-daemon /system/bin/rild -l /system/lib/libreference-ril.so
class main
socket rild stream 660 root radio
socket sap_uim_socket1 stream 660 bluetooth bluetooth
socket rild-debug stream 660 radio system
user root
group radio cache inet misc audio log
on property:ro.boot.baseband=N/A
setprop ro.radio.noril false
start ril-daemon
rild.libpath=/system/lib/libreference-ril.so
rild.libargs=-d /dev/ttyUSB0
# for radio
/dev/ttyUSB0 0660 radio radio
/dev/ttyUSB1 0660 radio radio
/dev/ttyUSB2 0660 radio radio
/dev/ttyUSB3 0660 radio radio
/dev/ttyUSB4 0660 radio radio
[ 5.382480] usb 1-1.1: New USB device found, idVendor=05c6, idProduct=9090
[ 5.382520] usb 1-1.1: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[ 5.382547] usb 1-1.1: Product: UMTS/HSPA Module
[ 5.382569] usb 1-1.1: Manufacturer: Quectel, Incorporated
[ 5.479168] option 1-1.1:1.0: GSM modem (1-port) converter detected
[ 5.480514] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB0
[ 5.481647] option 1-1.1:1.1: GSM modem (1-port) converter detected
[ 5.482896] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB1
[ 5.484041] option 1-1.1:1.2: GSM modem (1-port) converter detected
[ 5.488255] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB2
[ 5.489471] option 1-1.1:1.3: GSM modem (1-port) converter detected
[ 5.507673] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB3
[ 5.508908] option 1-1.1:1.4: GSM modem (1-port) converter detected
[ 5.510120] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB4
shell@rk312x:/ $ ps | grep rild
ps | grep rild
root 177 1 7200 1468 hrtimer_na 00000000 S /system/bin/rild
说明服务启动。