TQIMX6ULL测试 您所在的位置:网站首页 imx6ull连接外网 TQIMX6ULL测试

TQIMX6ULL测试

2024-06-16 07:03| 来源: 网络整理| 查看: 265

imx6ull支持双网卡。烧写使用tq-imx6ull_net0_net1.dtb就是双网卡,下面只以eth0为例子讲解。eth1方法也一样。靠近耳机接口那一端子的是eth0. 测试网卡模块时,接上网线,如果当前网卡是状态是down,网卡灯是不会亮的。在命令行输入操作如下:

# udhcpc -i eth0 udhcpc: started, v1.25.1 fec 2188000.ethernet eth0: Freescale FEC PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=2188000.ethernet:02, irq=-1) IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready udhcpc: sending discover fec 2188000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready udhcpc: sending discover udhcpc: sending select for 192.168.1.236 #成功分配到ip udhcpc: lease of 192.168.1.236 obtained, lease time 7200 deleting routers adding dns 202.96.128.166 #自动设置dns adding dns 202.96.134.133 # ping www.qq.com PING www.qq.com (14.17.32.211) 56(84) bytes of data. 64 bytes from 14.17.32.211 (14.17.32.211): icmp_seq=1 ttl=55 time=5.34 ms 64 bytes from 14.17.32.211 (14.17.32.211): icmp_seq=2 ttl=55 time=5.12 ms 64 bytes from 14.17.32.211 (14.17.32.211): icmp_seq=3 ttl=55 time=7.80 ms 64 bytes from 14.17.32.211 (14.17.32.211): icmp_seq=4 ttl=55 time=5.41 ms ^C --- www.qq.com ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3004ms rtt min/avg/max/mdev = 5.122/5.923/7.804/1.091 ms

如果一直循环打印一下信息说明网卡模块正常,测试完成后,在命令行按ctrl+c键中断ping。 以上是测试外网的。如果不能连接外网。可以设置ip后直接与pc互ping。

# ifconfig eth0 192.168.1.40 up #设置板子ip要与电脑ip为同网段 fec 2188000.ethernet eth0: Freescale FEC PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=2188000.ethernet:02, irq=-1) # ifconfig eth0 downfec 2188000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx # ping -I eth0 192.168.1.49 #指定使用eth0 ping pc的ip(192.168.1.49) PING 192.168.1.49 (192.168.1.49) from 192.168.1.40 eth0: 56(84) bytes of data. 64 bytes from 192.168.1.49: icmp_seq=1 ttl=64 time=0.625 ms 64 bytes from 192.168.1.49: icmp_seq=2 ttl=64 time=0.393 ms 64 bytes from 192.168.1.49: icmp_seq=3 ttl=64 time=0.378 ms 64 bytes from 192.168.1.49: icmp_seq=4 ttl=64 time=0.351 ms 64 bytes from 192.168.1.49: icmp_seq=5 ttl=64 time=0.374 ms ^C --- 192.168.1.49 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 3998ms rtt min/avg/max/mdev = 0.351/0.424/0.625/0.102 ms #

如果打印以下信息说明网络不通: ping: bad address ‘www.qq.com’ 可能是ip或者dns没有设置对。 另外如果同时两个网口都接上网线时,两个网卡的ip要设置成不同的网段。



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有