/**************************************************************************
* I.MX6 Android U-blox miniPCI 4G porting
* 声明:
* 在移植U-blox的4G模块的过程中遇到了不少的问题,有不少是自己的这边疏忽
* 的问题,无论怎么说,问题解决了就行。
*
* 2016-1-11 深圳 南山平山村 曾剑锋
*************************************************************************/ 一、参考文档:
. 飞思卡尔i.MX 6Quad Android 4.0.4的3G驱动移植
http://blog.csdn.net/xnwyd/article/details/9498235
. 关于 android RIL 调试
http://blog.lytsing.org/archives/476.html 二、ublox设备miniPCI识别到的设备节点:
. 只有一个: /dev/ttyACM0.
. 原因如下:
the USB mode of MPCI-L210 module in "RNDIS" mode, so it will only create one and only one ttyACM0 node. If you need to use ttyACM0, ttyACM1 and ttyACM2. please execute following command:
// Set USB configuration to "fairly back-compatible" and disable the audio over USB.
. AT+UUSBCONF=,””,
// It need reboot the module.
. AT+CFUN=
// this command will reboot the module, or you can reboot device instead of.
. AT+UUSBCONF?
For more detail description, please check attach file(AT-CommandExample), chapter USB profile configuration. 三、重新配置ublox:
. 参考《AT Commands Examples Examples for u-blox cellular modules Application Note》;
. chapter USB profile configuration: Fairly back-compatible profile
This is the configuration (<id>=) similar to the one implemented in the u-blox LISA-U series. The interfaces available are:
. CDC-ACM for AT command and data
. CDC-ACM for GNSS tunnelling
. CDC-ACM for SIM Access profile (SAP)
. CDC-ACM for diagnostic
This configuration is identified by:
VID = 0x1546
PID = 0x1141
省略后面的命令说明...
. 使用串口工具,对ublox进行配置,我使用的是自己之前写的命令行的串口工具,参考:《I.MX6 Android Linux UART send receive with multi-thread and multi-mode demo》
root@android:/data/local # ./autorun.sh
serialString : /dev/ttyACM0.
baudRate .
workMode: send and recv.
AT+UUSBCONF=,"", OK . dmesg信息提示如下:
......
usb -1.4: new high speed USB device number using fsl-ehci
imx-ipuv3 imx-ipuv3.: IPU DMFC DP HIGH RESOLUTION: (,), 5B(~), 5F(,)
cdc_acm -1.4:1.0: This device cannot do calls on its own. It is not a modem.
cdc_acm -1.4:1.0: ttyACM0: USB ACM device
cdc_acm -1.4:1.2: This device cannot do calls on its own. It is not a modem.
cdc_acm -1.4:1.2: ttyACM1: USB ACM device
cdc_acm -1.4:1.4: This device cannot do calls on its own. It is not a modem.
cdc_acm -1.4:1.4: ttyACM2: USB ACM device
cdc_acm -1.4:1.6: This device cannot do calls on its own. It is not a modem.
cdc_acm -1.4:1.6: ttyACM3: USB ACM device
cdc_acm -1.4:1.8: This device cannot do calls on its own. It is not a modem.
cdc_acm -1.4:1.8: ttyACM4: USB ACM device
cdc_acm -1.4:1.10: This device cannot do calls on its own. It is not a modem.
cdc_acm -1.4:1.10: ttyACM5: USB ACM device
......
. 厂家的FAE说上面的错误可以不用关心
This device cannot do calls on its own. It is not a modem. 四、配置Android系统:
. 参考文档:《Android RIL Production delivery – Source code Application Note》
. 参考章节:Appendix - D Android 4.1/ 4.2 / 4.3 / 4.4 module configuration
To enable the USB module connection, configure Ueventd.[platform].rc, AndroidProducts.mk and init.rc files as described in sections below. Before changing the files, below are some necessary steps to follow. 五、Error:
. Error1:
. 出错信息:
init: cannot execve('/system/bin/uril-repo.sh'): No such file or directory
. 查看uril-repo.sh文件:busybox vi uril-repo.sh
#!/system/bin/sh^M
^M
URIL_REPO_DST=/data/uril/repository.txt^M
^M
rril_repo_missing=`ls $URIL_REPO_DST`true^M
^M
if (${rril_repo_missing}) ; then^M
mkdir /data/uril^M
chmod /data/uril^M
cat /etc/uril/repository.txt > $URIL_REPO_DST^M
chmod $URIL_REPO_DST^M
sync^M
/system/bin/log -t RIL-repo "created $URIL_REPO_DST"^M
else^M
/system/bin/log -t RIL-repo "$URIL_REPO_DST exists"^M
fi^M
^M
# set this property after checking that repository exists or after it's created^
# This is checked in rildmain mainloop during RIL_Init^M
/system/bin/setprop "net.uril.repository" "ready"^M
^M
# set this property to configure emergency number if required^M
#/system/bin/setprop "ril.ecclist" "111,112,113,115,117,118,119,122,125,127,911,
- uril-repo.sh / %
. 通过查看文件,发现其中的每行最后都多出了^M这个字符,貌似这个文件是在Windows上面编辑的。
. 删除这些^M。
. 但是这个字符在Ubuntu、Vim中都看不到,这貌似有点奇怪。
. 有点忧伤的地方在于U-Blox提供的etc下的配置文件都是这种文件,他们提供错了文档。
. Error2:
. adb logcat -v time -b radio > logcat_info.txt
. 错误信息:
- ::05.570 I/RIL ( ): 3G modem monitor thread is start - ::05.570 E/RILD ( ): dlopen failed: Cannot load library: load_library(linker.cpp:): library "/system/lib/libhuawei-ril.so" not found - ::05.620 I/RIL-repo( ): created /data/uril/repository.txt - ::10.100 E/RILD ( ): dlopen failed: Cannot load library: load_library(linker.cpp:): library "/system/lib/libhuawei-ril.so" not found ......
. cat hardware/ril/rild/rild.c
......
// #define REFERENCE_RIL_DEF_PATH "/system/lib/libhuawei-ril.so"
......
int main(int argc, char **argv)
{
......
switch (modem_type){
case ZTE_MODEM:
rilLibPath = REFERENCE_RIL_ZTE_PATH;
break; case HUAWEI_MODEM:
case AMAZON_MODEM:
default:
rilLibPath = REFERENCE_RIL_DEF_PATH;
break;
}
......
}
. 修改REFERENCE_RIL_DEF_PATH的值为:
"/system/lib/librapid-ril-core.so"
. 根据rild.c中代码的运行流程可知,命令行中的-l参数是无效。
. 能够获取GSM信号,但无法获取网络数据:
. 模块问题检查:
root@android:/data/local # ./autorun.sh
CMD: AT+UUSBCONF?. +UUSBCONF: ,"RNDIS",,"0x1146" OK
CMD: AT+UUSBCONF=,"",. OK
CMD: AT+CFUN=.
usb -1.4: USB disconnect, device number
usb -1.4: new high speed USB device number using fsl-ehci
usb -1.4: USB disconnect, device number
usb -1.4: new high speed USB device number using fsl-ehci
cdc_acm -1.4:1.0: This device cannot do calls on its own. It is not a modem.
cdc_acm -1.4:1.0: ttyACM0: USB ACM device
cdc_acm -1.4:1.2: This device cannot do calls on its own. It is not a modem.
cdc_acm -1.4:1.2: ttyACM1: USB ACM device
cdc_acm -1.4:1.4: This device cannot do calls on its own. It is not a modem.
cdc_acm -1.4:1.4: ttyACM2: USB ACM device
cdc_acm -1.4:1.6: This device cannot do calls on its own. It is not a modem.
cdc_acm -1.4:1.6: ttyACM3: USB ACM device
cdc_acm -1.4:1.8: This device cannot do calls on its own. It is not a modem.
cdc_acm -1.4:1.8: ttyACM4: USB ACM device
cdc_acm -1.4:1.10: This device cannot do calls on its own. It is not a modem.
cdc_acm -1.4:1.10: ttyACM5: USB ACM device
CMD: AT+UUSBCONF?. +UUSBCONF: ,"",,"0x1141" OK
usb -1.4: USB disconnect, device number
usb -1.4: new high speed USB device number using fsl-ehci
usb -1.4: USB disconnect, device number
usb -1.4: new high speed USB device number using fsl-ehci
cdc_acm -1.4:1.2: This device cannot do calls on its own. It is not a modem.
cdc_acm -1.4:1.2: ttyACM0: USB ACM device
CMD: AT+UUSBCONF?.
AT+UUSBCONF?
+UUSBCONF: ,"RNDIS",,"0x1146" OK ATE0V1
OK
. 从1中可以看出:
将模块设置为Fairly back-compatible模式的时候,移植的系统又会自动将模块
重置为High throughput模式,无法稳定工作在Fairly back-compatible模式。
. 原因是 "hardware/ril/ublox_ril/CORE/ND/systemmanager.cpp” 的 1729 行.
. 解决办法:
. 参考《AndroidRIL-SourceCode_AppNote.pdf》中"章节 I, Repository file configuration".
. cat build/target/product/rootdir/etc/uril/repository.txt
......
// Modem settings
Group Modem
SupportedModem UbloxModem
//NetworkInterfaceName USB // 修改为ppp
NetworkInterfaceName ppp
DisableModemReset
......
// USB Profile Configuration
Group USBUBM
// 将RNDIS模式修改为CDC-ACM模式
// USBCONF 3 // 0: CDC-ACM, 2: CDC-ECM, 3: RNDIS
USBCONF // 0: CDC-ACM, 2: CDC-ECM, 3: RNDIS
UBMCONF // 1: Router, 2: Bridge
......

I.MX6 Android U-blox miniPCI 4G porting的更多相关文章

  1. I.MX6 Android iperf3 porting failed

    /***************************************************************************** * I.MX6 Android iperf ...

  2. I.MX6 Android i2c-tools porting

    /************************************************************************** * I.MX6 Android i2c-tool ...

  3. I.MX6 Android 5.1 快速合成系统

    /**************************************************************************** * I.MX6 Android 5.1 快速 ...

  4. I.MX6 Android backlight modify by C demo

    /************************************************************************** * I.MX6 Android backligh ...

  5. I.MX6 Android netperf

    /***************************************************************************** * I.MX6 Android netpe ...

  6. I.MX6 android 设置 默认 动态桌面

    /************************************************************************ * I.MX6 android 设置 默认 动态桌面 ...

  7. I.MX6 android 获取framebuffer信息

    /******************************************************************************** * I.MX6 android 获取 ...

  8. I.MX6 Android Linux shell MMPF0100 i2c 设置数据

    #!/system/bin/busybox ash # # I.MX6 Android Linux shell MMPF0100 i2c 设置数据 # 说明: # 本文主要记录通过shell脚本来设置 ...

  9. I.MX6 Android Linux shell MMPF0100 i2c 获取数据

    #!/system/bin/busybox ash # # I.MX6 Android Linux shell MMPF0100 i2c 获取数据 # 说明: # 本文主要记录通过shell脚本来获取 ...

随机推荐

  1. ios 多任务学习笔记

    一.检测多任务是否支持: - (BOOL) isMultitaskingSupported{ BOOL result = NO; if ([[UIDevice currentDevice] respo ...

  2. 有关javascript中的JSON.parse和JSON.stringify的使用一二

    有没有想过,当我们的大后台只是扮演一个数据库的角色,json在前后台的数据交换中扮演极其重要的角色时,作为依托node的前端开发,其实相当多的时间都是在处理数据,准确地说就是在处理逻辑和数据(这周实习 ...

  3. PAT-乙级-1051. 复数乘法 (15)

    1051. 复数乘法 (15) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue 复数可以写成(A + Bi)的常规 ...

  4. win8 ubuntu

    点进去看到几点注意: 1. 如果Windows是UEFI方式安装的,那Ubuntu必须也用UEFI方式安装 2. 必须用64位的Ubuntu安装文件,32位的不能探测EFI 3. 必须用UEFI的方式 ...

  5. HTTP请求报文与响应报文

    http://docs.telerik.com/fiddler/KnowledgeBase/HTTP HTTP请求报文与响应报文 HTTP http://www.w3.org/Protocols/rf ...

  6. 如何通过css控制内容显示顺序 第二行的内容优先显示

    我们有时进行网页设计时为了想让用户感兴趣的内容优先显示在前,又不想改动代码的先后顺序,要怎么操作呢?(或者换种说法:源代码中要先看到A再看到B,而视觉上是先B再A)举个简单的例子,想让第二行的内容在不 ...

  7. CentOS中实现Nginx负载均衡和反向代理

    一.安装必要软件 负载均衡服务器:IP设置为192.168.1.10 Web服务器1:安装Apache或者Nginx,IP设置为192.168.1.11: Web服务器2:安装Apache或者Ngin ...

  8. IOS 视图控制对象生命周期-init、viewDidLoad、viewWillAppear、viewDidAppear、viewWillDisappear等的区别及用途

    iOS视图控制对象生命周期-init.viewDidLoad.viewWillAppear.viewDidAppear.viewWillDisappear.viewDidDisappear的区别及用途 ...

  9. hdu 1713 相遇周期

    求分数的最小公倍数.对于a/b c/d 先化简为最简分数,分数最小公倍数=分子的最小公倍数/分母的最大公约数. ;}

  10. TCL语言笔记:TCL中的数组

    一.介绍 Tcl 中的数组和其他高级语言的数组有些不同:Tcl 数组元素的索引,或称键值,可以是任意的字符串,而且其本身没有所谓多维数组的概念.数组的存取速度要比列表有优势,数组在内部使用散列表来存储 ...