Files
Obsidian/开启网口.md
2025-08-23 15:15:57 +08:00

50 lines
1.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

``` bash
insmod mdio-netlink.ko
./mdio
```
``` bash
./mdio stmmac-0 phy 1 raw 0x1E 0xa001
./mdio stmmac-0 phy 1 raw 0x1F 0x8164
./mdio stmmac-0 phy 1 raw 0x1E 0xa003
./mdio stmmac-0 phy 1 raw 0x1F 0x80f1
./mdio stmmac-0 phy 1 raw 0x1E 0xa004
./mdio stmmac-0 phy 1 raw 0x1F 0x00b0
./mdio stmmac-0 phy 1 raw 0x1E 0xa001
./mdio stmmac-0 phy 1 raw 0x1F 0x0164 #工作模式(100)配置、rgmii工作模式(千兆、全双工)
./mdio stmmac-0 phy 1 raw 0x0 0x0140 #关闭自协商
./mdio stmmac-0 phy 1 raw 0x1E 0x01a0
./mdio stmmac-0 phy 1 raw 0x1F 0xa8d0 #打开收发包统计,桥接芯片两侧收到的包数
./mdio stmmac-0 phy 1 raw 0x11 #正常为0xa419
./mdio stmmac-0 phy 1 raw 0x1E 0x01a3
./mdio stmmac-0 phy 1 raw 0x1F
./mdio stmmac-0 phy 1 raw 0x1E 0x01a4
./mdio stmmac-0 phy 1 raw 0x1F #sgmii侧收包统计,64~1518
./mdio stmmac-0 phy 1 raw 0x1E 0x01ad
./mdio stmmac-0 phy 1 raw 0x1F
./mdio stmmac-0 phy 1 raw 0x1E 0x01ae
./mdio stmmac-0 phy 1 raw 0x1F #rgmii侧收包统计,64~1518
```
``` bash
ifconfig eth0 192.168.1.1 up
```
``` bash
diag_shell "port 7 speed 1000M"
diag_shell "show port 7 status"
diag_shell "show counter mac detail"
diag_shell "register write addr 0x13c5 value 0x951"
```
cp开机自动配ip
修改文件`/etc/network/interfaces`
``` bash
auto eth2
iface eth2 inet static
address 192.168.10.2
netmask 255.255.255.0
gateway 192.168.10.255
```