Two Ethernet Ports

  • DTS configuration
    Use infinity2m-spinand-ssc011a-s01a-rgb565-rmii.dts,Base on schematic,ETH0 use PAD_TTL16-PAD_TTL23、PAD_GPIO0 and PAD_GPIO1:

According to SSD201 HW Checklist V6.xlsx The mode of eth1 is 4:

Other default configurations are sufficient.

  • Test
    Take eth0 as an example, insert an Internet cable into the network interface (connect the router at the other end), and execute the following commands to operate the network interface.
  1. Connect the network cable and ‘dhcpcd’ automatically obtains the IP address.

  1. View eth0 device nodes
    # ifconfig eth0 

  1. Close and open the network port
# ifconfig eth0 up
# ifconfig eth0 down
  1. Set IP address
# ifconfig eth0 192.168.0.23
  1. Set MAC address
ifconfig eth0 hw ether 36:72:C3:0A:FE:B3
  1. Set subnet mask
# ifconfig eth0 netmask 255.255.255.0
  1. Set broadcast address
# ifconfig eth0 broadcast 192.168.0.255
  1. Gateway add and remove
# route add default gw 192.168.0.1
# route del default gw 192.168.0.1
  1. Set DNS

To add and modify DNS, you need to modify the “/etc/resolv.conf” file.
Example: add DNS “114.114.114.114” to the development board. The operation method is as follows

# vi /etc/resolv.conf

Add a line nameserver 114.114.114.114 at the end of the file

# Generated by dhcpcd from eth0.dhcp
# /etc/resolv.conf.head can replace this line
domain lan
nameserver 114.114.114.114

# /etc/resolv.conf.tail can replace this linea
  1. Get IP address manually and dynamically.
# udhcpc -i eth0
  1. Configure static IP
    Modify the “/etc/network/interfaces” file
# vi /etc/network/interfaces

Add content, set eth0 as static IP and address 192.168.0.19

auto eth0
iface eth0 inet static
address 192.168.0.19
netmask 255.255.255.0
gateway 192.168.0.1

Enable network card service

/etc/init.d/S40network restart

文档更新时间: 2021-07-30 15:18   作者:Aeeditor