From 4a5a61596e0be6ec3a0d461a45de2e705154e730 Mon Sep 17 00:00:00 2001 From: Jordan Yates Date: Tue, 24 Feb 2026 16:14:20 +1000 Subject: [PATCH 1/3] generated: regenerate definitions Regenerate definitions from main repo. Signed-off-by: Jordan Yates --- src/infuse_iot/generated/kv_definitions.py | 13 +++++++++++++ src/infuse_iot/generated/tdf_definitions.py | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/infuse_iot/generated/kv_definitions.py b/src/infuse_iot/generated/kv_definitions.py index 0a05c51..7063097 100644 --- a/src/infuse_iot/generated/kv_definitions.py +++ b/src/infuse_iot/generated/kv_definitions.py @@ -439,6 +439,18 @@ class memfault_disable(VLACompatLittleEndianStruct): ] _pack_ = 1 + class gateway_bluetooth_forward_options(VLACompatLittleEndianStruct): + """Forwarding configuration for Bluetooth advertising packets""" + + NAME = "GATEWAY_BLUETOOTH_FORWARD_OPTIONS" + BASE_ID = 55 + RANGE = 1 + _fields_ = [ + ("flags", ctypes.c_uint8), + ("percent", ctypes.c_uint8), + ] + _pack_ = 1 + class gravity_reference(VLACompatLittleEndianStruct): """Reference gravity vector for tilt calculations""" @@ -583,6 +595,7 @@ class secure_storage_reserved(VLACompatLittleEndianStruct): 52: bluetooth_throughput_limit, 53: led_disable_daily_time_range, 54: memfault_disable, + 55: gateway_bluetooth_forward_options, 60: gravity_reference, 100: geofence, 101: geofence, diff --git a/src/infuse_iot/generated/tdf_definitions.py b/src/infuse_iot/generated/tdf_definitions.py index 2d9dee4..86165c9 100644 --- a/src/infuse_iot/generated/tdf_definitions.py +++ b/src/infuse_iot/generated/tdf_definitions.py @@ -194,7 +194,7 @@ class tdf_struct_eui48(TdfStructBase): @property def val(self): - return int.from_bytes(self._val, byteorder="little") + return int.from_bytes(self._val, byteorder="big") class tdf_struct_wifi_network_params(TdfStructBase): """WiFi network parameters""" From 26d7e74b890d89b7a94ec6c7a05d73f158739eb3 Mon Sep 17 00:00:00 2001 From: Jordan Yates Date: Tue, 24 Feb 2026 16:14:45 +1000 Subject: [PATCH 2/3] zephyr: errno: add missing `picolibc` values Add errno values that aren't part of the Zephyr minimal libc but are in `picolibc`. Signed-off-by: Jordan Yates --- src/infuse_iot/zephyr/errno.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/infuse_iot/zephyr/errno.py b/src/infuse_iot/zephyr/errno.py index a15b7f9..644c925 100644 --- a/src/infuse_iot/zephyr/errno.py +++ b/src/infuse_iot/zephyr/errno.py @@ -43,6 +43,14 @@ class errno(enum.IntEnum): ENOMSG = (35, "Unexpected message type") EDEADLK = (45, "Resource deadlock avoided") ENOLCK = (46, "No locks available") + EBADE = (50, "Invalid exchange") + EBADR = (51, "Invalid request descriptor") + EXFULL = (52, "Exchange full") + ENOANO = (53, "No anode") + EBADRQC = (54, "Invalid request code") + EBADSLT = (55, "Invalid slot") + EDEADLOCK = (56, "File locking deadlock error") + EBFONT = (57, "Bad font file fmt") ENOSTR = (60, "STREAMS device required") ENODATA = (61, "Missing expected message data") ETIME = (62, "STREAMS timeout occurred") From ac4ab23b5d751a0764f5792d5c34b29177771a22 Mon Sep 17 00:00:00 2001 From: Jordan Yates Date: Tue, 24 Feb 2026 16:17:01 +1000 Subject: [PATCH 3/3] zephyr: errno: handle unknown values Handle unknown errno values when converting to a string, instead of raising an exception. Signed-off-by: Jordan Yates --- src/infuse_iot/zephyr/errno.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/infuse_iot/zephyr/errno.py b/src/infuse_iot/zephyr/errno.py index 644c925..aa3069e 100644 --- a/src/infuse_iot/zephyr/errno.py +++ b/src/infuse_iot/zephyr/errno.py @@ -104,4 +104,7 @@ def __new__(cls, value: int, description: str = ""): @classmethod def strerror(cls, int) -> str: - return cls(int).description + try: + return cls(int).description + except ValueError: + return f"Unknown errno ({int})"