code wiki / (root) / nx_iot_smartconfig.nx

nx_iot_smartconfig.nx

buildroot/runtime/nx_iot_smartconfig.nx

4522 B101 linesdepth 0pulls 0 transitivereach 8 importersview sourcekind librarytopic iot
docsdependenciesstructsconstsfunctions

about

nx_iot_smartconfig.nx -- SOVEREIGN ESP-Touch v1 (SmartConfig / EZ-mode) ENCODER. (R1b) Operator 2026-06-23: a superior sovereign Nishi IoT onboarder, hardware-rung-up. Tuya/ESP devices pair via EZ mode = SmartConfig: the sender (on the home 2.4GHz Wi-Fi) BROADCASTS the SSID+password encoded in UDP packet LENGTHS; the device in pairing mode SNIFFS + decodes. This organ produces that length sequence -- a byte-exact port of Espressif's EsptouchGenerator/DatumCode/DataCode/GuideCode/ CRC8 (sovereignly fetched to knowledge/fetched/sc_java_*.raw; cited, not guessed). The broadcaster (send one UDP packet of each length to a multicast group on the 2.4GHz) is the thin live shim -- runs on the GL.iNet router, which is already the 2.4GHz AP. NO app, NO Windows, NO SoftAP join. Spec: guide U8s = [515,514,513,512]; EXTRA_HEAD_LEN=5; EXTRA_LEN=40; CRC8 = Dallas/Maxim (reflected poly 0x8C, init 0). Data layout (each datum byte carries its own index so order is free; we emit contiguous index 0..totalLen+5, equivalent to the Java insertions): 0:totalLen 1:pwdLen 2:ssidCRC 3:bssidCRC 4:totalXOR 5..8:ip 9..:pwd ..:ssid totalLen..:bssid totalLen = 9 + pwdLen + ssidLen. Each datum byte (value@index) -> 3 U8 lengths: [ (crcHi<<4|dataHi)+40 , 296+index , (crcLo<<4|dataLo)+40 ] where dataHi/Lo = value nibbles, crc = CRC8(value,index), crcHi/Lo = crc nibbles. Pure caller-buffer (no syscalls) -> portable + gate-provable. NEVER-BRICK #26: emits Wi-Fi creds (reversible) only; no firmware. license_tier: ORIGINAL

dependencies 0 imports · 3 importers

nx_iot_smartconfig.nx nx_iot_sc_broadcast.nx nx_iot_sc_emit_a64.nx nx_iot_smartconfig_gate.nx

imports: none

imported by: nx_iot_sc_broadcast.nxnx_iot_sc_emit_a64.nxnx_iot_smartconfig_gate.nx

structs

none

consts

none

functions

23func nx_sc_crc8_upd(crc: i64, byte: i64) -> i64
32func nx_sc_crc8(buf: *u8, n: i64) -> i64
called by 2: nx_sc_encodemain calls 1: nx_sc_crc8_upd
40func nx_sc_emit_dc(out: *i64, off: i64, value: i64, index: i64) -> i64
called by 1: nx_sc_encode calls 1: nx_sc_crc8_upd
55func nx_sc_encode(ssid: *u8, ssid_n: i64, bssid: *u8, pwd: *u8, pwd_n: i64,