UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
480 Views
Registered: ‎02-12-2018

how to transfer video data with lwIP bare metal ethernet

Jump to solution

- Vivado, SDK: 2017.4
- Device: Zynq-7000

 

details

I have image data stored in VDMA frame buffer that I'd like to transfer to my PC for debugging purposes.
I chose 1GbE as interface for this, on the PS. I am able to transfer simple commands via HTTP POST messages between client and host and individual image frames. Performance is currently not optimized.

The size of my ethernet frame buffer is 1kB. To overcome this limitation I am pointing to the image frame buffer, instead.
Since lwIP is taking care of packet splitting to meet MTU I am assuming that I can provide any number of bytes to be send using tcp_write().

 

// create a HTTP header POST message, store in memory right before frame
len = generate_http_header((char *)(frameBufferStartAddress-headerLength), "js", length);

// update length of payload, in bytes
len += framelength;

// create TCP packets from bytes in memory
if (tcp_write(pcb, (char *)(0x0A000000-headerLength-3), len, 1) != ERR_OK) {
    xil_printf("error writing http POST response to socket\n\r");
    xil_printf("http header = %s\r\n", buf);
    return -1;
}

Doupts

This approach worked for me only for a small amount of data, relatively spoken. tcp_write() failes to send more data at once. Is it a good practive to call tcp_write() multiple times, if so which size should I choose?

 

Documents read:

- XAPP1026

- ug585
- https://stackoverflow.com/questions/15384518/how-many-bytes-can-i-write-at-once-on-a-tcp-socket

 

Can you provide me suggestions about my current approach or provide helpful references to solve such problems.

 

thank you

0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
609 Views
Registered: ‎10-30-2017

Re: how to transfer video data with lwIP bare metal ethernet

Jump to solution

Hello @theultimatesource,

 

call the tcp_write()  function for multiple times and transfer around 1400 bytes in each transfer.

 

Best Regards,
Srikanth
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.

0 Kudos
1 Reply
Xilinx Employee
Xilinx Employee
610 Views
Registered: ‎10-30-2017

Re: how to transfer video data with lwIP bare metal ethernet

Jump to solution

Hello @theultimatesource,

 

call the tcp_write()  function for multiple times and transfer around 1400 bytes in each transfer.

 

Best Regards,
Srikanth
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.

0 Kudos