Ethernet (SBC-i.MX51)

Aus BECOM Systems Support
Version vom 22. August 2023, 20:35 Uhr von en>Peter (1 Version importiert)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Zur Navigation springen Zur Suche springen

The SBC-i.MX51 provides 10/100MBit Ethernet via the RJ45 jack.

Kernel configuration

Default networking configuration:

[*] Networking support  --->
  Networking options  --->
    <*> Packet socket
    [*]   Packet socket: mmapped IO
    <*> Unix domain sockets
    [*] TCP/IP networking
    [*]   IP: multicasting
    [*]   IP: kernel level autoconfiguration
    [*]     IP: DHCP support
    [*]     IP: BOOTP support
    <*>   IP: IPsec transport mode
    <*>   IP: IPsec tunnel mode
    <*>   IP: IPsec BEET mode
    <*>   INET: socket monitoring interface

i.MX51 specific configuration:

Device Drivers  --->
  [*] Network device support  --->
    [*]   Ethernet (10 or 100Mbit)  --->
      <*>   Generic Media Independent Interface device support
        <*>   FEC ethernet controller

Test in Linux

  • Connect a cable to the RJ45 jack. We assume that a DHCP server is running in your network.
  • If you have set a valid MAC address in Redboot already, you will see that the board gets its IP address automatically during Linux boot:
udhcpc (v1.13.2) started
run-parts: /etc/udhcpc.d/00avahi-autoipd exited with code 1
Sending discover...
Sending discover...
Sending select for 192.168.1.161...
Lease of 192.168.1.161 obtained, lease time 600
run-parts: /etc/udhcpc.d/00avahi-autoipd exited with code 1
adding dns 192.168.0.4
done.
  • Ping a machine on your network:
root@sbc-imx51:~# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
64 bytes from 192.168.1.1: seq=0 ttl=64 time=0.300 ms
64 bytes from 192.168.1.1: seq=1 ttl=64 time=0.321 ms
64 bytes from 192.168.1.1: seq=2 ttl=64 time=0.297 ms
64 bytes from 192.168.1.1: seq=3 ttl=64 time=0.309 ms
64 bytes from 192.168.1.1: seq=4 ttl=64 time=0.308 ms
64 bytes from 192.168.1.1: seq=5 ttl=64 time=0.257 ms
64 bytes from 192.168.1.1: seq=6 ttl=64 time=0.297 ms
^C
--- 192.168.1.1 ping statistics ---
7 packets transmitted, 7 packets received, 0% packet loss
round-trip min/avg/max = 0.257/0.298/0.321 ms
root@sbc-imx51:~#

(supply a valid IP address)

Set the MAC address (Linux)

  • Show the current MAC address:
ifconfig -a|grep eth0

Look for "HWaddr"

  • Change the MAC address to 00:01:02:03:04:05:
ifconfig eth0 hw ether 00:01:02:03:04:05

Set the MAC address (Redboot)

You can setup Redboot to automatically assign a MAC address of your board at boot. Use the fconfig command for configuration. We will assign the address 02:03:04:05:06:07 here.

RedBoot> fconfig -l
...
Set FEC network hardware address [MAC]: true
FEC network hardware address [MAC]: 0x02:0x03:0x04:0x05:0x06:0x07
...

Don't forget to save this configuration at the end of fconfig.