#51 init mac component from config key

This commit is contained in:
Mikayla Fischler
2023-06-25 14:00:18 -04:00
parent f469754bb7
commit 57763702ff
11 changed files with 56 additions and 1 deletions

View File

@@ -31,6 +31,7 @@ local log_sys = coordinator.log_sys
local log_boot = coordinator.log_boot
local log_comms = coordinator.log_comms
local log_comms_connecting = coordinator.log_comms_connecting
local log_crypto = coordinator.log_crypto
----------------------------------------
-- config validation
@@ -132,6 +133,12 @@ local function main()
-- setup communications
----------------------------------------
-- message authentication init
if type(config.AUTH_KEY) == "string" then
local init_time = network.init_mac(config.AUTH_KEY)
log_crypto("HMAC init took " .. init_time .. "ms")
end
-- get the communications modem
local modem = ppm.get_wireless_modem()
if modem == nil then