After all it was something with the memory sections.

From: Nikolas Karakotas 
Sent: Saturday, March 16, 2013 4:45 PM
To: Mailing list for lwIP users 
Subject: Re: [lwip-users] Strange problem with Ethernet

Hi,

Apparently when I power up I receive packets with errors and they are 
disregarded by the driver.
Now I'm even more confused!

From: Nikolas Karakotas 
Sent: Saturday, March 16, 2013 4:04 PM
To: Mailing list for lwIP users 
Subject: [lwip-users] Strange problem with Ethernet

Hi Guys,

Im facing a strange problem that I recently noticed. Here is what happens:

When I program my LPC1769 chip with the program and board resets while 
connected to power everything works OK.
Now when I remove power and try to ping the board is not responsive!
Im very confused to what is causing this. I also have another program that uses 
the Ethernet DMA but works OK.
Im using the latest pulled lwip from git.
Here is some output, It seems as the tcip thread isnt receving data, maybe 
something with the interrupts? I also noticed its delaying a lot sometimes ping 
might work and has a value of 30.000ms!

Regards,
Nick


netif: setting default interface en
netif_set_ipaddr: netif address being changed
netif: IP address of interfaceset to 192.168.0.10
netif: netmask of interface set to 255.255.255.0
netif: GW address of interface set to 192.168.0.1
netif: added interface en IP addr 192.168.0.10 netmask 255.255.255.0 gw 
192.168.0.1
netif: setting default interface en
tcpip_thread: CALLBACK 0x10001354
tcpip_thread: PACKET 0x100013f4
tcpip_thread: PACKET 0x100013f4
tcpip_thread: CALLBACK 0x10001354
tcpip_thread: PACKET 0x100013f4
tcpip_thread: PACKET 0x100013f4
tcpip_thread: PACKET 0x100013f4
tcpip_thread: PACKET 0x100013e0
tcpip_thread: PACKET 0x100013cc
tcpip_thread: PACKET 0x100013cc
tcpip_thread: PACKET 0x100013cc
tcpip_thread: PACKET 0x100013cc
tcpip_thread: PACKET 0x100013cc
tcpip_thread: PACKET 0x100013cc
tcpip_thread: PACKET 0x100013cc
tcpip_thread: PACKET 0x100013cc
tcpip_thread: PACKET 0x100013cc
ip_input: iphdr->dest 0xa00a8c0 netif->ip_addr 0xa00a8c0 (0xa8c0, 0xa8c0, 
0xa000000)
ip_input: packet accepted on interface en
ip_input: 
IP header:
+-------------------------------+
| 4 | 5 |  0x00 |        84     | (v, hl, tos, len)
+-------------------------------+
|    49306      |000|       0   | (id, flags, offset)
+-------------------------------+
|   64  |    1  |    0x38a9     | (ttl, proto, chksum)
+-------------------------------+
|  192  |  168  |    0  |   11  | (src)
+-------------------------------+
|  192  |  168  |    0  |   10  | (dest)
+-------------------------------+
ip_input: p->len 84 p->tot_len 84
ip_output_if: en0
IP header:
+-------------------------------+
| 4 | 5 |  0x00 |        84     | (v, hl, tos, len)
+-------------------------------+
|    49306      |000|       0   | (id, flags, offset)
+-------------------------------+
|  255  |    1  |    0x79a8     | (ttl, proto, chksum)
+-------------------------------+
|  192  |  168  |    0  |   10  | (src)
+-------------------------------+
|  192  |  168  |    0  |   11  | (dest)
+-------------------------------+
netif->output()tcpip_thread: PACKET 0x100013e0
tcpip_thread: PACKET 0x100013e0
ip_input: iphdr->dest 0xa00a8c0 netif->ip_addr 0xa00a8c0 (0xa8c0, 0xa8c0, 
0xa000000)
ip_input: packet accepted on interface en
ip_input: 
IP header:
+-------------------------------+
| 4 | 5 |  0x00 |        84     | (v, hl, tos, len)
+-------------------------------+
|    40595      |000|       0   | (id, flags, offset)
+-------------------------------+
|   64  |    1  |    0x5ab0     | (ttl, proto, chksum)
+-------------------------------+
|  192  |  168  |    0  |   11  | (src)
+-------------------------------+
|  192  |  168  |    0  |   10  | (dest)
+-------------------------------+
ip_input: p->len 84 p->tot_len 84
ip_output_if: en0
IP header:
+-------------------------------+
| 4 | 5 |  0x00 |        84     | (v, hl, tos, len)
+-------------------------------+
|    40595      |000|       0   | (id, flags, offset)
+-------------------------------+
|  255  |    1  |    0x9baf     | (ttl, proto, chksum)
+-------------------------------+
|  192  |  168  |    0  |   10  | (src)
+-------------------------------+
|  192  |  168  |    0  |   11  | (dest)
+-------------------------------+
netif->output()tcpip_thread: PACKET 0x100013cc
tcpip_thread: PACKET 0x100013cc
tcpip_thread: PACKET 0x100013cc
tcpip_thread: PACKET 0x100013cc
tcpip_thread: PACKET 0x100013cc

Now when power off and on:

netif_set_ipaddr: netif address being changed
netif: IP address of interface set to 192.168.0.10
netif: netmask of interface set to 255.255.255.0
netif: GW address of interface  set to 192.168.0.1
netif: added interface en IP addr 192.168.0.10 netmask 255.255.255.0 gw 
192.168.0.1
netif: setting default interface en
tcpip_thread: CALLBACK 0x10001354
tcpip_thread: CALLBACK 0x10001354
ip_output_if: en0
IP header:
+-------------------------------+
| 4 | 5 |  0x00 |        76     | (v, hl, tos, len)
+-------------------------------+
|        0      |000|       0   | (id, flags, offset)
+-------------------------------+
|  255  |   17  |    0x62ef     | (ttl, proto, chksum)
+-------------------------------+
|  192  |  168  |    0  |   10  | (src)
+-------------------------------+
|  213  |  161  |  194  |   93  | (dest)
+-------------------------------+
netif->output()


--------------------------------------------------------------------------------
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users


--------------------------------------------------------------------------------
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to