This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[ARAGO Daisy] Issue obtaining IP address with DHCP

Hello,

I am currently in the process of building our own distro using arago-daisy as a base.

I bitbake using core-image-base build. I have added a couple of packages including connman and ofono.

I've noticed that I can't obtain an IP address through DHCP on ethernet interface. It works fine on arch linux, and also works fine with the USB0 interface. 

I get the following messages some of which are odd:

root@am335x-evm:/etc# ifup eth0
[ 3136.537059] net eth0: initializing cpsw version 1.12 (0)
[ 3136.545286] net eth0: phy found : id is : 0x7c0f1
[ 3136.558972] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 3136.565220] 8021q: adding VLAN 0 to HW filter on device eth0
udhcpc (v1.22.1) started
Sending discover...
[ 3138.540144] libphy: 4a101000.mdio:00 - Link is Up - 100/Full
[ 3138.546160] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Sending discover...
Sending select for 10.10.1.53...
Sending select for 10.10.1.53...
Sending select for 10.10.1.53...
No lease, forking to background

Here's the issue: There's nothing on 10.10.1.53. I am not sure where it gets the address from. If I assign the address, mask and gateway manually through either connman config file or through ifconfig, it works fine and I'm able to ping remote ips. 

After the "no lease" message I can do route -n and see the following:

Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 usb0

and ifconfig...

root@am335x-evm:/etc# ifconfig
eth0 Link encap:Ethernet HWaddr 7C:66:9D:58:93:75
inet addr:169.254.26.6 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:12779 errors:0 dropped:0 overruns:0 frame:0
TX packets:1021 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1313506 (1.2 MiB) TX bytes:351206 (342.9 KiB)
Interrupt:56

Where does the 169.254.26.6 address come from? It's impossible for me to obtain this public address, ours start with 10.10.x.x

I've tested this on the default Arago build provided by TI as well as my build. The behavior is the same. 

However it works fine with Arch linux on the same hardware, which suggests this is a software configuration issue or I am missing some package. 

Could anybody point me in the right direction to solve this problem?

  • Hi,
    Able to assign the IP manually and working ?
    ifconfig eth0 10.100.1.56 up
    Then try to ping your PC's IP on the board and ping board IP from PC.
  • Hello,

    Thank you for the response.

    I can assign the IP address fine manually. I can also ping remote server (google.com IP address since DNS isn't working currently).

    I have configured the connection through connman as follows:

    [ethernet_7c669d589375_cable]
    Name=Wired
    AutoConnect=true
    Modified=2015-07-23T16:15:54.213738Z
    IPv4.method=manual
    IPv4.local_address=10.10.1.53
    IPv4.netmask_prefixlen=16
    IPv4.gateway=10.10.0.1
    IPv6.method=off
    IPv6.privacy=disabled

    However, if I set IPv4.method to DHCP, I get a 169.x.x.x. address. I have a suspicion it's coming from avahi-daemon but I'm not 100% certain yet.

  • Worked around the problem by running udhcpc with a -C flag.
    Not sure why it doesn't work if it sends MAC as client identifier, however without it can negotiate an ip address and obtain DNS successfully.
  • Update:

    I understand it a bit better now.
    I was looking into an issue we had with a coworker on ssh through Ethernet being slow and unreliable, and realized that our two modules shared the same IP address.
    This was due to us having the same MAC across two devices, caused by parameter "usbethaddr" which is set in ./include/configs/am335x_evm.h.
    (Interestingly enough it was picked up for eth0 interface on linux)

    I was able to find more information on how to read ethernet mac address below:
    e2e.ti.com/.../1478929