Test with curl that the endpoint is active. Works!
Then on the device side, flashed and programmed the software:
1) Plugged the board to my laptop, and ran putty (as quick as possible to see the output). Log output:
*** Booting nRF Connect SDK v3.0.1-9eb5615da66b ***
*** Using Zephyr OS v4.0.99-77f865b8f8d0 ***
[00:00:00.255,645] <inf> app_startup: *** Vsys Current Limit: 1000 mA ***
[00:00:02.255,798] <inf> main: HTTPS Sample. Board: circuitdojo_feather_nrf9151
[00:00:02.599,670] <inf> cloud: Certificate match
[00:00:16.010,589] <inf> cloud: Publish path: <my url>/api/device/da ta
[00:00:16.010,742] <inf> cloud: Payload: {"do_something":true}
[00:00:16.010,772] <inf> cloud: Looking up <my url>
[00:00:17.206,054] <inf> cloud: getaddrinfo() successful.
[00:00:17.206,329] <inf> cloud: Socket created.
[00:00:17.206,359] <inf> cloud: Socket options set.
[00:00:17.206,390] <inf> cloud: Socket TX successful.
[00:00:17.206,756] <inf> cloud: TLS setup complete.
[00:00:22.207,305] <err> cloud: Unable to connect. Err: -116 - Connection timed out
[00:00:22.207,366] <inf> cloud: Free addr info
[00:00:22.208,709] <err> cloud: Unable to setup socket. Err: -116
[00:00:22.208,709] <err> main: Unable to publish. Err: -116
2) Press the reset button on the feather board, no other changes, did not move the board or antenna, Log output:
*** Booting nRF Connect SDK v3.0.1-9eb5615da66b ***
*** Using Zephyr OS v4.0.99-77f865b8f8d0 ***
[00:00:00.255,676] <inf> app_startup: *** Vsys Current Limit: 1000 mA ***
[00:00:02.255,828] <inf> main: HTTPS Sample. Board: circuitdojo_feather_nrf9151
[00:00:02.600,189] <inf> cloud: Certificate match
[00:00:14.566,650] <inf> cloud: Publish path: <my url>/api/device/da ta
[00:00:14.566,802] <inf> cloud: Payload: {"do_something":true}
[00:00:14.566,833] <inf> cloud: Looking up <my url>
[00:00:15.202,117] <inf> cloud: getaddrinfo() successful.
[00:00:15.202,392] <inf> cloud: Socket created.
[00:00:15.202,392] <inf> cloud: Socket options set.
[00:00:15.202,423] <inf> cloud: Socket TX successful.
[00:00:15.202,819] <inf> cloud: TLS setup complete.
[00:00:19.718,414] <inf> cloud: Connected!
[00:00:19.718,444] <inf> cloud: Free addr info
[00:00:19.718,475] <inf> cloud: Socket setup complete
[00:00:21.369,201] <inf> cloud: HTTP Status 200
[00:00:21.369,354] <inf> cloud: HTTP Status 200
[00:00:21.369,384] <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 30 39 54 31 39 3a 30 39 |2025-12- 09T19:09
3a 32 36 2e 38 35 37 5a 22 7d 65 6e 67 74 68 3a |:26.857Z "}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 54 75 65 2c 20 30 |-8..Date : Tue, 0
39 20 44 65 63 20 32 30 32 35 20 31 39 3a 30 39 |9 Dec 20 25 19:09
3a 32 36 20 47 4d 54 0d 0a 45 74 61 67 3a 20 57 |:26 GMT. .Etag: W
2f 22 33 62 2d 53 34 4d 6d 74 50 65 67 70 46 64 |/"3b-S4M mtPegpFd
31 41 4d 57 5a 59 36 6d 2b 52 67 6e 46 46 37 41 |1AMWZY6m +RgnFF7A
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.369,415] <inf> main: Cloud callback
[00:00:21.371,582] <inf> cloud: Data sent to cloud
3) Press the reset button a second time, did not move the board or antenna, log output:
*** Booting nRF Connect SDK v3.0.1-9eb5615da66b ***
*** Using Zephyr OS v4.0.99-77f865b8f8d0 ***
[00:00:00.255,645] <inf> app_startup: *** Vsys Current Limit: 1000 mA ***
[00:00:02.255,828] <inf> main: HTTPS Sample. Board: circuitdojo_feather_nrf9151
[00:00:02.599,731] <inf> cloud: Certificate match
[00:00:15.519,836] <inf> cloud: Publish path: <my url>/api/device/data
[00:00:15.519,989] <inf> cloud: Payload: {"do_something":true}
[00:00:15.520,050] <inf> cloud: Looking up <my url>
[00:00:16.075,347] <inf> cloud: getaddrinfo() successful.
[00:00:16.075,592] <inf> cloud: Socket created.
[00:00:16.075,622] <inf> cloud: Socket options set.
[00:00:16.075,653] <inf> cloud: Socket TX successful.
[00:00:16.076,019] <inf> cloud: TLS setup complete.
[00:00:21.076,538] <err> cloud: Unable to connect. Err: -116 - Connection timed out
[00:00:21.076,568] <inf> cloud: Free addr info
[00:00:21.077,758] <err> cloud: Unable to setup socket. Err: -116
[00:00:21.077,758] <err> main: Unable to publish. Err: -116
4) Tried a fourth time, moved the antenna a bit, log output:
*** Booting nRF Connect SDK v3.0.1-9eb5615da66b ***
*** Using Zephyr OS v4.0.99-77f865b8f8d0 ***
[00:00:00.255,676] <inf> app_startup: *** Vsys Current Limit: 1000 mA ***
[00:00:02.255,828] <inf> main: HTTPS Sample. Board: circuitdojo_feather_nrf9151
[00:00:02.599,792] <inf> cloud: Certificate match
[00:00:13.922,821] <inf> cloud: Publish path: <my url>/api/device/data
[00:00:13.922,973] <inf> cloud: Payload: {"do_something":true}
[00:00:13.923,004] <inf> cloud: Looking up <my url>
[00:00:14.808,319] <inf> cloud: getaddrinfo() successful.
[00:00:14.808,563] <inf> cloud: Socket created.
[00:00:14.808,593] <inf> cloud: Socket options set.
[00:00:14.808,624] <inf> cloud: Socket TX successful.
[00:00:14.809,051] <inf> cloud: TLS setup complete.
[00:00:19.715,637] <inf> cloud: Connected!
[00:00:19.715,667] <inf> cloud: Free addr info
[00:00:19.715,698] <inf> cloud: Socket setup complete
[00:00:21.284,362] <inf> cloud: HTTP Status 200
[00:00:21.284,515] <inf> cloud: HTTP Status 200
[00:00:21.284,545] <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 30 39 54 31 39 3a 32 32 |2025-12- 09T19:22
3a 30 31 2e 35 38 37 5a 22 7d 65 6e 67 74 68 3a |:01.587Z "}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 54 75 65 2c 20 30 |-8..Date : Tue, 0
39 20 44 65 63 20 32 30 32 35 20 31 39 3a 32 32 |9 Dec 20 25 19:22
3a 30 31 20 47 4d 54 0d 0a 45 74 61 67 3a 20 57 |:01 GMT. .Etag: W
2f 22 33 62 2d 6a 50 78 33 65 74 45 69 32 75 43 |/"3b-jPx 3etEi2uC
67 6c 4e 6c 32 59 50 67 72 35 48 68 36 41 51 41 |glNl2YPg r5Hh6AQA
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.284,576] <inf> main: Cloud callback
[00:00:21.286,499] <inf> cloud: Data sent to cloud
```
So either the modem setup isn't really succeeding or there is something wrong with the setup that the call to
`err = connect(fd, res->ai_addr, sizeof(struct sockaddr_in));` randomly fails. Is the antenna also quite sensitive? I imagine it should be a bit more robust given it's size, and where I'm physically located in the central business district at the moment, and should have a lot better coverage than my home