From df38994a4a784cc7b794c3f2a3c7f08172ef51ad Mon Sep 17 00:00:00 2001 From: xengineering Date: Sat, 1 Jun 2024 11:17:50 +0200 Subject: firmware: Assert presence of EUI-64 MAC address Without that address comunication is not possible. --- firmware/src/main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/firmware/src/main.c b/firmware/src/main.c index 18e4564..5abd68a 100644 --- a/firmware/src/main.c +++ b/firmware/src/main.c @@ -5,6 +5,7 @@ #include #include +#include "eui64.h" #include "data_link.h" #define UART_DEVICE_NODE DT_CHOSEN(zephyr_shell_uart) @@ -13,7 +14,12 @@ static const struct device *const uart_dev = DEVICE_DT_GET(UART_DEVICE_NODE); int main(void) { if (!device_is_ready(uart_dev)) { - printk("UART device not found!"); + printk("UART device not found"); + return 0; + } + + if (!eui64_available()) { + printk("No EUI-64 address available"); return 0; } -- cgit v1.2.3-70-g09d2