Ubuntu下使用ECM上网介绍

1、背景


为了验证展锐原厂的USB CDC EMC(Ethernet Control Model)驱动的上网功能,需要搭建Linux系统。现将整个流程整理如下。

2、环境搭建


安装虚拟机

VMware-workstation-full-16.2.3-19376536.exe

安装Ubuntu系统

ubuntu-16.04.5-desktop-amd64.iso

3、执行终端命令行


3.1 Linux 下使用


Linux 下 Kernel 自带USB 串口、 ECM 和MTP驱动,比较新的版本可能还自带 RNDIS 驱动。但是Linux使用 USB 网卡建议直接用 ECM。

Linux 下 ECM 驱动是通过 CLASS ID 来识别的,所以在Linux下不需要额外装驱动也不需要其他操作就可以被识别。

USB 串口没有标准 CLASS,在Linux要根据PID/VID 去识别。

1)    在命令行下配置

a)    挂载 option 驱动

/sbin/modprobe option

b)    把 8850 可能用到的模式加入 option 驱动的识别列表

# 4D30 可以不加,这个模式通常只在 Windows 下使用

echo 1782 4d11 ff > /sys/bus/usb-serial/drivers/option1/new_id

echo 1782 4d13 ff > /sys/bus/usb-serial/drivers/option1/new_id

echo 1782 4d17 ff > /sys/bus/usb-serial/drivers/option1/new_id

2)    修改 Kernel 代码&#

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
ECM(太网控制模型)协议文档 The USB Communications Device Class Specification 1.1 contains general Communications Class specifications, and details for seven device subclasses. That specification has been editorially reorganized into a common USB CDC 1.2 specification [USBCDC1.2] and a set of subclass specifications. This should help implementers understand what is necessary for each device subclass and facilitate specification maintenance by the USB Device Working Group. This document is one of those subclass specifications. It contains material technically identical to that contained in USB CDC 1.1. It is intended to guide implementers of USB-connected devices of the types listed in the following section. 1.2 Scope This document specifies one device subclass intended for use with Communication devices, based on the Universal Serial Bus Class Definitions for Communication Devices specification [USBCDC1.2]. It supports Ethernet (IEEE 802.3) and similar devices. The intention of this specification is that all material presented here is technically compatible with the previous version of the USB CDC 1.1 Specification, from which it is derived. Numeric codes are defined for subclass codes, protocol codes, management elements, and notification elements. In some cases material from [USBCDC1.2] is repeated for clarity. In such cases, [USBCDC1.2] shall be treated as the controlling document. In this specification, the word ‘shall’ or ‘must’ is used for mandatory requirements, the word ‘should’ is used to express recommendations and the word ‘may’ is used for options.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值