Target shows only IPv6 address

When I connect to the Target, it shows only IPv6 addresses for the Ethernet:

[code]Poky 9.0 (Yocto Project 1.4 Reference Distro) 1.4.1 swi-mdm9x15 ttyHSL0

swi-mdm9x15 login: root
root@swi-mdm9x15:~#
root@swi-mdm9x15:~# ifconfig
eth0 Link encap:Ethernet HWaddr AA:4D:BC:34:3B:39
inet6 addr: fd11:2233:4455:1:a84d:bcff:fe34:3b39/64 Scope:Global
inet6 addr: fe80::a84d:bcff:fe34:3b39/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:44379 errors:0 dropped:2 overruns:0 frame:0
TX packets:258 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3777876 (3.6 MiB) TX bytes:50182 (49.0 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:17 errors:0 dropped:0 overruns:0 frame:0
TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1694 (1.6 KiB) TX bytes:1694 (1.6 KiB)

usb0 Link encap:Ethernet HWaddr EE:4B:58:8E:CB:41
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)[/code]
ping requires an IPv4 address - so it won’t work with this:

ubuntu@ubuntu:~$ ping fd11:2233:4455:1:a84d:bcff:fe34:3b39 ping: unknown host fd11:2233:4455:1:a84d:bcff:fe34:3b39
ping6 works fine:

ubuntu@ubuntu:~$ ping6 fd11:2233:4455:1:a84d:bcff:fe34:3b39 PING fd11:2233:4455:1:a84d:bcff:fe34:3b39(fd11:2233:4455:1:a84d:bcff:fe34:3b39) 56 data bytes 64 bytes from fd11:2233:4455:1:a84d:bcff:fe34:3b39: icmp_seq=1 ttl=64 time=3.18 ms 64 bytes from fd11:2233:4455:1:a84d:bcff:fe34:3b39: icmp_seq=2 ttl=64 time=1.32 ms 64 bytes from fd11:2233:4455:1:a84d:bcff:fe34:3b39: icmp_seq=3 ttl=64 time=1.01 ms ^C --- fd11:2233:4455:1:a84d:bcff:fe34:3b39 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2002ms rtt min/avg/max/mdev = 1.018/1.840/3.181/0.957 ms ubuntu@ubuntu:~$

But it seems that instlegato only uses ping - so it doesn’t work.

:angry:

You’re right, instlegato is not working because ping requires an IPv4 address. As a workaround for now, can you go to the instlegato script and remove the following lines?

if ! ping -c 1 -w 1 $TARGET_IP > /dev/null
then
    echo "***ERROR: Device address $TARGET_IP seems to be unreachable."
    echo
    exit 1
fi

This seems to be a very Frequently Asked Question in loads of forums all over the interwebs - but I have yet to see any conclusive answer as to why it happens, or how to “fix” it.

One such thread included a suggestion to stop and restart the interface:

ifdown eth0 && ifup eth0

(except it wasn’t that simple - needed a bit more googling to find a syntax actually acceptable to this target)

So I gave that a try:

root@swi-mdm9x15:~# ifdown eth0 && ifup eth0 ifdown: interface eth0 not configured udhcpc (v1.20.2) started Sending discover... Sending select for 192.168.0.13... Lease of 192.168.0.13 obtained, lease time 214748364 /etc/udhcpc.d/50default: Adding DNS 192.168.0.1
And there we see an IPv4 address!
:smiley:

So I tried ifconfig again:

[code]
root@swi-mdm9x15:~# ifconfig
eth0 Link encap:Ethernet HWaddr AA:4D:BC:34:3B:39
inet addr:192.168.0.13 Bcast:0.0.0.0 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:48962 errors:0 dropped:2 overruns:0 frame:0
TX packets:412 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4178556 (3.9 MiB) TX bytes:76244 (74.4 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:21 errors:0 dropped:0 overruns:0 frame:0
TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2166 (2.1 KiB) TX bytes:2166 (2.1 KiB)

usb0 Link encap:Ethernet HWaddr EE:4B:58:8E:CB:41
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

root@swi-mdm9x15:~# [/code]
So it is now showing the IPv4 address - but now there’s no IPv6 address!
:confused:

Thanks for the suggestion, but it looks like I’m OK now…

I guess the ideal solution would be for instlegato to try both ping and ping6 - and only report the error if both fail :question:

Is all the rest of instlegato compatible with both v4 & v6 IP addresses… :question:

That’s good to hear, glad you finally got Legato installed on target :smiley:
Also, I noticed from your other posts (instlegato: command not found), that you are still using Legato 14.04. Just letting you know that the current documentation (legato.io/legato-docs/14_07/) is for Legato 14.07, so some of the documentation might not be applicable or work for you.

Yes, but I think instlegato will undergo some major changes in the next release. The plan is to remove the instlegato bash script and port this functionality to the target side. This will allow DevStudio to install Legato from other Operating Systems such as Windows.

This instlegato IPv6 bug will still be in 14.07, but we will make sure that both IPv4 and IPv6 addresses will be supported for the next release. Thank you for raising this bug.

Yes, you did mention that: Instlegato: command not found

Yes, I had come to that conclusion.

The trouble is, as noted here, the upgrade instructions just look like a load of Linux magic spells & incantations to me (the linux noob).

:confused:

That was why I got stuck when I first received the Dev Kit (before the USB stick), and why I’m using the USB stick now - to try to avoid getting bogged-down in the arcane Linux world of building & installing toolchains, etc.

Can I just download a new USB stick image :question:

In fact, I can’t seem to find the old USB stick image (in case I mess it up) - I thought it was going to be made available to download :question:

Or instructions to “clone” the stick - as a backup :question:

At the moment, the USB stick image is not available for download and the person responsible for it is on vacation. However they will be back next week, so I should be able to get back to you on this subject next week.