• 0
train04

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

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.

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

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

Share this post


Link to post
Share on other sites
  • 0

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.

Edited by Audrius

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now