Openwrt Support MINI-PCIE EC20 (6)
1 Scope of Document
This document describes MINI PCIE usb hardware design, for EC20 4G module
2 Requiremen
2.1 Function Requirement
Support ec20 ppp diag under openwrt
2.2 Performance Requirement
Connect to 4G network
3 Hardware Overview
NA
4 Functional Description
4.1 Functional Block Diagram
NA
5 Porting
5.1 Kernel porting
We want to enumerate ec20 module through usb option driver
So we need to add ec20 pid and vid into option_ids , and other private modification
Index: trunk/target/linux/ramips/patches-3.18/999-support-ec20.patch
===================================================================
--- trunk/target/linux/ramips/patches-3.18/999-support-ec20.patch (nonexistent)
+++ trunk/target/linux/ramips/patches-3.18/999-support-ec20.patch (revision 9)
@@ -0,0 +1,69 @@
+--- a/drivers/net/usb/qmi_wwan.c
++++ b/drivers/net/usb/qmi_wwan.c
+@@ -819,7 +819,7 @@ static const struct usb_device_id produc
+ {QMI_GOBI_DEVICE(0x05c6, 0x9225)}, /* Sony Gobi 2000 Modem device (N0279, VU730) */
+ {QMI_GOBI_DEVICE(0x05c6, 0x9245)}, /* Samsung Gobi 2000 Modem device (VL176) */
+ {QMI_GOBI_DEVICE(0x03f0, 0x251d)}, /* HP Gobi 2000 Modem device (VP412) */
+- {QMI_GOBI_DEVICE(0x05c6, 0x9215)}, /* Acer Gobi 2000 Modem device (VP413) */
++ //{QMI_GOBI_DEVICE(0x05c6, 0x9215)}, /* Acer Gobi 2000 Modem device (VP413) */
+ {QMI_GOBI_DEVICE(0x05c6, 0x9265)}, /* Asus Gobi 2000 Modem device (VR305) */
+ {QMI_GOBI_DEVICE(0x05c6, 0x9235)}, /* Top Global Gobi 2000 Modem device (VR306) */
+ {QMI_GOBI_DEVICE(0x05c6, 0x9275)}, /* iRex Technologies Gobi 2000 Modem device (VR307) */
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -647,6 +647,10 @@ static const struct option_blacklist_inf
+ };
+
+ static const struct usb_device_id option_ids[] = {
++ #if 1 // add by panzidong
++ { USB_DEVICE(0x05C6,0x9215)},
++ { USB_DEVICE(0x2C7C,0x0125)},
++ #endif
+ { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_MZ382) },
+ { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
+ { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },
+@@ -1873,6 +1877,9 @@ static struct usb_serial_driver option_1
+ .suspend = usb_wwan_suspend,
+ .resume = usb_wwan_resume,
+ #endif
++#if 1 // add by panzidong
++ //.reset_resume = usb_wwan_resume,
++#endif
+ };
+
+ static struct usb_serial_driver * const serial_drivers[] = {
+--- a/drivers/usb/serial/qcserial.c
++++ b/drivers/usb/serial/qcserial.c
+@@ -90,7 +90,7 @@ static const struct usb_device_id id_tab
+ {USB_DEVICE(0x03f0, 0x241d)}, /* HP Gobi 2000 QDL device (VP412) */
+ {USB_DEVICE(0x03f0, 0x251d)}, /* HP Gobi 2000 Modem device (VP412) */
+ {USB_DEVICE(0x05c6, 0x9214)}, /* Acer Gobi 2000 QDL device (VP413) */
+- {USB_DEVICE(0x05c6, 0x9215)}, /* Acer Gobi 2000 Modem device (VP413) */
++ //{USB_DEVICE(0x05c6, 0x9215)}, /* Acer Gobi 2000 Modem device (VP413) */
+ {USB_DEVICE(0x05c6, 0x9264)}, /* Asus Gobi 2000 QDL device (VR305) */
+ {USB_DEVICE(0x05c6, 0x9265)}, /* Asus Gobi 2000 Modem device (VR305) */
+ {USB_DEVICE(0x05c6, 0x9234)}, /* Top Global Gobi 2000 QDL device (VR306) */
+--- a/drivers/usb/serial/usb_wwan.c
++++ b/drivers/usb/serial/usb_wwan.c
+@@ -470,6 +470,21 @@ static struct urb *usb_wwan_setup_urb(st
+ usb_fill_bulk_urb(urb, serial->dev,
+ usb_sndbulkpipe(serial->dev, endpoint) | dir,
+ buf, len, callback, ctx);
++ #if 1
++ //Added by panzidong for zero packet
++ if (dir == USB_DIR_OUT) {
++ struct usb_device_descriptor *desc = &serial->dev->descriptor;
++ if (desc->idVendor == cpu_to_le16(0x05C6) && desc->idProduct == cpu_to_le16(0x9090))
++ urb->transfer_flags |= URB_ZERO_PACKET;
++ if (desc->idVendor == cpu_to_le16(0x05C6) && desc->idProduct == cpu_to_le16(0x9003))
++ urb->transfer_flags |= URB_ZERO_PACKET;
++ if (desc->idVendor == cpu_to_le16(0x05C6) && desc->idProduct == cpu_to_le16(0x9215))
++ urb->transfer_flags |= URB_ZERO_PACKET;
++ if (desc->idVendor == cpu_to_le16(0x2C7C))
++ urb->transfer_flags |= URB_ZERO_PACKET;
++ }
++ #endif
++
+
+ return urb;
+ }
<*> kmod-usb-serial..................... Support for USB-to-Serial converters
<*> kmod-usb-serial-option................... Support for Option HSDPA modems
-*- kmod-usb-serial-wwan..................... Support for GSM and CDMA modems
<*> luci-proto-3g............................................. Support for 3G
5.2 System configure
If we want to use ec20, we can manual change /etc/config/network
Then /etc/init.d/network restart, pppd deamon will be up.
In the nodewrt2p we can change the config_generate file, when system fisrt time bootup
ec20 relate ppp configure will be auto write to /etc/config/network file, get the right ipaddr ,
Normal access to the Internet , here are the changes made:
Index: trunk/package/base-files/files/bin/config_generate
===================================================================
--- trunk/package/base-files/files/bin/config_generate (revision 15)
+++ trunk/package/base-files/files/bin/config_generate (revision 16)
@@ -17,9 +17,30 @@
delete network.globals
set network.globals='globals'
set network.globals.ula_prefix='auto'
EOF
}
+generate_4g_network() {
+ uci -q batch <<EOF
+set network.mobile=interface
+set network.mobile.proto='3g'
+set network.mobile.device='/dev/ttyUSB2'
+set network.mobile.service='utms'
+set network.mobile.apn='3gnet'
+EOF
+}
@@ -167,4 +189,8 @@
json_get_keys keys led
for key in $keys; do generate_led $key; done
+generate_4g_network
uci commit
Openwrt Support MINI-PCIE EC20 (6)的更多相关文章
- Openwrt Support RESET Button (5)
1 Scope of Document This document describes how to support reset button under openwrt system2 Requir ...
- AM335x 添加 HUAWEI MU609 Mini PCIe Module,并用pppd 启动相关设备
kernel 的配置 kernel 3.2.0 make menuconfig Device Drivers ---> [*] USB support ---> <*> USB ...
- Jetson TK1刷机+配置Mini PCI-e无线网卡
最近买了台4K电视,觉得可以当显示器用,但没主机,不知怎的想到了Jetson TK1,于是一冲动买了.因为没网线,而Jetson TK1没有无线网卡,所以也折腾了一番,记录一下,给万一也有像我一样没有 ...
- kernel 4.4.12 移植 HUAWEI MU609 Mini PCIe Module
首先请参考 http://www.cnblogs.com/chenfulin5/p/6951290.html 上一章刚讲了 kernel 3.2.0 移植 MU609 这一章记录新版kernel 的移 ...
- am335x system upgrade kernel ec20 simcom7600ce(十一)
1 Scope of Document This document describes 4G hardware design, support quectel ec20 4G module/ ...
- Ubuntu下LimeSDR Mini使用说明
本文内容.开发板及配件仅限用于学校或科研院所开展科研实验! 淘宝店铺名称:开源SDR实验室 LimeSDR链接:https://item.taobao.com/item.htm?spm=a230r.1 ...
- Fusion-io ioDrive Duo Enterprise PCIe Review
原文地址:http://www.storagereview.com/fusionio_iodrive_duo_enterprise_pcie_review As part of StorageRevi ...
- Openwrt Udev Configure(3)
1 Scope of Document This document describes how to write udev script, when enum usb device mayb ...
- 科普:PCI-E插槽都有哪些样子?
主板上的扩展插槽曾经是多种多样的,例如曾经非常流行的组合就是PCI插槽搭配AGP插槽,其中AGP插槽主要用在显卡上,而PCI插槽的用途则更广一些,不仅有用在显卡上,还能用于扩展其它设备,如网卡.声卡. ...
随机推荐
- LightOJ 1393 Crazy Calendar(博弈)题解
题意:r*c方格中,每个格子有一定石子,每次移动每格任意数量石子,只能向下或者向右动一格,不能移动为败 思路:显然是Nim,到右下曼哈顿距离为偶数的不用管,因为先手动一下后手动一下最后移到右下后还是先 ...
- [Redis] - 高并发下Redis缓存穿透解决
高并发情况下,可能都要访问数据库,因为同时访问的方法,这时需要加入同步锁,当其中一个缓存获取后,其它的就要通过缓存获取数据. 方法一: 在方法上加上同步锁 synchronized //加同步锁,解决 ...
- 07_Flume_regex interceptor实践
实践一:regex filter interceptor 1.目标场景 regex filter interceptor的作用: 1)将event body的内容和配置中指定的正则表达式进行匹配2)如 ...
- UVa 11235 频繁出现的数值
https://vjudge.net/problem/UVA-11235 题意: 给出一个非降序排列的整数数组a1,a2,...,an,你的任务是对于一系列询问(i,j),回答ai,ai+1,...a ...
- C# asp.net 比较两个时间的差求天数
string str1 = "2017-2-13 23:59:59"; string str2 = "2017-2-14 0:00:01"; DateTime ...
- hdu 3706 Second My Problem First 单调队列
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3706 Second My Problem First Time Limit: 12000/4000 M ...
- node 文件、文件夹 增删改查
1. 文件夹 增加文件夹 var fs = require("fs"); console.log("创建目录 tmp"); fs.mkdir("tmp ...
- android开发:Android 中自定义属性(attr.xml,TypedArray)的使用
今天我们的教程是根据前面一节扩展进行的,如果你没有看,请点击 Android高手进阶教程(三)查看第三课,这样跟容易方便你的理解! 在xml 文件里定义控件的属性,我们已经习惯了android:att ...
- Unity如何判断一个对象是不是一件衣服
判断该对象及其子对象上是否有SkinnedMeshRenderer组价即可 public static bool IsCloth(Transform obj) { bool isCloth = fal ...
- 5-15 devise(git指南,部分认为重要的内容的译文)
git指南:https://github.com/plataformatec/devise 维基百科上有how to 的很多文章. Stackoverflow有大量问题的答案. 全的文档devise: ...