feat: boot manager, provisioning server, node stubs v0.3.0

This commit is contained in:
2026-06-06 17:25:52 +02:00
parent c22a2ea07e
commit 829a3e5f44
10 changed files with 622 additions and 145 deletions

29
node_access_control.py Normal file
View File

@@ -0,0 +1,29 @@
# ============================================================+
# Identity IoT — Node: Access Control
# (c) Copyright : ae Aeonian Engineering Limited - Hong Kong
# (c) Copyright : WIDE di D. Papa - Naples - Italy
# ============================================================+
# Reads NTAG424 badge via PN532, performs challenge/verify
# against identity_tag backend.
# ============================================================+
import utime
def run_access_control(cfg, caps):
"""Main loop for access_control node type. Called from boot_manager."""
print('[access_control] starting — NFC:', caps.get('has_nfc'))
if not caps.get('has_nfc'):
print('[access_control] ERROR: no NFC hardware detected')
return
# TODO: init PN532
# TODO: wait for badge tap
# TODO: read UID from NTAG424
# TODO: challenge/verify against cfg['base_url']
# TODO: trigger relay on success if has_relay
while True:
print('[access_control] waiting for badge...')
utime.sleep(2)