nx_iot_kasa_probe.nx
buildroot/runtime/nx_iot_kasa_probe.nx
about
nx_iot_kasa_probe.nx -- SOVEREIGN live Kasa device query.
Replaces the non-Nishi shell shim entirely: opens a UDP socket, sends the
autokey-encrypted get_sysinfo, reads + decrypts the reply, confirms it is
a Kasa sysinfo. The CAPABILITY is this organ; the OS only supplies the
socket syscalls -- so the SAME source runs on Linux today (via
nx_syscalls_x86_64) and on the optimized NishiOS later (via its syscalls).
Nothing PowerShell/netsh on the program path.
Composition (DRY, CLAUDE.md #15) -- duplicates nothing:
- nx_udp : sovereign UDP socket round-trip
- nx_iot_local_kasa : autokey encrypt/decrypt + get_sysinfo builder +
looks_like_sysinfo (crypto gate-proven in
nx_iot_local_kasa_test)
NEVER-BRICK (CLAUDE.md #26): get_sysinfo is READ-ONLY -- it queries device
state and writes NOTHING to the device. No firmware path exists here.
genealogy_id: NISHI_IOT_HUB_ROADMAP.md Epoch 1/2 + project-iot-discovery-pairing-revival-2026-06-22
license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_syscalls_x86_64.nxnx_udp.nxnx_iot_local_kasa.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 25 | const KP_MAGIC_2048: i64 = 2048 |
| 26 | const KP_MAGIC_9999: i64 = 9999 |
| 27 | const KP_MAGIC_2000: i64 = 2000 |
| 30 | const KP_SO_RCVTIMEO: i64 = 20 |
| 33 | const KP_UNKNOWN: i64 = 0 |
| 34 | const KP_OK: i64 = 1 // got a Kasa sysinfo reply |
| 35 | const KP_SOCKET_FAIL: i64 = 2 |
| 36 | const KP_SEND_FAIL: i64 = 3 |
| 37 | const KP_NO_REPLY: i64 = 4 // timeout, no datagram |
| 38 | const KP_NOT_SYSINFO: i64 = 5 // a reply, but not a Kasa sysinfo |
| 39 | const KP_BUF_SMALL: i64 = 6 |
| 40 | const KP_N: i64 = 7 |
functions
| 42 | func nx_iot_kp_verdict_is_valid(v: i64) -> i64 |
| 49 | func nx_iot_kp_set_rcvtimeo_ms(fd: i64, ms: i64) -> i64 |
| 75 | func nx_iot_kasa_probe_sysinfo(a: i64, b: i64, c: i64, d: i64, port: i64, |
| 126 | func main() -> i64 calls 1: nx_iot_kasa_probe_sysinfo |