drivers/usb/serial/option.c:
626 static const struct usb_device_id option_ids[] = {
627 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
628 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },
629 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA_LIGHT) },
630 { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA_QUAD) },
...
1819 #if 1 //Added by Air720
1820 { USB_DEVICE(0x1286, 0x4e3d) },
1821 #endif
1822 { } /* Terminating entry */
1823 };
...
1830 static struct usb_serial_driver option_1port_device = {
1831 .driver = {
1832 .owner = THIS_MODULE,
1833 .name = "option1",
1834 },
1835 .description = "GSM modem (1-port)",
1836 .id_table = option_ids,
1837 .num_ports = 1,
1838 .probe = option_probe,
1853 #ifdef CONFIG_PM
1854 .suspend = usb_wwan_suspend,
1855 .resume = usb_wwan_resume,
1856 #if 1 //Added by Quectel & Air720
1857 .reset_resume = usb_wwan_resume,
1858 #endif
1859 #endif
1860 };
458 static struct urb *usb_wwan_setup_urb(struct usb_serial_port *port,
459 int endpoint,
460 int dir, void *ctx, char *buf, int len,
461 void (*callback) (struct urb *))
462 {
463 struct usb_serial *serial = port->serial;
464 struct urb *urb;
...
487 #if 1 //Added by Air720
488 if(dir == USB_DIR_OUT){
489 struct usb_device_descriptor *desc = &serial->dev->descriptor;
490 if(desc->idVendor == cpu_to_le16(0x1286) && desc->idProduct == cpu_to_le16(0x4e3d))
491 {
492 urb->transfer_flags |= URB_ZERO_PACKET;
493 }
494 }
495 #endif
496 return urb;
497 }
Device Drivers --->
[*] USB support --->
<*> USB Serial Converter support --->
<*> USB driver for GSM and CDMA modems
[*] Network device support --->
<*> PPP (point-to-point protocol) support
<*> PPP BSD-Compress compression
<*> PPP Deflate compression
[*] PPP filtering
<*> PPP MPPE compression (encryption)
[*] PPP multilink support
<*> PPP over Ethernet
<*> PPP support for async serial ports
<*> PPP support for sync tty ports
当系统启动后,可以看到/dev/目录下产生ttyUSB1-4节点,说明驱动移植成功。
在/etc/ppp/目录下新建peers目录,并在peers目录下新建air720-chat-connect、air720-chat-disconnect、air720-ppp和air720-ppp-kill拨号脚本:
开始拨号:
pppd call air720-ppp
细节请参考合宙官方教程:https://ask.openluat.com/article/37
附件:移植Air720.zip
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!