当前位置: 移动技术网 > 科技>操作系统>Linux > am335x system upgrade kernel ec20 simcom7600ce(十一)

am335x system upgrade kernel ec20 simcom7600ce(十一)

2018年12月02日  | 移动技术网科技  | 我要评论

1      scope of document

this document describes 4g hardware design, support quectel ec20 4g module/ simcom 7600 ce 4g module

2      requiremen

2.1     function requirement

support ec20 qmi driver/ simcom 7600 ce ndis driver

2.2     performance requirement

na

3      hardware overview

 

                  figure 1 4g interface block diagram

4      functional description

4.1     functional block diagram

pcie-usb connect to 4g module. port4 connect usb hub, usb hub connect to cpu usb port0

                    

4.2      usb-cdc

4.2.1 overview qmi

              qualcomm msm interface(qmi) is a messaging format used to communicate

       between software components in the modem and other peripheral subsystems.

       this document proposes an architecture to introduce the qmi messaging

       into the kernel. this document proposes introducing a qmi encode/decode

       library to enable qmi message marshaling and an interface library to enable

       sending and receiving qmi messages through msm ipc router.

 

https://android.googlesource.com/kernel/msm/+/android-7.1.0_r0.2/documentation/arm/msm/msm_qmi.txt

4.2.2 overview ndis

 

it was jointly developed by microsoft and 3com corporation and is mostly used in microsoft windows. however, the open-source ndiswrapper and project evil driver wrapper projects allow many ndis-compliant nics to be used with linux, freebsd and netbsd. magnussoft zeta, a derivative of beos, supports a number of ndis drivers.

 

the ndis forms the logical link control (llc) sublayer, which is the upper sublayer of the osi data link layer (layer 2). therefore, the ndis acts as the interface between the media access control (mac) sublayer, which is the lower sublayer of the data link layer, and the network layer (layer 3).

 

the ndis is a library of functions often referred to as a "wrapper" that hides the underlying complexity of the nic hardware and serves as a standard interface for level 3 network protocol drivers and hardware level mac drivers. another common llc is the open data-link interface (odi).

 

the ndis versions supported by various windows versions are as follows:

 

ndis 2.0: ms-dos, windows for workgroups 3.1, os/2

ndis 3.0: windows for workgroups 3.11

ndis 3.1: windows 95

ndis 4.0: windows 95 osr2, nt 4.0, windows ce 3.0

ndis 5.0: windows 98, 98 se, me, 2000

ndis 5.1: windows xp, server 2003, windows ce 4.x, 5.0, 6.0[1]

ndis 5.2: windows server 2003 sp2

ndis 6.0: windows vista

ndis 6.1: windows vista sp1, server 2008, windows embedded compact 7,[2] windows embedded compact 2013

ndis 6.20: windows 7, server 2008 r2

ndis 6.30: windows 8, windows server 2012

ndis 6.40: windows 8.1, windows server 2012 r2

ndis 6.50: windows 10, version 1507[3]

ndis 6.60: windows server 2016 and windows 10, version 1607[3]

ndis 6.70: windows 10, version 1703[3]

ndis 6.80: windows 10, version 1709[3]

ndis 6.81: windows 10, version 1803[3]

ndis 6.82: windows 10, version 1809[3]

the traffic accepted by the nic is controlled by an ndis miniport driver while various protocols, such as tcp/ip, are implemented by ndis protocol drivers. a single miniport may be associated with one or more protocols. this means that traffic coming into the miniport may be received in parallel by several protocol drivers. for example, winpcap adds a second protocol driver on the selected miniport in order to capture incoming packets. furthermore, it is possible to simulate several virtual nics by implementing virtual miniport drivers that send and receive traffic from a single physical nic. one example of virtual miniport driver usage is to add virtual nics, each with a different virtual lan. because implementations cannot assume that other drivers received the same buffers, one must treat the incoming buffers as read only and a driver that changes the packet content must allocate its own buffers.

 

a miniport is a type of hardware driver, part of the windows driver model. these are usb, audio, scsi and network card adapters. they should usually be source and binary compatible between windows 98 and windows 2000 and are hardware specific but control access to the hardware through a specific bus class driver. [4]

 

another driver type is ndis intermediate driver. intermediate drivers sit in-between the mac and ip layers and can control all traffic being accepted by the nic. in practice, intermediate drivers implement both miniport and protocol interfaces. the miniport driver and protocol driver actually communicate with the corresponding miniport and protocol interfaces that reside in the intermediate driver. this design enables adding several chained intermediate drivers between the miniport and protocol drivers. therefore, driver vendors cannot assume that the interface that they send traffic to is implemented by the last driver in the chain. in order to write applications using ndis one can use samples that accompany microsoft's windows driver kit (wdk). the "passthru" sample is a good starting point for intermediate drivers as it implements all the necessary details required in this driver type, but just passes the traffic through to the next driver in the chain.

 

https://en.wikipedia.org/wiki/network_driver_interface_specification

5      porting

5.1     uboot porting

na

5.2     kernel porting

 for ec20

index: trunk/linux-4.14.40/drivers/net/usb/qmi_wwan.c
===================================================================
--- trunk/linux-4.14.40/drivers/net/usb/qmi_wwan.c (revision 244)
+++ trunk/linux-4.14.40/drivers/net/usb/qmi_wwan.c (revision 245)
@@ -23,6 +23,68 @@
#include <linux/usb/usbnet.h>
#include <linux/usb/cdc-wdm.h>

+
+#if 1 //add by quectel
+struct sk_buff *qmi_wwan_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags)
+{
+ if (dev->udev->descriptor.idvendor != cpu_to_le16(0x2c7c))
+ return skb;
+
+ // skip ethernet header from message
+ if (skb_pull(skb, eth_hlen)) {
+ return skb;
+ } else {
+ dev_err(&dev->intf->dev, "packet dropped ");
+ }
+
+ // filter the packet out, release it
+ dev_kfree_skb_any(skb);
+ return null;
+}
+
+#include <linux/version.h>
+#if (linux_version_code < kernel_version( 3,9,1 ))
+static int qmi_wwan_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
+{
+ __be16 proto;
+
+ if (dev->udev->descriptor.idvendor != cpu_to_le16(0x2c7c))
+ return 1;
+
+ /* this check is no longer done by usbnet */
+ if (skb->len < dev->net->hard_header_len)
+ return 0;
+
+ switch (skb->data[0] & 0xf0) {
+ case 0x40:
+ proto = htons(eth_p_ip);
+ break;
+ case 0x60:
+ proto = htons(eth_p_ipv6);
+ break;
+ case 0x00:
+ if (is_multicast_ether_addr(skb->data))
+ return 1;
+ /* possibly bogus destination - rewrite just in case */
+ skb_reset_mac_header(skb);
+ goto fix_dest;
+ default:
+ /* pass along other packets without modifications */
+ return 1;
+ }
+ if (skb_headroom(skb) < eth_hlen)
+ return 0;
+ skb_push(skb, eth_hlen);
+ skb_reset_mac_header(skb);
+ eth_hdr(skb)->h_proto = proto;
+ memset(eth_hdr(skb)->h_source, 0, eth_alen);
+fix_dest:
+ memcpy(eth_hdr(skb)->h_dest, dev->net->dev_addr, eth_alen);
+ return 1;
+}
+#endif
+#endif
+
/* this driver supports wwan (3g/lte/?) devices using a vendor
* specific management protocol called qualcomm msm interface (qmi) -
* in addition to the more common at commands over serial interface
@@ -740,6 +802,20 @@
}
dev->net->netdev_ops = &qmi_wwan_netdev_ops;
dev->net->sysfs_groups[0] = &qmi_wwan_sysfs_attr_group;
+#if 1 //add by quectel
+ if (dev->udev->descriptor.idvendor == cpu_to_le16(0x2c7c)) {
+ dev_info(&intf->dev, "quectel ec21&ec25 work on rawip mode\n");
+ dev->net->flags |= iff_noarp;
+ usb_control_msg(
+ interface_to_usbdev(intf),
+ usb_sndctrlpipe(interface_to_usbdev(intf), 0),
+ 0x22,
+ 0x21,
+ 1, //active cdc dtr
+ intf->cur_altsetting->desc.binterfacenumber,
+ null, 0, 100);
+ }
+#endif
err:
return status;
}
@@ -830,6 +906,9 @@
.bind = qmi_wwan_bind,
.unbind = qmi_wwan_unbind,
.manage_power = qmi_wwan_manage_power,
+#if 1 //add by quectel
+ .tx_fixup = qmi_wwan_tx_fixup,
+#endif
.rx_fixup = qmi_wwan_rx_fixup,
};

@@ -840,6 +919,9 @@
.unbind = qmi_wwan_unbind,
.manage_power = qmi_wwan_manage_power,
.rx_fixup = qmi_wwan_rx_fixup,
+#if 1 //add by quectel
+ .tx_fixup = qmi_wwan_tx_fixup,
+#endif
.data = qmi_wwan_quirk_dtr,
};

@@ -1247,6 +1329,7 @@
{qmi_quirk_set_dtr(0x2c7c, 0x0121, 4)}, /* quectel ec21 mini pcie */
{qmi_fixed_intf(0x2c7c, 0x0296, 4)}, /* quectel bg96 */
{qmi_quirk_set_dtr(0x2c7c, 0x0306, 4)}, /* quectel ep06 mini pcie */
+ {qmi_quirk_set_dtr(0x2c7c, 0x0435, 4)}, /* quectel ag35 */

/* 4. gobi 1000 devices */
{qmi_gobi1k_device(0x05c6, 0x9212)}, /* acer gobi modem device */
index: trunk/linux-4.14.40/drivers/usb/serial/usb_wwan.c
===================================================================
--- trunk/linux-4.14.40/drivers/usb/serial/usb_wwan.c (revision 244)
+++ trunk/linux-4.14.40/drivers/usb/serial/usb_wwan.c (revision 245)
@@ -501,6 +501,18 @@
usb_fill_bulk_urb(urb, serial->dev,
usb_sndbulkpipe(serial->dev, endpoint) | dir,
buf, len, callback, ctx);
+#if 1 //added by quectel for zero packet
+ if (dir == usb_dir_out) {
+ if (serial->dev->descriptor.idvendor == cpu_to_le16(0x05c6) && serial->dev->descriptor.idproduct == cpu_to_le16(0x9090))
+ urb->transfer_flags |= urb_zero_packet;
+ if (serial->dev->descriptor.idvendor == cpu_to_le16(0x05c6) && serial->dev->descriptor.idproduct == cpu_to_le16(0x9003))
+ urb->transfer_flags |= urb_zero_packet;
+ if (serial->dev->descriptor.idvendor == cpu_to_le16(0x05c6) && serial->dev->descriptor.idproduct == cpu_to_le16(0x9215))
+ urb->transfer_flags |= urb_zero_packet;
+ if (serial->dev->descriptor.idvendor == cpu_to_le16(0x2c7c))
+ urb->transfer_flags |= urb_zero_packet;
+ }
+#endif

return urb;
}
index: trunk/linux-4.14.40/drivers/usb/serial/option.c
===================================================================
--- trunk/linux-4.14.40/drivers/usb/serial/option.c (revision 244)
+++ trunk/linux-4.14.40/drivers/usb/serial/option.c (revision 245)
@@ -247,6 +247,7 @@
#define quectel_product_ec25 0x0125
#define quectel_product_bg96 0x0296
#define quectel_product_ep06 0x0306
+#define quectel_product_ag35 0x0435

#define cmotech_vendor_id 0x16d8
#define cmotech_product_6001 0x6001
@@ -1970,6 +1971,9 @@
.suspend = usb_wwan_suspend,
.resume = usb_wwan_resume,
#endif
+#if 1 //add by quectel
+ .reset_resume = usb_wwan_resume,
+#endif
};

static struct usb_serial_driver * const serial_drivers[] = {
@@ -1986,6 +1990,21 @@
struct usb_device_descriptor *dev_desc = &serial->dev->descriptor;
unsigned long device_flags = id->driver_info;

+#if 1 //added by quectel
+ //quectel uc20's interface 4 can be used as usb network device
+ if (serial->dev->descriptor.idvendor == cpu_to_le16(0x05c6) && serial->dev->descriptor.idproduct == cpu_to_le16(0x9003)
+ && serial->interface->cur_altsetting->desc.binterfacenumber >= 4)
+ return -enodev;
+ //quectel ec20's interface 4 can be used as usb network device
+ if (serial->dev->descriptor.idvendor == cpu_to_le16(0x05c6) && serial->dev->descriptor.idproduct == cpu_to_le16(0x9215)
+ && serial->interface->cur_altsetting->desc.binterfacenumber >= 4)
+ return -enodev;
+ //quectel ec25&ec21 's interface 4 can be used as usb network device
+ if (serial->dev->descriptor.idvendor == cpu_to_le16(0x2c7c)
+ && serial->interface->cur_altsetting->desc.binterfacenumber >= 4)
+ return -enodev;
+#endif
+
/* never bind to the cd-rom emulation interface */
if (iface_desc->binterfaceclass == 0x08)
return -enodev;
index: trunk/linux-4.14.40/drivers/usb/serial/qcserial.c
===================================================================
--- trunk/linux-4.14.40/drivers/usb/serial/qcserial.c (revision 244)
+++ trunk/linux-4.14.40/drivers/usb/serial/qcserial.c (revision 245)
@@ -92,7 +92,7 @@
{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) */
index: trunk/linux-4.14.40/drivers/usb/class/cdc-acm.c
===================================================================
--- trunk/linux-4.14.40/drivers/usb/class/cdc-acm.c (revision 244)
+++ trunk/linux-4.14.40/drivers/usb/class/cdc-acm.c (revision 245)
@@ -1484,6 +1484,10 @@
usb_fill_bulk_urb(snd->urb, usb_dev, acm->out,
null, acm->writesize, acm_write_bulk, snd);
snd->urb->transfer_flags |= urb_no_transfer_dma_map;
+#if 1 //add by quectel
+ if (usb_dev->descriptor.idvendor == 0x1519 && usb_dev->descriptor.idproduct == 0x0020)
+ snd->urb->transfer_flags |= urb_zero_packet;
+#endif
if (quirks & send_zero_packet)
snd->urb->transfer_flags |= urb_zero_packet;
snd->instance = acm;

 

for simcom7600ce

index: trunk/linux-4.14.40/arch/arm/configs/tisdk_am335x-evm_defconfig
===================================================================
--- trunk/linux-4.14.40/arch/arm/configs/tisdk_am335x-evm_defconfig (revision 245)
+++ trunk/linux-4.14.40/arch/arm/configs/tisdk_am335x-evm_defconfig (revision 246)
@@ -1977,7 +1977,7 @@
config_usb_usbnet=y
config_usb_net_ax8817x=m
config_usb_net_ax88179_178a=m
-config_usb_net_cdcether=m
+config_usb_net_cdcether=y
# config_usb_net_cdc_eem is not set
config_usb_net_cdc_ncm=m
# config_usb_net_huawei_cdc_ncm is not set
@@ -4229,8 +4229,6 @@
# config_usb_g_multi is not set
# config_usb_g_hid is not set
# config_usb_g_dbgp is not set
-# config_usb_g_dbgp_printk is not set
-# config_usb_g_dbgp_serial is not set
# config_usb_g_webcam is not set

#
index: trunk/linux-4.14.40/drivers/net/usb/simcom_wwan.c
===================================================================
--- trunk/linux-4.14.40/drivers/net/usb/simcom_wwan.c (nonexistent)
+++ trunk/linux-4.14.40/drivers/net/usb/simcom_wwan.c (revision 246)
@@ -0,0 +1,242 @@
+/*
+ * copyright (c) 2016 xiaobin wang <xiaobin.wang@sim.com>
+ *
+ * this program is free software; you can redistribute it and/or
+ * modify it under the terms of the gnu general public license
+ * version 2 as published by the free software foundation.
+ */
+
+/*
+ * history
+ * v1.00 - first release -20160822
+*/
+
+#include <linux/module.h>
+#include <linux/netdevice.h>
+#include <linux/ethtool.h>
+#include <linux/etherdevice.h>
+#include <linux/mii.h>
+#include <linux/usb.h>
+#include <linux/usb/cdc.h>
+#include <linux/usb/usbnet.h>
+
+
+/* very simplistic detection of ipv4 or ipv6 headers */
+static bool possibly_iphdr(const char *data)
+{
+ return (data[0] & 0xd0) == 0x40;
+}
+
+/* simcom devices combine the "control" and "data" functions into a
+ * single interface with all three endpoints: interrupt + bulk in and
+ * out
+ */
+static int simcom_wwan_bind(struct usbnet *dev, struct usb_interface *intf)
+{
+ int rv = -einval;
+
+ //struct usb_driver *subdriver = null;
+ atomic_t *pmcount = (void *)&dev->data[1];
+
+ /* ignore any interface with additional descriptors */
+ if (intf->cur_altsetting->extralen)
+ goto err;
+
+ /* some makes devices where the interface descriptors and endpoint
+ * configurations of two or more interfaces are identical, even
+ * though the functions are completely different. if set, then
+ * driver_info->data is a bitmap of acceptable interface numbers
+ * allowing us to bind to one such interface without binding to
+ * all of them
+ */
+ if (dev->driver_info->data &&
+ !test_bit(intf->cur_altsetting->desc.binterfacenumber, &dev->driver_info->data)) {
+ dev_info(&intf->dev, "not on our whitelist - ignored");
+ rv = -enodev;
+ goto err;
+ }
+
+ atomic_set(pmcount, 0);
+
+ /* collect all three endpoints */
+ rv = usbnet_get_endpoints(dev, intf);
+ if (rv < 0)
+ goto err;
+
+ /* require interrupt endpoint for subdriver */
+ if (!dev->status) {
+ rv = -einval;
+ goto err;
+ }
+
+ /* can't let usbnet use the interrupt endpoint */
+ dev->status = null;
+
+ printk("simcom usbnet bind here\n");
+
+ /*
+ * simcom sim7600 only support the raw_ip mode, so the host net driver would
+ * remove the arp so the packets can transmit to the modem
+ */
+ dev->net->flags |= iff_noarp;
+
+ /* make mac addr easily distinguishable from an ip header */
+ if (possibly_iphdr(dev->net->dev_addr)) {
+ dev->net->dev_addr[0] |= 0x02; /* set local assignment bit */
+ dev->net->dev_addr[0] &= 0xbf; /* clear "ip" bit */
+ }
+
+ /*
+ * simcom sim7600 need set line state
+ */
+ usb_control_msg(
+ interface_to_usbdev(intf),
+ usb_sndctrlpipe(interface_to_usbdev(intf), 0),
+ 0x22, //usb_cdc_req_set_control_line_state
+ 0x21, //usb_dir_out | usb_type_class| usb_recip_interface
+ 1, //line state 1
+ intf->cur_altsetting->desc.binterfacenumber,
+ null,0,100);
+
+err:
+ return rv;
+}
+
+static void simcom_wwan_unbind(struct usbnet *dev, struct usb_interface *intf)
+{
+ struct usb_driver *subdriver = (void *)dev->data[0];
+
+ if (subdriver && subdriver->disconnect)
+ subdriver->disconnect(intf);
+
+ dev->data[0] = (unsigned long)null;
+}
+
+#ifdef config_pm
+static int simcom_wwan_suspend(struct usb_interface *intf, pm_message_t message)
+{
+ struct usbnet *dev = usb_get_intfdata(intf);
+ int ret;
+
+ ret = usbnet_suspend(intf, message);
+ if (ret < 0)
+ goto err;
+
+err:
+ return ret;
+}
+
+static int simcom_wwan_resume(struct usb_interface *intf)
+{
+ struct usbnet *dev = usb_get_intfdata(intf);
+ int ret = 0;
+
+ ret = usbnet_resume(intf);
+
+err:
+ return ret;
+}
+#endif
+
+struct sk_buff *simcom_wwan_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags)
+{
+
+ //skip ethernet header
+ if(skb_pull(skb, eth_hlen))
+ {
+ return skb;
+ }else
+ {
+ dev_err(&dev->intf->dev, "packet dropped\n");
+ }
+
+ if (skb != null)
+ dev_kfree_skb_any(skb);
+
+ return null;
+}
+
+static int simcom_wwan_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
+{
+ __be16 proto;
+
+ /* this check is no longer done by usbnet */
+ if (skb->len < dev->net->hard_header_len)
+ return 0;
+
+ switch (skb->data[0] & 0xf0) {
+ case 0x40:
+ //printk("packetv4 coming ,,,\n");
+ proto = htons(eth_p_ip);
+ break;
+ case 0x60:
+ //printk("packetv6 coming ,,,\n");
+ proto = htons(eth_p_ipv6);
+ break;
+ case 0x00:
+ //printk("packet coming ,,,\n");
+ if (is_multicast_ether_addr(skb->data))
+ return 1;
+ /* possibly bogus destination - rewrite just in case */
+ skb_reset_mac_header(skb);
+ goto fix_dest;
+ default:
+ /* pass along other packets without modifications */
+ return 1;
+ }
+ if (skb_headroom(skb) < eth_hlen)
+ return 0;
+ skb_push(skb, eth_hlen);
+ skb_reset_mac_header(skb);
+ eth_hdr(skb)->h_proto = proto;
+ memset(eth_hdr(skb)->h_source, 0, eth_alen);
+fix_dest:
+ memcpy(eth_hdr(skb)->h_dest, dev->net->dev_addr, eth_alen);
+ return 1;
+}
+
+static const struct driver_info simcom_wwan_usbnet_driver_info = {
+ .description = "simcom wwan/qmi device",
+ .flags = flag_wwan,
+ .bind = simcom_wwan_bind,
+ .unbind = simcom_wwan_unbind,
+ .rx_fixup = simcom_wwan_rx_fixup,
+ .tx_fixup = simcom_wwan_tx_fixup,
+};
+
+static const struct usb_device_id products[] = {
+ {usb_device(0x1e0e, 0x9025), .driver_info = (unsigned long)&simcom_wwan_usbnet_driver_info },
+ {usb_device(0x1e0e, 0x9001), .driver_info = (unsigned long)&simcom_wwan_usbnet_driver_info },
+ { } /* end */
+};
+
+module_device_table(usb, products);
+
+static struct usb_driver simcom_wwan_usb_driver = {
+ .name = "simcom_wwan",
+ .id_table = products,
+ .probe = usbnet_probe,
+ .disconnect = usbnet_disconnect,
+#ifdef config_pm
+ .suspend = simcom_wwan_suspend,
+ .resume = simcom_wwan_resume,
+ .reset_resume = simcom_wwan_resume,
+ .supports_autosuspend = 1,
+#endif
+};
+
+static int __init simcom_wwan_init(void)
+{
+ return usb_register(&simcom_wwan_usb_driver);
+}
+module_init(simcom_wwan_init);
+
+static void __exit simcom_wwan_exit(void)
+{
+ usb_deregister(&simcom_wwan_usb_driver);
+}
+module_exit(simcom_wwan_exit);
+
+module_author("xiaobin wang <xiaobin.wang@sim.com>");
+module_description("sim7600 rmnet wwan driver");
+module_license("gpl");

property changes on: trunk/linux-4.14.40/drivers/net/usb/simcom_wwan.c
___________________________________________________________________
added: svn:executable
## -0,0 +1 ##
+*
\ no newline at end of property
index: trunk/linux-4.14.40/drivers/net/usb/makefile
===================================================================
--- trunk/linux-4.14.40/drivers/net/usb/makefile (revision 245)
+++ trunk/linux-4.14.40/drivers/net/usb/makefile (revision 246)
@@ -27,7 +27,7 @@
obj-$(config_usb_net_cdc_subset_enable) += cdc_subset.o
obj-$(config_usb_net_zaurus) += zaurus.o
obj-$(config_usb_net_mcs7830) += mcs7830.o
-obj-$(config_usb_usbnet) += usbnet.o
+obj-$(config_usb_usbnet) += usbnet.o simcom_wwan.o
obj-$(config_usb_net_int51x1) += int51x1.o
obj-$(config_usb_cdc_phonet) += cdc-phonet.o
obj-$(config_usb_net_kalmia) += kalmia.o
index: trunk/linux-4.14.40/drivers/usb/serial/option.c
===================================================================
--- trunk/linux-4.14.40/drivers/usb/serial/option.c (revision 245)
+++ trunk/linux-4.14.40/drivers/usb/serial/option.c (revision 246)
@@ -2005,6 +2005,12 @@
return -enodev;
#endif

+ /* add for sim7600 by panzidong*/
+ if (serial->dev->descriptor.idvendor == 0x1e0e &&
+ serial->dev->descriptor.idproduct == 0x9001 &&
+ serial->interface->cur_altsetting->desc.binterfacenumber == 5 )
+ return -enodev;
+
/* never bind to the cd-rom emulation interface */
if (iface_desc->binterfaceclass == 0x08)
return -enodev;

5.3     application interface

wwan0

 

6      follow-up

ec20 use :

quectel-cm

 

 

simcom7600ce use:

 

echo “at$qcrmcall=1.1”  >  /dev/ttyusb2

 

dhcpcd –m 3 wwan0

 

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网