These are chat archives for marvell-iot/aws_starter_sdk

2nd
Oct 2017
maxdd
@maxdd
Oct 02 2017 15:30

In http.c file i noticed the following code

if (size_read < 0) {if ((size_read == -WM_E_HTTPC_SOCKET_ERROR && errno != EAGAIN) || (size_read == -WM_E_HTTPC_SOCKET_SHUTDOWN)) { httpc_e("Error in reading content: %d", size_read);s->state = SESSION_ERROR;}return size_read;

WM_E_HTTPC_SOCKET_ERROR is exactly 65541.
It's rather strange don't you think? Is anyone willing to help me out a bit?

Jose Pablo Carballo
@josecarballoGL
Oct 02 2017 16:46
Maybe is not that strange, it is parsing the error from the previous call to recv_buf(), which in turn calls _http_raw_recv() who may return -WM_E_HTTPC_SOCKET_ERROR
maxdd
@maxdd
Oct 02 2017 17:33
[httpc] Using actual read: 29 256
[httpc] Using actual read: -65541 256
30721 32000
it seems an overflow to me
if you see 32000 is the sum of the actual read second column till the error
the working example reaches
[httpc] Using actual read: 83 83
27760 28499
which is the size of the hello_world.bin file, mine since it is 356kb delivers an error
Why a 27kb file is working while a 350 isn't
or rather a "space" problem, since the same file is downloaded and flashed when using http