3 Replies Latest reply on Jun 26, 2020 10:18 AM by NiMc_1688136

    TCP + TLS receive error 8E00 (36352)

    NiMc_1688136

      On rare occasions while pulling an OTA image from a server using TCP i get a result of 36352 returned from wiced_tcp_receive. This error is persistent while the transfer is pending even with the socket closing and reopening.

       

      I am not sure where this return code is coming from. I have searched the return codes within mbedTLS and LWIP and i am not seeing a match.

       

      The connection to the server succeeded, TLS handshake succeeded, initial communication with the server is working so i do not see a TLS or communication error.

       

      FreeRTOS + LWIP + 6.2.1 SDK

       

      I have no logs/captures with WPRINT_SECURITY_DEBUG or WPRINT_SECURITY_ERROR enabled.

        • 1. Re: TCP + TLS receive error 8E00 (36352)
          RaktimR_11

          Even I did a text search in the whole SDK for 36352; but not a single hit. My suggestion would be to have the debug macros enabled and check when you receive the error, is there any additional debug prints?

           

          Also, when the socket is reopened, do you receive that packet or the packet is lost and the image transfer gets stopped?

          • 2. Re: TCP + TLS receive error 8E00 (36352)
            NiMc_1688136

            Upon further investigation i see the errors over a larger population of our devices and in other TCP sockets/connections Many of these devices are running production code or at customer sites where serial logging is impossible so I will see what I can do to log additional information.

             

            I also see other invalid values returned from wiced_tcp_receive

            34688 (0x8780)

            36480 (0x8E80)

             

            I am periodically polling the socket for received data through wiced_tcp_receive. I currently treat these unknown return values as a general error that triggers the connection to be closed. I wonder what would happen if i ignore it.

             

            • 3. Re: TCP + TLS receive error 8E00 (36352)
              NiMc_1688136

              I enabled

              WPRINT_ENABLE_WWD_ERROR

              WPRINT_ENABLE_SECURITY_INFO

              WPRINT_ENABLE_SECURITY_ERROR

               

              I did not see anything reported when i encountered the strange return values, in this case it was 36480.