Jump to content
  • 0

how to send large data bytes to pc using TCP-LWIP stack


train04

Question

hii,

I am working on ARTY board for an application to real time ADC , after successfully receiving of data samples I want to send it to my PC using LWIP. I tried to use example code of echo server with modification of using API tcp_write();   but able to receive only few samples can anyone please help me out ,how to send data through it.

while I am using serial transmission UART, I am receiving data  continuously in while loop , but I want to use Ethernet .

provide any example code for this.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

Hi @bklopp,

I can recommend you to look at fpga-cores.com if you do signal processing. With this core you don't need any processor etc. You only stream the data and the core do all Ethernet stuff like TCP/IP. It is then very simple to use from Matlab, Python or what ever you prefer. With their logic analyzer you can view the signal as analog, so you can easily look at the signal during all steps. All cores and software can you download for free.

Cheers

Link to comment
Share on other sites

You need to register the callback that notifies you when some data have already be sent and acknowledged. This hook is registered with

void tcp_sent(struct tcp_pcb * pcb, err_t (* sent)(void * arg, struct tcp_pcb * tpcb, u16_t len))

Inside this function, you can check if you actually have more data to send and if so, enqueue now. As the data have just been sent, it should be more place in the buffer now. You may also need to call tcp_output after you enqueue the data.

It is not possible to send more than the size of the buffer from the receive callback, even if you call tcp_output there with the hope to get more room.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...