[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Tcp Server on Texas Instrument RM57
From: |
Julio Cesar Aguilar Zerpa |
Subject: |
[lwip-users] Tcp Server on Texas Instrument RM57 |
Date: |
Fri, 28 Oct 2016 15:56:47 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 |
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] Tcp Server on Texas Instrument RM57,
Julio Cesar Aguilar Zerpa <=