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.

Ethernet connection issue with AM335x Starter Kit



Hi there,

I meet a problem with "eth0" of my AM335x Starter Kit. I know that there might be similar questions that have been posted and solved in past.

Well, caused that I am pretty new for the Linux Embedded System, I could not exactly know what is the problem with my SK's Ethernet.

Hereby, I will try to illustrate my observation as clear as possible.

I am trying to upload the QT file ("helloword") to my AM335x SK. Given the wiki insturation, I would type "scp helloworld root@xx.xx.xx.xx:\home\root". And I expect to see the "hello world" on the touch screen.

And when I tried to copy the file, the linux always told me "loss connection/permission denied"

Now, I realize that the problem is: the ethernet0 on the AM335x cannot be linked or accessed by my Ubuntu  14.04, even though I could manually set an IP address to the AM335x Starter Kit and the Ethernet 0 in my Linux system. 

But, I cannot PING from Ubuntu to AM335x, either PING from AM335x to Ubuntu.

I guess that there would be multiple issue with my Kernel settings or my SDK settings. And I could not figure out the issue clearly, where I should start to solve the problem.

My SDK version is ti-processor-sdk-linux-evm-02.00.01.07, btw.

There may be also an issue with DHCP (I am not sure the name exactly). Or I may need to setup the default eth0 when I boot the SK.

Any suggestion would be appreciated. Please help.

Thanks again.

Best Regards.

  • Hi,

    Are you using the pre-built SDK image? Can you post the boot log?
  • Hello Biser,

              I did several tests, and tried various SDK (08.xx.xx ~ 20.00.01.07). Well, actually I just want follow the QT training lab, and copy the file to am335x SK board.

    like use command :

               "xx@am335x-evm:# cp helloworld root@192.168.177.152:/home/root"

              But I am pretty sure, the Ethernet link between eth0 and my linux host is failed.

              Sorry for the awkward explanation, I am pretty new for the embedded system.


             Here is what I did (just for presenting the problem)

    ------------------------------------------------------------------------------------------------------------------------

           am335x-evm login: root                                                          
    Last login: Sat Jan  9 00:30:53 UTC 2016 on ttyS0                               
    root@am335x-evm:~# ifconfig                                                     
    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:65536  Metric:1                              
              RX packets:18 errors:0 dropped:0 overruns:0 frame:0                   
              TX packets:18 errors:0 dropped:0 overruns:0 carrier:0                 
              collisions:0 txqueuelen:0                                             
              RX bytes:1252 (1.2 KiB)  TX bytes:1252 (1.2 KiB)                      
                                                                                    
    root@am335x-evm:~# ifdown eth0                                                  
    ifdown: interface eth0 not configured                                           
    root@am335x-evm:~# ifup eth0                                                    
    [  398.569706] net eth0: initializing cpsw version 1.12 (0)                     
    [  398.654138] net eth0: phy found : id is : 0x4dd074                           
    [  398.667403] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready               
    udhcpc (v1.23.1) started                                                        
    Sending discover...                                                             
    [  401.654393] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow cof
    [  401.662447] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready          
    Sending discover...                                                             
    Sending discover...                                                             
    No lease, forking to background                                                 
    root@am335x-evm:~# ifconfig                                                     
    eth0      Link encap:Ethernet  HWaddr C4:ED:BA:8B:2B:33                         
              inet6 addr: fe80::c6ed:baff:fe8b:2b33/64 Scope:Link                   
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1                    
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0                    
              TX packets:57 errors:0 dropped:0 overruns:0 carrier:0                 
              collisions:0 txqueuelen:1000                                          
              RX bytes:0 (0.0 B)  TX bytes:15206 (14.8 KiB)                         
              Interrupt:169                                                         
                                                                                    
    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:65536  Metric:1                              
              RX packets:18 errors:0 dropped:0 overruns:0 frame:0                   
              TX packets:18 errors:0 dropped:0 overruns:0 carrier:0                 
              collisions:0 txqueuelen:0                                             
              RX bytes:1252 (1.2 KiB)  TX bytes:1252 (1.2 KiB)                      
                                                                                    
    root@am335x-evm:~#


    ------------------------------------------------------------------------------------------------------------------------

    And yes, I cannot ping my Linux host (Ubuntu 12.04 LTS 64-bit )

    Here is the ifconfig of my host side

    ------------------------------------------------------------------------------------------------------------------------

    pengyuan@pengyuan-virtual-machine:~$ ifconfig
    eth0      Link encap:Ethernet  HWaddr 00:0c:29:1c:53:b8  
              inet addr:192.168.177.152  Bcast:192.168.177.255  Mask:255.255.255.0
              inet6 addr: fe80::20c:29ff:fe1c:53b8/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:60603 errors:0 dropped:0 overruns:0 frame:0
              TX packets:22737 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:70249872 (70.2 MB)  TX bytes:5591014 (5.5 MB)

    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:65536  Metric:1
              RX packets:2723 errors:0 dropped:0 overruns:0 frame:0
              TX packets:2723 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:269739 (269.7 KB)  TX bytes:269739 (269.7 KB)

    ------------------------------------------------------------------------------------------------------------------------

    Here is my interfaces settings (linux host):

    ------------------------------------------------------------------------------------------------------------------------

    auto lo
    iface lo inet loopback

    auto eth0
    iface eth0 inet dhcp

    ------------------------------------------------------------------------------------------------------------------------

    Actually, I tried to manually set the eth0 and eth1. Even though, the eth0 seemly may obtain some "address"

    , the SK board still cannot ping linux host

    ------------------------------------------------------------------------------------------------------------------------

    root@am335x-evm:~# ifdown eth0
    ifdown: interface eth0 not configured
    root@am335x-evm:~# ifconfig eth0 192.168.177.100 netmask 255.255.255.0 up
    [ 1755.697139] net eth0: initializing cpsw version 1.12 (0)
    [ 1755.784207] net eth0: phy found : id is : 0x4dd074
    [ 1755.792927] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    root@am335x-evm:~# [ 1758.784310] cpsw 4a100000.ethernet eth0: Link is Up - 100f
    [ 1758.792325] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

    root@am335x-evm:~# ifconfig
    eth0      Link encap:Ethernet  HWaddr C4:ED:BA:8B:2B:33  
              inet addr:192.168.177.100  Bcast:192.168.177.255  Mask:255.255.255.0
              inet6 addr: fe80::c6ed:baff:fe8b:2b33/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:89 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:0 (0.0 B)  TX bytes:24142 (23.5 KiB)
              Interrupt:169

    eth1      Link encap:Ethernet  HWaddr C4:ED:BA:8B:2B:35  
              UP BROADCAST 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)

    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:65536  Metric:1
              RX packets:18 errors:0 dropped:0 overruns:0 frame:0
              TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:1252 (1.2 KiB)  TX bytes:1252 (1.2 KiB)

    root@am335x-evm:~# ping 192.168.177.152
    PING 192.168.177.152 (192.168.177.152): 56 data bytes          

                                          
    --- 192.168.177.152 ping statistics ---
    25 packets transmitted, 0 packets received, 100% packet loss
    ^Croot@am335x-evm:~#


    ------------------------------------------------------------------------------------------------------------------------

    I am not sure what I am doing is correct, caused that I am pretty new for the embedded system.

    But, I think that if the link is set correctly, there should be some pack responses...

    Here is the interfaces setting on my AM335x side

    ------------------------------------------------------------------------------------------------------------------------

    # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

    # The loopback interface
    auto lo
    iface lo inet loopback

    # Wireless interfaces
    iface wlan0 inet dhcp
            wireless_mode managed
            wireless_essid any
            wpa-driver wext
            wpa-conf /etc/wpa_supplicant.conf

    iface tiwlan0 inet dhcp
            wireless_mode managed
            wireless_essid any

    iface atml0 inet dhcp

    # Wired or wireless interfaces
    auto eth0
    # Wired or wireless interfaces           
    auto eth0                                
    iface eth0 inet dhcp                     
            pre-up /bin/grep -v -e "ip=[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+" /proc/cmd
                                  
    iface eth1 inet dhcp                                                            
                                                                                    
    # Ethernet/RNDIS gadget (g_ether)                                               
    # ... or on host side, usbnet and random hwaddr                                 
    iface usb0 inet dhcp                                                            
                                                                                    
    # Bluetooth networking                                                          
    iface bnep0 inet dhcp                                                           
     

    ------------------------------------------------------------------------------------------------------------------------


    Here is the *.dts file that I used for boot my AM335x (if the board really does what I expect). I observed the patches used for SDK 07.xxxx or 06.xxxxx are inherently applied in the SDK 20.xxxxx *.dts file.

    I mean the *.dts file should be fine. So, I am kind of running out of options. And still do not what is going on.

    Anyway, the part, where was normally patched in previous SDKs, of am335x-evmsk.dts file is attached. 

    ------------------------------------------------------------------------------------------------------------------------

    &mac {
        pinctrl-names = "default", "sleep";
        pinctrl-0 = <&cpsw_default>;
        pinctrl-1 = <&cpsw_sleep>;
        dual_emac = <1>;
        status = "okay";
    };

    &davinci_mdio {
        pinctrl-names = "default", "sleep";
        pinctrl-0 = <&davinci_mdio_default>;
        pinctrl-1 = <&davinci_mdio_sleep>;
        status = "okay";
    };

    &cpsw_emac0 {
        phy_id = <&davinci_mdio>, <0>;
        phy-mode = "rgmii-txid";
        dual_emac_res_vlan = <1>;
    };

    &cpsw_emac1 {
        phy_id = <&davinci_mdio>, <1>;
        phy-mode = "rgmii-txid";
        dual_emac_res_vlan = <2>;
    };

    &mmc1 {
        status = "okay";
        vmmc-supply = <&vmmc_reg>;
        bus-width = <4>;
        pinctrl-names = "default", "sleep";
        pinctrl-0 = <&mmc1_pins_default>;
        pinctrl-1 = <&mmc1_pins_sleep>;
        cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
    };
    ------------------------------------------------------------------------------------------------------------------------

    I searched this issue for weeks and tried options, while I found that SDK 20.xx.xx.xx inherently solved those problems mentioned for previous SDKs.


    So, I am lost totally. Please help. Thank you very much, Biser.


    Best Regards

    Pengyuan

  • From what I see your SK Ethernet setup is for IPv6:

    [ 398.667403] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

    It should be setup for IPv4.
  • Hi Biser,

                   Yes, that is my problem. But I am not sure how to solve it. The problem is on the Target Board side or on the Linux Host Side, I have no idea. Any suggestion for this issue? Thanks a lot.

    Regards

    Pengyuan

  • I cannot say about the Host side, but it's definitely present on the Target board. I'm not a software expert, but this should be done through kernel configuration - disable IPv6 and enable IPv4.