samples: net: aws_iot_mqtt: Add support for hl7800 based boards

Add support for the pinnacle_100_dvk and mg100.
With these boards, wait to get on the network before trying
to connect to AWS.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
This commit is contained in:
Ryan Erickson 2025-01-10 12:00:05 -06:00 committed by Benjamin Cabé
parent b91c7418f1
commit 27eb8eb40b
6 changed files with 36 additions and 0 deletions

View file

@ -21,3 +21,5 @@ else()
endif()
target_sources(app PRIVATE "src/main.c" ${creds})
include(${ZEPHYR_BASE}/samples/net/common/common.cmake)

View file

@ -81,4 +81,5 @@ config AWS_EXPONENTIAL_BACKOFF
endmenu
source "samples/net/common/Kconfig"
source "Kconfig.zephyr"

View file

@ -0,0 +1,12 @@
# The HL7800 driver gets its IP settings from the cell network
CONFIG_NET_CONFIG_SETTINGS=n
CONFIG_NET_DHCPV4=n
CONFIG_DNS_SERVER_IP_ADDRESSES=n
# NB-IoT has large latency, so increase timeouts. It is ok to use this for Cat-M1 as well.
CONFIG_NET_SOCKETS_DNS_TIMEOUT=12000
CONFIG_NET_SOCKETS_CONNECT_TIMEOUT=15000
# Wait for the network to be ready
CONFIG_NET_CONNECTION_MANAGER=y
CONFIG_NET_SAMPLE_COMMON_WAIT_DNS_SERVER_ADDITION=y
# Don't require device to have time/date
CONFIG_MBEDTLS_HAVE_TIME_DATE=n

View file

@ -0,0 +1,12 @@
# The HL7800 driver gets its IP settings from the cell network
CONFIG_NET_CONFIG_SETTINGS=n
CONFIG_NET_DHCPV4=n
CONFIG_DNS_SERVER_IP_ADDRESSES=n
# NB-IoT has large latency, so increase timeouts. It is ok to use this for Cat-M1 as well.
CONFIG_NET_SOCKETS_DNS_TIMEOUT=12000
CONFIG_NET_SOCKETS_CONNECT_TIMEOUT=15000
# Wait for the network to be ready
CONFIG_NET_CONNECTION_MANAGER=y
CONFIG_NET_SAMPLE_COMMON_WAIT_DNS_SERVER_ADDITION=y
# Don't require device to have time/date
CONFIG_MBEDTLS_HAVE_TIME_DATE=n

View file

@ -71,3 +71,9 @@ CONFIG_MBEDTLS_TLS_VERSION_1_2=y
CONFIG_MBEDTLS_MEMORY_DEBUG=y
CONFIG_MBEDTLS_HAVE_TIME_DATE=y
CONFIG_MBEDTLS_SSL_ALPN=y
# Debugging options
# CONFIG_MBEDTLS_DEBUG=y
# CONFIG_MBEDTLS_LOG_LEVEL_DBG=y
# CONFIG_LOG_PROCESS_THREAD_SLEEP_MS=1
# CONFIG_LOG_BUFFER_SIZE=50000

View file

@ -17,6 +17,7 @@
#include <zephyr/data/json.h>
#include <zephyr/random/random.h>
#include <zephyr/logging/log.h>
#include "net_sample_common.h"
#if defined(CONFIG_MBEDTLS_MEMORY_DEBUG)
@ -453,6 +454,8 @@ int main(void)
{
setup_credentials();
wait_for_network();
for (;;) {
resolve_broker_addr(&aws_broker);