开发环境

开发板:A33-Vstar

开发板系统:Linux

USB网卡:三星S4、华为P8(USB共享网络)

------------------------------------------------

1. 配置内核

运行:make menuconfig ARCH=arm

依次进入: Device Drivers --->Network device support ---> USB Network Adapters

将以下三项编译进内核:

Multi-purpose USB Networking Framework [ m--y ]

CDC Ethernet support (smart devices such as cable modems) [ m--y ]

Host for RNDIS and ActiveSync devices (EXPERIMENTAL) [ n--y ]

注:当将Multi-purpose USB Networking Framework 和 Host for RNDIS and ActiveSync devices (EXPERIMENTAL) 同时选y时,CDC Ethernet support (smart devices such as cable modems) 选项将自动选为y。

1)Multi-purpose USB Networking Framework

即usbnet,对应模块为usbnet.ko。

在linux-3.4/drivers/net/usb/Kconfig中描述如下:

This driver supports several kinds of network links over USB,

with "minidrivers" built around a common network driver core

that supports deep queues for efficient transfers. (This gives

better performance with small packets and at high speeds).

The USB host runs "usbnet", and the other end of the link might be:

- Another USB host, when using USB "network" or "data transfer"

cables. These are often used to network laptops to PCs, like

"Laplink" parallel cables or some motherboards. These rely

on specialized chips from many suppliers.

- An intelligent USB gadget, perhaps embedding a Linux system.

These include PDAs running Linux (iPaq, Yopy, Zaurus, and

others), and devices that interoperate using the standard

CDC-Ethernet specification (including many cable modems).

- Network adapter hardware (like those for 10/100 Ethernet) which

uses this driver framework.

The link will appear with a name like "usb0", when the link is

a two-node link, or "eth0" for most CDC-Ethernet devices. Those

two-node links are most easily managed with Ethernet Bridging

(CONFIG_BRIDGE) instead of routing.

For more information see <http://www.linux-usb.org/usbnet/>.

To compile this driver as a module, choose M here: the module will be called usbnet.

2)CDC Ethernet support (smart devices such as cable modems)

对应模块为cdc_ether.ko。

在linux-3.4/drivers/net/usb/Kconfig中描述如下:

This option supports devices conforming to the Communication Device

Class (CDC) Ethernet Control Model, a specification that's easy to

implement in device firmware. The CDC specifications are available

from <http://www.usb.org/>.

CDC Ethernet is an implementation option for DOCSIS cable modems

that support USB connectivity, used for non-Microsoft USB hosts.

The Linux-USB CDC Ethernet Gadget driver is an open implementation.

This driver should work with at least the following devices:

* Dell Wireless 5530 HSPA

* Ericsson PipeRider (all variants)

* Ericsson Mobile Broadband Module (all variants)

* Motorola (DM100 and SB4100)

* Broadcom Cable Modem (reference design)

* Toshiba (PCX1100U and F3507g/F3607gw)

* ...

This driver creates an interface named "ethX", where X depends on

what other networking devices you have in use. However, if the

IEEE 802 "local assignment" bit is set in the address, a "usbX"

name is used instead.

3)Host for RNDIS and ActiveSync devices (EXPERIMENTAL)

即RNDIS_HOST,对应模块为rndis_host.ko。

在linux-3.4/drivers/net/usb/Kconfig中描述如下:

This option enables hosting "Remote NDIS" USB networking links,

as encouraged by Microsoft (instead of CDC Ethernet!) for use in

various devices that may only support this protocol. A variant

of this protocol (with even less public documentation) seems to

be at the root of Microsoft's "ActiveSync" too.

Avoid using this protocol unless you have no better options.

The protocol specification is incomplete, and is controlled by

(and for) Microsoft; it isn't an "Open" ecosystem or market.

注:

1)对于仅支持RNDIS的USB network device,host需要加载以上3个驱动,例如测试的S4和p8;

2)对于支持cdc_ether的device,host只需加载usbnet.ko和cdc_ether.ko,例如配置成cdc_ether gadget的开发板;

3)rndis_host.ko依赖cdc_ether.ko,两者都依赖usbnet.ko。

4)以下是FreeBSD doc中摘录:

Many cellphones provide the option to share their data connection over USB (often called "tethering"). This feature uses either the RNDIS, CDC or a custom Apple® iPhone®/iPad® protocol.

  • Android™ devices generally use the urndis driver.
  • Apple® devices use the ipheth driver.
  • Older devices will often use the cdce driver.

2. 识别USB虚拟网卡

将手机接入开发板USB,打开USB共享网络。

在minicom中输入:ifconfig usb0 up

然后:ifconfig

识别USB虚拟网卡成功。

3. 使用(ping测试)

1)在手机终端输入:busybox ifconfig 查看rndis0 ip地址为:192.168.42.129

2)在minicom中配置开发板usb0 IP地址:ifconfig usb0 192.168.42.170

3)在minicom中输入:ping -c 3 192.168.42.129

ping测试通过。

全志A33-USB虚拟网卡的配置与使用相关推荐

  1. LINUX驱动开发(三)USB虚拟网卡

    1. 简述 之前见过其他项目组的开发板,发现他们没有网口,但是可以通过IP进行ssh连接和scp文件传输到开发板,百度发现他们用的是USB虚拟网卡,于是我在我的开发板进行测试. 主机:windows ...

  2. 让Linux支持usb虚拟网卡。

    介绍: Usb作为device端插入pc,在pc中会出现对用的usb虚拟网卡,可以像普通网卡一样传递数据,socket编程. 让平台支持usb虚拟网卡,需要Linux内核支持UDC(usb 设备控制器 ...

  3. proe虚拟服务器,ProE安装以及虚拟网卡的配置

    1:ProE的安装需要一块处于活动状态的网卡 如果您已经有物理网卡(也就是真正的网卡),那就请您直接运行光盘里的SETUP.EXE.如果显示"PTC主机IDXX-XX-XX-XX-XX-XX ...

  4. win10下安装华为Atals USB虚拟网卡驱动

    1. 用USB连接电脑和HUAWEI Atlas 200 进入设备管理器,查看设备驱动安装情况 2. 安装驱动 (1) 在RNDIS上点击右键,选择更新驱动程序 (2) 接下来选择浏览我的电脑以查找驱 ...

  5. ibm服务器usb虚拟网卡,山石虚拟防火墙安装步骤

    山石虚拟防火墙,可以安装在vmware workstation上,非常适合动手操作实践.做实验等,非常好用. 前提也非常容易,电脑支持64位,内存最小4G. 山石虚拟防火墙桥接在物理网卡上,虚拟机和虚 ...

  6. 安霸S5L通过usb虚拟网卡共享网络功能

    之前在安霸S5L平台做过项目开发,掌握了一些比较有用的开发调试手段,为了避免忘记,在此记录一下安霸S5L平台通过usb共享网络的方法. 1.命令行中输入如下命令 modprobe ehci-hcd m ...

  7. Linux虚拟网卡bond配置

    目录 一.bond概述 1.1.bond的优点 二.bond模式 2.1.mode=0 2.2.mode=1 2.3.mode=2 2.4.mode=3 2.5.mode=4 2.6.mode=5 2 ...

  8. STM32驱动开发(二)--USB Device RNDIS虚拟网卡(USB2.0 基础概念讲解)

    STM32驱动开发(二)–USB Device RNDIS虚拟网卡(USB2.0基础概念讲解) 一.简介   本文基于stm32 Rndis实例,github开源, 使用STM32F407单板.结合协 ...

  9. 当前的网卡配置及虚拟网卡设置及默认网卡配置

    关于Linux下图形界面的网络配置,我这里就不多介绍了,这个很简单.这里介绍的是如何通过修改配置文件来实现虚拟网卡. 首先介绍Ubuntu(我这里使用的是ubuntu-16.04)下虚拟网卡的配置 1 ...

最新文章

  1. 侠客X官方网站成立,第一个内测版本即将放出,敬请期待.
  2. XYPieChart
  3. kubernetes log 流式数据处理
  4. 微信小程序 - 使用npm(第三方包)
  5. 《跟我学java》_《跟我学Java——基础篇02》
  6. 排序算法有哪些_超强整理,科班算法岗的秋招之路
  7. vscode + angular
  8. 【网络编程】网络协议简析
  9. mysql 自动安装脚本_mysql 5.7自动安装脚本
  10. DS1302时钟模块使用讲解附带完整程序
  11. 【笔记】第2章 向量
  12. 计算机硬盘从盘的设置,图文解说:电脑硬盘的主从盘设置方法_清风一笑
  13. linux内存占用率高怎么办,Linux下如何解决高内存使用率问题?
  14. fastjson 首字母大写问题
  15. 乐高编程学c语言吗,乐高编程和少儿编程的区别
  16. 专注B2B跨境支付的背后,XTransfer的风控基础设施是如何炼成的?
  17. 手把手教你如何安装java环境_手把手教你安装JAVA环境
  18. QT地图QtLocation
  19. (VUE)纯前端实现图片生成并打包成zip下载
  20. 美团云品牌升级启用动态logo,传导云价值释放云红利

热门文章

  1. qemu-kvm部署虚拟机
  2. 详谈DHCP SNOOP等多方面的安全设置(2)
  3. 客房收费系统数据库设计
  4. 模板:什么是Traits
  5. 深入update语句(延伸学习)
  6. 为IP v6划分子网
  7. css 列 布局,CSS二列三列布局
  8. ERP与SCM之区别
  9. hibernate数据类型与OR映射
  10. linux ubuntu 安装ftp,系统运维|如何在 Ubuntu 下安装和配置 FTP 服务器