当前位置:首页 » 《关注互联网》 » 正文

高通平台模块modem增加AT Port和GPS NMEA Port 方法_zhiru20的博客

19 人参与  2021年08月27日 09:43  分类 : 《关注互联网》  评论

点击全文阅读


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},

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

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


点击全文阅读


本文链接:http://zhangshiyu.com/post/26284.html

修改  被占  顺序  
<< 上一篇 下一篇 >>

  • 评论(0)
  • 赞助本站

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

关于我们 | 我要投稿 | 免责申明

Copyright © 2020-2022 ZhangShiYu.com Rights Reserved.豫ICP备2022013469号-1