Hi there,
I am trying to use the LwIP library (1.4.1) to create a simple tcp
server on a Texas Instrument RM57.
So far, I could make the "tcpecho_raw" example to work using an static ip.
I also added the following function (which did not work), to be able to
send data that wasn't an echo:
void tcpServer_send()
{
uint8 data[] = "TEST_DATA";
struct pbuf* buffer = pbuf_alloc(PBUF_RAW, sizeof(data), PBUF_POOL);
if (buffer)
{
sciDisplayText(sciREG1, txt_new_line, sizeof(txt_new_line));
sciDisplayText(sciREG1, "buffer created", sizeof("buffer
created"));
buffer->tot_len = sizeof(data);
buffer->len = sizeof(data);
buffer->payload = data;
tcpecho_es->p = buffer;
tcpecho_raw_send(tcpecho_raw_pcb, tcpecho_es);
}
}
As you can see, the function prints a debug msg ("buffer created"). I
modified the function 'tcpecho_raw_send' to also print a debug msg (the
data being sent).
When I run the program, I can see the msg "buffer created" every time
the function is called, but the msg from 'tcpecho_raw_send' comes only
when I close the client! (And the msg is missing the acutal data, btw).
NOTE: I want to build a server that receives some commands and sends a
block of data (4KB) every 60 ms. I am using the raw API because I don't
want to use blocking functions (from what I understood the netconn API
uses blocking functions).
I would appreciate any help.
Best regards,
Julio Aguilar
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users