Hi Frank,
The biggest thing that sticks out is the time. Over the course of the connection it looks like from packet 1 to packet 25 of the wireshark you sent a total of 19.85 seconds has expired. Nothing in the wireshark sticks out as an obvious issue in fact everything is progressing normally and then at 20.08 seconds we see 4 reset messages come from the server destined for the client, I honestly think you are just hitting a timeout for the server.
I tested this theory by placing a "sleep(4);" in the default IO Send callback and using our example client to test:
./examples/client/client -M smtp -h 64.233.168.108 -p 587 -d
Sure enough I was able to produce a wireshark very similar to yours just without the spurious re-transmissions. The peer hung up on me after only 12 seconds.
I tried again with sleep(3); and got similar results but the peer kept talking up to 15 seconds. It seems like there may be a threshold between messages that if exceeded too many times the peer aborts the connection.
Options to alleviate this would be to use a faster cipher suite. Have you run the <wolfssl-root>/wolfcrypt/benchmark/benchmark.c application on your device to see which algorithms perform the best on your device? Typically an ECDHE_ECDSA cipher suite will outperform any RSA cipher suites if that is an option for you.
Could you try running the benchmark app and running one of the faster cipher suites to see if you can up your success rate above 2%?
Warm Regards,
Kaleb