Topic: [CLOSED] Wolf SSL and PIC32MX with Microchip Stack ver 5.xx
I had a project working for a couple of years with PIC32 and MPLAB8 with TCPIP Stack v5.xx. Recently, google FCM stopped accepting SSL connection from my TCP Client.
I have to move to MPLAB X and Harmony. I used an example there which uses Wolf SSL and it was working fine. But after adding all the parts of my previous project (with a lot of pain) I found out the the Harmony TCPIP Stack stops responding (no receiving or sending). I use HTTP server, UDP server, TCP Client (with Wolf SSL) and check and update of IP. I believe (and a lot of other people on Microchip forum) that MPLABX and Harmony are not fully developed/debugged applications.
Then I tried to port the example code from Harmony to MPLAB 8 and TCPIP Stack v5.xx. I changed Wolf SSL configuration file to use this stack but it doesn't work.
It fails on wolfSSL_Connect(mySSL.ssl) with the result SSL_ERROR_WANT_READ. I have searched the forum about this error but it doesn't give me any solution.
Small part of the code is below:
if(!TCPIsConnected(mySSL.socket)){
hubClientState = SM_HUB_DISCONNECT;
break;
}
int result = wolfSSL_connect(mySSL.ssl);
if (result == SSL_SUCCESS){
hubClientState = SM_HUB_SEND_MESSAGE;
break;
}
else if (wolfSSL_get_error(mySSL.ssl, result) == SSL_ERROR_WANT_READ){
break;
}
else if(wolfSSL_get_error(mySSL.ssl, result) == SSL_ERROR_WANT_WRITE){
break;
}
else{
int err = wolfSSL_get_error(mySSL.ssl, result);
hubClientState = SM_HUB_DISCONNECT;
}
Any suggestions what I can do?
I am using Wolf SSL version 3.9.0 - which comes with Microchip Harmony.
Is there any working example of TCP Client with Wolf SSL for PIC32 and MPLAB 8 with TCPIP Stack v5xx?
Just remembered that I am using FreeRTOS but I haven't enabled it in the configuration file. Could it be the issue?