1 (edited by andreas20488 2012-11-20 08:01:07)

Topic: assert!!netconn_accept: invalid recvmbox

Hello,

I am trying to create a demo client-server on our lwip module. We have no filesystem.

In client side when I call

wolfSSL_connect(ssl)

for the first time the client need to say hello to server so it calls EmbedSend and in the line

208  sent = SEND_FUNCTION(sd, &buf[sz - len], len, 0);//SEND_FUNCTION is defined as lwip send

sends the buf to the server.


on the server side in wolfSSL_accept(ssl)

On function EmbedReceive when the server goes to the line where it has to read the clients hello

163 recvd = RECV_FUNCTION(sd, (char *)buf, sz, 0);

it print me in the screen the message

"assert!!netconn_accept: invalid recvmbox"

and server stucks there.

Does anyone know what the problem might be?

Share

Re: assert!!netconn_accept: invalid recvmbox

Hi andreas,

Do you have your LwIP stack configured to use the BSD-style sockets API?  This is done by setting LWIP_SOCKET to "1" in lwip/opt.h or in your build.

Best Regards,
Chris

3 (edited by andreas20488 2012-11-21 05:25:13)

Re: assert!!netconn_accept: invalid recvmbox

Hello Chris,

I already us BSD style sockets. Any other ideas?

Any other idead?

Share

Re: assert!!netconn_accept: invalid recvmbox

Typically, when setting up wolfSSL in your application code, you should:

1)  Set up your socket
2)  Connect the socket
3)  Pass the file descriptor to wolfSSL using the wolfSSL_set_fd() function

Are you following these steps in your application code?

Regards,
Chris

Re: assert!!netconn_accept: invalid recvmbox

Hello Chris,

I did all the steps you described, and actually I follow the exacts steps included in wolfSSL embedded SSL Manual for creating a client-server model.

If you like I can send you the exact code that I create.

Share

Re: assert!!netconn_accept: invalid recvmbox

Hi andreas,

Have you verified that your LwIP stack works correctly when using standard TCP/IP (not over SSL)?

Regards,
Chris