高通平台模块modem增加AT Port和GPS NAME Port 方法
- 修改 AP boot
diff --git a/arch/arm/mach-msm/smd_tty.c b/arch/arm/mach-msm/smd_tty.c
index 68e0f41..4903614 100755
--- a/arch/arm/mach-msm/smd_tty.c
+++ b/arch/arm/mach-msm/smd_tty.c
@@ -86,7 +86,7 @@ static struct smd_config smd_configs[] = {
{5, "APPS_RIVA_ANT_CMD", NULL, SMD_APPS_WCNSS},
{6, "APPS_RIVA_ANT_DATA", NULL, SMD_APPS_WCNSS},
{7, "DATA1", NULL, SMD_APPS_MODEM},
- {11, "DATA11", NULL, SMD_APPS_MODEM},
+ //{11, "DATA11", NULL, SMD_APPS_MODEM},//防止被占用
{21, "DATA21", NULL, SMD_APPS_MODEM},
//{27, "GPSNMEA", NULL, SMD_APPS_MODEM},//防止被占用
{36, "LOOPBACK", "LOOPBACK_TTY", SMD_APPS_MODEM},
+++ b/drivers/usb/gadget/u_smd.c
@@ -52,7 +52,7 @@ struct smd_port_info smd_pi[SMD_N_PORTS] = {
.name = "DS",
},
{
- .name = "UNUSED",
+ .name = "DATA11",//增加SMD AT Port
},
{
.name = "GPSNMEA",//增加SMD Gps Port
},
修改USB文件,修改前(9025):
echo $mode > /sys/bus/platform/devices/usb_bam/enable
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9025 > /sys/class/android_usb/android$num/idProduct
echo 0x0221 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo smd,tty > /sys/class/android_usb/android0/f_serial/transports
echo SMD,BAM2BAM > /sys/class/android_usb/android0/f_rmnet/transports
echo diag,adb,serial,rmnet,mass_storage > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/enable
修改后:
echo $mode > /sys/bus/platform/devices/usb_bam/enable
echo 0 > /sys/class/android_usb/android$num/enable
echo 0x9025 > /sys/class/android_usb/android$num/idProduct
echo 0x0221 > /sys/class/android_usb/android$num/idVendor
echo diag > /sys/class/android_usb/android0/f_diag/clients
echo smd,tty,smd,smd > /sys/class/android_usb/android0/f_serial/transports
echo SMD,BAM2BAM > /sys/class/android_usb/android0/f_rmnet/transports
echo diag,adb,serial,rmnet,mass_storage > /sys/class/android_usb/android$num/functions
echo 1 > /sys/class/android_usb/android$num/enable
注:由于驱动顺序问题,最好先增一个VID,同时修改USB Driver驱动文件,同时MI_0 MI顺序与echo顺序一一对应
将修改的文件放入/bin/usb/compositions,(bat脚本)
@echo off
adb shell rm -f boot_hsusb_composition
adb shell ln -s /bin/usb/compositions/9099 boot_hsusb_composition
@echo creat a link 9099 /........
adb shell mv boot_hsusb_composition /bin/usb
@echo mv the new boot_hsusb_composition To /bin/usb ........
adb shell sync
adb reboot
@echo LTE start to reboot, waiting...
@pause
- MODEM端 AT Port已有初始化;
- GPS Port(SIO_PORT_SMD_GPS_NMEA),
关闭#define FEATURE_CGPS_LBS_TASK_NMEA_PORT,且修改NV_CGPS_NMEA_CONFIG_INFO_I = 5047,为(3(SMD),0);