cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mxb7642_rit
Visitor
Visitor
5,050 Views
Registered: ‎08-10-2009

transmitting udp packet using lwip in raw mode

Hi, I am basing my design off the ml505 sample tftp design and all i'm trying to do is send a single udp packet to a static ip. Sadly, this is not working. I have traced the problem through lwip and into the drivers - everything seems to be working fine but for some reason, packets never actually get sent. Here is my debug output:

 

And my debug output
--------------------------------------------------
-- Starting main() --
netif: IP address of interface  set to 192.168.1.10
netif: netmask of interface  set to 255.255.255.0
netif: GW address of interface  set to 192.168.1.1
XLlTemac detect_phy: PHY detected at address 7.
XLlTemac detect_phy: PHY detected.
auto-negotiated link speed: 1000
netif: added interface te IP addr 192.168.1.10 netmask 255.255.255.0 gw 192.168.
1.1
netif: setting default interface te
find_entry: found empty entry 0
find_entry: selecting empty entry 0
etharp_request: sending ARP request.
pbuf_alloc(length=42)
pbuf_alloc(length=42) == 0x90020570
etharp_raw: sending raw ARP packet.
pbuf_free(0x90020570)
pbuf_free: 0x90020570 has ref 1, ending here.
udp_bind(ipaddr = 192.168.1.10, port = 7)
udp_bind: bound to 192.168.1.10, port 7
udp_connect: connected to 192.168.1.100,port 7
11111
pbuf_alloc(length=1200)
pbuf_alloc: allocated pbuf 0x90087bb8
pbuf_alloc(length=1200) == 0x90087bb8
22222
udp_send
pbuf_header: old 0x90087c00 new 0x90087bf8 (8)
udp_send: added header in given pbuf 0x90087bb8
udp_send: sending datagram of length 1208
udp_send: UDP packet length 1208
inet_chksum_pseudo(): checksumming pbuf 0x90087bb8 (has next 0x0)
inet_chksum_pseudo(): pbuf chain lwip_chksum()=d120
udp_send: UDP checksum 0x2edf
udp_send: ip_output_if (,,,,IP_PROTO_UDP,)
pbuf_header: old 0x90087bf8 new 0x90087be4 (20)
ip_output_if: te0
IP header:
+-------------------------------+
| 4 | 5 |  0x00 |      1228     | (v, hl, tos, len)
+-------------------------------+
|        0      |000|       0   | (id, flags, offset)
+-------------------------------+
|  255  |   17  |    0x3362     | (ttl, proto, chksum)
+-------------------------------+
|  192  |  168  |    1  |   10  | (src)
+-------------------------------+
|  192  |  168  |    1  |  100  | (dest)
+-------------------------------+
netif->output()pbuf_header: old 0x90087be4 new 0x90087bd6 (14)
find_entry: found empty entry 1
find_entry: selecting empty entry 1
etharp_request: sending ARP request.
pbuf_alloc(length=42)
pbuf_alloc(length=42) == 0x900205d0
etharp_raw: sending raw ARP packet.
pbuf_free(0x900205d0)
pbuf_free: 0x900205d0 has ref 1, ending here.
pbuf_alloc(length=1242)
pbuf_alloc(length=1242) == 0x90020630
pbuf_copy(0x90020630, 0x90087bb8)
pbuf_copy: end of chain reached.
etharp_query: queued packet 0x90087bb8 on ARP entry 1
Packet sent
33333
pbuf_free(0x90087bb8)
pbuf_free: deallocating 0x90087bb8 

 

I traced from etharp_raw() to netif->linkout() as far as i could (that is, to the point where the command to send the packet is written to the appropriate register and the hardware takes over). It seems to work fine, no errors or strange statuses. But no packets are ever sent from the board. Has anyone encountered a problem like this?

 

thank you

0 Kudos
0 Replies