ST87M01 MTU or network issue during TLS Client Hello?
Hi,
A bare-metal solution using the ST87M01-1301 modem (FW: v2.9.0) and a TCP connection to a remote server, with mbedTLS handling the TLS.
We are experiencing an issue with one specific server (which is not under our management, making it very difficult to obtain server-side logs). The server does not respond to our TLS Client Hello at all. It does not send a TLS alert or close the connection; it simply leaves the socket open until our application timeout terminates the connection after 2 minutes.
Here is what we have verified and tested so far:
* The exact same Client Hello payload was copied and tested from a PC, and the server responds correctly with a Server Hello.
* The exact same bare-metal implementation works with three other remote servers.
* +CGCONTRDP reports an MTU of 1500. We have attempted to lower the "max_ip_frame_size" on the ST87M01 from 1600 down to 512 bytes, but it had no effect.
* During PC test, if we transmit an invalid Client Hello, the server immediately terminates the connection. However, on the bare-metal setup over the LTE-M network, even an invalid Client Hello payload results in the same continuous hang (but please look at the next point *).
* On the bare-metal setup, if the transmitted data does not start with valid TLS handshake bytes (such as 0x16), the server immediately terminates the connection. This confirms that the data is reaching the server over LTE-M?
* The Client Hello size is 197 bytes + the Record header.
Could this be a network/server or routing issue specific to the LTE-M network, or is there a specific configuration we should adjust/try on the modem?
Below is a snippet of our debug logs. Any insights or recommendations would be highly appreciated.
Best regards,
Henry
10:44:11.456 >>AT#RESET
10:44:11.456
10:44:11.456 OK
10:44:12.187
10:44:12.187 #REBOOT_HOST
10:44:12.385
10:44:12.385 #SIMST: 1
10:44:12.485
10:44:12.485 +CEREG: 2,"","",,,,"",""
10:44:13.876 Temperature: Value/Age/Valid: 0/34/0
10:44:15.929
10:44:15.929 +CEREG: 0,"","",,,,"",""
10:44:15.929
10:44:15.929 +CEREG: 2,"","",,,,"",""
10:44:18.546
10:44:18.546 +CGEV: ME PDN ACT 5
10:44:18.546
10:44:18.546 #IPCFG: 5,0,1
10:44:19.042
10:44:19.042 +CEREG: 1,"B542","0005916A",9,,,"",""
10:44:19.473
10:44:19.473 +CGEV: NW IP ADDR CHG 5
10:44:19.473
10:44:19.473 #IPCFG: 5,1,1
10:44:19.473 >>AT#SOCKETCREATE=5,0,TCP,50544,120,120,6
10:44:19.506
10:44:19.506 #SOCKETCREATE: 0
10:44:19.506
10:44:19.506 OK
10:44:19.506 >>AT#TCPCONNECT=5,0,******,443 // ****** was hostname
10:44:20.301
10:44:20.301 OK
10:44:20.301 TLS init OK
10:44:20.301 Current MbedTLS Epoch: 1787730114 //this was hard coded for faster testing
10:44:20.666 TLS Handshake Send...
10:44:20.699 >>AT#IPSENDTCP=5,0,2,16030300c5010000c10//..........
10:44:20.864
10:44:20.864 OK
10:44:21.626
10:44:21.626 #TCPACK: 5,0,202
10:45:20.573 Modem TLS Timeout: When: wait data! //our timeout
10:45:20.573 >>AT#SOCKETCLOSE=5,0 //here we close socket
....
12:15:09.431 >ATI
12:15:09.431
12:15:09.431 STMICROELECTRONICS
12:15:09.464 ST87M01-1301
12:15:09.464 A:2.9.0-M:2.9.0-S:2.9.0-G:2.9.0-B:1.1
12:15:09.464
