From db9f3a83c071c8a2a52ed0f57543e7b1477fc2be Mon Sep 17 00:00:00 2001 From: Ryan Erickson Date: Fri, 10 Jan 2025 08:31:13 -0600 Subject: [PATCH] samples: net: http_get: add support for hl7800 modem Add overlay and small adjustments for using the hl7800 modem. Works out of the box with pinnacle_100_dvk and mg100. Signed-off-by: Ryan Erickson --- samples/net/common/net_sample_common.c | 4 ++++ samples/net/sockets/http_get/overlay-hl7800.conf | 3 +++ samples/net/sockets/http_get/overlay-tls.conf | 4 ++++ 3 files changed, 11 insertions(+) create mode 100644 samples/net/sockets/http_get/overlay-hl7800.conf diff --git a/samples/net/common/net_sample_common.c b/samples/net/common/net_sample_common.c index 1e744f178b5149..b10c8a1848c254 100644 --- a/samples/net/common/net_sample_common.c +++ b/samples/net/common/net_sample_common.c @@ -19,7 +19,11 @@ static void l4_event_handler(struct net_mgmt_event_callback *cb, uint32_t event, struct net_if *iface) { switch (event) { +#if defined(CONFIG_MODEM_HL7800) && !defined(CONFIG_DNS_SERVER_IP_ADDRESSES) + case NET_EVENT_DNS_SERVER_ADD: +#else case NET_EVENT_L4_CONNECTED: +#endif LOG_INF("Network connectivity established and IP address assigned"); k_sem_give(&network_connected); break; diff --git a/samples/net/sockets/http_get/overlay-hl7800.conf b/samples/net/sockets/http_get/overlay-hl7800.conf new file mode 100644 index 00000000000000..70a92099f2c53b --- /dev/null +++ b/samples/net/sockets/http_get/overlay-hl7800.conf @@ -0,0 +1,3 @@ +CONFIG_DNS_SERVER_IP_ADDRESSES=n +CONFIG_NET_CONFIG_SETTINGS=n +CONFIG_NET_CONNECTION_MANAGER=y diff --git a/samples/net/sockets/http_get/overlay-tls.conf b/samples/net/sockets/http_get/overlay-tls.conf index 0cf82f18cf8575..70da57986639cf 100644 --- a/samples/net/sockets/http_get/overlay-tls.conf +++ b/samples/net/sockets/http_get/overlay-tls.conf @@ -10,3 +10,7 @@ CONFIG_MBEDTLS_HASH_ALL_ENABLED=y CONFIG_MBEDTLS_CMAC=y CONFIG_NET_SOCKETS_SOCKOPT_TLS=y + +# Debugging options +#CONFIG_MBEDTLS_DEBUG=y +#CONFIG_MBEDTLS_LOG_LEVEL_DBG=y