[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] PolarSSL and mbedTLS
From: |
Noam Weissman |
Subject: |
Re: [lwip-users] PolarSSL and mbedTLS |
Date: |
Wed, 15 Mar 2017 19:30:35 +0000 |
Hi Simon,
I have triad debugging my code and added :
#define LWIP_DEBUG LWIP_DBG_ON
#define SOCKETS_DEBUG LWIP_DBG_ON
Strange that with this switches on I am able to get a file of about 38K but it
fails at the last part, always?.
Without the debug prints it never even starts, it fails on first read.
I have attached my debug printout if that helps.
The text is mixed with my own debug prints, sorry:
File transfer starts at line 438 with: From WssHandleReadData: PayloadLen =
38032, DataLen = 1020
The server sends chunks of 4K, my code reads 1K at a time from the ssl layer
hence the 1024 chunks.
You can see that PayloadLen reduces by the DataLen chunk ...
The last part received is PayloadLen 1172 DataLen 1024 ... on line 1512
It should read one 1024 block and then 148 bytes and finish... This never
happens and it fails on last read
This is consistent on every test I did ?.
If I turn off the two debug switches the file transfer never starts, actually
fails on first read and the lwip_recvfrom
returns with -1 and set_errno(EWOULDBLOCK); on line 773 in sockets.c (lwip ver
2.02)
Any ideas ?
Many thanks,
Noam.
-----Original Message-----
From: lwip-users [mailto:address@hidden On Behalf Of Simon Goldschmidt
Sent: Friday, March 10, 2017 10:36 AM
To: address@hidden
Subject: Re: [lwip-users] PolarSSL and mbedTLS
Noam Weissman wrote:
> I get a read error inside lwip_recvfrom function.
> [..]
> If anyone has any ideas on what more to check or test please respond.
1: Get an idea of the error (if recvfrom returns -1, what's the corrent errno?)
2: Get a debugger and try to find out why recvfrom returns an error. Without
that information, there's no way of knowing where the error is.
Simon
_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users
file_transfer.txt
Description: file_transfer.txt
- Re: [lwip-users] PolarSSL and mbedTLS, (continued)
- Re: [lwip-users] PolarSSL and mbedTLS, Simon Goldschmidt, 2017/03/10
- Re: [lwip-users] PolarSSL and mbedTLS, Noam Weissman, 2017/03/10
- Re: [lwip-users] PolarSSL and mbedTLS, address@hidden, 2017/03/11
- Re: [lwip-users] PolarSSL and mbedTLS, Noam Weissman, 2017/03/11
- Re: [lwip-users] PolarSSL and mbedTLS, address@hidden, 2017/03/11
- Re: [lwip-users] PolarSSL and mbedTLS, Noam Weissman, 2017/03/11
- Re: [lwip-users] PolarSSL and mbedTLS, Noam Weissman, 2017/03/12
- Re: [lwip-users] PolarSSL and mbedTLS, Jan Menzel, 2017/03/14
- Re: [lwip-users] PolarSSL and mbedTLS, Noam Weissman, 2017/03/14
- Re: [lwip-users] PolarSSL and mbedTLS, Dr. Jan Menzel, 2017/03/14
- Re: [lwip-users] PolarSSL and mbedTLS,
Noam Weissman <=
- Re: [lwip-users] PolarSSL and mbedTLS, address@hidden, 2017/03/15
- Re: [lwip-users] PolarSSL and mbedTLS, Jan Menzel, 2017/03/15
- Re: [lwip-users] PolarSSL and mbedTLS, Noam Weissman, 2017/03/16
- Re: [lwip-users] PolarSSL and mbedTLS, goldsimon, 2017/03/16
- [lwip-users] Subnet too large?, Stephen Cowell, 2017/03/16
- Re: [lwip-users] Subnet too large?, goldsimon, 2017/03/16
- Re: [lwip-users] Subnet too large?, Stephen Cowell, 2017/03/16
- Re: [lwip-users] Subnet too large?, address@hidden, 2017/03/16
- Re: [lwip-users] PolarSSL and mbedTLS, Noam Weissman, 2017/03/16
- Re: [lwip-users] PolarSSL and mbedTLS, Noam Weissman, 2017/03/26