feat: v0.3.8 — full access control stack, GRANTED working, NTAG424 ISO7816 read, PN532 driver

This commit is contained in:
2026-06-07 21:01:41 +02:00
parent 1467fc4886
commit 29300732c1
4 changed files with 167 additions and 82 deletions

View File

@@ -213,7 +213,7 @@ def do_checkin(cfg):
for attempt in range(3):
try:
_show(['CHECKIN', 'Registering IoT...', 'attempt ' + str(attempt+1) + '/3', '', ''])
identity.ensure_registered()
reg = identity.ensure_registered()
break
except Exception as e:
print('[checkin] IoT register attempt', attempt + 1, ':', e)
@@ -222,8 +222,6 @@ def do_checkin(cfg):
raise
utime.sleep(3)
# Seconda chiamata idempotente
reg = identity.ensure_registered()
uid_short = reg.get('node_uid', '')[:12] + '...'
_show(['CHECKIN', 'IoT Node ' + reg.get('result', ''), uid_short, '', ''])
utime.sleep(1)
@@ -257,7 +255,7 @@ def do_checkin(cfg):
for attempt in range(3):
try:
resp = urequests.post(
cfg['identity_node_url'],
cfg.get('identity_node_url', cfg['identity_tag_url']),
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + token.strip(),
@@ -291,6 +289,8 @@ def do_checkin(cfg):
def run():
state = 'BOOT'
cfg = None
caps = {'has_oled': False, 'has_nfc': False, 'has_sensor': False, 'has_relay': False}
while True: