Personal tools

How to test and use VisionSOM-6ULL Ethernet interface

From SomLabs Wiki

Revision as of 16:55, 13 November 2017 by Admin (talk | contribs) (Created page with "{{PageHeader|How to test and configure Ethernet interface}} == Default configuration == By default your VisionSOM-6ULL IP address is retrieved from DHCP server (if it is avail...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

How to test and configure Ethernet interface


Default configuration

By default your VisionSOM-6ULL IP address is retrieved from DHCP server (if it is available in your network), it is a good feature, as you can connect it to network without any configuration and it will be accessible. To get VisionSOM-6ULL IP address you can log in via UART-USB converter and execute ip a command:

root@somlabs:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether a6:e3:1c:a0:3d:b0 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.24/24 brd 192.168.0.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 2a02:a310:813c:d700:a4e3:1cff:fea0:3db0/64 scope global mngtmpaddr dynamic
       valid_lft 1066909sec preferred_lft 462109sec
    inet6 fe80::a4e3:1cff:fea0:3db0/64 scope link
       valid_lft forever preferred_lft forever
3: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default
    link/sit 0.0.0.0 brd 0.0.0.0

In this case VisionSOM address is 192.168.0.24. Other way to get the IP is to use network scanner, for example Advanced Network Scanner for Windows or use arp-scan tool on Linux:

root@somlabs:~# apt install arp-scan
root@somlabs:~# arp-scan --interface=eth0 --localnet
Interface: eth0, datalink type: EN10MB (Ethernet)
Starting arp-scan 1.9 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/)
192.168.0.1     90:5c:44:57:3b:4a       (Unknown)
192.168.0.87    00:c0:00:04:52:5b       LANOPTICS, LTD.
192.168.0.178   58:fb:84:a3:a2:82       (Unknown)

3 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.9: 256 hosts scanned in 3.178 seconds (80.55 hosts/sec). 3 responded

If you want to check if your board can communicate with Internet then you can use ping command with external IP address like 8.8.8.8 (Google DNS):

root@somlabs:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=59 time=10.7 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=59 time=16.7 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=59 time=15.1 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=59 time=12.9 ms
^C
--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 10.782/13.900/16.735/2.244 ms

In some cases dynamic IP address can cause problems, for example when you want to forward a port on the router to your Linux system. In such case you should assign static IP address, to do that you need to edit /etc/network/interfaces, it should contain:

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

Of course you should modify IP addresses and mask depending on your network configuration. Now you need to restart netrwork services:

root@somlabs:~# service networking restart

Note that if you restart networking services via SSH connection then connection will be lost.

NXP Partner ST Partner Renesas Partner