However, HTTPS/TLS connections consistently fail with the following error:
write:errno=104 (Connection reset by peer)
SSL handshake has read 0 bytes
This issue occurs when connecting to Amazon Web Services S3 endpoints as well as general HTTPS servers (e.g., Google). The same commands work without any issues when executed from a standard PC on a regular network.
HTTP response is returned (400 expected due to missing Host header)
Python workaround (SNI disabled)
Disabling SNI in the TLS handshake allows successful downloads. This confirms that the TLS stack is functioning correctly and suggests the issue is at the network level.
TLS ClientHello packets containing the SNI extension trigger an immediate TCP reset, while TLS connections without SNI succeed. This indicates possible Deep Packet Inspection (DPI) or carrier/network-level filtering.
We wanted to understand the following:
Why does this issue occur specifically on the embedded device using the M2M SIM? We also tested with a different custom board and a regular SIM card and observed the same behavior.
Is there a recommended or supported approach to resolve this issue without disabling SNI, since disabling SNI is not a viable long-term solution?
I might make mistakes or occasionally get you wrong. Our support team will step in if needed.
I appreciate your detailed description of the TLS/SNI connectivity issue. However, the problem you’re describing appears to be related to network/cellular carrier filtering rather than Toradex-specific software or hardware configuration.
Based on your findings, this appears to be Deep Packet Inspection (DPI) by your M2M cellular carrier that’s blocking TLS connections with SNI extensions - a common practice by some carriers to control bandwidth or filter certain types of traffic.
Recommendations
Since this is primarily a network/carrier-level issue rather than a Toradex platform issue, I’d suggest:
Contact your cellular carrier - This is the most direct approach since they control the DPI filtering
Consider alternative carriers - Test with different M2M providers that may have less restrictive policies
VPN tunneling - Establish a VPN connection to bypass DPI filtering
Alternative protocols - Consider using non-HTTPS protocols where possible
Toradex-Specific Resources
For networking and connectivity development on Toradex platforms, you might find these resources helpful(1):
Network and Connectivity documentation - covers Wi-Fi, Bluetooth, and networking applications
Application Development guides - for developing connectivity solutions on embedded Linux
You may also find relevant discussions on the Toradex Community by searching for “cellular connectivity” or “M2M networking.”
Since this appears to be a carrier-level restriction rather than a platform-specific issue, the solution will likely need to be implemented at the network level rather than through Toradex software configuration.
Best regards,
Toradex AI Assistant.
Did you like my answer?
If I answered your question, please tick the “Solution” checkbox.
For follow-up questions to me, please use @ToradexAI in your post.
From the logs, it appears that the issue is not specific to AWS S3, but rather that HTTPS/TLS connections are failing in general. Since the same behavior is observed when connecting to other HTTPS endpoints, it would be helpful to narrow down the root cause.
Could you please provide the following information?
Which Toradex module and carrier board are you using?
Which BSP/Torizon OS version are you running?
Does the issue occur only with your application, or can it also be reproduced using commands such as: