- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
send UDP-messages isn't a problem anymore. But now, when I try to send a message from pc to nios II, my data doesn't arrive and ethereal tells me that the IP-header checksum is 0x0000. When I chat with the program (it's a udp-version of a small chatprogram) it works fine. We written it ourselves, but for some reason, I doesn't cooperate with my NIOS II. This is what I use for receiving data: *************************************************************** while(1) { lan91c111if_service(&netif); pcb = udp_new(); udp_recv(pcb, udp_callback, 666); udp_bind(pcb, IP_ADDR_ANY, 666); // udp_callback_function(recvBuffer, pcb, p, &destIpAddr, 666); } *************************************************************** CALLBACK *************************************************************** void udp_callback_function(void *recvBuffer, struct udp_pcb *pcb, struct pbuf *p, struct ip_addr *ipaddr, u16_t port) { recvBuffer = p->payload; printf(recvBuffer); pbuf_free(p); udp_remove(pcb); } ************************************************************** Could anyone tell me what I'm doing wrong!? Thanks in advance. DannyLink Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok now I can receive messages http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif .. But now it seems that I can't receive large files. After a couple of messages it just stops receiving. I think I need to clear a buffer or anything... Or free memory... help anyone!?
Thanks, Danny- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I know what the problem is:
in lwipopts.h PBUF_POOL_SIZE is defined as 32. When I sent 32 strings it stops. But m question is: how do I clear it. There must be a way. When I use pbuf_free, it doesn't seem to be much of help.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No problems anymore also fixed it.... Only one question left: how large is the max size of a packages which is received by NIOS?!
cheers, Danny
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page