1、内核配置
+CONFIG_USB_USBNET=y
+CONFIG_USB_SERIAL=y
+CONFIG_USB_WDM=y
+CONFIG_USB_SERIAL_OPTION=y
2、添加pid vid
修改文件drivers/usb/serial/option.c
/*add HUAWEI ME909S-821*/
{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x15c1, 0x02, 0x06, 0x10) },
{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x15c1, 0x0a, 0x06, 0x11) },
{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x15c1, 0xff, 0x06, 0x10) },
{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x15c1, 0xff, 0x06, 0x13) },
{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x15c1, 0xff, 0x06, 0x12) },
{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x15c1, 0xff, 0x06, 0x06) },
{ USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, 0x15c1, 0xff, 0x06, 0x1b) },
3、拨号上网
echo -e "AT^NDISDUP=1,1,\"CMNET\"\r" > /dev/ttyUSB0
echo -e "AT+CGDCONT?" > /dev/ttyUSB2
echo -e "AT^NDISDUP?" > /dev/ttyUSB2
echo -e "AT^NDISDUP=1,1" > /dev/ttyUSB2
udhcpc -i usb0