Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    【FAQ】全志R329以太网常用调试命令和排查手段

    其它全志芯片讨论区
    r329 faq 技术支持 网络
    1
    1
    1412
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • q1215200171
      budbool LV 9 last edited by q1215200171

      1.【以太网常用调试命令】

      1.1 打开/关闭网络设备

      打开网络设备:ifconfig eth0 up
      关闭网络设备:ifconfig eth0 down
      

      1.2 查看网络设备信息

      查看网口状态及收发包统计:ifconfig eth0
      查看收发包统计:cat /proc/net/dev
      查看当前速率:cat /sys/class/net/eth0/speed
      

      1.3 配置网络设备

      设置静态IP地址:ifconfig eth0 192.168.1.100
      设置置MAC地址:ifconfig eth0 hw ether 00:11:22:aa:bb:cc
      动态获取IP地址:udhcpc -i eth0
      配置PHY强制模式:ethtool -s eth0 speed 100 duplex full autoneg on(设置100Mbps速率、全双工、开启自协商)
      

      1.4 常用测试命令

      测试设备连通性:ping 192.168.1.100
      
      TCP吞吐测试:
      Server端:iperf -s -i 1
      Client端:iperf -c 192.168.1.100 -i 1 -t 60 -P 4
      
      UDP吞吐测试:
      Server端:iperf -s -u -i 1
      Client端:iperf -c 192.168.1.100 -u -b 100M -i 1 -t 60 -P 4
      

      2.【以太网常用排查手段】#

      2.1 常用软件排查手段

      • 检查menuconfig及dts以太网配置是否打开;
      • 检查phy-mode配置是否与PHY和GMAC之间的物理接口匹配,如rgmii、rmii等;
      • 检查clk配置是否正确,如gmac clk、ephy_25m clk;
      • 检查GPIO配置是否正确,如IO复用功能、驱动能力等;
      • 检查phy-reset配置是否正确;
      • 通过cat /proc/net/dev命令查看eth0收发包统计;
      • 通过cat /proc/interrupts命令查看gmac中断统计;
      • 通过cat /sys/devices/platform/soc/gmac0/extra_tx_stats(或extra_rx_stats)命令查看gmac控制器收发包统计;
      • 通过cat /sys/devices/platform/soc/gmac0/mii_reg命令查看phy状态;

      2.2 常用硬件排查手段

      • 检查phy供电(vcc-ephy)是否正常,与GPIO耐压是否匹配;
      • 检查phy时钟(ephy25M或外部晶振)是否正常;
      • 检查tx/rx通路是否正常,如是否漏焊tx-delay/rx-delay电阻、差分走线、阻抗匹配、端接电阻异常、ESD器件异常等;
      • 检查RJ45外围电路是否正常;

      附件:FlameGraph.tar.xz

      1 Reply Last reply Reply Quote Share 0
      • Referenced by  q1215200171 q1215200171 
      • Referenced by  q1215200171 q1215200171 
      • Referenced by  q1215200171 q1215200171 
      • Referenced by  q1215200171 q1215200171 
      • Referenced by  q1215200171 q1215200171 
      • 1 / 1
      • First post
        Last post

      Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

      行为准则 | 用户协议 | 隐私权政策