jaredwolff I did a test, the original https example, just some minor additional prints (when the socketopts are successful), and changed the timer in the main.c from 1440 to every 1 minute wakeup. I also moved as close (as safe) to the cell tower that the SIM was connecting to, I was within 80m line of sight of the tower.

I get the weird logs as below:
[00:00:15.579,132] <inf> cloud: Publish path: <my url>/api/device/da ta
[00:00:15.579,315] <inf> cloud: Payload: {"do_something":true}
[00:00:15.579,345] <inf> cloud: Looking up <my url>
[00:00:16.121,734] <inf> cloud: getaddrinfo() successful.
[00:00:16.122,100] <inf> cloud: Socket created.
[00:00:16.122,131] <inf> cloud: Socket options set.
[00:00:16.122,161] <inf> cloud: Socket TX successful.
[00:00:16.122,436] <inf> cloud: TLS setup complete.
[00:00:20.588,500] <inf> cloud: Connected!
[00:00:20.588,500] <inf> cloud: Free addr info
[00:00:20.588,562] <inf> cloud: Socket setup complete
[00:00:21.955,871] <inf> cloud: HTTP Status 200
[00:00:21.956,024] <inf> cloud: HTTP Status 200
[00:00:21.956,085] <inf> cloud: Response data
22 73 74 61 74 75 73 22 3a 22 73 75 63 63 65 73 |"status" :"succes
73 22 2c 22 74 69 6d 65 73 74 61 6d 70 22 3a 22 |s","time stamp":"
32 30 32 35 2d 31 32 2d 31 33 54 30 36 3a 32 38 |2025-12- 13T06:28
3a 32 35 2e 34 31 32 5a 22 7d 65 6e 67 74 68 3a |:25.412Z "}ength:
20 35 39 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 70 | 59..Con tent-Typ
65 3a 20 61 70 70 6c 69 63 61 74 69 6f 6e 2f 6a |e: appli cation/j
73 6f 6e 3b 20 63 68 61 72 73 65 74 3d 75 74 66 |son; cha rset=utf
2d 38 0d 0a 44 61 74 65 3a 20 53 61 74 2c 20 31 |-8..Date : Sat, 1
33 20 44 65 63 20 32 30 32 35 20 30 36 3a 32 38 |3 Dec 20 25 06:28
3a 32 35 20 47 4d 54 0d 0a 45 74 61 67 3a 20 57 |:25 GMT. .Etag: W
2f 22 33 62 2d 67 30 65 30 45 2b 50 6c 68 4b 4d |/"3b-g0e 0E+PlhKM
4a 77 4c 74 53 62 61 6b 39 52 55 57 31 67 36 49 |JwLtSbak 9RUW1g6I
22 0d 0a 56 69 61 3a 20 31 2e 31 20 43 61 64 64 |"..Via: 1.1 Cadd
79 0d 0a 58 2d 50 6f 77 65 72 65 64 2d 42 79 3a |y..X-Pow ered-By:
20 45 78 70 72 65 73 73 0d 0a 43 6f 6e 6e 65 63 | Express ..Connec
74 69 6f 6e 3a 20 63 6c 6f 73 65 0d 0a 0d 0a 7b |tion: cl ose....{
[00:00:21.956,085] <inf> main: Cloud callback
[00:00:21.958,190] <inf> cloud: Data sent to cloud
[00:01:15.559,020] <inf> main: Timeout
[00:01:15.559,112] <inf> cloud: Publish path: <my url>/api/device/data
[00:01:15.559,234] <inf> cloud: Payload: {"do_something":true}
[00:01:15.559,295] <inf> cloud: Looking up <my url>
[00:01:15.568,389] <inf> cloud: getaddrinfo() successful.
[00:01:15.568,664] <inf> cloud: Socket created.
[00:01:15.568,664] <inf> cloud: Socket options set.
[00:01:15.568,695] <inf> cloud: Socket TX successful.
[00:01:15.575,408] <inf> cloud: TLS setup complete.
[00:01:18.785,278] <inf> cloud: Connected!
[00:01:18.785,308] <inf> cloud: Free addr info
[00:01:18.785,339] <inf> cloud: Socket setup complete
[00:01:21.784,942] <err> cloud: Unable to send data to cloud. Err: -116
[00:01:21.787,078] <inf> cloud: Data sent to cloud
[00:02:15.559,051] <inf> main: Timeout
[00:02:15.559,143] <inf> cloud: Publish path: <my url>/api/device/data
[00:02:15.559,265] <inf> cloud: Payload: {"do_something":true}
[00:02:15.559,326] <inf> cloud: Looking up <my url>
[00:02:15.560,943] <inf> cloud: getaddrinfo() successful.
[00:02:15.561,218] <inf> cloud: Socket created.
[00:02:15.561,218] <inf> cloud: Socket options set.
[00:02:15.561,248] <inf> cloud: Socket TX successful.
[00:02:15.567,962] <inf> cloud: TLS setup complete.
[00:02:20.567,871] <err> cloud: Unable to connect. Err: -116 - Connection timed out
[00:02:20.567,901] <inf> cloud: Free addr info
[00:02:20.569,274] <err> cloud: Unable to setup socket. Err: -116
[00:02:20.569,305] <err> main: Unable to publish. Err: -116
[00:03:15.559,020] <inf> main: Timeout
[00:03:15.559,112] <inf> cloud: Publish path: <my url>/api/device/data
[00:03:15.559,234] <inf> cloud: Payload: {"do_something":true}
[00:03:15.559,295] <inf> cloud: Looking up <my url>
[00:03:15.568,359] <inf> cloud: getaddrinfo() successful.
[00:03:15.568,634] <inf> cloud: Socket created.
[00:03:15.568,634] <inf> cloud: Socket options set.
[00:03:15.568,664] <inf> cloud: Socket TX successful.
[00:03:15.575,378] <inf> cloud: TLS setup complete.
[00:03:17.258,239] <inf> cloud: Connected!
[00:03:17.258,270] <inf> cloud: Free addr info
[00:03:17.258,300] <inf> cloud: Socket setup complete
[00:03:19.094,543] <inf> cloud: HTTP Status 200
[00:03:19.094,696] <inf> cloud: HTTP Status 200
[00:03:19.094,726] <inf> cloud: Response data
22 73 74 61 74 75 73 22 3a 22 73 75 63 63 65 73 |"status" :"succes
73 22 2c 22 74 69 6d 65 73 74 61 6d 70 22 3a 22 |s","time stamp":"
32 30 32 35 2d 31 32 2d 31 33 54 30 36 3a 33 31 |2025-12- 13T06:31
3a 32 32 2e 31 31 30 5a 22 7d 65 6e 67 74 68 3a |:22.110Z "}ength:
20 35 39 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 70 | 59..Con tent-Typ
65 3a 20 61 70 70 6c 69 63 61 74 69 6f 6e 2f 6a |e: appli cation/j
73 6f 6e 3b 20 63 68 61 72 73 65 74 3d 75 74 66 |son; cha rset=utf
2d 38 0d 0a 44 61 74 65 3a 20 53 61 74 2c 20 31 |-8..Date : Sat, 1
33 20 44 65 63 20 32 30 32 35 20 30 36 3a 33 31 |3 Dec 20 25 06:31
3a 32 32 20 47 4d 54 0d 0a 45 74 61 67 3a 20 57 |:22 GMT. .Etag: W
2f 22 33 62 2d 73 35 33 6d 71 2f 62 65 51 4b 6f |/"3b-s53 mq/beQKo
2b 43 4b 6f 79 62 35 4d 44 63 49 2b 53 41 30 6f |+CKoyb5M DcI+SA0o
22 0d 0a 56 69 61 3a 20 31 2e 31 20 43 61 64 64 |"..Via: 1.1 Cadd
79 0d 0a 58 2d 50 6f 77 65 72 65 64 2d 42 79 3a |y..X-Pow ered-By:
20 45 78 70 72 65 73 73 0d 0a 43 6f 6e 6e 65 63 | Express ..Connec
74 69 6f 6e 3a 20 63 6c 6f 73 65 0d 0a 0d 0a 7b |tion: cl ose....{
[00:03:19.094,757] <inf> main: Cloud callback
[00:03:19.096,679] <inf> cloud: Data sent to cloud
[00:04:15.559,020] <inf> main: Timeout
[00:04:15.559,112] <inf> cloud: Publish path: <my url>/api/device/data
[00:04:15.559,234] <inf> cloud: Payload: {"do_something":true}
[00:04:15.559,295] <inf> cloud: Looking up <my url>
[00:04:17.972,778] <inf> cloud: getaddrinfo() successful.
[00:04:17.973,388] <inf> cloud: Socket created.
[00:04:17.973,419] <inf> cloud: Socket options set.
[00:04:17.973,419] <inf> cloud: Socket TX successful.
[00:04:17.973,724] <inf> cloud: TLS setup complete.
[00:04:22.973,693] <err> cloud: Unable to connect. Err: -116 - Connection timed out
[00:04:22.973,724] <inf> cloud: Free addr info
[00:04:22.975,067] <err> cloud: Unable to setup socket. Err: -116
[00:04:22.975,097] <err> main: Unable to publish. Err: -116
[00:05:15.559,020] <inf> main: Timeout
[00:05:15.559,112] <inf> cloud: Publish path: <my url>/api/device/data
[00:05:15.559,234] <inf> cloud: Payload: {"do_something":true}
[00:05:15.559,295] <inf> cloud: Looking up <my url>
[00:05:15.568,359] <inf> cloud: getaddrinfo() successful.
[00:05:15.568,634] <inf> cloud: Socket created.
[00:05:15.568,664] <inf> cloud: Socket options set.
[00:05:15.568,664] <inf> cloud: Socket TX successful.
[00:05:15.575,378] <inf> cloud: TLS setup complete.
[00:05:19.433,258] <inf> cloud: Connected!
[00:05:19.433,288] <inf> cloud: Free addr info
[00:05:19.433,319] <inf> cloud: Socket setup complete
[00:05:20.837,127] <inf> cloud: HTTP Status 200
[00:05:20.837,280] <inf> cloud: HTTP Status 200
[00:05:20.837,310] <inf> cloud: Response data
22 73 74 61 74 75 73 22 3a 22 73 75 63 63 65 73 |"status" :"succes
73 22 2c 22 74 69 6d 65 73 74 61 6d 70 22 3a 22 |s","time stamp":"
32 30 32 35 2d 31 32 2d 31 33 54 30 36 3a 33 33 |2025-12- 13T06:33
3a 32 34 2e 32 37 36 5a 22 7d 65 6e 67 74 68 3a |:24.276Z "}ength:
20 35 39 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 70 | 59..Con tent-Typ
65 3a 20 61 70 70 6c 69 63 61 74 69 6f 6e 2f 6a |e: appli cation/j
73 6f 6e 3b 20 63 68 61 72 73 65 74 3d 75 74 66 |son; cha rset=utf
2d 38 0d 0a 44 61 74 65 3a 20 53 61 74 2c 20 31 |-8..Date : Sat, 1
33 20 44 65 63 20 32 30 32 35 20 30 36 3a 33 33 |3 Dec 20 25 06:33
3a 32 34 20 47 4d 54 0d 0a 45 74 61 67 3a 20 57 |:24 GMT. .Etag: W
2f 22 33 62 2d 6a 37 69 4d 52 4c 30 66 6b 67 6d |/"3b-j7i MRL0fkgm
70 71 2b 4f 42 50 50 52 6a 4b 59 7a 53 4e 30 41 |pq+OBPPR jKYzSN0A
22 0d 0a 56 69 61 3a 20 31 2e 31 20 43 61 64 64 |"..Via: 1.1 Cadd
79 0d 0a 58 2d 50 6f 77 65 72 65 64 2d 42 79 3a |y..X-Pow ered-By:
20 45 78 70 72 65 73 73 0d 0a 43 6f 6e 6e 65 63 | Express ..Connec
74 69 6f 6e 3a 20 63 6c 6f 73 65 0d 0a 0d 0a 7b |tion: cl ose....{
[00:05:20.837,341] <inf> main: Cloud callback
[00:05:20.839,416] <inf> cloud: Data sent to cloud
[00:06:15.559,051] <inf> main: Timeout
[00:06:15.559,143] <inf> cloud: Publish path: <my url>/api/device/data
[00:06:15.559,265] <inf> cloud: Payload: {"do_something":true}
[00:06:15.559,326] <inf> cloud: Looking up <my url>
[00:06:15.568,389] <inf> cloud: getaddrinfo() successful.
[00:06:15.568,664] <inf> cloud: Socket created.
[00:06:15.568,695] <inf> cloud: Socket options set.
[00:06:15.568,695] <inf> cloud: Socket TX successful.
[00:06:15.575,408] <inf> cloud: TLS setup complete.
[00:06:20.575,286] <err> cloud: Unable to connect. Err: -116 - Connection timed out
[00:06:20.575,317] <inf> cloud: Free addr info
[00:06:20.584,320] <err> cloud: Unable to setup socket. Err: -116
[00:06:20.584,320] <err> main: Unable to publish. Err: -116
[00:07:15.559,020] <inf> main: Timeout
[00:07:15.559,112] <inf> cloud: Publish path: <my url>/api/device/data
[00:07:15.559,234] <inf> cloud: Payload: {"do_something":true}
[00:07:15.559,295] <inf> cloud: Looking up <my url>
[00:07:15.568,359] <inf> cloud: getaddrinfo() successful.
[00:07:15.568,634] <inf> cloud: Socket created.
[00:07:15.568,664] <inf> cloud: Socket options set.
[00:07:15.568,664] <inf> cloud: Socket TX successful.
[00:07:15.575,042] <inf> cloud: TLS setup complete.
[00:07:17.926,269] <inf> cloud: Connected!
[00:07:17.926,300] <inf> cloud: Free addr info
[00:07:17.926,330] <inf> cloud: Socket setup complete
[00:07:20.926,483] <err> cloud: Unable to send data to cloud. Err: -116
[00:07:20.936,950] <inf> cloud: Data sent to cloud
[00:08:15.559,051] <inf> main: Timeout
[00:08:15.559,143] <inf> cloud: Publish path: <my url>/api/device/data
[00:08:15.559,265] <inf> cloud: Payload: {"do_something":true}
[00:08:15.559,326] <inf> cloud: Looking up <my url>
[00:08:15.568,389] <inf> cloud: getaddrinfo() successful.
[00:08:15.568,664] <inf> cloud: Socket created.
[00:08:15.568,695] <inf> cloud: Socket options set.
[00:08:15.568,725] <inf> cloud: Socket TX successful.
[00:08:15.575,073] <inf> cloud: TLS setup complete.
[00:08:20.575,317] <err> cloud: Unable to connect. Err: -116 - Connection timed out
[00:08:20.575,347] <inf> cloud: Free addr info
[00:08:20.575,805] <err> cloud: Unable to setup socket. Err: -116
[00:08:20.575,805] <err> main: Unable to publish. Err: -116
[00:09:15.559,051] <inf> main: Timeout
[00:09:15.559,143] <inf> cloud: Publish path: <my url>/api/device/data
[00:09:15.559,265] <inf> cloud: Payload: {"do_something":true}
[00:09:15.559,326] <inf> cloud: Looking up <my url>
[00:09:16.792,266] <inf> cloud: getaddrinfo() successful.
[00:09:16.792,877] <inf> cloud: Socket created.
[00:09:16.792,907] <inf> cloud: Socket options set.
[00:09:16.792,907] <inf> cloud: Socket TX successful.
[00:09:16.793,182] <inf> cloud: TLS setup complete.
[00:09:18.152,343] <inf> cloud: Connected!
[00:09:18.152,374] <inf> cloud: Free addr info
[00:09:18.152,404] <inf> cloud: Socket setup complete
[00:09:21.151,855] <err> cloud: Unable to send data to cloud. Err: -116
[00:09:21.162,292] <inf> cloud: Data sent to cloud
[00:10:15.559,051] <inf> main: Timeout
[00:10:15.559,143] <inf> cloud: Publish path: <my url>/api/device/data
[00:10:15.559,265] <inf> cloud: Payload: {"do_something":true}
[00:10:15.559,326] <inf> cloud: Looking up <my url>
[00:10:15.568,389] <inf> cloud: getaddrinfo() successful.
[00:10:15.568,664] <inf> cloud: Socket created.
[00:10:15.568,695] <inf> cloud: Socket options set.
[00:10:15.568,725] <inf> cloud: Socket TX successful.
[00:10:15.575,073] <inf> cloud: TLS setup complete.
[00:10:19.129,241] <inf> cloud: Connected!
[00:10:19.129,272] <inf> cloud: Free addr info
[00:10:19.129,302] <inf> cloud: Socket setup complete
[00:10:20.587,158] <inf> cloud: HTTP Status 200
[00:10:20.587,249] <err> cloud: Unable to send data to cloud. Err: -104
[00:10:20.589,202] <inf> cloud: Data sent to cloud
1) I got three successful transmits.
2) It will sometimes succeed in the “connect()” call but fail in the transmission of the data.
3) The last log entry shows “HTTP Status 200” but still failed to transmit the data.
So my main problem now is reliability, are there any APIs in the lte and modem library used in the example that can help me verify the state/status of the connection so that I can realiably say that I have sent the data (and hopefully get a response back to confirm?