找回密码
 注册
搜索
查看: 1729|回复: 0

[资料] MTK8735+USB网卡

[复制链接]
发表于 2017-8-29 16:46:01 | 显示全部楼层 |阅读模式
在没有任何的Wi-Fi和3G无线网卡情况下,通过有线网络(以太网)也可以上网,用户还可以通过有线网络(以太网)进行网络连接。以太网是一种基带局域网规范,是当今现有局域网采用的最通用的通信协议标准。以太网络使用CSMA/CD技术,并以较快的速率运行在多种类型的电缆上。

最近接到许多客户需要增加以太网功能,所以在网上搜集了一下相关USB网卡资讯:发现有几款USB转以太网的芯片可供选择----LAN7500  , DM9621  ,  AX88772   。。。等等

稍作考量后,最后选择了DM9621这款芯片进行调试;我这边平台为:MT8735M安卓5.1。调试步骤如下:
1,从网上找了该网卡的代理商,并取得相关DM9621demo板以及驱动文件;
=====demo板如下====

=======驱动附件======

2,软硬件都拿到手了,现在就是开始相关驱动调试:

請參考下列步驟: (“drivers/usb/net” is for old kernel version, “drivers/net/usb” is for the new kernel version )
DM9621 Driver
 Copy DM9621 driver into the kernel source
 Copy “dm9620.c” to “drivers/usb/net”

 Modify “drivers/usb/net/Kconfig”
   Find the “config USB_NET_CDCETHER” configuration item, add below configuration item
to follow it:

config USB_NET_DM9620
        tristate "Davicom DM9620 based ethernet devices"
        depends on USB_USBNET
        select CRC32
        select MII
        help
          This option adds support for Davicom DM9620 based
           usb-ethernet adapters.

 Modify “drivers/usb/net/Makefile”
Add “dm9620.o” into the object file list:

Obj-$(CONFIG_USB_NET_DM9620)    += dm9620.o

 enable the Multi-purpose USB Networking Framework and then DM9620/21, and save your new
kernel configuration.
   
   Change to BSP directory:
SHELL> cd ~/pxa270/microtime/linux
Start by execute the command:
SHELL> make menuconfig

Track the configure structure as below hierarchy, select “Multi-purpose USB Networking
Framework” & “Davicom DM9620 based ethernet devices”:

Device Drivers --->
USB support --->
USB Network Adapters --->
[*] Multi-purpose USB Networking Framework
              :
         <*> Davicom DM9620 based ethernet devices


3,加入后刷机,重启。。。
此时出现一个令我头疼的问题:由于MT8735只有一个USB OTG口,我把网卡驱动添加后,插上DM9621 USB网卡,发现此时我没办法用PC进行ADB调试了。。没有USB口了。。。接SUB hub的话,也是不能进行ADB调试的,因为两者都需要OTG功能。。。。
最后还是百度了一个办法:平板内下载一个叫“超级终端”的APK,此软件可以模拟adb调试环境。

打开DHCP,ifconfig eth0 up,接上路由器;此时网卡已经可以正常工作,adb内输入ifconfig 或者 netcfg 即可看到 eth0 已经UP起来,也能看到相关IP地址信息;
1)ping 路由器 192.168.1.1 ,发现link ok!
2)此时打开浏览器,输入baidu.com 成功连接。

至此,底层驱动调试完毕。

4,目前上层还在设计中。。。

高级模式
B Color Image Link Quote Code Smilies

本版积分规则

Archiver|手机版|小黑屋|52RD我爱研发网 ( 沪ICP备2022007804号-2 )

GMT+8, 2024-5-6 20:21 , Processed in 0.057628 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表