高通平台模块modem增加AT Port和GPS NAME Port 方法

高通平台模块modem增加AT Port和GPS NAME Port 方法

  1. 修改 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
  1. MODEM端 AT Port已有初始化;
  2. GPS Port(SIO_PORT_SMD_GPS_NMEA),

关闭#define FEATURE_CGPS_LBS_TASK_NMEA_PORT,且修改NV_CGPS_NMEA_CONFIG_INFO_I = 5047,为(3(SMD),0);

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

四儿家的小祖宗

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值