Ping Test Failed in iMX6 Platform SDK

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ping Test Failed in iMX6 Platform SDK

941 Views
deanchu
Contributor I

Hey everyone. I was working with the ping app in imx6 platform sdk recently, And i found it didn't work well.

Our board design is based on SABRE SDB, and it can successfully ping out with uboot/linux/android.It seems the hardware is not the problem.

I already found some bugs and fixed some of them.

1) sys_now() in sys_arch.c always returns 0 due to invalid data format transfer. Function time_get_microseconds() returns 64bit value while sys_now() returns 32bit value. I tried to pick only the lower 32bit to sys_now(), and the time value then became valid.

2)The target IP is fixed in line 240, ping_main.c

Here is the problem, after i fixed the bugs, it still won't wrok.

First, I used the default dhcp_start() to get netwrok parameters, it failed to acquire the dhcp server, and the debug output is "dhcp_discover(): set request timeout xxx msecs".

Then i tried to fix the network parameters in the code, and this time the network was up. But when i typein a hostname, it always failed to resolve the hostname. I am quite sure the dns server is reachable(8.8.8.8), and the hostname is valid(www.google.com.hk).

And then i modified the code to make it compatible with raw ip input. After entering an valid ip, the debug output showed it sent out 1 ping packet and got no answer from the target. But when i lisented the ICMP packet on the target ip, i got nothing.

After the sys_now() bug is fixed, it seems the tcp/ip stack is working, but it gets no answer from the phy.My guess is there is some bug in the phy driver of the sdk. However, the readout phy ID is correct and it can detect the link is up or down, which means the driver can read correctlly.

I was stucked in this problem for almost a week, please help! Thank you.

Here is the sys_now() i used now:

u32_t sys_now(void)

{

    return (time_get_microseconds_32()/1000);

}

And the pt of time_get_microseconds_32:

uint32_t time_get_microseconds_32()

{

   return HW_ARMGLOBALTIMER_COUNTERn_RD(0);

}

Labels (1)
0 Kudos
2 Replies

510 Views
enekofernandez
Contributor I

I am facing exactly the same issue. Implemented your time_get_microseconds_32() function successfully but now no getting messages out the Ethernet Interface.

Have you been able to make it work?

Thanks in advance for your help

0 Kudos

510 Views
sinanakman
Senior Contributor III

Eneko, I am trying to debug this for you. Just to clarify, were

you able to get data out of the Ethernet interface with the buggy

implementation of sys_now() which returned always zero.

Regards

Sinan Akman

0 Kudos