[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Re: problems serving larger data with netconn_write()
From: |
Andre Puschmann |
Subject: |
[lwip-users] Re: problems serving larger data with netconn_write() |
Date: |
Mon, 16 Oct 2006 22:07:26 +0200 |
User-agent: |
Thunderbird 1.5.0.4 (X11/20060619) |
hi folks,
sorry for the delay ..
i figured out that it was the internet explorer setting the reset flag
after receiving a "wrong header" .. my mistake, sorry!
now it works quite fast, but only with the 750byte hack .. which means
i force lwip to send two 750byte packets in order to get an ACK .. not
the best solution, i reckon.
another question:
is it possible that the internet explorer doesn't like negative heights
in bitmap files which means that the picture is top-down coded instead
of bottom-up.
normal windows programs like Paint understand this file format.
regards
Andre
Alan Lamphier wrote:
> Andre Puschmann <address@hidden> writes:
>
>> here is a code snippet:
>>
>> for (ul_BytesSent = 0; ul_PackageSize < ul_BytesToSend; ul_BytesSent +=
>> ul_PackageSize)
>> {
>> netconn_write( ps_newconn,
>> pub_Image + ul_BytesSent,
>> ul_PackageSize,
>> NETCONN_NOCOPY);
>>
>> ul_BytesToSend-=ul_PackageSize;
>> }
>> /* send rest */
>> ...
>
> Is your image sotting in a constant array in ROM? - I didn't have any luck
> when I tried to pass netconn_write() a pointer to ROM. I chose a different
> path and never resolved that problem.
>
> I noticed you don't adjust the PackageSize for the last packet - most likely
> the image size does not equal an even number of PackageSizes. You should
> include something like this (before netconn_write) to adjust the last
> PackageSize...
>
> if ( (ul_BytesToSend-ul_BytesSent) < ul_PackageSize )
> ul_PackageSize = ul_BytesToSend-ul_BytesSent;
>
> I attached an wireshark
> http://www.nabble.com/file/3611/Logo%20jpg%20load.pcap Logo jpg load.pcap
> trace of a web page retrieval and image GET example, if it helps. I've run
> into the "TCP segment of a Reassembled PDU" sending POST data to my
> hardware, but don't understand it enough to offer advice.
>
> Regards,
> Alan
>
>