{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"],"fields":{"title":{"boost":1000.0},"text":{"boost":1.0},"tags":{"boost":1000000.0}}},"docs":[{"location":"","title":"O tomto forku (meshcore-tth)","text":"
English version below -- experimental firmware, not meant for regular users.
Warning
Experiment\u00e1ln\u00ed firmware \u2013 nen\u00ed ur\u010den\u00fd pro b\u011b\u017en\u00e9 u\u017eivatele. Tenhle fork i v\u0161echny jeho releasy jsou osobn\u00ed v\u00fdvojov\u00e1 v\u011btev pro uzly jedn\u00e9 mal\u00e9 s\u00edt\u011b: rolling release nad upstreamovou v\u011btv\u00ed dev, sestavovan\u00fd automaticky zhruba dvakr\u00e1t denn\u011b, bez stabiln\u00edho kan\u00e1lu, bez podpory a vyzkou\u0161en\u00fd jen na na\u0161ich desk\u00e1ch. M\u016f\u017ee obsahovat chyby, kter\u00e9 uzel vy\u0159ad\u00ed z provozu, a vr\u00e1tit ho pak jde jen s USB nebo BLE v ruce. Pro b\u011b\u017en\u00fd provoz nahrajte ofici\u00e1ln\u00ed MeshCore (flasher.meshcore.io).
Fork projektu meshcore-dev/MeshCore, na kter\u00e9m b\u011b\u017e\u00ed repeatery, senzory a testovac\u00ed desky mal\u00e9 \u010desk\u00e9 s\u00edt\u011b na CZ meshi (869,432 MHz). Upstreamov\u00e9 v\u011btve main a dev se slu\u010duj\u00ed automaticky dvakr\u00e1t denn\u011b; v\u0161echno n\u00ed\u017ee je nav\u00edc nad nimi. N\u00e1\u0161 k\u00f3d je ve zdroj\u00e1c\u00edch ozna\u010den\u00fd CUSTOM (TeTeHacko). Nic z toho nem\u011bn\u00ed protokol na r\u00e1diu.
Po nahr\u00e1n\u00ed je zapnut\u00fd jen FairnessLimiter, s limity se zhruba dvojn\u00e1sobnou rezervou nad 30 dn\u00ed skute\u010dn\u00e9ho provozu CZ meshe: na kan\u00e1l d\u00e1vka 100 zpr\u00e1v a pak jedna za 30 s, na odes\u00edlatele 150 a jedna za 10 s, na p\u016fvodce advertu 30 a jeden za 10 min. Je to s\u00ed\u0165 na utr\u017een\u00e9 floody, ne kv\u00f3ta; fairness off ho vypne natrvalo. Okno na adverty, filtry a dry-run jsou vypnut\u00e9, dokud je nezapnete.
fairness [on|off|grid|cap|refill]; p\u0159\u00edmo sm\u011brovan\u00fd provoz se neomezuje nikdy.fairness advert <h>|clear), p\u0159evzato z AdvertLimiteru DutchMeshCore. M\u00ed\u0159\u00ed na uzly, kter\u00e9 advertuj\u00ed ka\u017edou minutu.fairness dryrun on zapo\u010d\u00edt\u00e1 ka\u017ed\u00fd verdikt, ale p\u0159epo\u0161le i tak; fairness air uk\u00e1\u017ee u\u0161et\u0159en\u00fd (nebo u\u0161et\u0159iteln\u00fd) airtime podle d\u016fvodu.#hashtag kan\u00e1ly), p\u0159estane p\u0159epos\u00edlat zpr\u00e1vy uveden\u00fdch jmen odes\u00edlatel\u016f (filter add|del|list). Jm\u00e9no se d\u00e1 podvrhnout: je to brzda na utr\u017een\u00e9ho bota, ne bezpe\u010dnost.filter hash add <hex> [s]: bez kl\u00ed\u010de, tak\u017ee funguje i na soukrom\u00fdch kan\u00e1lech; p\u0159\u00edjem se nem\u011bn\u00ed, jen p\u0159epos\u00edl\u00e1n\u00ed. S s se kan\u00e1l neod\u0159\u00edzne, ale p\u0159i\u0161krt\u00ed (jeden paket za s sekund).filter age <min>|off (voliteln\u00e9, 1\u201310080 min): nep\u0159epos\u00edl\u00e1 skupinov\u00e9 zpr\u00e1vy na de\u0161ifrovan\u00fdch kan\u00e1lech, jejich\u017e \u010das od odes\u00edlatele je star\u0161\u00ed; bez nastaven\u00fdch hodin repeateru neplat\u00ed. Posuzuje hodiny odes\u00edlatele, tak\u017ee zahod\u00ed i companiony bez synchronizace \u010dasu \u2013 nastavuj ho na dny.filter dryrun on zapo\u010d\u00edt\u00e1 ka\u017ed\u00fd verdikt filter, ale p\u0159epo\u0161le i tak.V\u0161echny p\u0159\u00edkazy forku, kde je kter\u00fd build m\u00e1 a v\u00fdchoz\u00ed hodnoty: docs/tth-commands.md.
Repeater, room server i senzor (v\u0161echno s textovou konzol\u00ed) maj\u00ed:
set radio.silence <min> \u2013 hluch\u00fd p\u0159ij\u00edma\u010d: kdy\u017e se za <min> minut nepohne \u010d\u00edta\u010d p\u0159ijat\u00fdch r\u00e1mc\u016f (po\u010d\u00edt\u00e1 se i r\u00e1mec s chybou CRC), uzel nap\u0159ed znovu nahod\u00ed p\u0159\u00edjem, a kdy\u017e ani to nepom\u016f\u017ee, restartuje se. Ka\u017ed\u00fd takov\u00fd restart zdvojn\u00e1sob\u00ed pr\u00e1h pro p\u0159\u00ed\u0161t\u00ed start (a\u017e 16\u00d7), prvn\u00ed p\u0159ijat\u00fd r\u00e1mec ho vr\u00e1t\u00ed, tak\u017ee tich\u00e9 m\u00edsto neskon\u010d\u00ed ve smy\u010dce restart\u016f. Ulo\u017e\u00ed se; ve v\u00fdchoz\u00edm stavu vypnut\u00fd (0) \u2013 pr\u00e1h volte s rezervou nad nejdel\u0161\u00ed b\u011b\u017en\u00e9 ticho na m\u00edst\u011b.RADIO_TXSTALL_MIN); set radio.txstall <min>|off plat\u00ed jen do restartu.get radio.reboots \u2013 kolik restart\u016f watchdogy ud\u011blaly (p\u0159e\u017eije i v\u00fdpadek nap\u00e1jen\u00ed); get boot \u2013 pro\u010d se deska naposledy resetovala a z\u00e1znam o hardfaultu (vyp\u00ed\u0161e se i p\u0159i startu).dfu [uf2|serial|ota] \u2013 spolehliv\u00fd reboot do bootloaderu (jen z lok\u00e1ln\u00ed konzole); i2c \u2013 sken sb\u011brnice.Repeater nav\u00edc:
blink (rozblik\u00e1 LED, i p\u0159es mesh \u2013 najdete uzel na sto\u017e\u00e1ru), txpwr (vys\u00edlac\u00ed v\u00fdkon do restartu, s verdiktem RadioLibu), \u010d\u00edta\u010de chyb vys\u00edl\u00e1n\u00ed ve stavov\u00e9 odpov\u011bdi.*-observer): textov\u00e1 konzole p\u0159es BLE vedle USB, ble on|off ulo\u017een\u00e9 p\u0159es reboot (RPT_BLE_DEFAULT_OFF: startuje vypnut\u00e9), vlastn\u00ed BLE PIN (ble pin), ulo\u017een\u00fd vys\u00edlac\u00ed v\u00fdkon spojen\u00ed (blepwr), bleconn, neblokuj\u00edc\u00ed BLE vys\u00edl\u00e1n\u00ed a parametry spojen\u00ed, kter\u00e9 vydr\u017e\u00ed i na slab\u00e9m linku.nodes (sly\u0161en\u00e9 repeatery a roomy, kl\u00ed\u010d pro spojen\u00ed v\u00edce cest), rxlog (ka\u017ed\u00fd sly\u0161en\u00fd r\u00e1mec: typ, cesta, SNR, RSSI), pktlog (surov\u00e9 r\u00e1mce pro feed observeru), velk\u00e9 str\u00e1nkovan\u00e9 odpov\u011bdi.BOT_CHANNEL_PSK: !link, !path, !snr, !heard, !noise, !ping, !help, v\u00fdb\u011br p\u0159es BOT_COMMANDS, cooldown na odes\u00edlatele, ignore list) \u2013 odpov\u00edd\u00e1, ani\u017e by p\u0159epos\u00edlal;RADIO_DIAG: radiostat (stav p\u0159ij\u00edma\u010de SX1262 bez z\u00e1sahu) a radiokick rx|clrirq|standby|agc (jeden krok obnovy, od nejjemn\u011bj\u0161\u00edho \u2013 prvn\u00ed, kter\u00fd pom\u016f\u017ee, uk\u00e1\u017ee rozbitou vrstvu);PIN_DIAG: dio1 (stav p\u0159eru\u0161en\u00ed v \u010dipu proti \u00farovni na pinu \u2013 kter\u00fd konec mrtv\u00e9 linky DIO1 je p\u0159eru\u0161en\u00fd);LORA_POLL_IRQ: provoz bez DIO1 pro desku s mrtvou linkou p\u0159eru\u0161en\u00ed.reboot uzel restartuje po\u0159\u00e1d dokola. Repeater, room server i sensor ho te\u010f zap\u00ed\u0161ou do flash d\u0159\u00edv, ne\u017e p\u0159\u00edkaz provedou (/s_acl_ts0|1, st\u0159\u00eddav\u011b s kontroln\u00edm sou\u010dtem, tak\u017ee ho nesma\u017ee ani v\u00fdpadek nap\u00e1jen\u00ed p\u0159i z\u00e1pisu). Timestamp v\u00edc ne\u017e den p\u0159ed hodinami uzlu (ACL_TS_MAX_AHEAD) se p\u0159ijme, ale neulo\u017e\u00ed, aby companion s rozhozen\u00fdmi hodinami nezamkl admina. Ukl\u00e1d\u00e1 se jen u admin\u016f: host sm\u00ed jen \u010d\u00edst a s pr\u00e1zdn\u00fdm guest heslem se j\u00edm stane kdokoli, tak\u017ee by ka\u017ed\u00fd jeho dotaz znamenal z\u00e1pis do flash. Klient\u016f se to nijak net\u00fdk\u00e1.LOGIN_FAIL_MAX, LOGIN_FAIL_SECS) se hesla do konce okna nekontroluj\u00ed. Klient, kter\u00fd u\u017e je v ACL jako admin, projde v\u017edy \u2013 login jeho jm\u00e9nem nikdo jin\u00fd poslat nedok\u00e1\u017ee, tak\u017ee \u00fatok adminy nezamkne.Packet::readFrom hl\u00eddaj\u00ed meze.markSeen je zase idempotentn\u00ed (odes\u00edlac\u00ed cesta uj\u00eddala okno deduplikace).calcMaxPacketMillis u\u017e nepodte\u010de (uzel na tom ohluchl).sendZeroHop; v\u00fdchoz\u00ed jsou 2bajtov\u00e9 path hashe (PATH_HASH_MODE_DEFAULT).ContactInfo se p\u0159ed \u010d\u00e1ste\u010dn\u00fdm vypln\u011bn\u00edm vynuluje.gps duty), i na T1000-E, kde nebyl: p\u0159ij\u00edma\u010d b\u011b\u017e\u00ed jen kolem synchronizace hodin (jednou denn\u011b, po ne\u00fasp\u011b\u0161n\u00e9m okn\u011b znovu za 6 h). Dotaz na polohu p\u0159ij\u00edma\u010d probud\u00ed pro p\u0159\u00ed\u0161t\u00ed dotaz..noinit); clkreboot.set batt.icon on, prahy set batt.icon.lo|hi <mV> (v\u00fdchoz\u00ed vypnut\u00e9; dlouh\u00e9 jm\u00e9no ikonu nepojme a p\u0159\u00edkaz na to upozorn\u00ed).set radio.rxps off|on|balanced|max, jemn\u011bji level <1-10>; port PowerSaving z EasySkyMesh): SX1262 mezi kr\u00e1tk\u00fdmi okny poslechu sp\u00ed. Ve ve\u0159ejn\u00fdch buildech je zabudovan\u00fd a vypnut\u00fd; max na lavici u\u0161et\u0159il ~2,3 mA bez ztr\u00e1ty paket\u016f (docs/power.md), na ostr\u00e9m meshi ale jeden n\u00e1\u0161 sto\u017e\u00e1r ztratil 16 % p\u0159\u00edjmu \u2013 zap\u00ednat s rozmyslem. Jen SX1262, ne LR1110 (T1000-E).PWRMGT_VOLTAGE_BOOTLOCK) je na nRF52 vypnut\u00e1, stejn\u011b jako v upstreamu od v1.18.0 (#2377): pevn\u00fd pr\u00e1h 3,3 V nepou\u0161t\u011bl k \u017eivotu uzly na LiFePO4 nebo LTO. Firmware tak nab\u011bhne na jak\u00e9koli chemii \u010dl\u00e1nku; p\u0159ed hlubok\u00fdm vybit\u00edm m\u00e1 chr\u00e1nit BMS nebo ochrann\u00e1 desti\u010dka \u010dl\u00e1nku. Konfigurovateln\u00e1 pojistka podle chemie \u010dek\u00e1 na upstream (#2088). V\u00fdjimkou je SenseCap_Solar_repeater (Li-ion, na\u0161e sto\u017e\u00e1ry): pojistka je zapnut\u00e1 a oba prahy jdou nastavit za b\u011bhu, i p\u0159es mesh jako admin \u2013 set pwr.bootlock <mV>|off (v\u00fdchoz\u00ed 3300, pod n\u00edm uzel nenab\u011bhne a sp\u00ed, dokud se \u010dl\u00e1nek nezotav\u00ed) a set pwr.cutoff <mV>|off (v\u00fdchoz\u00ed vypnuto, pod n\u00edm se b\u011b\u017e\u00edc\u00ed uzel vypne); get pwr (docs/power.md).simple_sensor: telemetrie z extern\u00ed stanice po UART (BudkaLinkSensorManager, jeden LPP kan\u00e1l na veli\u010dinu), sensor read.sensor set ina.shunt <m\u03a9>.gps duty p\u0159e\u017eije reboot, kopie data sestaven\u00ed m\u00e1 hl\u00eddanou d\u00e9lku. Export priv\u00e1tn\u00edho kl\u00ed\u010de, \u010dten\u00ed BLE PINu a jeho zm\u011bna (i p\u0159es CLI set pin) jdou jen p\u0159es sp\u00e1rovan\u00e9 BLE, ne p\u0159es USB, UART ani WiFi/TCP, a odpov\u011b\u010f s kl\u00ed\u010dem \u010di PINem jde jen tam, odkud p\u0159i\u0161el dotaz. (Merge v1.17 tu kontrolu potichu vy\u0159adil; build bez BLE bere sv\u00e9 jedin\u00e9 rozhran\u00ed d\u00e1l jako d\u016fv\u011bryhodn\u00e9.) KISS modem: oprava o jedna vedle p\u0159i zkracov\u00e1n\u00ed jm\u00e9na.Releasy z tohoto repozit\u00e1\u0159e (pub-release) jsou p\u0159ednastaven\u00e9 pro \u010desk\u00fd mesh podle wiki meshcore.cz, tak\u017ee \u010derstv\u011b nahran\u00fd uzel nepot\u0159ebuje obvykl\u00e9 kole\u010dko nastavov\u00e1n\u00ed:
get dutycycle \u2192 10.0%; zastaral\u00e9 af je 9);cz a cs vedle * \u2013 vlastn\u00ed cz-<kraj> p\u0159id\u00e1\u0161 p\u0159es region put cz-xxx cz + region save;filter add <jm\u00e9no>) je zabudovan\u00fd pro Public, #meshcore a #test, s pr\u00e1zdn\u00fdm seznamem \u2013 ned\u011bl\u00e1 nic, dokud do n\u011bj nep\u0159id\u00e1\u0161 jm\u00e9no.Plat\u00ed jen pro uzel bez ulo\u017een\u00e9ho nastaven\u00ed (nov\u00fd nebo po erase): nov\u00e9 nahr\u00e1n\u00ed ponech\u00e1, co u\u017e uzel m\u00e1, a regiony, kter\u00e9 jsi smazal a ulo\u017eil, z\u016fstanou smazan\u00e9. Jm\u00e9no a admin heslo si nastav s\u00e1m.
BLE PIN companionu je ve\u0159ejn\u00fd 123456 (desky s displejem si losuj\u00ed vlastn\u00ed a uk\u00e1\u017eou ho). Kdo se s n\u00edm sp\u00e1ruje, m\u00e1 companion cel\u00fd: zpr\u00e1vy, kontakty, export priv\u00e1tn\u00edho kl\u00ed\u010de. Po prvn\u00edm sp\u00e1rov\u00e1n\u00ed ho proto zm\u011b\u0148 v aplikaci. A s deskou v ruce nechr\u00e1n\u00ed nic ani PIN, ani heslo: flash nen\u00ed zam\u010den\u00e1 a bootloader p\u0159ijme jak\u00fdkoli firmware. Ztracen\u00fd nebo ukraden\u00fd uzel ber jako vyzrazen\u00fd \u2013 u repeateru zm\u011b\u0148 admin heslo v\u0161ude, kde bylo stejn\u00e9, a vyho\u010f jeho kl\u00ed\u010d z ACL; u companionu ber kan\u00e1ly, kter\u00e9 na n\u011bm byly, jako zn\u00e1m\u00e9.
Varianty observer (*_repeater-observer-*) nRF52 repeater\u016f (XIAO, SenseCAP Solar, RAK4631, T1000-E, Heltec T114) p\u0159id\u00e1vaj\u00ed buffery nodes / rxlog / pktlog a textovou konzoli p\u0159es BLE, aby \u0161el repeater \u010d\u00edst p\u0159es USB nebo BLE (meshcore-repeater-observer). BLE konzole je po nahr\u00e1n\u00ed vypnut\u00e1 (RPT_BLE_DEFAULT_OFF). Nem\u00e1 vlastn\u00ed p\u0159ihl\u00e1\u0161en\u00ed, jen BLE PIN, a PIN v buildu je ve\u0159ejn\u00fd z\u00e1stupn\u00fd 123456. Nejd\u0159\u00edv si proto nastav vlastn\u00ed \u2013 v USB konzoli, nebo jako admin p\u0159es mesh (vzd\u00e1len\u00e9 CLI v aplikaci): ble pin <6 \u010d\u00edslic> (ulo\u017e\u00ed se a p\u0159e\u017eije reboot i nov\u00e9 nahr\u00e1n\u00ed; z\u00e1rove\u0148 sma\u017ee v\u0161echny bondy, tak\u017ee sp\u00e1rovan\u00e1 za\u0159\u00edzen\u00ed se p\u00e1ruj\u00ed znovu). Teprve pak ble on \u2013 dokud je PIN z\u00e1stupn\u00fd, tyhle buildy ho odm\u00edtnou. ble uk\u00e1\u017ee, jestli je PIN own nebo build default, samotn\u00fd PIN nikdy. Releasy do tth-654d53f3 ble pin nemaj\u00ed: BLE tam nech vypnut\u00e9 a pou\u017e\u00edvej USB.
Ka\u017ed\u00fd release je automatick\u00fd build nad upstreamov\u00fdm dev (viz upozorn\u011bn\u00ed naho\u0159e), ne stabiln\u00ed verze. Nahr\u00e1vejte ho jen na uzly, na kter\u00e9 dos\u00e1hnete, a nov\u00fd release v\u017edy nejd\u0159\u00edv na jeden z nich.
Soubory jsou v Releases. Release se jmenuje podle upstreamov\u00e9 verze a data, nap\u0159. v1.18.0+tth.20261112 (druh\u00fd t\u00e9ho\u017e dne .2), a v popisu m\u00e1 zm\u011bny od p\u0159edchoz\u00edho releasu. Pro ka\u017edou desku a roli je jedna sada (<deska>_<role>-<release>, nap\u0159. Xiao_nrf52_repeater-v1.18.0+tth.20261112.zip): .zip a .uf2 pro nRF52, .bin pro ESP32 (-merged.bin je cel\u00fd obraz pro pr\u00e1zdnou desku, oby\u010dejn\u00fd .bin aktualizace). Kontroln\u00ed sou\u010dty jsou v SHA256SUMS. Releasy do 12. 11. 2026 se jmenovaly tth-<sha>.
nRF52 (XIAO, RAK4631, SenseCAP Solar, T1000-E, T114) p\u0159es webov\u00fd flasher MeshCore \u2013 Chrome, Edge nebo Chromium na po\u010d\u00edta\u010di (Web Serial; ne Firefox ani Safari):
.zip pro svou desku.ver uk\u00e1\u017ee v1.xx.x-tth<sha>, stejn\u011b jako \u0159\u00e1dek \u201eVerze v uzlu\u201c v popisu releasu.Neklikej na Erase Flash, pokud nechce\u0161 nov\u00fd uzel: sma\u017ee identitu (kl\u00ed\u010d uzlu a v\u0161echno, co ho zn\u00e1) i ve\u0161ker\u00e9 nastaven\u00ed. Oby\u010dejn\u00e9 nahr\u00e1n\u00ed je zachov\u00e1.
Vyzkou\u0161eno na XIAO (repeater-observer, 3. 11. 2026). ESP32 .bin p\u0159es stejn\u00e9 tla\u010d\u00edtko Custom Firmware tu vyzkou\u0161en\u00e9 nen\u00ed.
Bez webov\u00e9ho flasheru: na v\u011bt\u0161in\u011b desek otev\u0159e dvoj\u00ed stisk resetu bootloader jako USB disk; zkop\u00edruj na n\u011bj .uf2. Nebo adafruit-nrfutil dfu serial -pkg <soubor>.zip -p <port> -b 115200 s deskou v bootloaderu.
Nov\u00fd uzel po nahr\u00e1n\u00ed nastav v konzoli: set name <jm\u00e9no>, password <admin heslo> (nejv\u00fd\u0161 15 znak\u016f), vlastn\u00ed region p\u0159es region put cz-<kraj> cz + region save. Repeater p\u0159epos\u00edl\u00e1 od prvn\u00edho startu (v\u00fdchoz\u00ed v upstreamu) a tyhle buildy jsou na ostr\u00e9 CZ frekvenci: na stole bez ant\u00e9ny dej set repeat off, dokud nen\u00ed na m\u00edst\u011b.
*-ota)","text":"Ka\u017ed\u00fd nRF52 build s textovou konzol\u00ed (repeater, observer, room server, senzor) je v releasu je\u0161t\u011b jednou jako experiment\u00e1ln\u00ed *-ota / *-observer-ota. Ten um\u00ed p\u0159ijmout nov\u00fd firmware od admina p\u0159\u00edkazy fw \u2026: v USB nebo BLE konzoli, nebo p\u0159es mesh jako vzd\u00e1len\u00e9 admin CLI. Bez zm\u011bny bootloaderu a bez druh\u00e9 banky: uzel si bal\u00ed\u010dek ulo\u017e\u00ed do voln\u00e9 flash, zkontroluje ho cel\u00fd (podpis, hashe, nane\u010disto proveden\u00e1 delta) a p\u0159ep\u00ed\u0161e se a\u017e na fw apply, rutinou b\u011b\u017e\u00edc\u00ed z RAM. Kdy\u017e b\u011bhem p\u0159episu vypadne nap\u00e1jen\u00ed, z\u016fstane v bootloaderu a vr\u00e1t\u00ed se p\u0159es USB/BLE DFU.
*-ota obrazu pln\u00fd bal\u00ed\u010dek <deska>_<role>-ota-<release>.mcfw (jen p\u0159es USB/BLE) a delta \u2026.from-<star\u0161\u00ed release>.mcfw od ka\u017ed\u00e9ho dr\u017een\u00e9ho p\u0159edchoz\u00edho releasu, typicky jednotky kB.fw apply downgrade). fw apply \u010dek\u00e1 na baterii \u2265 3,8 V, pokud uzel neb\u011b\u017e\u00ed z USB.SHA256SUMS jsou podepsan\u00e9 kl\u00ed\u010dem meshcore-ota@tth-pub a *-ota obraz jin\u00fd podpis nep\u0159ijme. Ov\u011b\u0159en\u00ed sta\u017een\u00fdch soubor\u016f: ssh-keygen -Y verify -f tools/ota_allowed_signers -I meshcore-ota@tth-pub -n meshcore-ota -s SHA256SUMS.sig < SHA256SUMS. Vlastn\u00ed build s vlastn\u00edm kl\u00ed\u010dem: [ota] pubkey v platformio.local.ini.*-ota obraz se nahraje oby\u010dejn\u011b (viz v\u00fd\u0161e), dal\u0161\u00ed u\u017e jako delta. N\u00e1stroje: tools/ota_push.py (USB), tools/ota_mesh_push.py (p\u0159es mesh skrz companion; pot\u0159ebuje pythonovou knihovnu meshcore, admin heslo bere z [secrets] admin_pw v platformio.local.ini; s --side jde p\u0159enos po vedlej\u0161\u00edm kan\u00e1lu mimo sd\u00edlen\u00fd mesh), tools/ota_pack.py info. P\u0159enos samotn\u00fd je OTA engine kolekce tth.meshcore (modul meshcore_fw_ota), stejn\u00fd k\u00f3d pro n\u00e1stroje i Ansible. Z telefonu: fork aplikace meshcore-open, spr\u00e1va repeateru \u2192 Firmware update (OTA), deltu si najde v releasu s\u00e1m. Postup a \u010d\u00edsla: docs/ota.md.set radio.silence. Stoj\u00ed ~10 kB RAM nav\u00edc.v1.18.0-tth<sha>, + = neuklizen\u00fd strom), z\u00e1kladn\u00ed verze z upstreamov\u00e9ho tagu (tools/build_version.py).tools/: n\u00e1stroje na uzly \u2013 konzole (USB, BLE), flashov\u00e1n\u00ed, testy na lavici, diagnostika (tools/README.md). Desky podle jm\u00e9na bere z lok\u00e1ln\u00edho configu mimo repo (tools/config.example.ini).hardware/cavity-box: parametrick\u00e1 krabi\u010dka pro dutinov\u00fd filtr na sto\u017e\u00e1r.Working notes for the DIRECT-forward loss seen on mast-three (SenseCap Solar, SenseCap_Solar_repeater_ble). Written down because the result is mostly negative, and a negative result is only worth anything if the method and its limits are recorded with it.
Commit f6e9aeca widened the BLE connection interval from 15\u201330 ms to 60\u201380 ms after an A/B on the mast showed ~40 % of DIRECT-route forwards silently lost with an idle BLE connection at 15\u201330 ms. The stated mechanism is that the SoftDevice's per-connection-event preemption disturbs the SX126x TX path (startTransmit fail / send-complete timeout).
The fix is deployed. What was never established is whether a bench rig can detect the effect at all \u2014 a measurement that reads zero in both the treatment and the control has shown nothing.
"},{"location":"ble-lora-coexistence/#rig","title":"Rig","text":"Isolated test mesh on 866.5 MHz (BW 62.5, SF 8, CR 5). Isolation is by frequency, not by tx power: a hilltop repeater with RX_BOOSTED_GAIN hears a few mW just fine. The override is compile-time (platformio.local.ini) because MyMesh.cpp seeds _prefs.freq from LORA_FREQ, so the firmware cannot come up on the production frequency even after erase.
bench-board XIAO nRF52840 + Wio-SX1262 forwarder under test bench-board same paired control / radiating witness bench-board, bench-board same probe sources bench-rpt SenseCap Solar Node forwarder, mast-identical hardware tth-s2-rpt same paired control Paired controls differ only in ADVERT_NAME, verified by diffing strings in the ELF. Any other difference invalidates them.
The measured quantity is the node's own direct_rx \u2212 direct_tx from stats-packets: how many DIRECT packets it accepted for forwarding versus how many it actually sent. This is self-normalising \u2014 it does not depend on channel conditions or on a receiver hearing anything. tx_start_fail and tx_timeout are the mechanism-level counters. A second repeater with repeat off acts as a radiating witness, so \"counted a TX\" can be distinguished from \"actually radiated\".
Route forcing: a contact is injected into the sender's companion with an explicit out_path, so the DM must traverse the node under test. out_path_len is not a hop count \u2014 it is a packed byte, top two bits = hash size \u2212 1, low six = hop count (Packet.h:85). One hop with a 2-byte hash is 0x41, not 1. The receiver reads the size out of the packet (Mesh.cpp:93), so a forced path works regardless of the node's path.hash.mode.
All cells at a verified 22.50 ms connection interval \u2014 bleconn reports the parameters actually negotiated, because bleOnSecured() only requests them and the central may refuse. Without that read-back none of the null results below would mean anything.
blepwr \u2248RSSI at central link up direct_rx direct_tx lost tx_timeout BLE off \u2014 \u2014 8 8 0 0 0 dBm \u221267 100 % 8 8 0 0 \u22128 \u221275 100 % 8 8 0 0 \u221212 \u221279 100 % 8 8 0 0 \u221216 \u221283 87 % 8 8 0 0 \u221220 \u221287 27 % 8 8 0 0 The \u221220 dBm row is a bonus condition: the link held only a quarter of the window, so the node spent the rest advertising and re-connecting \u2014 close to the reconnect churn the mast reports as HCI 0x3E.
Ruled out as the missing factor: BLE link margin. The whole \u221275..\u221290 window the mast sits in is covered, at the known-bad interval, with zero loss.
"},{"location":"ble-lora-coexistence/#why-idle-weak-link-does-nothing","title":"Why idle + weak link does nothing","text":"In idle the connection events carry empty PDUs, whose retransmission costs almost no radio time. The cost of a retransmission scales with payload size, and the mast has a bridge actively draining the console. Hence the poll mode in the harness.
Direction matters too, and it is the reason to weaken our side rather than the central's: a connection event ends as soon as either side misses a packet, so if the central misses our PDU we must re-send it at the next anchor \u2014 an extra slave TX. If we miss the central's PDU we never transmit in that event at all, and the SoftDevice uses less radio.
"},{"location":"ble-lora-coexistence/#on-mast-hardware-with-the-file-log-on","title":"On mast hardware, with the file log on","text":"Two SenseCap Solar nodes (bench-rpt forwarder, tth-s2-rpt paired control) \u2014 the same board as the mast, so InternalFS logging, INA226/solar telemetry and the SenseCap SPI layout are all in play. Again at a verified 22.50 ms interval (bleconn).
The logging condition was real, not nominal: log afterwards held 69 entries with RX/TX lines timestamped inside the measurement window, i.e. an InternalFS write per packet \u2014 the mechanism behind the known deaf windows.
Ten cells, 80 forced forwards, zero lost, tx_timeout and tx_start_fail at zero throughout. Against the mast's reported ~40 % loss rate this is not a weak null: a single 8-probe cell would miss a true 40 % effect with probability 0.6\u2078 \u2248 1.7 %, and ten cells make it vanishing. Whatever the mast is doing, it is not reproduced by the connection interval, the BLE link margin, the board, or InternalFS logging \u2014 alone or together.
Loaded LoRa channel is the one uncontrolled difference left. Ours is idle; the mast relays flood traffic, so its forwards contend for a busy channel and the TX window lands on a BLE connection event far more often. This cannot be tested legally here: 866.5 is capped at 1 % duty and the 10 % sub-band (869.4\u2013869.65) is where production lives.
Practical consequence: f6e9aeca can be neither confirmed nor refuted on the bench. Deciding whether the 60\u201380 ms interval is still needed requires measuring on mast-three itself \u2014 the counters (stats-packets, and now bleconn to prove which interval is actually in force) are all reachable over its BLE console.
866.5 MHz sits in 865\u2013868 (CZ VO-R/10): 25 mW ERP, 1 % duty cycle = 36 s of transmission per hour. The firmware does not police this \u2014 airtime_factor defaults to 0 (= 100 %) and is clamped to 9, so the lowest duty MeshCore can enforce is 10 %. The first sweep consumed tx_air_secs 27 s in 18 minutes of uptime, a rate of ~2.5 %. Budget the probes: stats-radio.tx_air_secs is the ground truth, and the harness aborts before crossing a configured cap.
stats-core.queue_len and errors are a required control, not decoration: when the airtime budget runs out the Dispatcher defers a forward (next_tx_time, Dispatcher.cpp:101), which looks identical to loss in the counters. Both were zero throughout.
command[160]. Two concurrent consoles interleave into one line and crash the node. The harness keeps a strict sequence: counters over USB \u2192 close USB \u2192 BLE client \u2192 probes \u2192 stop BLE \u2192 counters over USB.Bluefruit.setTxPower() is advertising-only (see the commit message for blepwr); the connection runs at the SoftDevice default 0 dBm.blepwr over the mesh admin CLI.set tx does not change radiated LoRa power~~ \u2014 retracted. The original reading (+2 dBm \u2192 RSSI \u221244.1, \u22129 dBm \u2192 \u221244.0) was made with an instrument that could not report failure: RadioLibWrapper::setTxPower() discarded RadioLib's status, so a refused request looked exactly like an accepted one. Re-measured 2026-08-04 on the repeater build with txpwr confirming each step, x1 transmitting and x4 as witness:txpwr witness last_rssi +22 0 dBm (saturated) +14 \u22121 dBm (saturated) +6 \u22127 dBm 0 \u221218 dBm \u22129 \u221228 dBm 31 dB of command produced 28 dB of RSSI, and the witness recv counter rose by one at every step, so no point was missed. Radiated power does follow the setting. The top two points are saturated \u2014 the boards were ~10 cm apart \u2014 so the usable range of that particular rig starts around +6 dBm; characterising the top end needs attenuation or distance, not a bigger number.
The lesson is not about tx power. It is that a null result from an instrument which cannot distinguish \"refused\" from \"no effect\" is not a result at all.
"},{"location":"ble-lora-coexistence/#the-two-commands-this-bench-added","title":"The two commands this bench added","text":"Both live in examples/simple_repeater/main.cpp and are repeater-only.
bleconn \u2014 what the link is actually doing","text":"bleconn\n-> BLE conn: interval 75.00 ms (req 60-80), latency 0, sup timeout 4000 ms [live]\n Reports the negotiated connection parameters, not the requested ones. The central is free to ignore a peripheral's request, so this is the only way to know whether a change like f6e9aeca (widening the requested interval to 60\u201380 ms) is in force on a node you cannot see. The trailing [live] / [last] says whether a client is connected right now or these are the values from the last one; before any client has ever connected it answers nothing seen yet.
blepwr [dBm] \u2014 connection TX power, saved","text":"blepwr # report: BLE conn tx: 0 dBm, adv tx: 8 dBm\nblepwr 8 # set, apply to live connections and save\nblepwr default # forget the saved value, back to RPT_BLE_CONN_TX_POWER\n The reply carries how many live connections accepted the value (OK - BLE conn tx 8 dBm (1/1 conn), saved) because the nRF52840 only takes \u221240, \u221220, \u221216, \u221212, \u22128, \u22124, 0 and 2..8 dBm; anything else is rejected and is not latched or saved, so a typo cannot arm itself for the next reconnect. The value lives in /ble_pwr in InternalFS, so it survives a reboot and also a reflash with a different build default: an explicit value is pinned even when it equals the default (no file = follow RPT_BLE_CONN_TX_POWER, which mast-three's env sets to 8).
Sets BLE_GAP_TX_POWER_ROLE_CONN, which is independent of Bluefruit.setTxPower() \u2014 that one only affects advertising, despite reading like a global. The connection otherwise runs at the SoftDevice default of 0 dBm; the compile-time starting value is RPT_BLE_CONN_TX_POWER.
The value is re-applied on every 'secured' event and saved, so a setting weak enough to break the link persists across reconnects and reboots \u2014 at \u221240 dBm during this bench it locked the BLE console out. Fix it over the mesh admin CLI (blepwr 0), which does not depend on BLE. Until 6. 10. 2026 a weakening auto-reverted after 5 minutes and nothing was saved; that went away once the value started to be saved, because a revert that the next reboot undoes again only made the state harder to read.
A Chytra Budka (ESP32-S3 bird box) sends its readings over a one-way UART line to a XIAO nRF52840 running simple_sensor; the sensor serves them as CayenneLPP telemetry to anyone on the mesh. The line format and the budka side are documented in the chytra-budka repo, firmware/MESHCORE.md.
BudkaLinkSensorManager (src/helpers/sensors/) replaces the variant's EnvironmentSensorManager when the env defines BUDKA_LINK_RX_PIN; every other env is unchanged.
[env:Xiao_x1_budka] ; platformio.local.ini\nextends = env:Xiao_nrf52_sensor\nbuild_flags =\n ${env:Xiao_nrf52_sensor.build_flags}\n ${test_radio.build_flags} ; bench: test band only\n -D BUDKA_LINK_RX_PIN=0 ; D0 = the only pad LoRa + I\u00b2C leave free\n Optional: BUDKA_LINK_TX_PIN (default LED_GREEN \u2014 nothing is ever sent, the idle-high line keeps that LED dark), BUDKA_LINK_BAUD (115200), BUDKA_LINK_METERS (3), BUDKA_LINK_STALE_MS (120 s).
Budka mc_tx pad \u2192 XIAO D0, GND \u2194 GND, each board on its own USB. A 1 k\u03a9 series resistor protects against back-powering when one side is off.
A line with a bad checksum is dropped whole; a value not refreshed for 2 min is left out. Meter channels stay reserved while a meter is missing.
Read it with .tth/tools/budka_telem.py <companion-port> <sensor-name>. The sensor answers only clients in its ACL \u2014 a request from anyone else is dropped (recv matches no peers in a MESH_DEBUG build). Add the companion from the sensor's USB console with setperm <companion-pubkey> 1, or log in as admin. The port may be a pyserial URL (socket://\u2026 for an openHop companion), and the name may be the sensor's public key when the companion does not have it yet.
x1 (sensor, test band) fed by the bench budka; x4 as USB companion:
ch2 temp_C 25.3 humidity_% 59.0 generic 29\nch3 voltage_V 4.94 current_A 0.10 analog_in 0.49 energy_kWh 0.111\nch4 voltage_V 4.94 current_A 0.18 analog_in 0.89 energy_kWh 0.311\n"},{"location":"budka-sensor/#not-done","title":"Not done","text":"Alerts (reed opened, budka WiFi down) and the return direction (mesh \u2192 budka). The sensor build has no dfu console command \u2014 reflash with pio run -t upload, one touch per power session.
This document provides an overview of CLI commands that can be sent to MeshCore Repeaters, Room Servers and Sensors.
"},{"location":"cli_commands/#navigation","title":"Navigation","text":"Usage: - reboot
Note: No reply is sent.
"},{"location":"cli_commands/#power-off-the-node","title":"Power-off the node","text":"Usage: - poweroff, or - shutdown
Note: No reply is sent.
"},{"location":"cli_commands/#reset-the-clock-and-reboot","title":"Reset the clock and reboot","text":"Usage: - clkreboot
Note: No reply is sent.
Resets the clock to the firmware's build epoch (or, on an unstamped build, the upstream 15 May 2024 literal) and reboots. This is the only way to move a clock backwards: time and clock sync both refuse to.
Usage: - clock sync
Takes the time from the packet's sender_timestamp, so it works only over the remote admin CLI, never from the USB or BLE console \u2014 those pass sender_timestamp = 0 (they share one command buffer, see examples/simple_repeater/main.cpp), and 0 > curr is never true, so a local clock sync always answers ERR: clock cannot go backwards. Use time <epoch> locally.
Usage: - clock
Reply: HH:MM - D/M/YYYY UTC (epoch <seconds>)
The epoch is a TeTeHacko addition. The human part is minutes only, so a host comparing clocks cannot see a difference smaller than a minute and has to leave a deadband of over 59 s; the epoch makes the comparison exact. It is appended, so anything that only prints the reply is unaffected.
"},{"location":"cli_commands/#set-the-time-to-a-specific-timestamp","title":"Set the time to a specific timestamp","text":"Usage: - time <epoch_seconds>
Parameters: - epoch_seconds: Unix epoch time
Refuses to go backwards (secs > curr), answering (ERR: clock cannot go backwards). That reply usually means the clock was already right, so treat it as success and judge by reading clock back.
Where the clock comes from if nobody sets it. Without GPS and without an I2C RTC the clock is volatile: it starts at the build epoch and only ticks from millis(). It is worth setting, because the RTC stamps every advert the node transmits and a receiver drops a stale timestamp as a replay. Automatic sources, in order of preference:
gps duty is enough \u2014 see docs/power.md);tools/ble_cli.py <MAC> \"time {epoch}\", the meshcore-ble-bridge/meshcore-serial-bridge scrape, or tools/xiao_uf2_flash.sh, which sets it right after every flash;Usage: - advert
Usage: - advert.zerohop
Usage: - start ota
Usage: - erase
Serial Only: Yes
Warning: This is destructive!
"},{"location":"cli_commands/#neighbors-repeater-only","title":"Neighbors (Repeater Only)","text":""},{"location":"cli_commands/#list-nearby-neighbors","title":"List nearby neighbors","text":"Usage: - neighbors
Note: The output of this command is limited to the 8 most recent adverts.
Note: Each line is encoded as {pubkey-prefix}:{timestamp}:{snr*4}
Usage: - neighbor.remove <pubkey_prefix>
Parameters: - pubkey_prefix: The public key of the node to remove from the neighbors list. This can be a short prefix or the full key. All neighbors matching the provided prefix will be removed.
Note: You can remove all neighbors by sending a space character as the prefix. The space indicates an empty prefix, which matches all existing neighbors.
"},{"location":"cli_commands/#discover-zero-hop-neighbors","title":"Discover zero hop neighbors","text":"Usage: - discover.neighbors
Usage: - room.post <message>
Parameters: - message: The text of the post
Note: The post is stored and pushed to logged-in clients like a client's post, with the room server as its author.
"},{"location":"cli_commands/#statistics","title":"Statistics","text":""},{"location":"cli_commands/#clear-stats","title":"Clear Stats","text":"Usage: clear stats
Usage: - stats-core
Serial Only: Yes
Note: Output format: {\"battery_mv\":<mV>,\"uptime_secs\":<secs>,\"errors\":<flags>,\"queue_len\":<count>}
Note: errors is a bitmask shown as \"Debug flags\" in the app's repeater status.
ERR_EVENT_FULL A packet failed to send because the memory pool was full. 2 ERR_EVENT_CAD_TIMEOUT After waiting 4 seconds for a gap, a packet was transmitted into a busy network. 4 ERR_EVENT_STARTRX_TIMEOUT The radio was out of receive mode for more than 8 seconds. Flags stay set until the node reboots or clear stats is run.
Usage: stats-radio
Serial Only: Yes
"},{"location":"cli_commands/#packet-stats-packet-counters-received-sent","title":"Packet stats - Packet counters: Received, Sent","text":"Usage: stats-packets
Serial Only: Yes
"},{"location":"cli_commands/#logging","title":"Logging","text":""},{"location":"cli_commands/#begin-capture-of-rx-log-to-node-storage","title":"Begin capture of rx log to node storage","text":"Usage: log start
Usage: log stop
Usage: log erase
Usage: log
Serial Only: Yes
"},{"location":"cli_commands/#info","title":"Info","text":""},{"location":"cli_commands/#get-the-version","title":"Get the Version","text":"Usage: ver
Usage: board
Usage: - get radio - set radio <freq>,<bw>,<sf>,<cr>
Parameters: - freq: Frequency in MHz - bw: Bandwidth in kHz - sf: Spreading factor (5-12) - cr: Coding rate (5-8)
Set by build flag: LORA_FREQ, LORA_BW, LORA_SF, LORA_CR
Default: 869.618,62.5,8,5
Note: Requires reboot to apply
Notes: These settings control the setup of the radio parameters. Refer to the node's manual for the correct settings to use. Setting a value too high or too low may violate the laws in your country.
"},{"location":"cli_commands/#view-or-change-this-nodes-transmit-power","title":"View or change this node's transmit power","text":"Usage: - get tx - set tx <dbm>
Parameters: - dbm: Power level in dBm (-9 to 22 on SX126x; meshcore-tth refuses values out of range or not taken by the radio)
Set by build flag: LORA_TX_POWER
Default: Varies by board
Notes: This setting only controls the power level of the LoRa chip. Some nodes have an additional power amplifier stage which increases the total output. Refer to the node's manual for the correct setting to use. Setting a value too high may violate the laws in your country.
"},{"location":"cli_commands/#change-the-radio-parameters-for-a-set-duration","title":"Change the radio parameters for a set duration","text":"Usage: - tempradio <freq>,<bw>,<sf>,<cr>,<timeout_mins>
Parameters: - freq: Frequency in MHz (300-2500) - bw: Bandwidth in kHz (7.8-500) - sf: Spreading factor (5-12) - cr: Coding rate (5-8) - timeout_mins: Duration in minutes (must be > 0)
Notes: These settings control the setup of the radio parameters. Refer to the node's manual for the correct settings to use. Setting a value too high or too low may violate the laws in your country.
Note: This is not saved to preferences and will clear on reboot
"},{"location":"cli_commands/#view-or-change-this-nodes-frequency","title":"View or change this node's frequency","text":"Usage: - get freq - set freq <frequency>
Parameters: - frequency: Frequency in MHz
Default: 869.618
Note: Requires reboot to apply Serial Only: set freq <frequency>
Usage: - get radio.rxgain - set radio.rxgain <state>
Parameters: - state: on|off
Default: on
Temporary Note: If you upgraded from an older version to 1.14.1 without erasing flash, this setting is off because of #2118
Usage: - get radio.fem.rxgain - set radio.fem.rxgain <state>
Parameters: - state: on|off
Notes: - This controls the external LoRa FEM receive-path LNA where the board supports it. - This is separate from radio.rxgain, which controls the radio chip receive gain mode.
Usage: - get radio.fem.txgain - set radio.fem.txgain <state>
Parameters: - state: on|off
Notes: - This controls a software-selectable external LoRa FEM transmit gain where the board supports it. - On Station G3, remove the PA PL1 jumper to allow software control. on selects PA PL1 high/short and off selects PA PL1 low/open. The PA PL2 hardware jumper determines whether this switches between power levels 1/3 or 2/4. - Select an operating level and SX1262 transmit power that comply with local RF limits and the Station G3 power-supply requirements. - The setting is saved immediately, but on Station G3 the level is applied to the hardware at the start of the next transmit, so that the PA supply rail is never re-targeted while the PA is being driven. get reports the configured state, which may lead the hardware until the node next transmits.
Usage: - get name - set name <name>
Parameters: - name: Node name
Set by build flag: ADVERT_NAME
Default: Varies by board
Note: Advertised names can use up to 23 bytes when location is included and 31 bytes otherwise. Emoji and Unicode characters may take more than one byte. Names that exceed the available advert space are truncated at a valid UTF-8 code point boundary.
"},{"location":"cli_commands/#show-battery-state-as-an-icon-on-the-advertised-name","title":"Show battery state as an icon on the advertised name","text":"(TeTeHacko fork) Appends a solar marker and a charge level to the name carried in adverts, so anyone who hears the node can see its state without logging in for telemetry. Off by default.
Usage: - get batt.icon - set batt.icon on|off
Default: off
Glyphs: \u2600 permanently (solar node), then one of \u2581\u2582\u2583\u2584\u2585\u2586\u2587\u2588 for the charge level -- or \u26a1 instead of the level while the node runs on external power (USB), where VBAT reads the charger rather than the cell.
Note: The indicator costs 6 bytes of the name (3 + 3), which with a position in the advert leaves 17. Unicode has only two battery emoji and no \"half full\" one, and at 4 bytes each they do not fit -- hence block elements, which are 3 bytes and come in eight steps. If the name is too long the whole indicator is dropped rather than truncated, and both set and get say so.
Note: Every level is the same byte width on purpose. A name that changed length with the charge would be re-truncated at some steps and not others, and every client that heard it would rewrite the contact.
Note: Switching is hysteretic (BATT_ICON_HYST_MV, default 50 mV) and asymmetric -- the level drops as soon as the voltage crosses a boundary but climbs only once clear of it. The measured daily swing of a solar node under weak sun is 38-46 mV and the drift 13 mV/day, so at eight levels the name changes roughly once a week.
Usage: - get batt.icon.lo / set batt.icon.lo <millivolts> - get batt.icon.hi / set batt.icon.hi <millivolts>
Set by build flag: BATT_ICON_LO_MV, BATT_ICON_HI_MV
Default: 3300 and 4200 -- the same 1S Li-Ion scale the dashboards use, so the icon and the Grafana percentage tell one story.
Parameters: - millivolts: 2500..4500, or 0 to use the build default
Usage: - get lat - set lat <degrees>
Set by build flag: ADVERT_LAT
Default: 0
Parameters: - degrees: Latitude in degrees
Usage: - get lon - set lon <degrees>
Set by build flag: ADVERT_LON
Default: 0
Parameters: - degrees: Longitude in degrees
Usage: - get prv.key - set prv.key <private_key>
Parameters: - private_key: Private key in hex format (64 hex characters)
Serial Only: - get prv.key: Yes - set prv.key: No
Note: Requires reboot to take effect after setting
"},{"location":"cli_commands/#change-this-nodes-admin-password","title":"Change this node's admin password","text":"Usage: - password <new_password>
Parameters: - new_password: New admin password
Set by build flag: ADMIN_PASSWORD
Default: password
Note: Command reply echoes the updated password for confirmation.
Note: Any node using this password will be added to the admin ACL list.
"},{"location":"cli_commands/#view-or-change-this-nodes-guest-password","title":"View or change this node's guest password","text":"Usage: - get guest.password - set guest.password <password>
Parameters: - password: Guest password
Set by build flag: ROOM_PASSWORD (Room Server only)
Default: <blank>
Usage: - get owner.info - set owner.info <text>
Parameters: - text: Owner information text
Default: <blank>
Note: | characters are translated to newlines
Note: Requires firmware 1.12+
"},{"location":"cli_commands/#fine-tune-the-battery-reading","title":"Fine-tune the battery reading","text":"Usage: - get adc.multiplier - set adc.multiplier <value>
Parameters: - value: ADC multiplier (0.0-10.0)
Default: 0.0 (value defined by board)
Note: Returns \"Error: unsupported by this board\" if hardware doesn't support it
"},{"location":"cli_commands/#view-this-nodes-public-key","title":"View this node's public key","text":"Usage: get public.key
Usage: ver
Usage: get role
Usage: - powersaving - powersaving on - powersaving off
Parameters: - on: enable power saving - off: disable power saving
Default: off
Note: When enabled, device enters sleep mode between radio transmissions
"},{"location":"cli_commands/#view-or-change-the-rx-duty-cycle-rxps-custom-tetehacko","title":"View or change the RX duty cycle (rxps) -- CUSTOM (TeTeHacko)","text":"Usage: - get radio.rxps - set radio.rxps off|on|balanced|max - set radio.rxps level <1-10> [preamble <16|32>] - set radio.rxps max preamble <16|32>
The SX1262 sleeps between short listening windows (SetRxDutyCycle) instead of listening all the time, and stays awake through a packet once it hears a preamble. Ported from EasySkyMesh PowerSaving v18 (IoTThinks). Repeater, room server and sensor; SX1262 only (an LR11x0 reports supported=no). Present only in builds with -D WITH_RX_POWERSAVING (the public releases have it) and off until you set it; the setting is saved.
Parameters: - on (= conservative, level 3), balanced (level 6), max (level 8): the higher the level, the longer the sleep. The named presets assume senders with a 16-symbol preamble (the MeshCore default), so they are safe on a mixed mesh. - level <n>: the same scale by number; without preamble it follows the SF. 9 (overdrive) and 10 (riskyWorkingMax) are past the datasheet's timing condition -- 10 is known to lose packets. - <rx_us> <sleep_us>: raw window lengths.
get radio.rxps shows the requested and the effective state (desired=on,effective=armed), the window lengths and two error counters. If arming fails three times in a row, the radio falls back to continuous RX by itself (effective=continuous, fail counts up). The noise-floor calibration also runs in continuous RX.
Default: off
Note: Measured 12. 11. 2026 on a XIAO nRF52840 + Wio-SX1262 at 5 V (866.5 MHz / SF8 / BW62.5, A/B/A/B, 15 min cells): max saves ~2.3 mA (cell repeatability 0.3 mA). A 3-board zero-hop test lost nothing on max (0/240 over two runs, the second on the public release). See docs/power.md.
Usage: - get repeat - set repeat <state>
Parameters: - state: on|off
Default: on
Usage: - get path.hash.mode - set path.hash.mode <value>
Parameters: - value: Path hash size (0-2) - 0: 1 Byte hash size (256 unique ids)[64 max flood] - 1: 2 Byte hash size (65,536 unique ids)[32 max flood] - 2: 3 Byte hash size (16,777,216 unique ids)[21 max flood] - 3: DO NOT USE (Reserved)
Default: 0
Note: the 'path.hash.mode' sets the low-level ID/hash encoding size used when the repeater adverts. This setting has no impact on what packet ID/hash size this repeater forwards, all sizes should be forwarded on firmware >= 1.14. This feature was added in firmware 1.14
Temporary Note: adverts with ID/hash sizes of 2 or 3 bytes may have limited flood propagation in your network while this feature is new as v1.13.0 firmware and older will drop packets with multibyte path ID/hashes as only 1-byte hashes are supported. Consider your install base of firmware >=1.14 has reached a criticality for effective network flooding before implementing higher ID/hash sizes.
"},{"location":"cli_commands/#view-or-change-this-nodes-loop-detection","title":"View or change this node's loop detection","text":"Usage: - get loop.detect - set loop.detect <state>
Parameters: - state: - off: no loop detection is performed - minimal: packets are dropped if repeater's ID/hash appears 4 or more times (1-byte), 2 or more (2-byte), 1 or more (3-byte) - moderate: packets are dropped if repeater's ID/hash appears 2 or more times (1-byte), 1 or more (2-byte), 1 or more (3-byte) - strict: packets are dropped if repeater's ID/hash appears 1 or more times (1-byte), 1 or more (2-byte), 1 or more (3-byte)
Default: off
Note: When it is enabled, repeaters will now reject flood packets which look like they are in a loop. This has been happening recently in some meshes when there is just a single 'bad' repeater firmware out there (probably some forked or custom firmware). If the payload is messed with, then forwarded, the same packet ends up causing a packet storm, repeated up to the max 64 hops. This feature was added in firmware 1.14
Example: If preference is loop.detect minimal, and a 1-byte path size packet is received, the repeater will see if its own ID/hash is already in the path. If it's already encoded 4 times, it will reject the packet. If the packet uses 2-byte path size, and repeater's own ID/hash is already encoded 2 times, it rejects. If the packet uses 3-byte path size, and the repeater's own ID/hash is already encoded 1 time, it rejects.
Usage: - get txdelay - set txdelay <value>
Parameters: - value: Transmit delay factor (0-2)
Default: 0.5
Note: When multiple nearby repeaters all hear the same flood packet, each waits a random amount of time before retransmitting to avoid simultaneous collisions. This factor scales the size of that random window. Higher values reduce collision risk at the cost of added latency. 0 disables the window entirely.
Usage: - get direct.txdelay - set direct.txdelay <value>
Parameters: - value: Direct transmit delay factor (0-2)
Default: 0.3 (Repeater) - 0.2 (Room Server, Sensor)
Note: Same collision-avoidance random window as txdelay, but applied to direct (non-flood, routed) traffic. The default is lower because direct packets are addressed to a specific next hop, so far fewer nodes compete to retransmit them.
Usage: - get rxdelay - set rxdelay <value>
Parameters: - value: Receive delay base (0-20)
Default: 0.0
Note: When enabled, repeaters that received a flood packet with a weak signal are held in a delay queue before processing, while those that received it with a strong signal process it immediately. This gives strong-signal paths forwarding priority. By the time weak-signal nodes process their copy, the packet may have already propagated and will be suppressed as a duplicate, reducing redundant retransmissions.
"},{"location":"cli_commands/#view-or-change-the-duty-cycle-limit","title":"View or change the duty cycle limit","text":"Usage: - get dutycycle - set dutycycle <value>
Parameters: - value: Duty cycle percentage (1-100)
Default: 50% (equivalent to airtime factor 1.0)
Examples: - set dutycycle 100 \u2014 no duty cycle limit - set dutycycle 50 \u2014 50% duty cycle (default) - set dutycycle 10 \u2014 10% duty cycle - set dutycycle 1 \u2014 1% duty cycle (strictest EU requirement)
Note: Added in firmware v1.15.0
Notes: Refer to the node's manual for the correct settings to use. Setting a value too high may violate the laws in your country.
"},{"location":"cli_commands/#view-or-change-the-airtime-factor-duty-cycle-limit","title":"View or change the airtime factor (duty cycle limit)","text":"Deprecated as of firmware v1.15.0. Use get/set dutycycle instead.
Usage: - get af - set af <value>
Parameters: - value: Airtime factor (0-9). After each transmission, the repeater enforces a silent period of approximately the on-air transmission time multiplied by the value. This results in a long-term duty cycle of roughly 1 divided by (1 plus the value). For example: - af = 1 \u2192 ~50% duty - af = 2 \u2192 ~33% duty - af = 3 \u2192 ~25% duty - af = 9 \u2192 ~10% duty You are responsible for choosing a value that is appropriate for your jurisdiction and channel plan (for example EU 868 Mhz 10% duty cycle regulation).
Default: 1.0
Usage: - get int.thresh - set int.thresh <value>
Parameters: - value: Interference threshold value
Default: 0.0
Usage: - get cad - set cad <on|off>
Description: When enabled, the radio performs a hardware Channel Activity Detection scan before transmitting and defers if the channel is busy. Runs independently of int.thresh \u2014 either, both, or none may be active.
Parameters: - on|off: Enable or disable hardware CAD
Default: off
Usage: - get agc.reset.interval - set agc.reset.interval <value>
Parameters: - value: Interval in seconds, 0-1020, rounded down to a multiple of 4 (17 becomes 16). 0 to disable.
Default: 0.0
Usage: - get radio.silence - set radio.silence <minutes> - get radio.reboots
Parameters: - minutes: 1-1440, or 0/off to disable.
Description: Recovers a receiver that has gone deaf while the node keeps running (the hardware watchdog only catches a frozen loop). After minutes without a single received frame \u2014 a receive error counts as heard, too \u2014 the receiver is re-armed (IRQs cleared, RX restarted). If nothing arrives within a further quarter of the threshold (at least 5 minutes), the node reboots.
To keep a quiet site out of a reboot loop, each such reboot doubles the threshold for the next boot (up to 16\u00d7); the first frame received afterwards resets it. get radio.silence shows the threshold, the current multiplier, how long the receiver has been quiet and the stage (0 healthy, 1 re-armed). get radio.reboots counts the reboots done by this watchdog; it survives power loss. Pick a threshold well above the longest quiet spell the site normally has.
Default: 0 (off)
Usage: - get radio.txstall - set radio.txstall <minutes>
Parameters: - minutes: 1-1440, or 0/off to disable. Not saved: the build default (RADIO_TXSTALL_MIN) is back after a reboot.
Description: Recovers a node that still receives but no longer transmits. If packets wait in the outbound queue and the sent counter does not move for minutes, the radio is re-armed (IRQs cleared, back to standby); if still nothing goes out within a further quarter of the threshold (at least 5 minutes), the node reboots. An empty queue never counts, so a quiet site cannot trigger it. get radio.txstall shows the threshold, the queue (in total and due now), how long nothing has been sent and the stage (0 healthy, 1 re-armed). Its reboots are counted in get radio.reboots and are logged with the queue numbers.
Default: 15
Usage: - dfu [uf2|serial|ota]
Description: Reboots straight into the Adafruit bootloader: uf2 (default) brings up the UF2 drive, serial only the CDC port for adafruit-nrfutil, ota BLE DFU. Refused over the mesh, where it would leave the node waiting in the bootloader with no way back.
Usage: - get boot
Description: The reset reason latched at boot (RESETREAS on nRF52: 0x1 reset pin, 0x2 watchdog, 0x4 software reset, 0x8 lockup, 0 power-on) and, if the board crashed, the hardfault record (PC, LR, PSR). The same is printed once at boot, but on a build without a settle delay the console is not open yet at that moment.
Usage: - get multi.acks - set multi.acks <state>
Parameters: - state: 0 (disable) or 1 (enable)
Default: 0
Usage: - get flood.advert.interval - set flood.advert.interval <hours>
Parameters: - hours: Interval in hours (3-168)
Default: 47 (Repeater, Room Server) - 0, disabled (Sensor)
Usage: - get advert.interval - set advert.interval <minutes>
Parameters: - minutes: Interval in minutes rounded down to the nearest multiple of 2 (61 becomes 60) (60-240)
Default: 2 on a factory-fresh node, then 0 (disabled) once configured.
Note: A new install ships with a 2 minute zero-hop advert interval. Saving any setting resets an interval below the 60 minute minimum to 0, on the assumption that the node has now been deliberately configured. To keep zero-hop adverts running, set an explicit value in the 60-240 range.
Usage: - get flood.max - set flood.max <value>
Parameters: - value: Maximum flood hop count (0-64)
Default: 64
Usage: - get flood.max.unscoped - set flood.max.unscoped <value>
Parameters: - value: Maximum flood hop count (0-64) for a packet without a scope (no region set)
Default: 64 - (0xFF indicates it hasn't been set, will track flood.max until it is.)
Note: An alternative to region denyf *, setting flood.max.unscoped to a lower value such as 3 would allow for local unscoped messages to propagate, while preventing noisy neighbors from flooding a local region.
Usage: - get flood.max.advert - set flood.max.advert <value>
Parameters: - value: Maximum flood hop count (0-64) for an advert packet
Default: 8
Usage: - setperm <pubkey> <permissions>
Parameters: - pubkey: Companion public key - permissions: - 0: Guest - 1: Read-only - 2: Read-write - 3: Admin
Note: Removes the entry when permissions is omitted
Usage: - get acl
Serial Only: Yes
"},{"location":"cli_commands/#view-or-change-this-room-servers-read-only-flag","title":"View or change this room server's 'read-only' flag","text":"Usage: - get allow.read.only - set allow.read.only <state>
Parameters: - state: on (enable) or off (disable)
Default: off
Usage: - region load - region load <name> [flood_flag]
Parameters: - name: A name of a region. * represents the wildcard region
Note: flood_flag: Optional F to allow flooding
Note: Indentation creates parent-child relationships (max 8 levels)
Note: region load with an empty name will not work remotely (it's interactive)
Usage: - region save
Usage: - region allowf <name>
Parameters: - name: Region name (or * for wildcard)
Note: Setting on wildcard * allows packets without region transport codes
Usage: - region denyf <name>
Parameters: - name: Region name (or * for wildcard)
Note: Setting on wildcard * drops packets without region transport codes
Usage: - region get <name>
Parameters: - name: Region name (or * for wildcard)
Usage: - region home - region home <name>
Parameters: - name: Region name
Usage: - region default - region default {name|<null>}
Parameters: - name: Region name, or to reset/clear"},{"location":"cli_commands/#create-a-new-region","title":"Create a new region","text":"
Usage: - region put <name> [parent_name]
Parameters: - name: Region name - parent_name: Parent region name (optional, defaults to wildcard)
Usage: - region def <token> [<token> ...]
Parameters (tokens): Space-separated. A logical cursor starts at the wildcard *.
name \u2014 Create name as a child of the current cursor (equivalent to region put name with the cursor as parent). Cursor moves to name.name|jump (or name,jump) \u2014 Create name as a child of the current cursor, then move the cursor to jump (must already exist on the node, or have been created earlier in this command). jump is not the parent of name; use this form to pop back up and start another branch.Behavior: Each created region defaults to flood-allowed (same as region put). The reply is the resulting region tree (same format as bare region); review it before running region save to persist. On error, the reply is Err - ... and any regions placed before the failure remain on the node, just like a partial chain of region put.
Existing regions: region def does not clear the existing tree \u2014 if a name already exists, its parent is updated to the current cursor; otherwise a new region is created. To start from scratch, region remove the unwanted regions first.
Limits: Repeater serial accepts one line up to 160 characters. For larger trees, split across multiple region def commands; the cursor resets to * between commands, so lead the next command with child|ancestor to reposition. Each token splits at most once on | \u2014 region def a|b|c|d is not a flat-list shorthand; see the flat-list example below.
Example \u2014 linear chain (each token becomes a child of the previous):
region def a b c d e\nregion save\n Example \u2014 branched tree (equivalent to region put a, region put b a, region put c b, region put d c, region put e b, region put f e):
region def a b c d|b e f\nregion save\n Example \u2014 error and partial state:
region def a b c|nope d\n The reply is Err - unknown jump: nope. a, b, and c were placed before the failure; d was not. Run region to inspect, then re-run with a corrected jump or repair with region remove / region put. Example \u2014 flat list (each region a child of *). Use |* after each token to pop the cursor back to the root before the next token:
region def a|* b|* c|* d|* e|* f\nregion save\n"},{"location":"cli_commands/#remove-a-region","title":"Remove a region","text":"Usage: - region remove <name>
Parameters: - name: Region name
Note: Must remove all child regions before the region can be removed
"},{"location":"cli_commands/#view-all-regions","title":"View all regions","text":"Usage: - region list <filter>
Serial Only: Yes
Parameters: - filter: allowed|denied
Note: Requires firmware 1.12+
"},{"location":"cli_commands/#dump-all-defined-regions-and-flood-permissions","title":"Dump all defined regions and flood permissions","text":"Usage: - region
Serial Only: For firmware older than 1.12.0
"},{"location":"cli_commands/#region-examples","title":"Region Examples","text":"Example 1: Using F Flag with Named Public Region
region load\n#Europe F\n<blank line to end region load>\nregion save\n Explanation: - Creates a region named #Europe with flooding enabled - Packets from this region will be flooded to other nodes
Example 2: Using Wildcard with F Flag
region load \n* F\n<blank line to end region load>\nregion save\n Explanation: - Creates a wildcard region * with flooding enabled - Enables flooding for all regions automatically - Applies only to packets without transport codes
Example 3: Using Wildcard Without F Flag
region load \n*\n<blank line to end region load>\nregion save\n Explanation: - Creates a wildcard region * without flooding - This region exists but doesn't affect packet distribution - Used as a default/empty region Example 4: Nested Public Region with F Flag
region load \n#Europe F\n #UK\n #London\n #Manchester\n #France\n #Paris\n #Lyon\n<blank line to end region load>\nregion save\n Explanation: - Creates #Europe region with flooding enabled - Adds nested child regions (#UK, #France) - All nested regions inherit the flooding flag from parent
Example 5: Wildcard with Nested Public Regions
region load \n* F\n #NorthAmerica\n #USA\n #NewYork\n #California\n #Canada\n #Ontario\n #Quebec\n<blank line to end region load>\nregion save\n Explanation: - Creates wildcard region * with flooding enabled - Adds nested #NorthAmerica hierarchy - Enables flooding for all child regions automatically - Useful for global networks with specific regional rules
Usage: - gps
Note: Reports the requested state, receiver activity, last-fix status (last fix gives number of sats and how long ago was the fix), and mode. In periodic mode, waiting means the receiver is off between acquisitions; the last fix remains available. off(hw) means a hardware GPS switch is off.
Usage: - gps <state>
Parameters: - state: on|off|duty
Default: off
Note: In duty-cycle mode gps answers duty, {awake|asleep}, {fix|no fix}, {sat count} sats.
gps duty powers the receiver only around a clock sync and cuts it in between. It is meant for a node that runs GPS purely to keep its (volatile) RTC set \u2014 a mast or solar repeater \u2014 where a receiver drawing tens of mA continuously dwarfs the rest of the power budget. Unlike gps period, every attempt is capped even before the first fix ever, so a node that never sees the sky does not keep the receiver powered. It sets gps period to 0. The position still comes from prefs (see set advert.loc), so duty mode does not affect what a repeater advertises. gps on / gps off leave duty mode. Build-time knobs: GPS_DUTY_SYNC_INTERVAL_SECS (86400), GPS_DUTY_MAX_AWAKE_SECS (300, the cap on one attempt) and GPS_DUTY_RETRY_SECS (21600, backoff after a window with no fix).
Usage: - gps period - gps period <value>
Parameters: - value: 0 for continuous tracking, or a period. The value can be postfixed with s, m, h or d to specify the unit (seconds by default).
Note: A periodic acquisition stops after receiving a valid fix, then resumes after the configured period. Without a fix it stops after 5 minutes (GPS_PERIODIC_ACQUISITION_TIMEOUT_MS), or, until the first fix since boot, after the first fix timeout (see gps firstfix).
Usage: - gps firstfix - gps firstfix <value>
Parameters: - value: 0 for no limit, or a duration up to 1d. The value can be postfixed with s, m, h or d to specify the unit (seconds by default).
Default: 1h (GPS_FIRST_FIX_TIMEOUT_MS)
Note: In periodic mode, limits an acquisition until the first valid fix since boot. A cold start can take much longer than the usual 5 minutes with a weak sky view; after the limit the GPS sleeps for the period and tries again. Saved with the other GPS settings.
"},{"location":"cli_commands/#view-the-last-gps-fix","title":"View the last GPS fix","text":"Usage: - gps fix
Output: - > Fix (n sat): <lat>, <lon>: the GPS currently has a fix. - > Last fix <age> ago (n sat)[, acq <time>]: <lat>, <lon>: position of the last valid fix; acq is shown only while the receiver is running and shows how for how long the gps has been trying to get a fix. - > No fix[, acq <time>]: no valid fix since the node started.
Note: Ages and durations are given in s, m or h.
Usage: - gps sync
Usage: - gps once - gps once -s
Parameters: - -s: also sync this node's clock with GPS time (as gps sync)
Note: Starts an acquisition now. If the GPS is off, it is switched and kept on until a valid fix and then turned off.
Reply: OK - turning on and acquiring (GPS was off), OK - waking gps (periodic mode, receiver off between acquisitions) or OK - gps already on. Error, gps hw switch off if a hardware GPS switch is off, Error, gps once not supported.
Usage: - gps fix_stats
Output: > ttf:<last>/<max> ok:<n> miss:<n>: last and maximum time between a start of the GPS and its first valid fix, then the last count of consecutive starts with a fix (ok) or without one (miss).
Usage: - gps diag
GPS_GUARD)","text":"With GPS_GUARD, a fix becomes the node's last fix (position, telemetry, adverts) only after it passes plausibility checks: at least GPS_GUARD_MIN_SATS satellites, HDOP \u2264 GPS_GUARD_MAX_HDOP10/10, inside the optional build-time region (GPS_GUARD_LAT_MIN/MAX, GPS_GUARD_LON_MIN/MAX), within the fence around the node's configured lat/lon (if set), no jump faster than GPS_GUARD_MAX_SPEED_KMH, and GPS_GUARD_STABLE_FIXES consistent fixes in a row. An unverified position is never reported.
GPS time is written to the clock only while such a fix is current, never earlier than the firmware build date, and, once the clock holds a plausible time (from the build date to 10 years after it), only within GPS_GUARD_TIME_MAX_STEP seconds for the first sync and within clock drift (GPS_GUARD_TIME_DRIFT_BASE s + GPS_GUARD_TIME_DRIFT_PPM) afterwards. Setting the clock manually (time, clock sync) resets that anchor. A clock outside that window (e.g. a bogus date in 2080) is corrected by the first trusted fix.
Covers serial NMEA receivers (MicroNMEALocationProvider).
Usage: - gps guard: status, e.g. > ok 7sat time ok +1s, > rej region time rej nofix, > ok 7sat time wait (last check passed, no current trusted fix to check again, e.g. GPS asleep between periodic fixes), or ... ALERT gps-clk +3600s 75m when a trusted fix has disagreed with the clock by the same offset for GPS_GUARD_ALERT_MIN minutes. - gps guard on, gps guard off: turn the guard on or off (saved, default on). While off, every fix and GPS time is accepted and gps guard shows off. - gps guard accept: while an alert is active, confirm that the GPS time is right and apply it to the clock. - gps fence, gps fence <metres>: fence radius around the configured lat/lon (0 = off). Default GPS_GUARD_FENCE_M (1000); a value set here is saved. - gps ref: the reference position; follows set lat, set lon and gps setloc.
Usage: - gps setloc
Usage: - get advert.loc - set advert.loc <policy> - gps advert - gps advert <policy>
Parameters: - policy: none|share|prefs - none: don't include location in adverts - share: share gps location (from SensorManager) - prefs: location stored in node's lat and lon settings (can be different from gps value)
Default: prefs
Note: gps advert command is the old format but is only accessible when a gps is attached to the unit. It has been kept for compatibility but one should prefer using get/set commands instead.
Usage: sensor list [start]
Parameters: - start: Optional starting index (defaults to 0)
Note: Output format: <var_name>=<value>\\n
Usage: - sensor get <key> - sensor set <key> <value>
Parameters: - key: Sensor setting name - value: The value to set the sensor to
Usage: - sensor get ina.shunt - sensor set ina.shunt <mOhm>
Parameters: - mOhm: the shunt on the module, in milliohms (10 for a shunt marked R010, 100 for R100); 0 = the build's value (100 mOhm unless the build sets TELEM_INA219_SHUNT_VALUE / TELEM_INA226_SHUNT_VALUE / TELEM_INA3221_SHUNT_VALUE)
Note: Listed only when an INA219, INA226 or INA3221 was detected at boot. Saved, applies at once and survives a reboot; it also works over the mesh as admin, and on a companion as the custom variable ina.shunt. With the wrong value the current is off by the ratio -- LaskaKit's INA226 modules carry 10 mOhm, the default assumes 100. Current is reported in steps of 1 mA (CayenneLPP).
Usage: get bridge.type
Usage: - get bridge.enabled - set bridge.enabled <state>
Parameters: - state: on|off
Default: off
Usage: - get bridge.delay - set bridge.delay <ms>
Parameters: - ms: Delay in milliseconds (0-10000)
Default: 500
Usage: - get bridge.source - set bridge.source <source>
Parameters: - source: - logRx: bridges received packets - logTx: bridges transmitted packets
Default: logTx
Usage: - get bridge.baud - set bridge.baud <rate>
Parameters: - rate: Baud rate (9600, 19200, 38400, 57600, or 115200)
Default: 115200
Usage: - get bridge.channel - set bridge.channel <channel>
Parameters: - channel: Channel number (1-14)
Usage: - get bridge.secret - set bridge.secret <secret>
Parameters: - secret: ESP-NOW bridge secret, up to 15 characters
Default: Varies by board
"},{"location":"cli_commands/#view-the-bootloader-version-nrf52-only","title":"View the bootloader version (nRF52 only)","text":"Usage: get bootloader.ver
Usage: get pwrmgt.support
Usage: get pwrmgt.source
Note: Returns an error on boards without power management support.
"},{"location":"cli_commands/#view-the-boot-reset-and-shutdown-reasons","title":"View the boot reset and shutdown reasons","text":"Usage: get pwrmgt.bootreason
Note: Returns an error on boards without power management support.
"},{"location":"cli_commands/#view-the-boot-voltage","title":"View the boot voltage","text":"Usage: get pwrmgt.bootmv
Note: Returns an error on boards without power management support.
"},{"location":"cli_commands/#ethernet-when-ethernet-support-is-compiled-in","title":"Ethernet (when Ethernet support is compiled in)","text":"Ethernet support is available on RAK4631 boards with a RAK13800 (W5100S) Ethernet module. Use the _ethernet firmware variants (e.g. RAK_4631_repeater_ethernet) to enable this feature.
Usage: - eth.status
Output: - ETH: <ip>:<port> when connected (e.g. ETH: 192.168.1.50:23) - ETH: not connected when Ethernet is not active
Notes: - Available on repeater and room server firmware only. Companion radio ethernet firmware does not expose a CLI. - The Ethernet interface obtains an IP address via DHCP automatically on boot. - A TCP server listens on port 23 (default) for CLI connections. - Connect with any TCP client (e.g. nc, PuTTY) to access the same CLI available over serial.
Since version 1.18 meshcore companion radio firmware has a CLI interface, which can be accessed locally (through companion radio protocol) or remotely via the network.
"},{"location":"companion_cli/#navigation","title":"Navigation","text":"Usage: - reboot
Note: No reply is sent.
"},{"location":"companion_cli/#power-off-the-node","title":"Power-off the node","text":"Usage: - poweroff, or - shutdown
Note: No reply is sent.
"},{"location":"companion_cli/#configuration","title":"Configuration","text":""},{"location":"companion_cli/#system","title":"System","text":""},{"location":"companion_cli/#view-or-change-this-nodes-name","title":"View or change this node's name","text":"Usage: - get name - set name <name>
Parameters: - name: Node name
Set by build flag: ADVERT_NAME
Default: Varies by board
Note: Advertised names can use up to 23 bytes when location is included and 31 bytes otherwise. Emoji and Unicode characters may take more than one byte. Names that exceed the available advert space are truncated at a valid UTF-8 code point boundary.
"},{"location":"companion_cli/#view-this-nodes-firmware-version","title":"View this node's firmware version","text":"Usage: ver
Usage: - set tz.offset <offset> - get tz.offset
Parameters: - offset: float value of the offset in hours
Usage: - get adc.multiplier - set adc.multiplier <value>
Parameters: - value: ADC multiplier (0.0-10.0)
Default: 0.0 (value defined by board)
Note: Returns \"Error: unsupported\" if the board doesn't support it. Same command as on repeaters, for boards whose battery divider resistors vary (e.g. DIY ProMicro / Faketec).
"},{"location":"companion_cli/#view-or-change-the-buzzer-state","title":"View or change the buzzer state","text":"Usage: - get buzzer - set buzzer <state>
Parameters: - state: on|off
Default: on
Note: Only available on boards with a buzzer (PIN_BUZZER). This is the same setting as the buzzer toggle in the device UI.
Radio parameters are common to all roles and handled by CommonRadioPrefs.
Usage: - get radio - set radio <freq>,<bw>,<sf>,<cr>
Parameters: - freq: Frequency in MHz - bw: Bandwidth in kHz - sf: Spreading factor (5-12) - cr: Coding rate (5-8)
Set by build flag: LORA_FREQ, LORA_BW, LORA_SF, LORA_CR
Default: 869.618,62.5,8,5
Note: Requires reboot to apply
"},{"location":"companion_cli/#view-or-change-this-nodes-transmit-power","title":"View or change this node's transmit power","text":"Usage: - get tx - set tx <dbm>
Parameters: - dbm: Power level in dBm (-9 to 22 on SX126x; meshcore-tth refuses values out of range or not taken by the radio)
Set by build flag: LORA_TX_POWER
Default: Varies by board
Notes: This setting only controls the power level of the LoRa chip. Some nodes have an additional power amplifier stage which increases the total output. Refer to the node's manual for the correct setting to use. Setting a value too high may violate the laws in your country.
"},{"location":"companion_cli/#view-or-change-this-nodes-frequency","title":"View or change this node's frequency","text":"Usage: - get freq - set freq <frequency>
Parameters: - frequency: Frequency in MHz
Default: 869.618
Note: Requires reboot to apply Serial Only: set freq <frequency>
Usage: - gps
Note: Reports the requested state, receiver activity, last-fix status (last fix gives number of sats and how long ago was the fix), and mode. In periodic mode, waiting means the receiver is off between acquisitions; the last fix remains available. off(hw) means a hardware GPS switch is off.
Usage: - gps <state>
Parameters: - state: on|off
Usage: - gps period - gps period <value>
Parameters: - value: 0 for continuous tracking, or a period. The value can be postfixed with s, m, h or d to specify the unit (seconds by default).
Note: A periodic acquisition stops after receiving a valid fix, then resumes after the configured period.
"},{"location":"companion_cli/#view-the-last-gps-fix","title":"View the last GPS fix","text":"Usage: - gps fix
Output: - > Fix (n sat): <lat>, <lon>: the GPS currently has a fix. - > Last fix <age> ago (n sat)[, acq <time>]: <lat>, <lon>: position of the last valid fix; acq is shown only while the receiver is running and shows how for how long the gps has been trying to get a fix. - > No fix[, acq <time>]: no valid fix since the node started.
Note: Ages and durations are given in s, m or h.
Usage: - gps sync
Usage: - gps once - gps once -s
Parameters: - -s: also sync this node's clock with GPS time (as gps sync)
Note: Starts an acquisition now. If the GPS is off, it is switched and kept on until a valid fix and then turned off.
Reply: OK - turning on and acquiring (GPS was off), OK - waking gps (periodic mode, receiver off between acquisitions) or OK - gps already on. Error, gps hw switch off if a hardware GPS switch is off, Error, gps once not supported.
Usage: - gps fix_stats
Output: > ttf:<last>/<max> ok:<n> miss:<n>: last and maximum time between a start of the GPS and its first valid fix, then the last count of consecutive starts with a fix (ok) or without one (miss).
Usage: - gps diag
Usage: - get radio.rxgain - set radio.rxgain <state>
Parameters: - state: on|off
Default: on
Usage: - get radio.fem.rxgain - set radio.fem.rxgain <state>
Parameters: - state: on|off
Notes: - This controls the external LoRa FEM receive-path LNA where the board supports it. - This is separate from radio.rxgain, which controls the radio chip receive gain mode.
Usage: - get radio.fem.txgain - set radio.fem.txgain <state>
Parameters: - state: on|off
Notes: - This controls a software-selectable external LoRa FEM transmit gain where the board supports it. - On Station G3, remove the PA PL1 jumper to allow software control. on selects PA PL1 high/short and off selects PA PL1 low/open. The PA PL2 hardware jumper determines whether this switches between power levels 1/3 or 2/4. - Select an operating level and SX1262 transmit power that comply with local RF limits and the Station G3 power-supply requirements. - The setting is saved immediately, but on Station G3 the level is applied to the hardware at the start of the next transmit, so that the PA supply rail is never re-targeted while the PA is being driven. get reports the configured state, which may lead the hardware until the node next transmits.
Usage: - get dutycycle - set dutycycle <value>
Parameters: - value: Duty cycle percentage (1-100)
Default: 50% (equivalent to airtime factor 1.0)
Examples: - set dutycycle 100 \u2014 no duty cycle limit - set dutycycle 50 \u2014 50% duty cycle (default) - set dutycycle 10 \u2014 10% duty cycle - set dutycycle 1 \u2014 1% duty cycle (strictest EU requirement)
Note: Added in firmware v1.15.0
"},{"location":"companion_cli/#view-or-change-the-airtime-factor-duty-cycle-limit","title":"View or change the airtime factor (duty cycle limit)","text":"Deprecated as of firmware v1.15.0. Use get/set dutycycle instead.
Usage: - get af - set af <value>
Parameters: - value: Airtime factor (0-9). After each transmission, the repeater enforces a silent period of approximately the on-air transmission time multiplied by the value. This results in a long-term duty cycle of roughly 1 divided by (1 plus the value). For example: - af = 1 \u2192 ~50% duty - af = 2 \u2192 ~33% duty - af = 3 \u2192 ~25% duty - af = 9 \u2192 ~10% duty You are responsible for choosing a value that is appropriate for your jurisdiction and channel plan (for example EU 868 Mhz 10% duty cycle regulation).
Default: 1.0
Usage: - get int.thresh - set int.thresh <value>
Parameters: - value: Interference threshold value
Default: 0.0
Usage: - get cad - set cad <on|off>
Description: When enabled, the radio performs a hardware Channel Activity Detection scan before transmitting and defers if the channel is busy. Runs independently of int.thresh \u2014 either, both, or none may be active.
Parameters: - on|off: Enable or disable hardware CAD
Default: off
Usage: - get agc.reset.interval - set agc.reset.interval <value>
Parameters: - value: Interval in seconds, 0-1020, rounded down to a multiple of 4 (17 becomes 16). 0 to disable.
Default: 0.0
Usage: - get multi.acks - set multi.acks <state>
Parameters: - state: 0 (disable) or 1 (enable)
Default: 0
Usage: - get path.hash.mode - set path.hash.mode <value>
Parameters: - value: Path hash size (0-2) - 0: 1 Byte hash size (256 unique ids)[64 max flood] - 1: 2 Byte hash size (65,536 unique ids)[32 max flood] - 2: 3 Byte hash size (16,777,216 unique ids)[21 max flood] - 3: DO NOT USE (Reserved)
Default: 0
Note: the 'path.hash.mode' sets the low-level ID/hash encoding size used when the repeater adverts. This setting has no impact on what packet ID/hash size this repeater forwards, all sizes should be forwarded on firmware >= 1.14. This feature was added in firmware 1.14
"},{"location":"companion_cli/#view-or-change-the-retransmit-delay-factor-for-flood-traffic","title":"View or change the retransmit delay factor for flood traffic","text":"Usage: - get txdelay - set txdelay <value>
Parameters: - value: Transmit delay factor (0-2)
Default: 0.5
Note: When multiple nearby repeaters all hear the same flood packet, each waits a random amount of time before retransmitting to avoid simultaneous collisions. This factor scales the size of that random window. Higher values reduce collision risk at the cost of added latency. 0 disables the window entirely.
Usage: - get direct.txdelay - set direct.txdelay <value>
Parameters: - value: Direct transmit delay factor (0-2)
Default: 0.3 (Repeater) - 0.2 (Room Server, Sensor)
Note: Same collision-avoidance random window as txdelay, but applied to direct (non-flood, routed) traffic. The default is lower because direct packets are addressed to a specific next hop, so far fewer nodes compete to retransmit them.
Usage: - get rxdelay - set rxdelay <value>
Parameters: - value: Receive delay base (0-20)
Default: 0.0
Note: When enabled, repeaters that received a flood packet with a weak signal are held in a delay queue before processing, while those that received it with a strong signal process it immediately. This gives strong-signal paths forwarding priority. By the time weak-signal nodes process their copy, the packet may have already propagated and will be suppressed as a duplicate, reducing redundant retransmissions.
"},{"location":"companion_cli/#ble","title":"BLE","text":""},{"location":"companion_cli/#change-ble-pin","title":"Change BLE PIN","text":"Usage: - set pin <pin>
Parameters: - pin: New BLE PIN
Set by build flag: BLE_PIN_CODE
Usage: - get ble.name - set ble.name <name>
Parameters: - name: New BLE name
Note: By default the BLE name is Meshcore- followed by the node name. If <name> is empty the BLE name will be reset to the aforementioned default. These commands require a reboot to take effect.
Usage: - get wifi.status - get wifi.ip
Usage: - set wifi.enabled <value> - get wifi.enabled
Parameters: - value: 0 (disable) or 1 (enable)
Usage: - set wifi.ssid <value> - get wifi.ssid
Parameters: - value: ssid as a string
Usage: - set wifi.pwd <value> - get wifi.pwd
Parameters: - value: password string
Usage: - set ui.show_clock <state> - get ui.show_clock
Parameters: - state: 0 (disable) or 1 (enable)
Default: 0 (or UI_SHOW_CLOCK build flag)
Usage: - set ui.gps_action <action> - get ui.gps_action
Parameters: - action: toggle (or 0) to switch the GPS on and off, once (or trigger, 1) to acquire a fix on demand, as gps once
Default: toggle, or once on boards with a GPS switch
Note: Only used by the ui-new screens for now.
Usage: - set ui.nd_name <state> - get ui.nd_name
Parameters: - state: 1 (show name) or 0 (show pubkey_prefix)
Default: 1
Note: When showing name, there is not always enough space to draw both incoming and outgoing snr values.
"},{"location":"companion_cli/#auto-off-screen","title":"Auto-off screen","text":"Usage: - set ui.auto_off_delay <delay> - get ui.auto_off_delay
Parameters: - delay: in seconds (0 means always on)
Default: 15 (or set by AUTO_OFF_MILLIS build flag (in ms))
Note: On e-ink displays, when turned off, the screen is not necessarily blanked, see ui.auto_off_blank and ui.backlight_delay.
When screen is not blanked, it is not refreshed any more. To let the user aware of that, a sleep icon is shown.
"},{"location":"companion_cli/#display-backlight-timeout","title":"Display backlight timeout","text":"Usage: - set ui.backlight_delay <delay> - get ui.backlight_delay
Parameters: - delay: in seconds - 0 means no timeout - -2 means always off - -1 means always on
Note: When set to 0, backlight can only be triggered using backlight btn.
Usage: - set ui.backlight_on_keys <state> - get ui.backlight_on_keys - set ui.backlight_on_msgs <state> - get ui.backlight_on_msgs
Parameters: - state: 0 (disable) or 1 (enable)
Default: - ui.backlight_on_msgs = 0 - ui.backlight_on_keys = 0 if there is a backlight button on the board, else 1
Note: By default backlight is triggered by backlight button if present (as long as the button is pressed backlight is on, and is turned off after a delay). These toggles permits to toggle backlight when keys are pressed or when a message arrives (it acts as a notification signal). If backlight_delay is set to 0 then this setting has no effect, backlight won't be turned on.
Usage: - set ui.auto_off_blank <state> - get ui.auto_off_blank
Parameters: - state: 0 (disable) or 1 (enable)
Default: 0 (or set by UI_SCREENOFF_BLANK build flag)
Note: If disabled, when screen is shut the displays stays on screen and is not updated (an sleep icons covers battery to show the screen is sleeping).
When screen is blanked, the controller is also put into hibernation, which should preserve the screen a little and some battery ...
"},{"location":"companion_cli/#keep-message-previews-when-the-eink-screen-turns-off","title":"Keep message previews when the eink screen turns off","text":"Usage: - set ui.auto_off_keep_msgs <state> - get ui.auto_off_keep_msgs
Parameters: - state: 0 (disable) or 1 (enable)
Default: 1
Note: Only has an effect when ui.auto_off_blank is enabled. If the message preview screen is showing when the screen turns off, it is left on screen instead of being blanked.
Usage: - set ui.max_partial <value> - get ui.max_partial
Parmeters: - value: max partial refreshes before doing a full refresh
Default: 0 (no partial refresh or set by EINK_MAX_PARTIAL_REFRESH build flag)
Note: Forcing full refresh helps revives the screen when some tearing appears (under certain environmental conditions). If you see some tearing appearing, you can force full refresh on your screen manually by double clicking the backlight button. If tearing reappears often, use this setting to force full refresh every value partial refreshes.
NOTE: This document is still in development. Some information may be inaccurate.
This document provides a comprehensive guide for communicating with MeshCore devices over Bluetooth Low Energy (BLE).
It is platform-agnostic and can be used for Android, iOS, Python, JavaScript, or any other platform that supports BLE.
"},{"location":"companion_protocol/#official-libraries","title":"Official Libraries","text":"Please see the following repos for existing MeshCore Companion Protocol libraries.
All secrets, hashes, and cryptographic values shown in this guide are example values only.
MeshCore Companion devices expose a BLE service with the following UUIDs:
6E400001-B5A3-F393-E0A9-E50E24DCCA9E6E400002-B5A3-F393-E0A9-E50E24DCCA9E6E400003-B5A3-F393-E0A9-E50E24DCCA9EScan for Devices
Connect to GATT
Discover Services and Characteristics
6E400001-B5A3-F393-E0A9-E50E24DCCA9E6E400002-B5A3-F393-E0A9-E50E24DCCA9E6E400003-B5A3-F393-E0A9-E50E24DCCA9EEnable Notifications
Send Initial Commands
CMD_APP_START to identify your app to firmware and get radio settingsCMD_DEVICE_QUERY to fetch device info and negotiate supported protocol versionsCMD_SET_DEVICE_TIME to set the firmware clockCMD_GET_CONTACTS to fetch all contactsCMD_GET_CHANNEL multiple times to fetch all channel slotsCMD_SYNC_NEXT_MESSAGE to fetch the next message stored in firmwarePUSH_CODE_MSG_WAITING or PUSH_CODE_ADVERTNote: MeshCore devices may disconnect after periods of inactivity. Implement auto-reconnect logic with exponential backoff.
"},{"location":"companion_protocol/#ble-write-type","title":"BLE Write Type","text":"When writing commands to the RX characteristic, specify the write type:
Platform-specific:
BluetoothGattCharacteristic.WRITE_TYPE_DEFAULT or WRITE_TYPE_NO_RESPONSECBCharacteristicWriteType.withResponse or .withoutResponsewrite_gatt_char() with response=True or FalseRecommendation: Use write with response for reliability.
"},{"location":"companion_protocol/#mtu-maximum-transmission-unit","title":"MTU (Maximum Transmission Unit)","text":"The default BLE MTU is 23 bytes (20 bytes payload). For larger commands like SET_CHANNEL (50 bytes), you may need to:
gatt.requestMtu(512)peripheral.maximumWriteValueLength(for:)Critical: Commands must be sent in the correct sequence:
After Connection:
Command-Response Matching:
CMD_GET_CHANNEL \u2192 RESP_CODE_CHANNEL_INFO)For reliable operation, implement a command queue.
Queue Structure:
Error Handling:
The MeshCore protocol uses a binary format with the following structure:
Most packets follow this format:
[Packet Type (1 byte)] [Data (variable length)]\n The first byte indicates the packet type (see Response Parsing).
"},{"location":"companion_protocol/#commands","title":"Commands","text":""},{"location":"companion_protocol/#1-app-start","title":"1. App Start","text":"Purpose: Initialize communication with the device. Must be sent first after connection.
Command Format:
Byte 0: 0x01\nBytes 1-7: Reserved (currently ignored by firmware)\nBytes 8+: Application name (UTF-8, optional)\n Example (hex):
01 00 00 00 00 00 00 00 6d 63 63 6c 69\n Response: PACKET_SELF_INFO (0x05)
Purpose: Query device information.
Command Format:
Byte 0: 0x16\nByte 1: 0x03\n Example (hex):
16 03\n Response: PACKET_DEVICE_INFO (0x0D) with device information
Purpose: Retrieve information about a specific channel.
Command Format:
Byte 0: 0x1F\nByte 1: Channel Index (0 .. max_channels-1)\n Example (get channel 1):
1F 01\n Response: PACKET_CHANNEL_INFO (0x12) with channel details
Purpose: Create or update a channel on the device.
Command Format:
Byte 0: 0x20\nByte 1: Channel Index (0 .. max_channels-1)\nBytes 2-33: Channel Name (32 bytes, UTF-8, null-padded)\nBytes 34-49: Secret (16 bytes)\n Total Length: 50 bytes
Channel Index: - Valid range is 0 to max_channels - 1. Read max_channels from byte 3 of the PACKET_DEVICE_INFO response; do not assume 8. Builds ship with MAX_GROUP_CHANNELS set to 1, 8 or 40 depending on the board. - Index 0: pre-populated by the firmware with the built-in \"Public\" channel. It can be overwritten like any other slot. - An out-of-range index is rejected with PACKET_ERROR / ERR_CODE_NOT_FOUND.
Channel Name: - UTF-8 encoded - Maximum 32 bytes - Padded with null bytes (0x00) if shorter
Secret Field (16 bytes): - Always a real 16-byte key; the firmware derives the channel hash from SHA256(secret) (BaseChatMesh.cpp:936-942). There is no \"no secret\" form. - Do not write an all-zero secret. SHA256 over 16 zero bytes is a fixed, globally identical value, so a zero-secret channel is a well-known channel with an all-zero AES key that any node can read \u2014 not a private one. The firmware skips unnamed slots when matching inbound group traffic for exactly this reason (BaseChatMesh.cpp:392-401), but a slot that has been given a name and a zero secret is not skipped, and will absorb null-key group traffic from any node on the mesh. - The built-in public channel uses the well-known key izOH6cXN6mrJ5e26oRXNcg== (base64), i.e. 8b3387e9c5cdea6ac9e5edbaa115cd72 in hex.
Example (create channel \"YourChannelName\" at index 1 with secret):
20 01 53 4D 53 00 00 ... (name padded to 32 bytes)\n [16 bytes of secret]\n Note: The 32-byte secret variant is unsupported and returns PACKET_ERROR.
Response: PACKET_OK (0x00) on success, PACKET_ERROR (0x01) on failure
Purpose: Send a text message to a channel.
Command Format:
Byte 0: 0x03\nByte 1: 0x00\nByte 2: Channel Index (0 .. max_channels-1)\nBytes 3-6: Timestamp (32-bit little-endian Unix timestamp, seconds)\nBytes 7+: Message Text (UTF-8, variable length)\n Timestamp: Unix timestamp in seconds (32-bit unsigned integer, little-endian)
Example (send \"Hello\" to channel 1 at timestamp 1234567890):
03 00 01 D2 02 96 49 48 65 6C 6C 6F\n Response: PACKET_MSG_SENT (0x06) on success
Purpose: Send a binary datagram to a channel. Unlike channel text messages, datagrams carry no built-in sender identity and no timestamp \u2014 applications needing either must encode them inside the binary payload.
Command Format:
Byte 0: 0x3E\nByte 1: Channel Index (0 .. max_channels-1)\nByte 2: Path Length (0xFF = flood, otherwise actual path length)\nBytes 3 .. 2+path_len: Path (omitted when path_len == 0xFF)\nNext 2 bytes (little-endian): Data Type (`data_type`, uint16)\nRemaining bytes: Binary payload (variable length)\n Example (flood, DATA_TYPE_DEV, payload A1 B2 C3, channel 1):
3E 01 FF FF FF A1 B2 C3\n Data Type / Transport Mapping: - 0x0000 (DATA_TYPE_RESERVED) is invalid and rejected with PACKET_ERROR. - 0xFFFF (DATA_TYPE_DEV) is the developer namespace for experimenting and developing apps. - Values 0x0001\u20130xFFFE are available for registered application/community namespaces. See the Registered data_type values table below.
Limits: - Maximum payload length is 165 bytes \u2014 MAX_GROUP_DATA_LENGTH = MAX_PACKET_PAYLOAD - CIPHER_BLOCK_SIZE - 3 (src/MeshCore.h:21). This is the radio-side limit and the one clients should enforce. - Two different bounds are checked, and they do not agree. The host-frame check uses the larger MAX_CHANNEL_DATA_LENGTH = MAX_FRAME_SIZE - 9 = 167 (companion_radio/MyMesh.cpp:1265); the radio-side check uses 165 (BaseChatMesh.cpp:544). - Payloads above 167 are rejected with ERR_CODE_ILLEGAL_ARG (6). - Payloads of 166 or 167 pass the frame check, then fail the radio-side check and return ERR_CODE_TABLE_FULL (3). Despite that code's usual meaning, such a send can never succeed \u2014 do not retry it. Keep payloads at 165 bytes or fewer and this case cannot arise.
Response: PACKET_OK (0x00) on success, or PACKET_ERROR (0x01) with one of: - ERR_CODE_NOT_FOUND (2) \u2014 unknown channel_idx - ERR_CODE_ILLEGAL_ARG (6) \u2014 invalid path_len, reserved data_type (0x0000), or payload larger than MAX_CHANNEL_DATA_LENGTH (167) - ERR_CODE_TABLE_FULL (3) \u2014 outbound send queue is full (retry later), or a payload of 166-167 bytes that exceeds the radio-side limit (permanent; see Limits above)
Inbound datagrams are delivered to the host via RESP_CODE_CHANNEL_DATA_RECV (0x1B); see Receive Channel Data Datagram.
data_type values","text":"data_type is an application identifier, not a payload-format identifier. Each registered value identifies an application that owns its own internal payload schemas. The firmware does not inspect payload contents \u2014 data_type is transported opaquely.
DATA_TYPE_RESERVED Reserved; invalid on send 0x0001 \u2013 0x00FF \u2014 Reserved for internal use 0x0100 \u2013 0xFEFF \u2014 Registered application namespaces (see number_allocations.md) 0xFF00 \u2013 0xFFFE \u2014 Testing/development; no registration required 0xFFFF DATA_TYPE_DEV Developer/experimental namespace To register a new application, submit a PR adding a row to the table in docs/number_allocations.md. Internal sub-formats within an allocated application ID are owned by that application and are not tracked in MeshCore firmware or this document.
"},{"location":"companion_protocol/#receive-channel-data-datagram","title":"Receive Channel Data Datagram","text":"Inbound group datagrams (radio-level PAYLOAD_TYPE_GRP_DATA, 0x06) are forwarded to the host as RESP_CODE_CHANNEL_DATA_RECV notifications.
Frame Format (RESP_CODE_CHANNEL_DATA_RECV, 0x1B):
Byte 0: 0x1B (packet type)\nByte 1: SNR (signed int8, scaled \u00d74 \u2014 divide by 4.0 to recover dB)\nBytes 2-3: Reserved (clients MUST ignore)\nByte 4: Channel Index (0 .. max_channels-1)\nByte 5: Path Length (actual path length when flooded, otherwise 0xFF for direct)\nBytes 6-7: Data Type (uint16 little-endian)\nByte 8: Data Length\nBytes 9 .. 8+data_len: Payload\n Path bytes are not forwarded: Only path_len is reported in the receive frame \u2014 the path itself is not copied to the host. There are no path bytes between byte 5 and the data_type field at bytes 6\u20137, regardless of path_len.
Path Length semantics differ between send and receive:
Directionpath_len = 0xFF path_len \u2260 0xFF Send Flood the network Direct route; the encoded path follows (low 6 bits = hash count, top 2 bits + 1 = hash size; on-wire byte count = hash_count \u00d7 hash_size) Receive Packet arrived via direct route Packet was flooded; this is the encoded pkt->path_len field as observed (no path bytes follow) In other words, the meaning of 0xFF is inverted between the two directions, and on receive the field carries metadata only \u2014 never a routable path. path_len is an encoded byte (see Packet::isValidPathLen / Packet::writePath in src/Packet.cpp), not a raw byte count.
Note: The device may also emit PACKET_MESSAGES_WAITING (0x83) to notify the host that datagrams are queued; poll with CMD_SYNC_NEXT_MESSAGE (0x0A) to retrieve them.
Parsing Pseudocode:
def parse_channel_data_recv(data):\n if len(data) < 9:\n return None\n snr_byte = data[1]\n snr = (snr_byte if snr_byte < 128 else snr_byte - 256) / 4.0\n channel_idx = data[4]\n path_len = data[5]\n data_type = int.from_bytes(data[6:8], 'little')\n data_len = data[8]\n if 9 + data_len > len(data):\n return None\n payload = data[9:9 + data_len]\n return {\n 'snr': snr,\n 'channel_idx': channel_idx,\n 'path_len': path_len,\n 'data_type': data_type,\n 'payload': bytes(payload),\n }\n"},{"location":"companion_protocol/#7-get-message","title":"7. Get Message","text":"Purpose: Request the next queued message from the device.
Command Format:
Byte 0: 0x0A\n Example (hex):
0A\n Response: - PACKET_CHANNEL_MSG_RECV (0x08) or PACKET_CHANNEL_MSG_RECV_V3 (0x11) for channel messages - PACKET_CONTACT_MSG_RECV (0x07) or PACKET_CONTACT_MSG_RECV_V3 (0x10) for contact messages - PACKET_CHANNEL_DATA_RECV (0x1B) for channel data datagrams - PACKET_NO_MORE_MSGS (0x0A) if no messages available
Note: Poll this command periodically to retrieve queued messages. The device may also send PACKET_MESSAGES_WAITING (0x83) as a notification when messages are available.
Purpose: Query device battery voltage and storage usage.
Command Format:
Byte 0: 0x14\n Example (hex):
14\n Response: PACKET_BATTERY (0x0C) with battery millivolts and storage information
8b3387e9c5cdea6ac9e5edbaa115cd72sha256(\"#test\")#test has the key: 9cd8fcf22a47333b591d96a2b848b73fCMD_SET_CHANNEL with name and a 16-byte secretCMD_GET_CHANNEL with channel indexRESP_CODE_CHANNEL_INFO responseCMD_SET_CHANNEL with empty name and all-zero secretMessages are received via the TX characteristic (notifications). The device sends:
PACKET_CHANNEL_MSG_RECV (0x08) - Standard formatPACKET_CHANNEL_MSG_RECV_V3 (0x11) - Version 3 with SNR
Contact Messages:
PACKET_CONTACT_MSG_RECV (0x07) - Standard formatPACKET_CONTACT_MSG_RECV_V3 (0x10) - Version 3 with SNR
Notifications:
PACKET_MESSAGES_WAITING (0x83) - Indicates messages are queuedStandard Format (PACKET_CONTACT_MSG_RECV, 0x07):
Byte 0: 0x07 (packet type)\nBytes 1-6: Public Key Prefix (6 bytes, hex)\nByte 7: Path Length\nByte 8: Text Type\nBytes 9-12: Timestamp (32-bit little-endian)\nBytes 13-16: Signature (4 bytes, only if txt_type == 2)\nBytes 17+: Message Text (UTF-8)\n V3 Format (PACKET_CONTACT_MSG_RECV_V3, 0x10):
Byte 0: 0x10 (packet type)\nByte 1: SNR (signed byte, multiplied by 4)\nBytes 2-3: Reserved\nBytes 4-9: Public Key Prefix (6 bytes, hex)\nByte 10: Path Length\nByte 11: Text Type\nBytes 12-15: Timestamp (32-bit little-endian)\nBytes 16-19: Signature (4 bytes, only if txt_type == 2)\nBytes 20+: Message Text (UTF-8)\n Parsing Pseudocode:
def parse_contact_message(data):\n packet_type = data[0]\n offset = 1\n\n # Check for V3 format\n if packet_type == 0x10: # V3\n snr_byte = data[offset]\n snr = ((snr_byte if snr_byte < 128 else snr_byte - 256) / 4.0)\n offset += 3 # Skip SNR + reserved\n\n pubkey_prefix = data[offset:offset+6].hex()\n offset += 6\n\n path_len = data[offset]\n txt_type = data[offset + 1]\n offset += 2\n\n timestamp = int.from_bytes(data[offset:offset+4], 'little')\n offset += 4\n\n # If txt_type == 2, skip 4-byte signature\n if txt_type == 2:\n offset += 4\n\n message = data[offset:].decode('utf-8')\n\n return {\n 'pubkey_prefix': pubkey_prefix,\n 'path_len': path_len,\n 'txt_type': txt_type,\n 'timestamp': timestamp,\n 'message': message,\n 'snr': snr if packet_type == 0x10 else None\n }\n"},{"location":"companion_protocol/#channel-message-format","title":"Channel Message Format","text":"Standard Format (PACKET_CHANNEL_MSG_RECV, 0x08):
Byte 0: 0x08 (packet type)\nByte 1: Channel Index (0 .. max_channels-1)\nByte 2: Path Length\nByte 3: Text Type\nBytes 4-7: Timestamp (32-bit little-endian)\nBytes 8+: Message Text (UTF-8)\n V3 Format (PACKET_CHANNEL_MSG_RECV_V3, 0x11):
Byte 0: 0x11 (packet type)\nByte 1: SNR (signed byte, multiplied by 4)\nBytes 2-3: Reserved\nByte 4: Channel Index (0 .. max_channels-1)\nByte 5: Path Length\nByte 6: Text Type\nBytes 7-10: Timestamp (32-bit little-endian)\nBytes 11+: Message Text (UTF-8)\n Parsing Pseudocode:
def parse_channel_message(data):\n packet_type = data[0]\n offset = 1\n\n # Check for V3 format\n if packet_type == 0x11: # V3\n snr_byte = data[offset]\n snr = ((snr_byte if snr_byte < 128 else snr_byte - 256) / 4.0)\n offset += 3 # Skip SNR + reserved\n\n channel_idx = data[offset]\n path_len = data[offset + 1]\n txt_type = data[offset + 2]\n timestamp = int.from_bytes(data[offset+3:offset+7], 'little')\n message = data[offset+7:].decode('utf-8')\n\n return {\n 'channel_idx': channel_idx,\n 'timestamp': timestamp,\n 'message': message,\n 'snr': snr if packet_type == 0x11 else None\n }\n"},{"location":"companion_protocol/#sending-messages","title":"Sending Messages","text":"Use the SEND_CHANNEL_MESSAGE command (see Commands).
Important: - Messages are limited to 133 characters per MeshCore specification - Long messages should be split into chunks - Include a chunk indicator (e.g., \"[1/3] message text\")
"},{"location":"companion_protocol/#response-parsing","title":"Response Parsing","text":""},{"location":"companion_protocol/#terminology","title":"Terminology","text":"This document uses a spec-level naming convention (PACKET_*) for bytes the firmware sends back to the host. In the firmware source these same values are split across two #define families by purpose:
RESP_CODE_* \u2014 direct replies to a command (e.g. RESP_CODE_CHANNEL_DATA_RECV = PACKET_CHANNEL_DATA_RECV = 0x1B).PUSH_CODE_* \u2014 asynchronous notifications not tied to a specific command (e.g. PUSH_CODE_MSG_WAITING = PACKET_MESSAGES_WAITING = 0x83).Byte values are authoritative; names are aliases. When reading firmware source, RESP_CODE_X / PUSH_CODE_X correspond to this doc's PACKET_X of the same numeric value.
PACKET_OK (0x00):
Byte 0: 0x00\nBytes 1-4: Optional value (32-bit little-endian integer)\n PACKET_ERROR (0x01):
Byte 0: 0x01\nByte 1: Error code (optional)\n PACKET_CHANNEL_INFO (0x12):
Byte 0: 0x12\nByte 1: Channel Index\nBytes 2-33: Channel Name (32 bytes, null-terminated)\nBytes 34-49: Secret (16 bytes)\n Note: The device returns the 16-byte channel secret in this response.
PACKET_DEVICE_INFO (0x0D):
Byte 0: 0x0D\nByte 1: Firmware Version (uint8)\nBytes 2+: Variable length based on firmware version\n\nFor firmware version >= 3:\nByte 2: Max Contacts Raw (uint8, actual = value * 2)\nByte 3: Max Channels (uint8)\nBytes 4-7: BLE PIN (32-bit little-endian)\nBytes 8-19: Firmware Build (12 bytes, UTF-8, null-padded)\nBytes 20-59: Model (40 bytes, UTF-8, null-padded)\nBytes 60-79: Version (20 bytes, UTF-8, null-padded)\nByte 80: Client repeat enabled/preferred (firmware v9+)\nByte 81: Path hash mode (firmware v10+)\n Parsing Pseudocode:
def parse_device_info(data):\n if len(data) < 2:\n return None\n\n fw_ver = data[1]\n info = {'fw_ver': fw_ver}\n\n if fw_ver >= 3 and len(data) >= 80:\n info['max_contacts'] = data[2] * 2\n info['max_channels'] = data[3]\n info['ble_pin'] = int.from_bytes(data[4:8], 'little')\n info['fw_build'] = data[8:20].decode('utf-8').rstrip('\\x00').strip()\n info['model'] = data[20:60].decode('utf-8').rstrip('\\x00').strip()\n info['ver'] = data[60:80].decode('utf-8').rstrip('\\x00').strip()\n\n return info\n PACKET_BATTERY (0x0C):
Byte 0: 0x0C\nBytes 1-2: Battery Voltage (16-bit little-endian, millivolts)\nBytes 3-6: Used Storage (32-bit little-endian, KB)\nBytes 7-10: Total Storage (32-bit little-endian, KB)\n Parsing Pseudocode:
def parse_battery(data):\n if len(data) < 3:\n return None\n\n mv = int.from_bytes(data[1:3], 'little')\n info = {'battery_mv': mv}\n\n if len(data) >= 11:\n info['used_kb'] = int.from_bytes(data[3:7], 'little')\n info['total_kb'] = int.from_bytes(data[7:11], 'little')\n\n return info\n PACKET_SELF_INFO (0x05):
Byte 0: 0x05\nByte 1: Advertisement Type\nByte 2: TX Power\nByte 3: Max TX Power\nBytes 4-35: Public Key (32 bytes, hex)\nBytes 36-39: Advertisement Latitude (32-bit little-endian, divided by 1e6)\nBytes 40-43: Advertisement Longitude (32-bit little-endian, divided by 1e6)\nByte 44: Multi ACKs\nByte 45: Advertisement Location Policy\nByte 46: Telemetry Mode (bitfield)\nByte 47: Manual Add Contacts (bool)\nBytes 48-51: Radio Frequency (32-bit little-endian, divided by 1000.0)\nBytes 52-55: Radio Bandwidth (32-bit little-endian, divided by 1000.0)\nByte 56: Radio Spreading Factor\nByte 57: Radio Coding Rate\nBytes 58+: Device Name (UTF-8, variable length, no null terminator required)\n Parsing Pseudocode:
def parse_self_info(data):\n if len(data) < 36:\n return None\n\n offset = 1\n info = {\n 'adv_type': data[offset],\n 'tx_power': data[offset + 1],\n 'max_tx_power': data[offset + 2],\n 'public_key': data[offset + 3:offset + 35].hex()\n }\n offset += 35\n\n lat = int.from_bytes(data[offset:offset+4], 'little') / 1e6\n lon = int.from_bytes(data[offset+4:offset+8], 'little') / 1e6\n info['adv_lat'] = lat\n info['adv_lon'] = lon\n offset += 8\n\n info['multi_acks'] = data[offset]\n info['adv_loc_policy'] = data[offset + 1]\n telemetry_mode = data[offset + 2]\n info['telemetry_mode_env'] = (telemetry_mode >> 4) & 0b11\n info['telemetry_mode_loc'] = (telemetry_mode >> 2) & 0b11\n info['telemetry_mode_base'] = telemetry_mode & 0b11\n info['manual_add_contacts'] = data[offset + 3] > 0\n offset += 4\n\n freq = int.from_bytes(data[offset:offset+4], 'little') / 1000.0\n bw = int.from_bytes(data[offset+4:offset+8], 'little') / 1000.0\n info['radio_freq'] = freq\n info['radio_bw'] = bw\n info['radio_sf'] = data[offset + 8]\n info['radio_cr'] = data[offset + 9]\n offset += 10\n\n if offset < len(data):\n name_bytes = data[offset:]\n info['name'] = name_bytes.decode('utf-8').rstrip('\\x00').strip()\n\n return info\n PACKET_MSG_SENT (0x06):
Byte 0: 0x06\nByte 1: Route Flag (0 = direct, 1 = flood)\nBytes 2-5: Tag / Expected ACK (4 bytes, little-endian)\nBytes 6-9: Suggested Timeout (32-bit little-endian, milliseconds)\n PACKET_ACK (0x82):
Byte 0: 0x82\nBytes 1-6: ACK Code (6 bytes, hex)\n"},{"location":"companion_protocol/#error-codes","title":"Error Codes","text":"PACKET_ERROR (0x01) carries a single-byte error code in byte 1. Values match the ERR_CODE_* constants defined in examples/companion_radio/MyMesh.cpp:
ERR_CODE_UNSUPPORTED_CMD Unknown or unsupported command byte / sub-command 2 ERR_CODE_NOT_FOUND Target not found (channel, contact, message, etc.) 3 ERR_CODE_TABLE_FULL Internal queue or table is full \u2014 retry later 4 ERR_CODE_BAD_STATE Operation not valid in current device state (e.g. iterator already running) 5 ERR_CODE_FILE_IO_ERROR Filesystem or storage I/O failure 6 ERR_CODE_ILLEGAL_ARG Invalid argument (bad length, out-of-range value, reserved field, etc.) Note: Error codes may vary by firmware version. Always check byte 1 of PACKET_ERROR response, and treat unknown codes as generic errors.
BLE implementations enqueue and deliver one protocol frame per BLE write/notification at the firmware layer.
Use command queue to prevent concurrent commands
Asynchronous Messages:
PACKET_MESSAGES_WAITING (0x83) by polling GET_MESSAGE commandValidate frame length before decoding
Response Matching:
Match responses to commands by expected packet type:
APP_START \u2192 PACKET_SELF_INFODEVICE_QUERY \u2192 PACKET_DEVICE_INFOGET_CHANNEL \u2192 PACKET_CHANNEL_INFOSET_CHANNEL \u2192 PACKET_OK or PACKET_ERRORSEND_CHANNEL_MESSAGE \u2192 PACKET_MSG_SENTGET_MESSAGE \u2192 PACKET_CHANNEL_MSG_RECV, PACKET_CONTACT_MSG_RECV, PACKET_CHANNEL_DATA_RECV, or PACKET_NO_MORE_MSGSSEND_CHANNEL_DATA \u2192 PACKET_OK or PACKET_ERRORGET_BATTERY \u2192 PACKET_BATTERYTimeout Handling:
SET_CHANNEL may need 1-2 seconds)Consider longer timeout for channel operations
Error Recovery:
PACKET_ERROR: Log error code, clear current command# 1. Scan for MeshCore device\ndevice = scan_for_device(\"MeshCore\")\n\n# 2. Connect to BLE GATT\ngatt = connect_to_device(device)\n\n# 3. Discover services and characteristics\nservice = discover_service(gatt, \"6E400001-B5A3-F393-E0A9-E50E24DCCA9E\")\nrx_char = discover_characteristic(service, \"6E400002-B5A3-F393-E0A9-E50E24DCCA9E\")\ntx_char = discover_characteristic(service, \"6E400003-B5A3-F393-E0A9-E50E24DCCA9E\")\n\n# 4. Enable notifications on TX characteristic\nenable_notifications(tx_char, on_notification_received)\n\n# 5. Send AppStart command\nsend_command(rx_char, build_app_start())\nwait_for_response(PACKET_SELF_INFO)\n"},{"location":"companion_protocol/#creating-a-private-channel","title":"Creating a Private Channel","text":"# 1. Generate 16-byte secret\nsecret_16_bytes = generate_secret(16) # Use CSPRNG\nsecret_hex = secret_16_bytes.hex()\n\n# 2. Build SET_CHANNEL command\nchannel_name = \"YourChannelName\"\nchannel_index = 1 # Use 1-7 for private channels\ncommand = build_set_channel(channel_index, channel_name, secret_16_bytes)\n\n# 3. Send command\nsend_command(rx_char, command)\nresponse = wait_for_response(PACKET_OK)\n\n# 4. Store secret locally\nstore_channel_secret(channel_index, secret_hex)\n"},{"location":"companion_protocol/#sending-a-message","title":"Sending a Message","text":"# 1. Build channel message command\nchannel_index = 1\nmessage = \"Hello, MeshCore!\"\ntimestamp = int(time.time())\ncommand = build_channel_message(channel_index, message, timestamp)\n\n# 2. Send command\nsend_command(rx_char, command)\nresponse = wait_for_response(PACKET_MSG_SENT)\n"},{"location":"companion_protocol/#receiving-messages_1","title":"Receiving Messages","text":"def on_notification_received(data):\n packet_type = data[0]\n\n if packet_type == PACKET_CHANNEL_MSG_RECV or packet_type == PACKET_CHANNEL_MSG_RECV_V3:\n message = parse_channel_message(data)\n handle_channel_message(message)\n elif packet_type == PACKET_MESSAGES_WAITING:\n # Poll for messages\n send_command(rx_char, build_get_message())\n"},{"location":"companion_protocol/#best-practices","title":"Best Practices","text":"Store last connected device address for quick reconnection
Secret Management:
Never log or transmit secrets in plain text
Message Handling:
CMD_SYNC_NEXT_MESSAGE when PUSH_CODE_MSG_WAITING is receivedImplement message deduplication to avoid displaying the same message twice
Channel Management:
Error Handling:
RESP_CODE_ERR responses appropriatelyGET_MESSAGE command periodically\u010cesk\u00e1 verze v\u00fd\u0161e.
Warning
Experimental firmware -- not meant for regular users. This fork and all its releases are a personal development branch for the nodes of one small network: a rolling release on upstream dev, built automatically about twice a day, with no stable channel, no support, and tried only on our own boards. It may carry bugs that take a node out of service, and getting one back then needs USB or BLE in hand. For everyday use flash the official MeshCore (flasher.meshcore.io).
A fork of meshcore-dev/MeshCore that runs the repeaters, sensors and bench boards of a small Czech network on the CZ mesh (869.432 MHz). Upstream main and dev are merged automatically twice a day; everything below is on top of that. Our code is marked CUSTOM (TeTeHacko) in the source. Nothing here changes the wire protocol.
After flashing only the FairnessLimiter is on, with limits about twice above 30 days of real CZ mesh traffic: per channel a burst of 100 messages, then one per 30 s; per sender 150 and one per 10 s; per advert origin 30 and one per 10 min. It is a net for runaway floods, not a quota; fairness off switches it off for good. The advert window, the filters and dry-run stay off until you turn them on.
fairness [on|off|grid|cap|refill]; direct-routed traffic is never limited.fairness advert <h>|clear), ported from DutchMeshCore's AdvertLimiter. Aimed at nodes that re-advertise every minute.fairness dryrun on counts every verdict but forwards anyway; fairness air reports the airtime shed (or that would be) per reason.#hashtag channels), stop forwarding messages of listed sender names (filter add|del|list). Names are spoofable: it contains a runaway bot, it is not security.filter hash add <hex> [secs]: keyless, works on private channels too; reception is unaffected, only forwarding. With secs the channel is throttled (one packet per secs) instead of cut.filter age <min>|off (opt-in, 1-10080 min): do not forward group texts on the decrypted channels whose sender timestamp is older; inactive while the repeater clock is unset. It judges the sender's clock, so companions without a time sync are dropped too -- keep it in days.filter dryrun on counts every filter verdict but forwards anyway.Every command of the fork, which builds have it and the defaults: docs/tth-commands.md.
Repeater, room server and sensor (everything with a text console) have:
set radio.silence <min> -- deaf receiver: when the received-frame counter does not move for <min> minutes (a frame with a CRC error counts), the node re-arms its receiver first and reboots if that does not help either. Each such reboot doubles the threshold for the next boot (up to 16x) and the first frame received resets it, so a quiet site does not end in a reboot loop. Saved; off by default (0) -- pick a threshold well above the longest normal quiet spell of the site.RADIO_TXSTALL_MIN); set radio.txstall <min>|off holds until the next reboot.get radio.reboots -- reboots done by the watchdogs (survives power loss); get boot -- why the board last reset, and the hardfault record (also printed at boot).dfu [uf2|serial|ota] -- a deterministic reboot into the bootloader (local console only); i2c -- bus scan.The repeater also has:
blink (flashes the LED, also over the mesh -- finds a node on a mast), txpwr (TX power until reboot, with RadioLib's verdict), TX-failure counters in the status reply.*-observer): text console over BLE next to USB, ble on|off saved across reboots (RPT_BLE_DEFAULT_OFF: starts off), own BLE PIN (ble pin), persisted connection TX power (blepwr), bleconn, a non-blocking BLE TX pump and connection parameters that hold on a weak link.nodes (heard repeaters/rooms, multi-path join key), rxlog (every frame heard, type/path/SNR/RSSI), pktlog (raw frames for an observer feed), big paged replies.BOT_CHANNEL_PSK: !link, !path, !snr, !heard, !noise, !ping, !help, narrowed by BOT_COMMANDS, per-sender cooldown, ignore list) -- answers without repeating;RADIO_DIAG: radiostat (SX1262 receiver state, hands off) and radiokick rx|clrirq|standby|agc (one recovery step at a time, gentlest first -- the first that helps names the broken layer);PIN_DIAG: dio1 (the chip's IRQ status against the level on the pin -- which end of a dead DIO1 line is broken);LORA_POLL_IRQ: DIO1-less operation for a board with a dead IRQ line.reboot reboots the node forever. Repeater, room server and sensor now write it to flash before acting on the command (/s_acl_ts0|1, alternating with a checksum, so a power cut mid-write does not lose it). A timestamp more than a day ahead of the node's clock (ACL_TS_MAX_AHEAD) is accepted but not stored, so a companion with a runaway clock cannot lock its admin out. Only admins are stored: a guest can only read, and with the empty guest password anybody is one, so its every request would be a flash write. Nothing changes for clients.LOGIN_FAIL_MAX, LOGIN_FAIL_SECS) no password is checked until the window ends. A client that is already an admin in the ACL always gets through -- nobody else can send a login in its name, so the attack cannot lock the admins out.Packet::readFrom are bounds-checked.markSeen is idempotent again (the send path was eating the dedup window).calcMaxPacketMillis fallback no longer underflows (a node went deaf on it).sendZeroHop; 2-byte path hashes are the default (PATH_HASH_MODE_DEFAULT).ContactInfo zeroed before a partial fill.gps duty), also on the T1000-E, which had none: the receiver runs only around a clock sync (once a day, after a window without a fix again in 6 h). A position request warms it for the next request..noinit); clkreboot.set batt.icon on, thresholds set batt.icon.lo|hi <mV> (off by default; a long name has no room for it and the command says so).set radio.rxps off|on|balanced|max, finer level <1-10>; ported from EasySkyMesh PowerSaving): the SX1262 sleeps between short listening windows. Built into the public releases and off; max saved ~2.3 mA on the bench with no packet loss (docs/power.md), but on the live mesh one of our masts lost 16 % of its reception -- switch it on with care. SX1262 only, not the LR1110 (T1000-E).PWRMGT_VOLTAGE_BOOTLOCK) is off, as in upstream since v1.18.0 (#2377): its fixed 3.3 V threshold kept LiFePO4 and LTO nodes from booting. The firmware boots on any cell chemistry; deep-discharge protection is up to the BMS or the cell's protection board. A configurable, chemistry-aware lock is waiting for upstream (#2088). The exception is SenseCap_Solar_repeater (Li-ion, our masts): the lock is on and both thresholds are settable at runtime, also as an admin over the mesh -- set pwr.bootlock <mV>|off (default 3300; below it the node does not start and sleeps until the cell recovers) and set pwr.cutoff <mV>|off (default off; below it a running node switches off); get pwr (docs/power.md).simple_sensor: telemetry from an external station over UART (BudkaLinkSensorManager, one LPP channel per meter), sensor read.sensor set ina.shunt <mOhm>.gps duty persists, bounded build-date copy. Private key export, reading the BLE PIN and changing it (CLI set pin included) work only over paired BLE, never over USB, a UART or WiFi/TCP, and the reply that carries the key or PIN goes back only where the request came from. (The v1.17 merge had silently disabled that gate; a build without BLE still trusts its one transport.) KISS modem: off-by-one in the name clamp.Releases built from this repository (pub-release) come preset for the Czech mesh, following the meshcore.cz wiki, so a freshly flashed node does not need the usual round of settings:
get dutycycle \u2192 10.0%; the deprecated af reads 9);cz and cs next to * -- add your own cz-<kraj> with region put cz-xxx cz + region save;filter add <name>) is built in for Public, #meshcore and #test, with an empty list -- it does nothing until you add a name.They apply only to a node with no saved settings (new, or after an erase): a reflash keeps whatever the node already has, and regions you removed and saved stay removed. Set a name and an admin password yourself.
The companion's BLE PIN is the public 123456 (boards with a display draw their own and show it). Whoever pairs with it owns the companion: messages, contacts, private key export. So change it in the app after the first pairing. And with the board in hand neither the PIN nor a password protects anything: the flash is not locked and the bootloader takes any firmware. Treat a lost or stolen node as compromised -- for a repeater, change the admin password wherever it was the same and drop its key from ACLs; for a companion, treat the channels it held as known.
Observer variants (*_repeater-observer-*) of the nRF52 repeaters (XIAO, SenseCAP Solar, RAK4631, T1000-E, Heltec T114) add the nodes / rxlog / pktlog rings and a text console over BLE, for reading the repeater over USB or BLE (meshcore-repeater-observer). The BLE console is off after flashing (RPT_BLE_DEFAULT_OFF). It has no login of its own, only the BLE PIN, and the build's PIN is the public placeholder 123456. So first set your own -- in the USB console, or as admin over the mesh (remote CLI in the app): ble pin <6 digits> (saved, survives a reboot and a reflash; it also drops every existing bond, so paired devices pair again). Only then ble on -- these builds refuse it while the PIN is still the placeholder. ble shows whether the PIN is own or build default, never the PIN itself. Releases up to tth-654d53f3 do not have ble pin: keep BLE off there and use USB.
Every release is an automatic build on upstream dev (see the warning above), not a stable version. Flash it only on nodes you can reach, and each new release on one of them first.
Files are in Releases. A release is named after the upstream version and the date, e.g. v1.18.0+tth.20261112 (a second one that day .2), and its notes list the changes since the previous release. One set per board and role (<board>_<role>-<release>, e.g. Xiao_nrf52_repeater-v1.18.0+tth.20261112.zip): .zip and .uf2 for nRF52 boards, .bin for ESP32 (-merged.bin is the full image for a blank board, the plain .bin an update). SHA256SUMS lists the checksums. Releases up to 12. 11. 2026 were named tth-<sha>.
nRF52 (XIAO, RAK4631, SenseCAP Solar, T1000-E, T114) with the MeshCore web flasher -- Chrome, Edge or Chromium on a computer (Web Serial; not Firefox or Safari):
.zip for your board.ver shows v1.xx.x-tth<sha>, the same as the \"Verze v uzlu\" (node version) line in the release notes.Do not click Erase Flash unless you want a new node: it wipes the identity (the node's key and everything that knows it) together with all settings. A plain flash keeps them.
Tried on a XIAO (repeater-observer, 3. 11. 2026). ESP32 .bin through the same Custom Firmware button is untested here.
Without the web flasher: on most boards a double-tap of reset opens the bootloader as a USB drive; copy the .uf2 onto it. Or adafruit-nrfutil dfu serial -pkg <file>.zip -p <port> -b 115200 with the board in the bootloader.
After flashing a new node, set it up in the console: set name <name>, password <admin password> (at most 15 characters), your own region with region put cz-<kraj> cz + region save. A repeater forwards from its first boot (upstream default) and these builds are on the live CZ frequency: on a desk without its antenna, set repeat off until it is in place.
*-ota)","text":"Every nRF52 build with a text console (repeater, observer, room server, sensor) is in the release once more as an experimental *-ota / *-observer-ota image. It takes a new firmware from its admin with the fw \u2026 commands: on the USB or BLE console, or over the mesh as remote admin CLI. No bootloader change, no second bank: the node stores the package in free flash, checks all of it (signature, hashes, the delta applied dry) and rewrites itself only on fw apply, from a routine running in RAM. A power cut during the rewrite leaves it in the bootloader, back via USB/BLE DFU.
*-ota image comes with a full package <board>_<role>-ota-<release>.mcfw (USB/BLE only) and a delta \u2026.from-<earlier release>.mcfw from every kept earlier release, typically a few kB.fw apply downgrade). fw apply wants the battery at 3.8 V or more unless the node runs on USB.SHA256SUMS are signed by meshcore-ota@tth-pub, and an *-ota image accepts no other signature. Checking the downloads: ssh-keygen -Y verify -f tools/ota_allowed_signers -I meshcore-ota@tth-pub -n meshcore-ota -s SHA256SUMS.sig < SHA256SUMS. Your own build with your own key: [ota] pubkey in platformio.local.ini.*-ota image is flashed the usual way (above), later ones go as deltas. Tools: tools/ota_push.py (USB), tools/ota_mesh_push.py (over the mesh through a companion; needs the meshcore Python library, takes the admin password from [secrets] admin_pw in platformio.local.ini; --side carries the transfer on a side channel, off the shared mesh), tools/ota_pack.py info. The transfer itself is the OTA engine of the tth.meshcore Ansible collection (module meshcore_fw_ota), one code for the tools and Ansible. From a phone: the meshcore-open fork, repeater management \u2192 Firmware update (OTA), which finds the delta in the release by itself. How it works and bench numbers: docs/ota.md.set radio.silence on for nodes you push to. Costs ~10 kB of RAM.v1.18.0-tth<sha>, + = dirty tree), base version from the upstream tag (tools/build_version.py).tools/: host tools for the nodes -- consoles (USB, BLE), flashing, bench tests, diagnostics (tools/README.md). Board names come from a local config outside the repo (tools/config.example.ini).hardware/cavity-box: parametric enclosure for a cavity filter on a mast.N\u00ed\u017ee je README upstreamov\u00e9ho MeshCore. Jeho flasher, klienti a n\u00e1vody se t\u00fdkaj\u00ed ofici\u00e1ln\u00edho firmwaru, ne releas\u016f tohoto forku. / Below is upstream MeshCore's README: its flasher, clients and guides refer to the official firmware, not to this fork's releases.
"},{"location":"faq/","title":"Frequently Asked Questions","text":"A list of frequently-asked questions and answers for MeshCore
path.hash.mode do on a repeater?A: MeshCore is a multi-platform system for enabling secure text-based communications utilizing LoRa radio hardware. It can be used for Off-Grid Communication, Emergency Response & Disaster Recovery, Outdoor Activities, Tactical Security including law enforcement and private security and also IoT sensor networks. (source)
MeshCore is free and open source:
Some more advanced, but optional features are available on T-Deck if you register your device for a key to unlock. On the MeshCore smartphone clients for Android and iOS/iPadOS, you can unlock the wait timer for repeater and room server remote management over RF feature.
These features are completely optional and aren't needed for the core messaging experience. They're like super bonus features and to help the developers continue to work on these amazing features, they may charge a small fee for an unlock code to utilize the advanced features.
Anyone is able to build anything they like on top of MeshCore without paying anything.
"},{"location":"faq/#12-q-what-do-you-need-to-start-using-meshcore","title":"1.2. Q: What do you need to start using MeshCore?","text":"A: Everything you need for MeshCore is available at:
You need LoRa hardware devices to run MeshCore firmware as clients or server (repeater and room server).
"},{"location":"faq/#121-hardware","title":"1.2.1. Hardware","text":"MeshCore is available on a variety of 433MHz, 868MHz and 915MHz LoRa devices. For example, Lilygo T-Deck, T-Pager, RAK Wireless WisBlock RAK4631 devices (e.g. 19003, 19007, 19026), Heltec V3, Xiao S3 WIO, Xiao C3, Heltec T114, Station G2, Nano G2 Ultra, Seeed Studio T1000-E. More devices are being added regularly.
For an up-to-date list of supported devices, please go to https://flasher.meshcore.io
To use MeshCore without using a phone as the client interface, you can run MeshCore on a LilyGo T-Deck, T-Deck Plus, T-Pager, T-Watch, or T-Display Pro. MeshCore Ultra firmware running on these devices is a complete off-grid secure communication solution.
"},{"location":"faq/#122-firmware","title":"1.2.2. Firmware","text":"MeshCore has four firmware types that are not available on other LoRa systems. MeshCore has the following:
"},{"location":"faq/#123-companion-radio-firmware","title":"1.2.3. Companion Radio Firmware","text":"Companion radios are for connecting to the Android app or web app as a messenger client. There are two different companion radio firmware versions:
BLE Companion BLE Companion firmware runs on a supported LoRa device and connects to a smart device running the Android or iOS MeshCore client over BLE https://meshcore.io
USB Serial Companion USB Serial Companion firmware runs on a supported LoRa device and connects to a smart device or a computer over USB Serial running the MeshCore web client https://app.meshcore.nz
Repeaters are used to extend the range of a MeshCore network. Repeater firmware runs on the same devices that run client firmware. A repeater's job is to forward MeshCore packets to the destination device. It does not forward or retransmit every packet it receives, unlike other LoRa mesh systems.
A repeater can be remotely administered using a T-Deck running the MeshCore firmware with remote administration features unlocked, or from a BLE Companion client connected to a smartphone running the MeshCore app.
"},{"location":"faq/#125-room-server","title":"1.2.5. Room Server","text":"A room server is a simple BBS server for sharing posts. T-Deck devices running MeshCore firmware or a BLE Companion client connected to a smartphone running the MeshCore app can connect to a room server.
Room servers store message history on them and push the stored messages to users. Room servers allow roaming users to come back later and retrieve message history. With channels, messages are either received when it's sent, or not received and missed if the channel user is out of range. Room servers are different and more like email servers where you can come back later and get your emails from your mail server.
A room server can be remotely administered using a T-Deck running the MeshCore firmware with remote administration features unlocked, or from a BLE Companion client connected to a smartphone running the MeshCore app.
When a client logs into a room server, the client will receive the previously 32 unseen messages.
Although room server can also repeat with the command line command set repeat on, it is not recommended nor encouraged. A room server with repeat set to on lacks the full set of repeater and remote administration features that are only available in the repeater firmware.
The recommendation is to run repeater and room server on separate devices for the best experience.
"},{"location":"faq/#2-initial-setup","title":"2. Initial Setup","text":""},{"location":"faq/#21-q-how-many-devices-do-i-need-to-start-using-meshcore","title":"2.1. Q: How many devices do I need to start using MeshCore?","text":"A: If you have one supported device, flash the BLE Companion firmware and use your device as a client. You can connect to the device using the Android or iOS client via Bluetooth. You can start communicating with other MeshCore users near you.
If you have two supported devices, and there are not many MeshCore users near you, flash both to BLE Companion firmware so you can use your devices to communicate with your nearby friends and family.
If you have two supported devices, and there are other MeshCore users nearby, you can flash one of your devices with BLE Companion firmware and flash another supported device to repeater firmware. Place the repeater high above ground to extend your MeshCore network's reach.
After you flashed the latest firmware onto your repeater device, keep the device connected to your computer via USB serial, use the console feature on the web flasher and set the frequency for your region or country, so your client can remote administer the repeater or room server over RF:
set freq {frequency}
The repeater and room server CLI reference is here: https://docs.meshcore.io/cli_commands
If you have more supported devices, you can use your additional devices with the room server firmware.
"},{"location":"faq/#22-q-does-meshcore-cost-any-money","title":"2.2. Q: Does MeshCore cost any money?","text":"A: All radio firmware versions (e.g. for Heltec V3, RAK, T-1000E, etc.) are free and open source developed by Scott at Ripple Radios.
The native Android and iOS client uses the freemium model and is developed by Liam Cottle, developer of meshtastic map at meshtastic.liamcottle.net on GitHub and reticulum-meshchat on GitHub.
The T-Deck firmware is free to download and most features are available without cost. To support the firmware developer, you can pay for a registration key to unlock your T-Deck for deeper map zoom and remote server administration over RF using the T-Deck. You do not need to pay for the registration to use your T-Deck for direct messaging and connecting to repeaters and room servers.
"},{"location":"faq/#23-q-what-frequencies-are-supported-by-meshcore","title":"2.3. Q: What frequencies are supported by MeshCore?","text":"A: It supports the 868MHz range in the UK/EU and the 915MHz range in New Zealand, Australia, and the USA. Countries and regions in these two frequency ranges are also supported.
Use the smartphone client or the repeater setup feature on the web flasher to set your radios' RF settings by choosing the preset for your regions.
Recently, as of October 2025, many regions have moved to the \"narrow\" setting, aka using BW62.5 and a lower SF number (instead of the original SF11). For example, USA/Canada (Recommended) preset is 910.525MHz, SF7, BW62.5, CR5.
After extensive testing, many regions have switched or about to switch over to BW62.5 and SF7, 8, or 9. Narrower bandwidth setting and lower SF setting allow MeshCore's radio signals to fit between interference in the ISM band, provide for a lower noise floor, better SNR, and faster transmissions.
If you have consensus from your community in your region to update your region's preset recommendation, please post your update request on the #meshcore-app channel on the MeshCore Discord server to let Liam Cottle know.
"},{"location":"faq/#24-q-what-is-an-advert-in-meshcore","title":"2.4. Q: What is an \"advert\" in MeshCore?","text":"A: Advert means to advertise yourself on the network. In Reticulum terms it would be to announce. In Meshtastic terms it would be the node sending its node info.
MeshCore allows you to manually broadcast your name, position and public encryption key, which is also signed to prevent spoofing. When you click the advert button, it broadcasts that data over LoRa. MeshCore calls that an Advert. There's two ways to advert, \"zero hop\" and \"flood\".
MeshCore clients only advertise themselves when the user initiates it. A repeater sends a flood advert once every 12 hours by default. This interval can be configured using the following command:
set flood.advert.interval {hours}
The separate set advert.interval {minutes} command controls the local zero-hop advert timer.
A: Internally the firmware has maximum limit of 64 hops. In real world settings it will be difficult to get close to the limit due to the environments and timing as packets travel further and further. We want to hear how far your MeshCore conversations go.
"},{"location":"faq/#3-server-administration","title":"3. Server Administration","text":""},{"location":"faq/#31-q-how-do-you-configure-a-repeater-or-a-room-server","title":"3.1. Q: How do you configure a repeater or a room server?","text":"A: When MeshCore is flashed onto a LoRa device for the first time, it is necessary to set the server device's frequency to make it utilize the frequency that is legal in your country or region.
Repeater or room server can be administered with one of the options below:
Connect the server device using a USB cable to a computer running Chrome on https://flasher.meshcore.io, then use the console feature to connect to the device
Use a MeshCore smartphone client to remotely administer servers via LoRa.
A T-Deck running unlocked/registered MeshCore firmware. Remote server administration is enabled through registering your T-Deck with Ripple Radios. It is one of the ways to support MeshCore development. You can register your T-Deck at:
https://buymeacoffee.com/ripplebiz/e/249834
"},{"location":"faq/#32-q-do-i-need-to-set-the-location-for-a-repeater","title":"3.2. Q: Do I need to set the location for a repeater?","text":"A: While not required, with location set for a repeater it will show up on the MeshCore map in the future. Set location with the following command:
set lat <GPS Lat>
set lon <GPS Lon>
You can get the latitude and longitude from Google Maps by right-clicking the location you are at on the map.
"},{"location":"faq/#33-q-what-is-the-password-to-administer-a-repeater-or-a-room-server","title":"3.3. Q: What is the password to administer a repeater or a room server?","text":"A: The default admin password to a repeater and room server is password. Use the following command to change the admin password:
password {new-password}
A: The default guest password to a room server is hello. Use the following command to change the guest password:
set guest.password {guest-password}
A: You can issue these commands to get or set a repeater's private key using a USB serial connection.
get prv.key to print a repeater's private key on the serial console set prv.key <hex> to set a repeater's private key on the serial console
Reboot the repeater after set prv.key <hex> command for the new private key to take effect.
A: You can generate a new private key and specify the first byte of its public key here: https://gessaman.com/mc-keygen
Having multiple repeaters with the same first byte ID does not negatively affect the mesh or its functionality. Flood and pathed packets will still reach their destinations. First byte ID collision makes traceroute and path analysis harder because these tools don't know exactly which of the two (or more) colliding repeaters is the one in the path.
Best practice is when you set up a new repeater, choose a public key that is not in use. If it is not possible to find a unique first byte for your repeater's public key, choose one that is unique within about 10 miles (16 km) to minimize collision with nearby repeaters.
"},{"location":"faq/#37-q-my-repeater-may-be-suffering-from-deafness-due-to-high-power-interference-near-my-meshs-frequency-it-is-not-hearing-other-in-range-meshcore-radios-what-can-i-do","title":"3.7. Q: My repeater may be suffering from deafness due to high power interference near my mesh's frequency, it is not hearing other in-range MeshCore radios. What can I do?","text":"A: This may be due to the SX1262 radio's auto gain control feature. You can use this command to periodically reset its AGC.
set agc.reset.interval <number>
The <number> unit is in seconds and is incremented by 4. set agc.reset.interval 4 works well to cure deafness.
This is a very low-cost operation. AGC reset is done by simply setting state = STATE_IDLE; in function RadioLibWrapper::resetAGC() in RadioLibWrappers.cpp
A: The observer instruction is available here: https://analyzer.letsmesh.net/observer/onboard
"},{"location":"faq/#39-q-what-is-multibyte-support-what-do-1-byte-2-byte-3-byte-adverts-and-messages-mean","title":"3.9. Q: What is multibyte support? What do 1-byte, 2-byte, 3-byte adverts and messages mean?","text":"A: The original MeshCore protocol design uses the first byte of a repeater's public key to denote the repeater in a path. And with 1 byte for each repeater in the path, MeshCore packets can travel as many as 64 hops.
However, with 1 byte, there are only 254 unique IDs (exclude 00 and FF which are reserved). Many meshes group have multiple repeaters with the same first byte in their public keys. Packets continue to pass through repeaters and the mesh is not harmed in any way. It does make it harder for tools to analyze paths with duplicated repeater IDs.
Firmware version 1.14 and newer introduces the ability for repeaters to advert with 1-, 2-, or 3-byte adverts. Companions can also send out channel and direct messages with 1-, 2-, or 3-byte path. Adverts and messages sent in 1-byte path is compatible with repeater firmware older or newer than 1.14. They will travel up to 64 hops. 2-byte adverts and messages will travel up to 32 hops. 3-byte adverts and messages will travel up to 21 hops.
"},{"location":"faq/#391-q-what-path-hash-sizes-will-my-repeater-forward","title":"3.9.1. Q: What path hash sizes will my repeater forward?","text":"Repeaters running firmware 1.14+ repeat packets sent with 1-, 2-, or 3-byte path hash. Repeaters on firmware older than 1.14 only repeat 1-byte path hash packets and silently drop 2- and 3-byte packets.
"},{"location":"faq/#392-q-what-determines-a-packets-path-hash-size","title":"3.9.2. Q: What determines a packet's path hash size?","text":"The original packet sender determines the path hash size. The most common original sender is a companion app. The other common original sender is a repeater, when it broadcasts its advert.
"},{"location":"faq/#393-q-how-do-i-change-my-companions-path-hash-size","title":"3.9.3. Q: How do I change my companion's path hash size?","text":"As of firmware version 1.14 and MeshCore app version 1.41.0, in the MeshCore app, you can set your companion's message path hash size in Settings (gear icon), Experimental Settings.
Until your regional mesh has the vast majority of the repeaters updated to 1.14+ firmware, it is recommended to keep your companion at the default 1-byte because pre-1.14 repeaters will silently drop messages with larger path hashes.
"},{"location":"faq/#394-q-what-does-the-cli-command-pathhashmode-do-on-a-repeater","title":"3.9.4. Q: What does the CLI commandpath.hash.mode do on a repeater?","text":"This CLI command path.hash.mode only controls the path hash size used in a repeater's own advert broadcasts. It does NOT affect which packets the repeater forwards. A repeater with firmware 1.14+ always forward 1-, 2-, and 3-byte packets regardless of this setting.
Usage: set path.hash.mode {0|1|2}:
\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 path.hash.mode \u2502 Advert path hash size \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 0 \u2502 1 byte (default) \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 1 \u2502 2 bytes \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 2 \u2502 3 bytes \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \n It is safe to set your 1.14+ repeaters to mode 1 or 2.
"},{"location":"faq/#395-q-why-use-2-or-3-byte-path-hash-for-adverts","title":"3.9.5. Q: Why use 2- or 3-byte path hash for adverts?","text":"A longer path hash helps tools like the LetsMesh.net Analyzer and MeshMapper disambiguate repeaters more reliably. With only 1 byte, the chance of different repeaters having the same first byte in their public key is high, making it harder to tell them apart in mesh network analysis. Since this only affects adverts, there's no downside. 2- and 3-byte adverts don't travel as far as 1-byte adverts, but it is not important for MeshCore nodes to hear a repeater's advert that is 21 or 32 hops away.
"},{"location":"faq/#396-q-when-can-we-move-away-from-1-byte-path-hash-for-channel-and-direct-messages","title":"3.9.6. Q: When can we move away from 1-byte path hash for channel and direct messages?","text":"You should move to send 2-byte or 3-byte channel and direct messages when the vast majority of the repeaters in your regional mesh are updated to firmware version 1.14 or newer. Setting your repeater's path.hash.mode to 1 (for 2-byte path hash) or 2 (for 3-byte path hash) now helps the community gauge to how many repeaters have updated to 1.14+. Please work with your MeshCore community together to decide when to switch to 2-byte path or 3-byte path for channel and direct messages.
A: Yes, it is available on https://buymeacoffee.com/ripplebiz/ultra-v7-7-guide-meshcore-users
"},{"location":"faq/#42-q-what-are-the-steps-to-get-a-t-deck-into-dfu-device-firmware-update-mode","title":"4.2. Q: What are the steps to get a T-Deck into DFU (Device Firmware Update) mode?","text":"A:
A: For T-Deck Plus, the GPS baud rate should be set to 38400. Also, some T-Deck Plus devices were found to have the GPS module installed upside down, with the GPS antenna facing down instead of up. If your T-Deck Plus still doesn't get any satellite lock after setting the baud rate to 38400, you might need to open the device to check the GPS orientation.
GPS on T-Deck is always enabled. You can skip the \"GPS clock sync\" and the T-Deck will continue to try to get a GPS lock. You can go to the GPS Info screen; you should see the Sentences: counter increasing if the baud rate is correct.
Source
"},{"location":"faq/#44-q-why-is-my-og-non-plus-t-deck-not-getting-any-satellite-lock","title":"4.4. Q: Why is my OG (non-Plus) T-Deck not getting any satellite lock?","text":"A: The OG (non-Plus) T-Deck doesn't come with a GPS. If you added a GPS to your OG T-Deck, please refer to the manual of your GPS to see what baud rate it requires. Alternatively, you can try to set the baud rate from 9600, 19200, etc., and up to 115200 to see which one works.
"},{"location":"faq/#45-q-what-size-of-sd-card-does-the-t-deck-support","title":"4.5. Q: What size of SD card does the T-Deck support?","text":"A: Users have had no issues using 16GB or 32GB SD cards. Format the SD card to FAT32.
"},{"location":"faq/#46-q-what-is-the-public-key-for-the-default-public-channel","title":"4.6. Q: What is the public key for the default public channel?","text":"A: T-Deck uses the same key the smartphone apps use but in base64 izOH6cXN6mrJ5e26oRXNcg==
There is no = key on the T-Deck's hardware keyboard. You can use the on-screen software keyboard to enter =. Tap the text box to enable the on-screen software keyboard. The third character is the capital letter O (Oh), not zero 0
The smartphone app key is in hex: 8b3387e9c5cdea6ac9e5edbaa115cd72
Source
"},{"location":"faq/#47-q-how-do-i-get-maps-on-t-deck","title":"4.7. Q: How do I get maps on T-Deck?","text":"A: You need map tiles. You can get pre-downloaded map tiles here (a good way to support development):
Another way to download map tiles is to use this Python script to get the tiles in the areas you want: https://github.com/fistulareffigy/MTD-Script
There is also a modified script that adds additional error handling and parallel downloads: https://github.com/TheBestJohn/MTD-Script
"},{"location":"faq/#48-q-where-do-the-map-tiles-go","title":"4.8. Q: Where do the map tiles go?","text":"Once you have the tiles downloaded, copy the \\tiles folder to the root of your T-Deck's SD card.
A: You can download, install, and use the T-Deck firmware for free, but it has some features (map zoom, server administration) that are enabled if you purchase an unlock code for \\$10 per T-Deck device. Unlock page: https://buymeacoffee.com/ripplebiz/e/249834
"},{"location":"faq/#410-q-how-to-decipher-the-diagnostics-screen-on-t-deck","title":"4.10. Q: How to decipher the diagnostics screen on T-Deck?","text":"A: Space is tight on T-Deck's screen, so the information is a bit cryptic. The format is : {hops} l:{packet-length}({payload-len}) t:{packet-type} snr:{n} rssi:{n}
See here for packet-type: https://github.com/meshcore-dev/MeshCore/blob/main/src/Packet.h#L19
#define PAYLOAD_TYPE_REQ 0x00 // request (prefixed with dest/src hashes, MAC) (enc data: timestamp, blob)\n#define PAYLOAD_TYPE_RESPONSE 0x01 // response to REQ or ANON_REQ (prefixed with dest/src hashes, MAC) (enc data: timestamp, blob)\n#define PAYLOAD_TYPE_TXT_MSG 0x02 // a plain text message (prefixed with dest/src hashes, MAC) (enc data: timestamp, text)\n#define PAYLOAD_TYPE_ACK 0x03 // a simple ack #define PAYLOAD_TYPE_ADVERT 0x04 // a node advertising its Identity\n#define PAYLOAD_TYPE_GRP_TXT 0x05 // an (unverified) group text message (prefixed with channel hash, MAC) (enc data: timestamp, \"name: msg\")\n#define PAYLOAD_TYPE_GRP_DATA 0x06 // an (unverified) group datagram (prefixed with channel hash, MAC) (enc data: data_type, data_len, blob)\n#define PAYLOAD_TYPE_ANON_REQ 0x07 // generic request (prefixed with dest_hash, ephemeral pub_key, MAC) (enc data: ...)\n#define PAYLOAD_TYPE_PATH 0x08 // returned path (prefixed with dest/src hashes, MAC) (enc data: path, extra)\n Source
"},{"location":"faq/#411-q-the-t-deck-sound-is-too-loud","title":"4.11. Q: The T-Deck sound is too loud?","text":""},{"location":"faq/#412-q-can-you-customize-the-sound","title":"4.12. Q: Can you customize the sound?","text":"A: You can customize the sounds on the T-Deck, by placing .mp3 files onto the root dir of the SD card. The files are:
startup.mp3error.mp3alert.mp3new-advert.mp3existing-advert.mp3A: 'Import from Clipboard' is for importing a contact via a file named 'clipboard.txt' on the SD card. The opposite, is in the Identity screen, the 'Card to Clipboard' menu, which writes to 'clipboard.txt' so you can share yourself (call these 'biz cards', that start with \"meshcore://...\")
"},{"location":"faq/#414-q-how-to-capture-a-screenshot-on-t-deck","title":"4.14. Q: How to capture a screenshot on T-Deck?","text":"A: To capture a screenshot on a T-Deck, long press the top-left corner of the screen. The screenshot is saved to the microSD card, if one is inserted into the device.
"},{"location":"faq/#5-general","title":"5. General","text":""},{"location":"faq/#51-q-what-are-bw-sf-and-cr","title":"5.1. Q: What are BW, SF, and CR?","text":"A:
BW is bandwidth - width of frequency spectrum that is used for transmission
SF is spreading factor - how much should the communication spread in time
CR is coding rate - from: https://www.thethingsnetwork.org/docs/lorawan/fec-and-code-rate
TL;DR: default CR to 5 for good stable links. If it is not a solid link and is intermittent, change CR to 7 or 8.
Forward Error Correction is a process of adding redundant bits to the data to be transmitted. During the transmission, data may get corrupted by interference (changes from 0 to 1 / 1 to 0). These error correction bits are used at the receivers for restoring corrupted bits.
The Code Rate of a forward error correction expresses the proportion of bits in a data stream that actually carry useful information.
There are 4 code rates used in LoRaWAN:
4/5 4/6 5/7 4/8
For example, if the code rate is 5/7, for every 5 bits of useful information, the coder generates a total of 7 bits of data, of which 2 bits are redundant.
Making the bandwidth 2x wider (from BW125 to BW250) allows you to send 2x more bytes in the same time. Making the spreading factor 1 step lower (from SF10 to SF9) allows you to send 2x more bytes in the same time.
Lowering the spreading factor makes it more difficult for the gateway to receive a transmission, as it will be more sensitive to noise. You could compare this to two people talking in a noisy place (a bar for example). If you\u2019re far from each other, you have to talk slow (SF10), but if you\u2019re close, you can talk faster (SF7)
So, it's a balancing act between speed of the transmission and resistance to noise. The Things Network is mainly focused on LoRaWAN, but the LoRa low-level stuff still checks out for any LoRa project
"},{"location":"faq/#52-q-do-meshcore-clients-repeat","title":"5.2. Q: Do MeshCore clients repeat?","text":"A: No, MeshCore clients do not repeat. This is the core of MeshCore's messaging-first design. This is to avoid devices flooding the airwaves and create endless collisions, so messages sent aren't received. In MeshCore, only repeaters and room servers with set repeat on repeat.
A: If you used to reach a node through a repeater and the repeater is no longer reachable, the client will send the message using the existing (but now broken) known path, the message will fail after 3 retries, and the app will reset the path and send the message as flood on the last retry by default. This can be turned off in settings. If the destination is reachable directly or through another repeater, the new path will be used going forward. Or you can set the path manually if you know a specific repeater to use to reach that destination.
In the case if users are moving around frequently, and the paths are breaking, they just see the phone client retries and revert to flood to attempt to re-establish a path.
"},{"location":"faq/#54-q-how-does-a-node-discover-a-path-to-its-destination-and-then-use-it-to-send-messages-in-the-future-instead-of-flooding-every-message-it-sends-like-meshtastic","title":"5.4. Q: How does a node discover a path to its destination and then use it to send messages in the future, instead of flooding every message it sends like Meshtastic?","text":"Routes are stored in sender's contact list. When you send a message the first time, the message first gets to your destination by flood routing. When your destination node gets the message, it will send back a delivery report to the sender with all repeaters that the original message went through. This delivery report is flood-routed back to you the sender and is a basis for future direct path. When you send the next message, the path will get embedded into the packet and be evaluated by repeaters. If the hop and address of the repeater matches, it will retransmit the message, otherwise it will not retransmit, hence minimizing utilization.
Source
"},{"location":"faq/#55-q-do-public-channels-always-flood-do-private-channels-always-flood","title":"5.5. Q: Do public channels always flood? Do private channels always flood?","text":"A: Yes, group channels are A to B, so there is no defined path. They have to flood. Repeaters can however deny flood traffic up to some hop limit, with the set flood.max CLI command. Administrators of repeaters get to set the rules of their repeaters.
Source
"},{"location":"faq/#56-q-what-is-the-public-key-for-the-default-public-channel","title":"5.6. Q: What is the public key for the default public channel?","text":"A: The smartphone app key is in hex:
8b3387e9c5cdea6ac9e5edbaa115cd72
T-Deck uses the same key but in base64:
izOH6cXN6mrJ5e26oRXNcg==
The third character is the capital letter O, not zero 0.
Source
"},{"location":"faq/#57-q-is-meshcore-open-source","title":"5.7. Q: Is MeshCore open source?","text":"A: Most of the firmware is freely available. Everything is open source except the T-Deck firmware and Liam's native mobile apps.
Firmware repo: https://github.com/meshcore-dev/MeshCore
"},{"location":"faq/#58-q-how-can-i-support-meshcore","title":"5.8. Q: How can I support MeshCore?","text":"A: Provide your honest feedback on GitHub and on MeshCore Discord server. Spread the word of MeshCore to your friends and communities; help them get started with MeshCore. Support Scott's MeshCore development at https://buymeacoffee.com/ripplebiz.
Support Liam Cottle's smartphone client development by unlocking the server administration wait gate with in-app purchase
Support Rastislav Vysoky (recrof)'s flasher website and the map website development through PayPal or Revolut
"},{"location":"faq/#59-q-how-do-i-build-meshcore-firmware-from-source","title":"5.9. Q: How do I build MeshCore firmware from source?","text":"A: See instructions here: https://discord.com/channels/826570251612323860/1330643963501351004/1341826372120608769
Build instructions for MeshCore:
For Windows, first install WSL and Python+pip via: https://plainenglish.io/blog/setting-up-python-on-windows-subsystem-for-linux-wsl-26510f1b2d80
(Linux, Windows+WSL) In the terminal/shell:
sudo apt update\nsudo apt install libpython3-dev\nsudo apt install python3-venv\n Mac: python3 should be already installed. Then it should be the same for all platforms:
python3 -m venv meshcore-venv\ncd meshcore-venv && source bin/activate\npip install -U platformio\ngit clone https://github.com/meshcore-dev/meshcore.git\ncd meshcore\n open platformio.ini and in [arduino_base] edit LORA_FREQ (it defaults to 869.618) to the frequency for your region, save, then run: pio run -e RAK_4631_repeater\n then you'll find firmware.zip in .pio/build/RAK_4631_repeater"},{"location":"faq/#510-q-are-there-other-meshcore-related-open-source-projects","title":"5.10. Q: Are there other MeshCore related open source projects?","text":"A: Liam Cottle's MeshCore web client and MeshCore JavaScript library are open source under MIT license.
Web client: https://github.com/liamcottle/meshcore-web Javascript: https://github.com/liamcottle/meshcore.js
"},{"location":"faq/#511-q-does-meshcore-support-atak","title":"5.11. Q: Does MeshCore support ATAK?","text":"A: ATAK is not currently on MeshCore's roadmap.
MeshCore would not be best suited to ATAK because MeshCore:
MeshCore clients would need to reset path constantly and flood traffic across the network which could lead to lots of collisions with something as chatty as ATAK.
This could change in the future if MeshCore develops a client firmware that repeats.
Source
"},{"location":"faq/#512-q-how-do-i-add-a-node-to-the-meshcore-map","title":"5.12. Q: How do I add a node to the MeshCore Map?","text":"A:
To add a BLE Companion radio, connect to the BLE Companion radio from the MeshCore smartphone app. In the app, tap the 3 dot menu icon at the top right corner, then tap Internet Map. Tap the 3 dot menu icon again and choose Add me to the Map
To add a Repeater or Room Server to the map, go to the Contact List, tap the 3 dot next to the Repeater or Room Server you want to add to the Internet Map, tap Share, then tap Upload to Internet Map.
You can use the same companion (same public key) that you used to add your repeaters or room servers to remove them from the Internet Map.
"},{"location":"faq/#513-q-can-i-use-a-raspberry-pi-to-update-a-meshcore-radio","title":"5.13. Q: Can I use a Raspberry Pi to update a MeshCore radio?","text":"A: Yes. Below are the instructions to flash firmware onto a supported LoRa device using a Raspberry Pi over USB serial.
Instructions for nRF devices like RAK, T1000-E, T114 are immediately after the ESP instructions
For ESP-based devices (e.g. Heltec V3) you need:
Heltec_v3_companion_radio_ble-v1.7.1-165fb33.binHeltec_v3_companion_radio_usb-v1.7.1-165fb33-merged.binhttps://flasher.meshcore.io/releases/download/companion-v1.7.1/Heltec_v3_companion_radio_ble-v1.7.1-165fb33.binwget https://flasher.meshcore.io/releases/download/companion-v1.7.1/Heltec_v3_companion_radio_ble-v1.7.1-165fb33.bin to download the firmware file for your device type or the version you need: USB, BLE, Repeater, Room Server, merged bin or non-merged bin.wget --user-agent=\"Mozilla/5.0\" --content-disposition \"https://flasher.meshcore.io/releases/download/companion-v1.7.1/Heltec_v3_companion_radio_usb-v1.7.1-165fb33.bin\"ttyXXXX device path on your Raspberry Pi./dev directory and run the ls command to find your device path./dev/ttyUSB0 for ESP devices.pip install esptool --break-system-packagesesptool.py -p /dev/ttyUSB0 --chip esp32-s3 write_flash 0x10000 <non-merged_firmware>.binesptool.py -p /dev/ttyUSB0 --chip esp32-s3 write_flash 0x00000 <merged_firmware>.binInstructions for nRF devices:
For nRF devices (e.g. RAK, Heltec T114) you need the following:
RAK_4631_companion_radio_ble-v1.7.1-165fb33.ziphttps://flasher.meshcore.io/releases/download/companion-v1.7.1/RAK_4631_companion_radio_ble-v1.7.1-165fb33.zipwget https://flasher.meshcore.io/releases/download/companion-v1.7.1/RAK_4631_companion_radio_ble-v1.7.1-165fb33.zip to download the firmware file for your device type or the version you need: USB, BLE, Repeater, Room Server, ZIP file only.ttyXXXX device path on your Raspberry Pi./dev directory and run the ls command to find your device path./dev/ttyACM0 for nRF devices.pip install adafruit-nrfutil --break-system-packagesadafruit-nrfutil --verbose dfu serial --package RAK_4631_companion_radio_usb-v1.7.1-165fb33.zip -p /dev/ttyACM0 -b 115200 --singlebank --touch 1200To manage a repeater or room server connected to a Pi over USB serial using shell commands, you need to install picocom. To install picocom, run the following command:
sudo apt install picocomTo start managing your USB serial-connected device using picocom, use the following command:
picocom -b 115200 /dev/ttyUSB0 --imap lfcrlfFrom here, reference repeater and room server command line commands in the MeshCore docs here:
A: Yes, there are many. MeshCore's protocol is open source using the MIT license. The MIT license and the open source protocol makes it very easy for the MeshCore community to build new firmware for radios, applications on mobile devices, map tools, and analysis tools, and integration with other projects like Home Assistant.
As new MeshCore community projects become available on a weekly basis, we have stopped tracking them here in this FAQ. samuk maintains a very exhaustive list of MeshCore community project at https://github.com/samuk/awesome-meshcore/blob/main/README.md. samuk accepts PRs and merges them regularly.
"},{"location":"faq/#515-q-are-there-client-applications-for-windows-or-mac","title":"5.15. Q: Are there client applications for Windows or Mac?","text":"A: Yes, the same iOS and Android client is also available for Windows and Mac. You can find them together with the Android APK here: https://files.liamcottle.net/MeshCore
Both the Windows and Mac versions of the client app are fully unlocked and are free to use.
"},{"location":"faq/#516-q-are-there-any-resources-that-compare-meshcore-to-other-lora-systems","title":"5.16. Q: Are there any resources that compare MeshCore to other LoRa systems?","text":"A: Here is a list of MeshCore comparison resources:
A:
You can get the epoch time on https://www.epochconverter.com and use it to set your T-Deck clock. For a repeater and room server, the admin can use a T-Deck to remotely set their clock (clock sync), or use the time command in the USB serial console with the server device connected.
A: You can't connect to a device running repeater firmware via Bluetooth. You can connect to devices running the BLE companion firmware via Bluetooth using the Android app.
"},{"location":"faq/#64-q-my-companion-isnt-showing-up-over-bluetooth","title":"6.4. Q: My companion isn't showing up over Bluetooth?","text":"A: Make sure that you flashed the Bluetooth companion firmware and not the USB-only companion firmware.
"},{"location":"faq/#65-q-i-cant-connect-via-bluetooth-what-is-the-bluetooth-pairing-code","title":"6.5. Q: I can't connect via Bluetooth, what is the Bluetooth pairing code?","text":"A: The default Bluetooth pairing code is 123456
A: Heltec V3 has a very small coil antenna on its PCB for Wi-Fi and Bluetooth connectivity. It has a very short range, only a few feet. It is possible to remove the coil antenna and replace it with a 31mm wire. The BT range is much improved with the modification.
"},{"location":"faq/#67-q-my-rakt1000-exiao_nrf52-device-seems-to-be-corrupted-how-do-i-wipe-it-clean-to-start-fresh","title":"6.7. Q: My RAK/T1000-E/xiao_nRF52/... device seems to be corrupted, how do I wipe it clean to start fresh?","text":"A: If you're able to connect to the device from your MeshCore app 1. Navigate to Gear icon(Settings) on the upper right corner 2. Click on Export Settings button, choose Select All and Confirm. This will save your Node configuration 3. Now choose Factory Reset option 4. Confirm that you want to reset your device 5. Go to Bluetooth System settings and remove pairing of the device, so you can connect again 6. Connect your device in the app and enter the PIN 7. Navigate to Gear icon(Settings) on the upper right corner 8. Click on Import Settings and choose the file from 2., click on Select All and Confirm 9. Find Reboot button on of the Settings list
B: You're not able to connect to the App 1. Connect USB cable to your device 2. Go to https://flasher.meshcore.io 3. Search for your device in the list 4. Choose Companion Bluetooth 5. Press Enter DFU mode button, choose your USB device 6. Press Erase Flash button, choose the device again and wait until it completes 7. Press Flash! button and choose the USB device last time 8. The device is erased and newest firmware is installed 9. You might need to remove the pairing in Bluetooth System Settings in order to re-pair the app again.
Separately, starting in firmware version 1.7.0, there is a CLI Rescue mode. If your device has a user button (e.g. some RAK, T114), you can activate the rescue mode by holding down the user button of the device within 8 seconds of boot. Then you can use the 'Console' on https://flasher.meshcore.io
"},{"location":"faq/#68-q-webflasher-fails-on-linux-with-failed-to-open","title":"6.8. Q: WebFlasher fails on Linux with failed to open","text":"A: If the usb port doesn't have the right ownership for this task, the process fails with the following error:
NetworkError: Failed to execute 'open' on 'SerialPort': Failed to open serial port.
Allow user access on your USB port:
sudo setfacl -m u:$USER:rw /dev/ttyUSB0
A: The steps below work on both Android and iOS as nRF has made both apps' user interface the same on both platforms:
nrf dfu, the app's full name is nRF Device Firmware Updatestart ota and hit enter.OK to confirm the repeater device is now in OTA modeSettings in the top-right cornerPacket receipt notifications, and change Number of Packets to 10 for RAK, 8 for T114. 8 also works for RAK.OTA on the device againForce Scanning in the DFU appUpload to begin OTA updateA: You can flash this safer bootloader to the Wio Tracker L1 Pro https://github.com/oltaco/Adafruit_nRF52_Bootloader_OTAFIX
After this bootloader is flashed onto the device, you can trigger an over-the-air update using Bluetooth by holding the button next to the D-Pad and then clicking the reset button. Then follow the same OTA update instructions above. You can skip the start ota instruction and start the update using the DFU app.
A: For ESP32-based devices (e.g. Heltec V3):
Heltec_v3_repeater-v1.6.2-4449fd3.bin, no \"merged\" in the file name).start ota and hit enter.OK to confirm the repeater device is now in OTA mode.start ota on an ESP32-based device starts a Wi-Fi hotspot named MeshCore OTA.A: Yes, developer che aporeps has an enhanced OTA DFU bootloader for nRF52 based devices. With this bootloader, if it detects that the application firmware is invalid, it falls back to OTA DFU mode so you can attempt to flash again to recover. This bootloader has other changes to make the OTA DFU process more fault tolerant.
Refer to https://github.com/oltaco/Adafruit_nRF52_Bootloader_OTAFIX for the latest information.
Currently, the following boards are supported:
A: Yes, it is on the MeshCore GitHub repo here: https://github.com/meshcore-dev/MeshCore/tree/main/logo
"},{"location":"faq/#75-q-what-is-the-format-of-a-contact-or-channel-qr-code","title":"7.5. Q: What is the format of a contact or channel QR code?","text":"A:
Channel: meshcore://channel/add?name=<name>&secret=<secret>
Contact: meshcore://contact/add?name=<name>&public_key=<secret>&type=<type>
Where &type is:
chat = 1repeater = 2room = 3sensor = 4A: Wi-Fi firmware requires you to compile it yourself, as you need to set the Wi-Fi SSID and password. Edit WIFI_SSID and WIFI_PWD in ./variants/heltec_v3/platformio.ini and then flash it to your device.
A: For companion radios, you can set these radios' transmit power in the smartphone app. For repeater and room server radios, you can set their transmit power using the command line command set tx. You can get their current value using command line command get tx
\u26a0\ufe0f WARNING: Set these values at your own risk. Incorrect power settings can permanently damage your radio hardware.
Device / Model Region / Description In-App Setting (dBm) Target Radio Output Notes Station G2 Reference US915 Max Output 19 dBm 36.5 dBm (4.46W) US915 Max at 1dB compression point 16 dBm 35 dBm (3.16W) 1dB compression point EU868 Max at 1dB compression point 15 dBm 34.5 dBm (2.82W) 1dB compression point US915 1W Output 10 dBm 1W Refer to your local government's requirements EU868 1W Output 9 dBm 1W Refer to your local government's requirements Ikoka Stick E22-900M30S 1W Model 19 dBm 1W DO NOT EXCEED (Risk of burn out) data sheet Ikoka Stick E22-900M33S 2W Model 9 dBm 2W DO NOT EXCEED (Risk of burn out) data sheet Refer to your local government's requirements Heltec V4 Standard Output 10 dBm 22 dBm (~0.15W) High Output 22 dBm 28 dBm (~0.5W to 0.6W)"},{"location":"faq/#78-q-how-do-i-use-ethernet-with-a-rak4631","title":"7.8. Q: How do I use Ethernet with a RAK4631?","text":"A: MeshCore supports Ethernet on RAK4631 boards using the RAK13800 WisBlock Ethernet module (based on the W5100S chip).
Hardware required: - RAK4631 WisBlock Core - RAK19007 or RAK19018 WisBlock Base Board (with an available IO slot) - RAK13800 WisBlock Ethernet module - Ethernet cable connected to a network with a DHCP server
Firmware: Flash one of the Ethernet-enabled firmware variants: - RAK_4631_repeater_ethernet - Repeater with Ethernet CLI access - RAK_4631_room_server_ethernet - Room server with Ethernet CLI access - RAK_4631_companion_radio_ethernet - Companion radio over Ethernet (replaces BLE)
Connecting: - The device obtains an IP address via DHCP automatically on boot. - For repeaters and room servers, connect to the device on TCP port 23 using any TCP client (e.g. nc <ip> 23 or PuTTY in raw mode). This gives you the same CLI available over serial/USB. - For companion radio firmware, the Ethernet interface replaces BLE as the transport to companion apps. Connect on TCP port 5000 (same as the WiFi companion radio). - Use the eth.status CLI command to check connection status and see the assigned IP address.
Standard KISS TNC firmware for MeshCore LoRa radios. Compatible with any KISS client (Direwolf, APRSdroid, YAAC, etc.) for sending and receiving raw packets. MeshCore-specific extensions (cryptography, radio configuration, telemetry) are available through the standard SetHardware (0x06) command.
"},{"location":"kiss_modem_protocol/#serial-configuration","title":"Serial Configuration","text":"115200 baud, 8N1, no flow control.
"},{"location":"kiss_modem_protocol/#frame-format","title":"Frame Format","text":"Standard KISS framing per the KA9Q/K3MC specification.
Byte Name Description0xC0 FEND Frame delimiter 0xDB FESC Escape character 0xDC TFEND Escaped FEND (FESC + TFEND = 0xC0) 0xDD TFESC Escaped FESC (FESC + TFESC = 0xDB) \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 FEND \u2502 Type Byte \u2502 Data (escaped) \u2502 FEND \u2502\n\u2502 0xC0 \u2502 1 byte \u2502 0-510 bytes \u2502 0xC0 \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n"},{"location":"kiss_modem_protocol/#type-byte","title":"Type Byte","text":"The type byte is split into two nibbles:
Bits Field Description 7-4 Port Port number (0 for single-port TNC) 3-0 Command Command numberMaximum unescaped frame size: 512 bytes.
"},{"location":"kiss_modem_protocol/#standard-kiss-commands","title":"Standard KISS Commands","text":""},{"location":"kiss_modem_protocol/#host-to-tnc","title":"Host to TNC","text":"Command Value Data Description Data0x00 Raw packet Queue packet for transmission (one pending at a time) TXDELAY 0x01 Delay (1 byte) Transmitter keyup delay in 10ms units (default: 50 = 500ms) Persistence 0x02 P (1 byte) CSMA persistence parameter 0-255 (default: 63) SlotTime 0x03 Interval (1 byte) CSMA slot interval in 10ms units (default: 10 = 100ms) TXtail 0x04 Delay (1 byte) Post-TX hold time in 10ms units (default: 0) FullDuplex 0x05 Mode (1 byte) 0 = half duplex, nonzero = full duplex (default: 0) SetHardware 0x06 Sub-command + data MeshCore extensions (see below) Return 0xFF - Exit KISS mode (no-op)"},{"location":"kiss_modem_protocol/#tnc-to-host","title":"TNC to Host","text":"Type Value Data Description Data 0x00 Raw packet Received packet from radio Data frames carry raw packet data only, with no metadata prepended. The Data command payload is limited to 255 bytes to match the MeshCore maximum transmission unit (MAX_TRANS_UNIT); frames larger than 255 bytes are silently dropped. The KISS specification recommends at least 1024 bytes for general-purpose TNCs; this modem is intended for MeshCore packets only, whose protocol MTU is 255 bytes.
Only one packet may be pending for radio transmission at a time. If the host sends a second Data frame before the first has completed, the modem responds with Error (0xF1) and TxBusy (0x07).
"},{"location":"kiss_modem_protocol/#host-output-backpressure","title":"Host Output Backpressure","text":"Outbound frames are encoded into a 2-slot queue and flushed when serial output space is available; loop() never blocks on writes. Radio TX state advances independently of host read speed. TxDone is retained until it can be queued. If the outbound queue is full, the modem responds with Error (0xF1) and TxBusy (0x07). Hosts should read serial promptly to avoid delayed responses.
The TNC implements p-persistent CSMA for half-duplex operation:
In full-duplex mode, CSMA is bypassed and packets transmit after TXDELAY.
"},{"location":"kiss_modem_protocol/#sethardware-extensions-0x06","title":"SetHardware Extensions (0x06)","text":"MeshCore-specific functionality uses the standard KISS SetHardware command. The first byte of SetHardware data is a sub-command. Standard KISS clients ignore these frames.
"},{"location":"kiss_modem_protocol/#frame-format_1","title":"Frame Format","text":"\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 FEND \u2502 0x06 \u2502 Sub-command \u2502 Data (escaped) \u2502 FEND \u2502\n\u2502 0xC0 \u2502 \u2502 1 byte \u2502 variable \u2502 0xC0 \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n"},{"location":"kiss_modem_protocol/#request-sub-commands-host-to-tnc","title":"Request Sub-commands (Host to TNC)","text":"Sub-command Value Data GetIdentity 0x01 - GetRandom 0x02 Length (1 byte, 1-64) VerifySignature 0x03 PubKey (32) + Signature (64) + Data SignData 0x04 Data to sign EncryptData 0x05 Key (32) + Plaintext DecryptData 0x06 Key (32) + MAC (2) + Ciphertext KeyExchange 0x07 Remote PubKey (32) Hash 0x08 Data to hash SetRadio 0x09 Freq (4) + BW (4) + SF (1) + CR (1) SetTxPower 0x0A Power dBm (1) GetRadio 0x0B - GetTxPower 0x0C - GetCurrentRssi 0x0D - IsChannelBusy 0x0E - GetAirtime 0x0F Packet length (1) GetNoiseFloor 0x10 - GetVersion 0x11 - GetStats 0x12 - GetBattery 0x13 - GetMCUTemp 0x14 - GetSensors 0x15 Permissions (1) GetDeviceName 0x16 - Ping 0x17 - Reboot 0x18 - SetSignalReport 0x19 Enable (1): 0x00=disable, nonzero=enable GetSignalReport 0x1A - GetCapabilities 0x1B - SetAgcResetInterval 0x1C Seconds (2): 0=disable, 0-1020 GetAgcResetInterval 0x1D - SetFemState 0x1E Apply mask (1) + Value mask (1) GetFemState 0x1F - SetRxBoostedGain 0x20 Enable (1): 0x00=disable, nonzero=enable GetRxBoostedGain 0x21 -"},{"location":"kiss_modem_protocol/#response-sub-commands-tnc-to-host","title":"Response Sub-commands (TNC to Host)","text":"Response codes use the high-bit convention: response = command | 0x80. Generic and unsolicited responses use the 0xF0+ range. Set commands that report state (SetSignalReport, SetAgcResetInterval, SetFemState, SetRxBoostedGain) reply with the matching Get response, so 0x9C, 0x9E and 0xA0 are never sent.
0x81 PubKey (32) Random 0x82 Random bytes (1-64) Verify 0x83 Result (1): 0x00=invalid, 0x01=valid Signature 0x84 Signature (64) Encrypted 0x85 MAC (2) + Ciphertext Decrypted 0x86 Plaintext SharedSecret 0x87 Shared secret (32) Hash 0x88 SHA-256 hash (32) Radio 0x8B Freq (4) + BW (4) + SF (1) + CR (1) TxPower 0x8C Power dBm (1) CurrentRssi 0x8D RSSI dBm (1, signed) ChannelBusy 0x8E Result (1): 0x00=clear, 0x01=busy Airtime 0x8F Milliseconds (4) NoiseFloor 0x90 dBm (2, signed) Version 0x91 Version (1) + Reserved (1) Stats 0x92 RX (4) + TX (4) + Errors (4) Battery 0x93 Millivolts (2) MCUTemp 0x94 Temperature (2, signed) Sensors 0x95 CayenneLPP payload DeviceName 0x96 Name (variable, UTF-8) Pong 0x97 - SignalReport 0x9A Status (1): 0x00=disabled, 0x01=enabled Capabilities 0x9B Feature bits (4) AgcResetInterval 0x9D Effective seconds (2) FemState 0x9F Capability mask (1) + Value mask (1) RxBoostedGain 0xA1 Status (1): 0x00=disabled, 0x01=enabled OK 0xF0 - Error 0xF1 Error code (1) TxDone 0xF8 Result (1): 0x00=failed, 0x01=success RxMeta 0xF9 SNR (1) + RSSI (1)"},{"location":"kiss_modem_protocol/#error-codes","title":"Error Codes","text":"Code Value Description InvalidLength 0x01 Request data too short InvalidParam 0x02 Invalid parameter value NoCallback 0x03 Feature not available MacFailed 0x04 MAC verification failed UnknownCmd 0x05 Unknown sub-command EncryptFailed 0x06 Encryption failed TxBusy 0x07 Radio TX busy, or host output queue full Unsupported 0x08 Command known, but not supported by this board"},{"location":"kiss_modem_protocol/#unsolicited-events","title":"Unsolicited Events","text":"The TNC sends these SetHardware frames without a preceding request:
TxDone (0xF8): Sent after radio transmission completes. Contains a single byte: 0x01 for success, 0x00 for failure. Delivery to the host may be delayed under serial backpressure but is not dropped.
RxMeta (0xF9): Sent after each standard data frame (type 0x00) with SNR (1 byte, signed, value x4) and RSSI (1 byte, signed, dBm). Queued with the data frame; omitted if the data frame cannot be queued. Enabled by default; toggle with SetSignalReport. Standard KISS clients ignore this frame.
"},{"location":"kiss_modem_protocol/#data-formats","title":"Data Formats","text":""},{"location":"kiss_modem_protocol/#radio-parameters-setradio-radio-response","title":"Radio Parameters (SetRadio / Radio response)","text":"All values little-endian.
Field Size Description Frequency 4 bytes Hz (e.g., 869618000) Bandwidth 4 bytes Hz (e.g., 62500) SF 1 byte Spreading factor (5-12) CR 1 byte Coding rate (5-8)"},{"location":"kiss_modem_protocol/#version-version-response","title":"Version (Version response)","text":"Field Size Description Version 1 byte Firmware version Reserved 1 byte Always 0"},{"location":"kiss_modem_protocol/#encrypted-encrypted-response","title":"Encrypted (Encrypted response)","text":"Field Size Description MAC 2 bytes HMAC-SHA256 truncated to 2 bytes Ciphertext variable AES-128 block-encrypted data with zero padding"},{"location":"kiss_modem_protocol/#airtime-airtime-response","title":"Airtime (Airtime response)","text":"All values little-endian.
Field Size Description Airtime 4 bytes uint32_t, estimated air time in milliseconds"},{"location":"kiss_modem_protocol/#noise-floor-noisefloor-response","title":"Noise Floor (NoiseFloor response)","text":"All values little-endian.
Field Size Description Noise floor 2 bytes int16_t, dBm (signed)The modem recalibrates the noise floor every 2 seconds. AGC resets follow the configured AGC reset interval (default 32 seconds).
"},{"location":"kiss_modem_protocol/#capabilities-capabilities-response","title":"Capabilities (Capabilities response)","text":"All values little-endian. Hosts should probe capabilities rather than infer them from the firmware version: boards running the same version expose different hardware controls. Firmware older than version 2 answers GetCapabilities with UnknownCmd; treat that as no capabilities.
0x01 AGC reset interval control (always set) 1 0x02 External FEM RX (LNA) gain control 2 0x04 External FEM TX (PA) gain control 3 0x08 Radio chip boosted RX gain control Remaining bits are reserved and sent as 0.
"},{"location":"kiss_modem_protocol/#agc-reset-interval-setagcresetinterval-agcresetinterval-response","title":"AGC Reset Interval (SetAgcResetInterval / AgcResetInterval response)","text":"All values little-endian.
Field Size Description Seconds 2 bytes uint16_t, 0 = disabled, maximum 1020The modem periodically resets the radio's AGC while idle (no transmission in progress and host output not backed up). The interval has 4-second resolution, matching the MeshCore agc.reset.interval setting: requested values are rounded down to a multiple of 4, so 1-3 disable the reset. Values above 1020 return InvalidParam. SetAgcResetInterval replies with the AgcResetInterval response carrying the effective value, and restarts the countdown from the time of the request.
The default is 32 seconds (previously a fixed 30; changed so the default is a settable 4-second multiple). The setting is not persisted; hosts should re-send it after reconnecting or rebooting the modem.
"},{"location":"kiss_modem_protocol/#fem-state-setfemstate-femstate-response","title":"FEM State (SetFemState / FemState response)","text":"Controls the board's external LoRa front-end module gain. This is separate from the radio chip's own RX boosted gain. TX/RX switching of the FEM is handled by the board and is not affected by these settings.
Bit Value Description 00x01 RX gain (LNA enabled) 1 0x02 TX gain (PA high gain enabled) SetFemState data:
Field Size Description Apply mask 1 byte Bits to change; bits not set are left as-is Value mask 1 byte New value for each bit in the apply maskFemState response data:
Field Size Description Capability mask 1 byte Bits this board can control Value mask 1 byte Current state; always 0 for uncontrollable bitsExample: enable RX gain without changing TX gain: apply 0x01, value 0x01.
If any bit in the apply mask is not in the board's capability mask (including reserved bits), the modem replies Unsupported and changes nothing. Otherwise SetFemState replies with the FemState response carrying the state read back from the board; if a bit differs from the request, that change did not take effect. SetFemState and GetFemState requests, including their error replies, are answered strictly in the order received. A SetFemState received while a packet is on air (before its TxDone is queued) is held and applied after TxDone, so its reply follows TxDone, and FEM requests that arrive after it wait behind it. Up to 4 FEM requests can wait; beyond that the modem replies TxBusy immediately. Capabilities come from the board's own get/set radio.fem.rxgain and radio.fem.txgain CLI commands (see cli_commands.md): a gain is controllable when the board answers get with > on or > off. Any board that implements those commands is supported without KISS changes, and a board with a fixed, board-managed FEM (for example RAK3401) reports none. Changes made over KISS are not saved to the board's preferences.
The setting is not persisted; the board's power-on default applies after reboot.
"},{"location":"kiss_modem_protocol/#rx-boosted-gain-setrxboostedgain-rxboostedgain-response","title":"RX Boosted Gain (SetRxBoostedGain / RxBoostedGain response)","text":"Controls the radio chip's own boosted RX gain mode (SX1262, SX1268, LLCC68, LR11x0, LR2021), the equivalent of the MeshCore radio.rxgain setting. This is independent of the external FEM RX gain controlled by SetFemState; a board can support either, both or neither.
SetRxBoostedGain always replies with the RxBoostedGain response carrying the effective state read back from the radio; if it differs from the requested value, the change did not take effect. Some radios must drop to standby to apply it, so the modem replies TxBusy and changes nothing while a packet is on air or host output is backed up; retry later. Before applying, any completed received packet is delivered to the host first. A packet still being received at that moment can be lost. Radios whose driver has no boosted RX gain control (for example SX127x and STM32WLx) do not set capability bit 3 and reply Unsupported to both commands. The power-on default is the build's SX126X_RX_BOOSTED_GAIN setting; the value is not persisted, and periodic AGC resets preserve it.
All values little-endian.
Field Size Description RX 4 bytes Packets received TX 4 bytes Packets transmitted Errors 4 bytes Receive errors"},{"location":"kiss_modem_protocol/#battery-battery-response","title":"Battery (Battery response)","text":"All values little-endian.
Field Size Description Millivolts 2 bytes uint16_t, battery voltage in mV"},{"location":"kiss_modem_protocol/#mcu-temperature-mcutemp-response","title":"MCU Temperature (MCUTemp response)","text":"All values little-endian.
Field Size Description Temperature 2 bytes int16_t, tenths of \u00b0C (e.g., 253 = 25.3\u00b0C)Returns NoCallback error if the board does not support temperature readings.
Sends an OK response, flushes serial, then reboots the device. The host should expect the connection to drop.
0x01 Base (battery) 1 0x02 Location (GPS) 2 0x04 Environment (temp, humidity, pressure) Use 0x07 for all permissions.
Data returned in CayenneLPP format. See CayenneLPP documentation for parsing.
"},{"location":"kiss_modem_protocol/#cryptographic-algorithms","title":"Cryptographic Algorithms","text":"Operation Algorithm Identity / Signing / Verification Ed25519 Key Exchange X25519 (ECDH) Encryption AES-128 block encryption with zero padding + HMAC-SHA256 (MAC truncated to 2 bytes) Hashing SHA-256"},{"location":"kiss_modem_protocol/#notes","title":"Notes","text":"Welcome to the MeshCore documentation.
Below are a few quick start guides.
If you find a mistake in any of our documentation, or find something is missing, please feel free to open a pull request for us to review.
The nRF52 Power Management module provides battery protection features to prevent over-discharge, minimise likelihood of brownout and flash corruption conditions existing, and enable safe voltage-based recovery.
"},{"location":"nrf52_power_management/#features","title":"Features","text":""},{"location":"nrf52_power_management/#boot-voltage-protection","title":"Boot Voltage Protection","text":"Shutdown reason codes (stored in GPREGRET2):
Code Name Description 0x00 NONE Normal boot / no previous shutdown 0x4C LOW_VOLTAGE Runtime low voltage threshold reached 0x55 USER User requested powerOff() 0x42 BOOT_PROTECT Boot voltage protection triggered"},{"location":"nrf52_power_management/#supported-boards","title":"Supported Boards","text":"Board Implemented LPCOMP wake VBUS wake Seeed Studio XIAO nRF52840 (xiao_nrf52) Yes Yes Yes RAK4631 (rak4631) Yes Yes Yes Heltec T114 (heltec_t114) Yes Yes Yes GAT562 Mesh Watch13 Yes Yes Yes Promicro nRF52840 No No No RAK WisMesh Tag No No No Heltec Mesh Solar No No No LilyGo T-Echo / T-Echo Lite No No No SenseCAP Solar Yes Yes Yes WIO Tracker L1 / L1 E-Ink No No No WIO WM1110 No No No Mesh Pocket No No No Nano G2 Ultra No No No ThinkNode M1/M3/M6 No No No T1000-E No No No Ikoka Nano/Stick/Handheld (nRF) No No No Keepteen LT1 No No No Minewsemi ME25LS01 No No No Notes: - \"Implemented\" reflects Phase 1 (boot lockout + shutdown reason capture). - User power-off on Heltec T114 does not enable LPCOMP wake. - VBUS detection is used to skip boot lockout on external power, and VBUS wake is configured alongside LPCOMP when supported hardware exposes VBUS to the nRF52.
"},{"location":"nrf52_power_management/#technical-details","title":"Technical Details","text":""},{"location":"nrf52_power_management/#architecture","title":"Architecture","text":"The power management functionality is integrated into the NRF52Board base class in src/helpers/NRF52Board.cpp. Board variants provide hardware-specific configuration via a PowerMgtConfig struct and override initiateShutdown(uint8_t reason) to perform board-specific power-down work and conditionally enable voltage wake (LPCOMP + VBUS).
A static constructor with priority 101 in NRF52Board.cpp captures the RESETREAS and GPREGRET2 registers before: - SystemInit() (priority 102) - which clears RESETREAS - Static C++ constructors (default priority 65535)
This ensures we capture the true reset reason before any initialisation code runs.
"},{"location":"nrf52_power_management/#board-implementation","title":"Board Implementation","text":"To enable power management on a board variant:
Enable in platformio.ini:
-D NRF52_POWER_MANAGEMENT\n Define configuration in variant.h:
#define PWRMGT_VOLTAGE_BOOTLOCK 3300 // Won't boot below this voltage (mV)\n#define PWRMGT_LPCOMP_AIN 7 // AIN channel for voltage sensing\n#define PWRMGT_LPCOMP_REFSEL 2 // REFSEL (0-6=1/8..7/8, 7=ARef, 8-15=1/16..15/16)\n Implement in board .cpp file:
#ifdef NRF52_POWER_MANAGEMENT\nconst PowerMgtConfig power_config = {\n .lpcomp_ain_channel = PWRMGT_LPCOMP_AIN,\n .lpcomp_refsel = PWRMGT_LPCOMP_REFSEL,\n .voltage_bootlock = PWRMGT_VOLTAGE_BOOTLOCK\n};\n\nvoid MyBoard::initiateShutdown(uint8_t reason) {\n // Board-specific shutdown preparation (e.g., disable peripherals)\n bool enable_lpcomp = (reason == SHUTDOWN_REASON_LOW_VOLTAGE ||\n reason == SHUTDOWN_REASON_BOOT_PROTECT);\n\n if (enable_lpcomp) {\n configureVoltageWake(power_config.lpcomp_ain_channel, power_config.lpcomp_refsel);\n }\n\n enterSystemOff(reason);\n}\n#endif\n\nvoid MyBoard::begin() {\n NRF52Board::begin(); // or NRF52BoardDCDC::begin()\n // ... board setup ...\n\n#ifdef NRF52_POWER_MANAGEMENT\n checkBootVoltage(&power_config);\n#endif\n}\n For user-initiated shutdowns, powerOff() remains board-specific. Power management only arms LPCOMP for automated shutdown reasons (boot protection/low voltage).
#ifdef NRF52_POWER_MANAGEMENT\n void initiateShutdown(uint8_t reason) override;\n#endif\nThe LPCOMP (Low Power Comparator) is configured to: - Monitor the specified AIN channel (0-7 corresponding to P0.02-P0.05, P0.28-P0.31) - Compare against VDD fraction reference (REFSEL: 0-6=1/8..7/8, 7=ARef, 8-15=1/16..15/16) - Detect UP events (voltage rising above threshold) - Use 50mV hysteresis for noise immunity - Wake the device from SYSTEMOFF when triggered
VBUS wake is enabled via the POWER peripheral USBDETECTED event whenever configureVoltageWake() is used. This requires USB VBUS to be routed to the nRF52 (typical on nRF52840 boards with native USB).
LPCOMP Reference Selection (PWRMGT_LPCOMP_REFSEL):
REFSEL Fraction VBAT @ 1M/1M divider (VDD=3.0-3.3) VBAT @ 1.5M/1M divider (VDD=3.0-3.3) 0 1/8 0.75-0.82 V 0.94-1.03 V 1 2/8 1.50-1.65 V 1.88-2.06 V 2 3/8 2.25-2.47 V 2.81-3.09 V 3 4/8 3.00-3.30 V 3.75-4.12 V 4 5/8 3.75-4.12 V 4.69-5.16 V 5 6/8 4.50-4.95 V 5.62-6.19 V 6 7/8 5.25-5.77 V 6.56-7.22 V 7 ARef - - 8 1/16 0.38-0.41 V 0.47-0.52 V 9 3/16 1.12-1.24 V 1.41-1.55 V 10 5/16 1.88-2.06 V 2.34-2.58 V 11 7/16 2.62-2.89 V 3.28-3.61 V 12 9/16 3.38-3.71 V 4.22-4.64 V 13 11/16 4.12-4.54 V 5.16-5.67 V 14 13/16 4.88-5.36 V 6.09-6.70 V 15 15/16 5.62-6.19 V 7.03-7.73 VImportant: For boards with a voltage divider on the battery sense pin, LPCOMP measures the divided voltage. Use: VBAT_threshold \u2248 (VDD * fraction) * divider_scale, where divider_scale = (Rtop + Rbottom) / Rbottom (e.g., 2.0 for 1M/1M, 2.5 for 1.5M/1M, 3.0 for XIAO).
The power management code checks whether SoftDevice is enabled and uses the appropriate API: - When SD enabled: sd_power_* functions - When SD disabled: Direct register access (NRF_POWER->*)
This ensures compatibility regardless of BLE stack state.
"},{"location":"nrf52_power_management/#cli-commands","title":"CLI Commands","text":"Power management status can be queried via the CLI:
Command Descriptionget pwrmgt.support Returns \"supported\" or \"unsupported\" get pwrmgt.source Returns current power source - \"battery\" or \"external\" (5V/USB power) get pwrmgt.bootreason Returns reset and shutdown reason strings get pwrmgt.bootmv Returns boot voltage in millivolts On boards without power management enabled, get pwrmgt.source and get pwrmgt.bootmv return:
ERROR: Power management not supported\n get pwrmgt.support returns unsupported. get pwrmgt.bootreason is not compiled out at all and answers on every board: getResetReason() and getShutdownReason() are virtuals on the base board class, so a board that does not override them reports Not available rather than an error. ESP32 boards override the reset half with esp_reset_reason(), so they return a real reset reason and Not available for the shutdown reason.
When MESH_DEBUG=1 is enabled, the power management module outputs:
DEBUG: PWRMGT: Reset = Wake from LPCOMP (0x20000); Shutdown = Low Voltage (0x4C)\nDEBUG: PWRMGT: Boot voltage = 3450 mV (threshold = 3300 mV)\nDEBUG: PWRMGT: LPCOMP wake configured (AIN7, ref=3/8 VDD)\n"},{"location":"nrf52_power_management/#phase-2-planned","title":"Phase 2 (Planned)","text":"This document lists unique numbers/identifiers used in various MeshCore protocol payloads.
"},{"location":"number_allocations/#group-data-types","title":"Group Data Types","text":"The PAYLOAD_TYPE_GRP_DATA payloads have a 16-bit data-type field, which identifies which application the packet is for.
To make sure multiple applications can function without interfering with each other, the table below is for reserving various ranges of data-type values. Just modify this table, adding a row, then submit a PR to have it authorised/merged.
NOTE: the range FF00 - FFFF is for use while you're developing, doing POC, and for these you don't need to request to use/allocate.
Once you have a working app/project, you need to be able to demonstrate it exists/works, and THEN request type IDs. So, just use the testing/dev range while developing, then request IDs before you transition to publishing your project.
Data-Type range App name Contact 0000 - 00FF -reserved for internal use- 0100 MeshCore Open zsylvester@monitormx.com \u2014 https://github.com/zjs81/meshcore-open 0110 - 011F Ripple ripple_biz@protonmail.com \u2014 https://buymeacoffee.com/ripplebiz 0120 MCO Advanced most.original.address@gmail.com \u2014 https://hdden.ru/MCOa/ 0130 - 013F StreamSensor william@housedillon.com - https://housedillon.com/blog/lora-e5-with-seeed-fusion 0140 Nelos support@nelos.app \u2014 https://nelos.app 0150 Road Events juraj@bednar.io \u2014 https://github.com/jooray/roadbeacon/blob/main/nips/road-events.md 0160 Knit jeff@getknit.app \u2014 https://getknit.app FF00 - FFFF -reserved for testing/dev-(add rows, inside the range 0100 - FEFF for custom apps)
"},{"location":"ota/","title":"Admin-pushed firmware update (experimental-ota images)","text":"Warning
Part of an experimental fork, not meant for regular users: its releases are a rolling release on MeshCore dev (see the README).
The *-ota and *-observer-ota images of this fork's releases can take a new firmware from their admin -- over the USB or BLE console, or over the mesh, as remote admin CLI. Nothing changes in the bootloader and there is no second bank: the node stores the package in free flash, checks all of it, and only on an explicit fw apply rewrites itself from a routine running in RAM.
The point is the delta: a package against the image the node runs is usually a few kB, so it goes through LoRa in minutes. A full image (~300 kB) goes only over USB or BLE.
Rolling release on dev, for experienced users. These -ota images track MeshCore dev, merged continuously, so a new release lands roughly twice a day and each delta stays small. There is no stable channel, no second bank, and no automatic rollback: a bad image that still boots keeps running until you push the next one, and one that will not boot needs USB/BLE DFU in hand. Run it only on nodes you can reach, and try every release on one within reach first.
For every <board>_<role>-ota / -observer-ota image:
<image>-<release>.zip / .uf2 the image, flashed the usual way (first time) <image>-<release>.mcfw full package: USB/BLE console only <image>-<release>.from-<earlier>.mcfw delta from an earlier release's same image manifest.json image sha256, target, build epoch, packages, deltas by base SHA256SUMS, SHA256SUMS.sig checksums, signed by meshcore-ota@tth-pub Check a download:
ssh-keygen -Y verify -f tools/ota_allowed_signers -I meshcore-ota@tth-pub \\\n -n meshcore-ota -s SHA256SUMS.sig < SHA256SUMS\nsha256sum -c --ignore-missing SHA256SUMS\n tools/ota_pack.py fetch <image> --base <sha8> does both and picks the delta for the node's image (--full for the full package, --release <tag> for another than the latest).
fw status state, battery, the running image's size and sha256 prefix\nfw ver target and build epoch a package for this image needs\nfw begin <bytes> [sid] start a transfer\nfw w <offset> <base64> one 96 B chunk (text)\nfw missing what is still missing\nfw verify queue the full check, poll fw status\nfw apply battery gate, then rewrite and reboot\nfw apply downgrade local console only: an older (or the same) image\nfw abort\n What the node checks before it touches its own image:
[ota] pubkey), the target (board + variant: an -observer-ota node takes no -ota package), the size, for a delta the base (the sha256 of the image it runs), and the build epoch.fw apply downgrade.fw verify: the payload hash, and a delta applied dry -- the same code the real run uses, with the flash untouched -- must produce the signed image hash.fw apply: battery at 3.8 V or more unless the node runs on USB. The bootloader settings get the new image's CRC first, so a power cut during the rewrite leaves the node in the bootloader (back with USB/BLE DFU), not in half an image.No second bank, no automatic rollback. The checks above stop a corrupt package, but firmware that passes them and still boots into a broken state keeps running. Two watchdogs catch that. The deaf-receiver one is off by default -- turn it on for nodes you push to; the TX stall one is on in repeaters:
set radio.silence <min> re-arm the receiver, then reboot, if it hears nothing\n for <min> (persisted, off by default); catches an OTA\n that boots with a dead radio\nset radio.txstall <min> the same when the TX queue stalls (repeater only, on\n at 15 min by default, a change holds until reboot)\nget radio.reboots watchdog reboots so far (survives power loss)\nget boot why the board last reset, plus the hardfault record\n Details: docs/cli_commands.md, \"Radio silence watchdog\" and \"TX stall watchdog\".
A node that will not boot at all has to be reflashed over USB/BLE DFU. After an fw apply over BLE the bond can drop (a supervision timeout while the node reboots) -- re-pair from the same host; it is not a brick.
# a delta for the node's image, from the latest release\ntools/ota_pack.py fetch Xiao_nrf52_repeater-ota --base <sha8 from fw status>\n\n# over the mesh, through a companion (USB port or tcp://host:port), as admin\ntools/ota_mesh_push.py /dev/serial/by-id/<companion> <node pubkey prefix> pkg.mcfw --apply\n\n# over the node's own USB console\ntools/ota_push.py /dev/serial/by-id/<node> pkg.mcfw --apply\n"},{"location":"ota/#from-a-phone","title":"From a phone","text":"The tth fork of meshcore-open (Android, Obtainium) has it in the repeater management of an admin: Firmware update (OTA). With no file chosen it reads the node's target and image and takes the delta from the latest release (checked against SHA256SUMS); the side channel below is a switch there.
--side","text":"tools/ota_mesh_push.py <companion> <node> pkg.mcfw --apply \\\n --side 869.525,62.5,7,5 --duty 10 --gap 1\n Login, fw status and get radio still go over the mesh; then the node gets tempradio <side>,3, the companion retunes to the same preset, logs in again zero-hop, and the chunks go there. The window grows to --window (15 min) once the link is proven and is renewed while the transfer runs. The node comes back by itself when the window runs out, on fw apply (the reboot), or when the tool sends it back with tempradio <its preset>,1. Nothing new in the firmware: any node with tempradio takes it.
set_radio with OK and stays put; the tool checks that and stops, and the node returns within 3 minutes.set_radio it back yourself.The transfer in both tools is the OTA engine of the tth.meshcore Ansible collection (plugins/module_utils/meshcore_ota_engine.py) -- its meshcore_fw_ota module runs the same code, so a fix lands everywhere at once. The tools need only its files, not Ansible: an installed collection (ansible-galaxy collection install git+https://git.rfa.cz/tth-pub/meshcore-ansible.git), a checkout named by MESHCORE_ANSIBLE, or one next to this repository (tools/ota_collection.py prints which one it uses).
ota_mesh_push.py needs the meshcore Python library. It logs in as admin (password from [secrets] admin_pw of platformio.local.ini, or asked for), sends binary chunks with a pause between them, asks which are missing and resends only those, and keeps an airtime budget (--duty, default 1 % per hour: the 865-868 MHz band). A refused package costs the two manifest chunks, not the whole transfer. Check get radio on both ends first: this transmits.
A build with -D FW_OTA=1 trusts [ota] pubkey of platformio.ini -- the release key. To sign your own packages, set your key in the gitignored platformio.local.ini:
[ota]\npubkey = <tools/ota_pack.py pubkey --key your.key>\n and pack with tools/ota_pack.py pack|diff <env> --key your.key. Target and build epoch come from the ELF, never from the command line. Keep every image you flash: a delta needs the exact bytes the node runs as its base.
Cost: about 10 kB of RAM on a repeater, the applier code in RAM, a 32 kB buffer while a full package is verified or applied. Classic images (without -ota) have none of it.
This document describes the MeshCore packet format.
0xYY indicates YY in hex notation.0bYY indicates YY in binary notation.0000000XX0000000This is the protocol level packet structure used in MeshCore firmware v1.12.0
[header][transport_codes(optional)][path_length][path][payload]\n 0bVVPPPPRR - V=Version - P=PayloadType - R=RouteType0x00/0b00 - ROUTE_TYPE_TRANSPORT_FLOOD - Flood Routing + Transport Codes0x01/0b01 - ROUTE_TYPE_FLOOD - Flood Routing0x02/0b10 - ROUTE_TYPE_DIRECT - Direct Routing0x03/0b11 - ROUTE_TYPE_TRANSPORT_DIRECT - Direct Routing + Transport Codes0x00/0b0000 - PAYLOAD_TYPE_REQ - Request (destination/source hashes + MAC)0x01/0b0001 - PAYLOAD_TYPE_RESPONSE - Response to REQ or ANON_REQ0x02/0b0010 - PAYLOAD_TYPE_TXT_MSG - Plain text message0x03/0b0011 - PAYLOAD_TYPE_ACK - Acknowledgment0x04/0b0100 - PAYLOAD_TYPE_ADVERT - Node advertisement0x05/0b0101 - PAYLOAD_TYPE_GRP_TXT - Group text message (unverified)0x06/0b0110 - PAYLOAD_TYPE_GRP_DATA - Group datagram (unverified)0x07/0b0111 - PAYLOAD_TYPE_ANON_REQ - Anonymous request0x08/0b1000 - PAYLOAD_TYPE_PATH - Returned path0x09/0b1001 - PAYLOAD_TYPE_TRACE - Trace a path, collecting SNR for each hop0x0A/0b1010 - PAYLOAD_TYPE_MULTIPART - Packet is part of a sequence of packets0x0B/0b1011 - PAYLOAD_TYPE_CONTROL - Control packet data (unencrypted)0x0C/0b1100 - reserved0x0D/0b1101 - reserved0x0E/0b1110 - reserved0x0F/0b1111 - PAYLOAD_TYPE_RAW_CUSTOM - Custom packet (raw bytes, custom encryption)0x00/0b00 - v1 - 1-byte src/dest hashes, 2-byte MAC0x01/0b01 - v2 - Future version (e.g., 2-byte hashes, 4-byte MAC)0x02/0b10 - v3 - Future version0x03/0b11 - v4 - Future versiontransport_codes - 4 bytes (optional)ROUTE_TYPE_TRANSPORT_FLOOD and ROUTE_TYPE_TRANSPORT_DIRECTtransport_code_1 - 2 bytes - uint16_t - calculated from region scopetransport_code_2 - 2 bytes - uint16_t - reservedpath_length - 1 byte - Encoded path metadata0-63)0b00: 1-byte path hashes0b01: 2-byte path hashes0b10: 3-byte path hashes0b11: reserved / unsupportedpath - hop_count * hash_size bytes - Path to use for Direct Routing or flood path trackingMAX_PATH_SIZEpath_lengthpayload - variable length - Payload DataMAX_PACKET_PAYLOADpayload sizes larger than 184MAX_PATH_SIZE) Stores hop_count * hash_size bytes of path data if applicable payload up to 184 (MAX_PACKET_PAYLOAD) Data for the provided Payload Type NOTE: see the Payloads documentation for more information about the content of specific payload types.
"},{"location":"packet_format/#header-format","title":"Header Format","text":"Bit 0 means the lowest bit (1s place)
Bits Mask Field Description 0-10x03 Route Type Flood, Direct, etc 2-5 0x3C Payload Type Request, Response, ACK, etc 6-7 0xC0 Payload Version Versioning of the payload format"},{"location":"packet_format/#route-types","title":"Route Types","text":"Value Name Description 0x00 ROUTE_TYPE_TRANSPORT_FLOOD Flood Routing + Transport Codes 0x01 ROUTE_TYPE_FLOOD Flood Routing 0x02 ROUTE_TYPE_DIRECT Direct Routing 0x03 ROUTE_TYPE_TRANSPORT_DIRECT Direct Routing + Transport Codes"},{"location":"packet_format/#path-length-encoding","title":"Path Length Encoding","text":"path_length is not a raw byte count. It packs both hash size and hop count:
0-63) 6-7 Hash Size Code Stored as hash_size - 1 Hash size codes:
Bits 6-7 Hash Size Notes0b00 1 byte Legacy / default mode 0b01 2 bytes Supported in current firmware 0b10 3 bytes Supported in current firmware 0b11 4 bytes Reserved / invalid Examples:
0x00: zero-hop packet, no path bytes0x05: 5 hops using 1-byte hashes, so path is 5 bytes0x45: 5 hops using 2-byte hashes, so path is 10 bytes0x8A: 10 hops using 3-byte hashes, so path is 30 bytes0x00 PAYLOAD_TYPE_REQ Request (destination/source hashes + MAC) 0x01 PAYLOAD_TYPE_RESPONSE Response to REQ or ANON_REQ 0x02 PAYLOAD_TYPE_TXT_MSG Plain text message 0x03 PAYLOAD_TYPE_ACK Acknowledgment 0x04 PAYLOAD_TYPE_ADVERT Node advertisement 0x05 PAYLOAD_TYPE_GRP_TXT Group text message (unverified) 0x06 PAYLOAD_TYPE_GRP_DATA Group datagram (unverified) 0x07 PAYLOAD_TYPE_ANON_REQ Anonymous request 0x08 PAYLOAD_TYPE_PATH Returned path 0x09 PAYLOAD_TYPE_TRACE Trace a path, collecting SNR for each hop 0x0A PAYLOAD_TYPE_MULTIPART Packet is part of a sequence of packets 0x0B PAYLOAD_TYPE_CONTROL Control packet data (unencrypted) 0x0C reserved reserved 0x0D reserved reserved 0x0E reserved reserved 0x0F PAYLOAD_TYPE_RAW_CUSTOM Custom packet (raw bytes, custom encryption)"},{"location":"packet_format/#payload-versions","title":"Payload Versions","text":"Value Version Description 0x00 1 1-byte src/dest hashes, 2-byte MAC 0x01 2 Future version (e.g., 2-byte hashes, 4-byte MAC) 0x02 3 Future version 0x03 4 Future version"},{"location":"payloads/","title":"Payload Format","text":"Inside each MeshCore Packet is a payload, identified by the payload type in the packet header. The types of payloads are:
This document defines the structure of each of these payload types.
NOTE: all 16 and 32-bit integer fields are Little Endian.
"},{"location":"payloads/#important-concepts","title":"Important concepts:","text":"This kind of payload notifies receivers that a node exists, and gives information about the node
Field Size (bytes) Description public key 32 Ed25519 public key of the node timestamp 4 unix timestamp of advertisement signature 64 Ed25519 signature of public key, timestamp, and app data appdata rest of payload optional, see belowAppdata
Field Size (bytes) Description flags 1 specifies which of the fields are present, see below latitude 4 (optional) decimal latitude multiplied by 1000000, integer longitude 4 (optional) decimal longitude multiplied by 1000000, integer feature 1 2 (optional) reserved for future use feature 2 2 (optional) reserved for future use name rest of appdata name of the nodeAppdata Flags
Value Name Description0x01 is chat node advert is for a chat node 0x02 is repeater advert is for a repeater 0x03 is room server advert is for a room server 0x04 is sensor advert is for a sensor server 0x10 has location appdata contains lat/long information 0x20 has feature 1 Reserved for future use. 0x40 has feature 2 Reserved for future use. 0x80 has name appdata contains a node name"},{"location":"payloads/#acknowledgement","title":"Acknowledgement","text":"An acknowledgement that a message was received. Note that for returned path messages, an acknowledgement can be sent in the \"extra\" payload (see Returned Path) instead of as a separate acknowledgement packet. CLI commands do not cause acknowledgement responses, neither discrete nor extra.
Field Size (bytes) Description checksum 4 CRC checksum of message timestamp, text, and sender pubkey"},{"location":"payloads/#returned-path-request-response-and-plain-text-message","title":"Returned path, request, response, and plain text message","text":"Returned path, request, response, and plain text messages are all formatted in the same way. See the subsection for more details about the ciphertext's associated plaintext representation.
Field Size (bytes) Description destination hash 1 first byte of destination node public key source hash 1 first byte of source node public key cipher MAC 2 MAC for encrypted data in next field ciphertext rest of payload encrypted message, see subsections below for details"},{"location":"payloads/#returned-path","title":"Returned path","text":"Returned path messages provide a description of the route a packet took from the original author. Receivers will send returned path messages to the author of the original message.
Field Size (bytes) Description path length 1 length of next field path see above a list of node hashes (one byte each) extra type 1 extra, bundled payload type, eg., acknowledgement or response. Same values as in Packet Format extra rest of data extra, bundled payload content, follows same format as main content defined by this document"},{"location":"payloads/#request","title":"Request","text":"Field Size (bytes) Description timestamp 4 sender time (unix timestamp) req type 1 request sub type request data rest of payload application-defined request payload bodyFor the common chat/server helpers in BaseChatMesh, the current request type values are:
0x01 get stats get stats of repeater or room server 0x02 keepalive (deprecated) 0x03 get telemetry request node telemetry 0x04 get min/max/avg get sensor node stats on time series data 0x05 get acl node ACL query 0x06 get neighbors node neighbors query 0x08 subscribe subscribe to telemetry push 0x09 ubsubscribe unsubscribe from telemetry push"},{"location":"payloads/#get-stats","title":"Get stats","text":"Gets information about the node, possibly including the following:
Not defined in BaseChatMesh.
Not defined in BaseChatMesh.
Response contents are opaque application data. There is no single generic response envelope beyond the encrypted payload wrapper shown above.
"},{"location":"payloads/#plain-text-message","title":"Plain text message","text":"Field Size (bytes) Description timestamp 4 send time (unix timestamp) txt_type + attempt 1 upper six bits are txt_type (see below), lower two bits are attempt number (0..3) message rest of payload the message content, see next tabletxt_type
Value Description Message content0x00 plain text message the plain text of the message 0x01 CLI data CLI command OR reply text 0x02 signed plain text message first four bytes is sender pubkey prefix, followed by plain text message 0x03 CLI command (since v1.18+) CLI command text (explicit)"},{"location":"payloads/#anonymous-request","title":"Anonymous request","text":"Field Size (bytes) Description destination hash 1 first byte of destination node public key public key 32 sender's Ed25519 public key cipher MAC 2 MAC for encrypted data in next field ciphertext rest of payload encrypted message, see below for details"},{"location":"payloads/#room-server-login","title":"Room server login","text":"Field Size (bytes) Description timestamp 4 sender time (unix timestamp) sync timestamp 4 sender's \"sync messages SINCE x\" timestamp password rest of message password for room"},{"location":"payloads/#repeatersensor-login","title":"Repeater/Sensor login","text":"Field Size (bytes) Description timestamp 4 sender time (unix timestamp) password rest of message password for repeater/sensor"},{"location":"payloads/#repeater-regions-request","title":"Repeater - Regions request","text":"Field Size (bytes) Description timestamp 4 sender time (unix timestamp) req type 1 0x01 (request sub type) reply path len 1 path len for reply reply path (variable) reply path"},{"location":"payloads/#repeater-owner-info-request","title":"Repeater - Owner info request","text":"Field Size (bytes) Description timestamp 4 sender time (unix timestamp) req type 1 0x02 (request sub type) reply path len 1 path len for reply reply path (variable) reply path"},{"location":"payloads/#repeater-clock-and-status-request","title":"Repeater - Clock and status request","text":"Field Size (bytes) Description timestamp 4 sender time (unix timestamp) req type 1 0x03 (request sub type) reply path len 1 path len for reply reply path (variable) reply path"},{"location":"payloads/#group-text-message","title":"Group text message","text":"Field Size (bytes) Description channel hash 1 first byte of SHA256 of channel's shared key cipher MAC 2 MAC for encrypted data in next field ciphertext rest of payload encrypted message, see below for details The plaintext contained in the ciphertext matches the format described in plain text message. Specifically, it consists of a four byte timestamp, a flags byte, and the message. The flags byte will generally be 0x00 because it is a \"plain text message\". The message will be of the form <sender name>: <message body> (eg., user123: I'm on my way).
The sender name is unverified message text. Group messages contain no sender signature, so any channel-key holder can choose any sender name.
"},{"location":"payloads/#group-datagram","title":"Group datagram","text":"Field Size (bytes) Description channel hash 1 first byte of SHA256 of channel's shared key cipher MAC 2 MAC for encrypted data in next field ciphertext rest of payload encrypted data, see below for detailsThe data contained in the ciphertext uses the format below:
Field Size (bytes) Description data type 2 Identifier for type of data. (See number_allocations.md) data len 1 byte length of data data rest of payload (depends on data type)"},{"location":"payloads/#control-data","title":"Control data","text":"Field Size (bytes) Description flags 1 upper 4 bits is sub_type data rest of payload typically unencrypted data"},{"location":"payloads/#discover_req-sub_type","title":"DISCOVER_REQ (sub_type)","text":"Field Size (bytes) Description flags 1 0x8 (upper 4 bits), prefix_only (lowest bit) type_filter 1 bit for each ADV_TYPE_* tag 4 randomly generate by sender since 4 (optional) epoch timestamp (0 by default)"},{"location":"payloads/#discover_resp-sub_type","title":"DISCOVER_RESP (sub_type)","text":"Field Size (bytes) Description flags 1 0x9 (upper 4 bits), node_type (lower 4) snr 1 signed, SNR*4 tag 4 reflected back from DISCOVER_REQ pubkey 8 or 32 node's ID (or prefix)"},{"location":"payloads/#custom-packet","title":"Custom packet","text":"Custom packets have no defined format.
"},{"location":"power/","title":"Power saving on a solar repeater \u2014 what it costs, measured","text":"Everything here was measured on the deployment hardware (SenseCAP Solar Node P1-Pro, nRF52840 + SX1262 + L76K) on 2026-08-05/06 with tools/power_ab.py, not taken from a datasheet. Numbers are input current on the 5 V USB side; the delta between two states is what the paired design measures, and that is what these figures are.
gps duty recovers 42-45 of it BLE advertising + Bluefruit's blinking LED see below defaults changed, LED off, 1 s interval powersaving on (MCU light sleep) ~1 mA with USB, 2.7 mA without (XIAO, 11/2026) keep it on CC310 IRQ cleared before sleep (nRF52) 2.6 mA after every boot fixed in firmware, see below RX duty cycle (set radio.rxps, from EasySkyMesh) ~2.3 mA at max (XIAO, 12. 11. 2026) no on a live node: -16 % received and a TX stall on mast-three, see below radio.rxgain off ~0.7 mA no \u2014 1-3 dB of sensitivity is what a mast node is for FEM LNA control n/a SenseCap has no FEM, only an RXEN switch A whole node in the shipping configuration, with the battery charged and GPS duty-cycled, sits at ~24 mA. Continuous GPS alone would nearly triple that.
"},{"location":"power/#gps-is-the-whole-game","title":"GPS is the whole game","text":"The receiver on this board draws 46 mA, and a mast repeater runs GPS for one reason only: the RTC is volatile, and a node whose clock is wrong has its replies dropped by clients. It does not need a continuous fix \u2014 it needs the clock set.
GPS is no longer the only way to get that (since 7. 8. 2026 a node starts at its build epoch and any attached host sets it \u2014 see docs/cli_commands.md under time). A reboot still throws the clock back to the build epoch: carrying it across one in retained RAM was tried and measured not to work, because the bootloader's stack owns the top of RAM. GPS is still what makes a mast node's clock absolutely right months after the flash, with nobody there to set it, so this reasoning stands for anything on a mast. What changed is that a node without GPS is no longer stuck in 2024.
gps duty (gps_enabled == 2, so no prefs-layout change) powers the receiver only around a sync, once a day (until 11/2026 every 30 minutes, the cadence gps on re-syncs at). The LF crystal is \u00b120 ppm plus ~40 ppm at \u221210 \u00b0C, so a day costs ~5 s of clock \u2014 far below what the mesh notices \u2014 and a reboot syncs at once anyway. Verified on hardware in both paths (with the old 30 min / 1 h timers):
mast-three): duty, asleep, fix, 7 sats \u2014 got a fix, set the clock, cut power to the receiver;bench-rpt): awake for exactly 300 s (GPS_DUTY_MAX_AWAKE_SECS), then asleep with an hourly retry, so a blocked sky cannot turn duty mode back into \"always on\".Worst case (fix never obtained) still saves 42 mA; a normal 30 s fix saves 45. Going from 30 min to 24 h saves another 0.25\u20130.75 mA (hot vs. warm start, not measured per window), and the retry from 1 h to 6 h takes a node whose dome is under snow from 3.8 mA (300 s at 46 mA hourly) to 0.64 mA. Knobs: GPS_DUTY_SYNC_INTERVAL_SECS (86400), GPS_DUTY_MAX_AWAKE_SECS (300), GPS_DUTY_RETRY_SECS (21600).
Upstream later (v1.18 dev, 11/2026) added its own gps period <s>. It is not a replacement: a periodic acquisition has no timeout until the first fix ever, so the indoor case above would stay at 46 mA for good. gps duty sets the period to 0, and gps on / gps off leave duty mode.
One visible side effect: querySensors() only adds the GPS channel to telemetry while the receiver is powered, so a duty-cycled node reports position in telemetry only during its sync windows (well under 1 % of the time). What a repeater advertises is unaffected \u2014 that comes from prefs via set advert.loc prefs (formerly gps advert prefs) \u2014 and node_lat/lon keep the last fix. Confirmed in the field: mast-three's scrape now carries voltage/temperature/humidity and no gps field.
LED_BLUE while advertising and holds it on while connected. On SenseCap Solar that pin is 12 \u2014 the same pin as P_LORA_TX_LED, so a sealed mast node spent solar charge blinking an LED nobody can see, and the LoRa TX indicator lied as a bonus. RPT_BLE_CONN_LED now defaults to 0.RPT_BLE_ADV_SLOW now defaults to 1600 = 1 s; the first RPT_BLE_ADV_FAST_SECS (30) after boot or disconnect stay fast so discovery is still immediate when someone is looking.Bench boards keep both upstream behaviours (-D RPT_BLE_CONN_LED=1, -D RPT_BLE_ADV_SLOW=244 in xiao_analyzer): on a desk the blinking LED is the \"this thing is alive\" indicator.
ble off remains the big BLE lever for a deployed node, but the deployment rule stands: ship with BLE on, verify the node on site, and only then turn it off over the mesh \u2014 otherwise a node that does not come up has no way in.
Ported from EasySkyMesh PowerSaving v18 behind -D WITH_RX_POWERSAVING (the public releases have it), SX1262 only, off until set. The radio listens in short windows and sleeps between them, staying awake through a packet once it hears a preamble; after three failed arms it falls back to continuous RX by itself. Commands: docs/cli_commands.md, radio.rxps.
Measured 12. 11. 2026 on a XIAO nRF52840 + Wio-SX1262 (not the SenseCAP of the rest of this page), bench preset 866.5 MHz / SF8 / BW62.5, fed at 5 V through an INA226 (10 mOhm) read every 5 s; the only other load was a UC96 on the XIAO's USB port. A/B/A/B, 15 min cells, the first 2 min of each dropped:
cell rxps mean median 1 off 33.84 mA 32.2 mA 2 max 31.31 mA 30.5 mA 3 off 33.53 mA 32.5 mA 4 max 31.36 mA 30.3 mAmax (level 8) against the mean of its neighbours: -2.4 / -2.2 mA, pooled -2.35 mA (medians -1.95 mA); off vs off differs by 0.3 mA, max vs max by 0.05 mA. That is the radio's share, so it carries over to other SX1262 boards in absolute terms; the 33 mA base is this bench (meter, BLE advertising), not a node. Behind the XIAO's linear regulator the battery sees the same current: ~7-8 mW at 3.3 V.
Reception: a 3-board zero-hop matrix (x1, x3, x4; rxps switched on x1 and x4, x3 the reference with rxps off; 20 rounds per phase, each link witnessed by another board), run twice -- on the development build, then repeated on the public release v1.18.0+tth.20261112 (ver v1.18.0-tthd4afea1):
on (level 3) 1/120 2/120 3/240 max (level 8) 0/120 0/120 0/240 rxps stayed armed throughout, no error counts. Single losses happen with rxps off as well, and of the three at level 3 one was on x3, which had rxps off: the bench shows no degradation at any level. Not measured: mixed SF/preamble senders, a busy live mesh. On a mast, where 2 mA of ~24 is not the problem, leave it off.
On the live mesh it failed (mast-three, 14. 11. 2026, max). Against ob1 as the reference for the hour-to-hour traffic, the node received ~16 % fewer packets (2.08 vs 2.47 per ob1 packet) with ~30 % more recv_errors, and within two hours of switching it on it stopped transmitting altogether: sent frozen, queue full (32), no tx_start_fail/tx_timeout, RX still counting -- so no adverts and no replies to an admin login, for 6+ hours. radiostat showed irq=0x0014 (preamble + header valid, no RX done). set radio.rxps off did NOT bring TX back; a reboot did. The mechanism is not proven, and the radio silence watchdog cannot see it (it watches RX only). Do not enable rxps on a node that has to answer.
powersaving on makes the nRF52 wait in WFE between events (it wakes on any interrupt, including LoRa DIO1). Upstream ships it off, and it was missing from our provisioning, so every node built from that file ran the core at 64 MHz around the clock. It is now in our provisioning file.
But it buys about 1 mA, not the 3-4 that seemed obvious. Measured with GPS held off so its sync windows could not pollute the cells: paired estimate -0.96 mA over three pairs, spread -1.97 to +0.07, against a measured cell-to-cell repeatability of 1.16 mA \u2014 i.e. the effect is the same size as this rig's noise and cannot be told from zero. That fits the mechanism: the loop still polls the SX1262 over SPI on every pass and the SoftDevice wakes the core for each advertising event, so there is not much idle left to sleep through. Keep it on (it is free and cannot hurt), but do not budget for it.
Blocking the loop task instead of waiting for an event (so that FreeRTOS can sleep tickless) changes nothing either: delay(10) against sd_app_evt_wait(), XIAO x4, A/B/A/B 30 min cells (14. 11. 2026): paired difference 0.04 mA, cell repeatability 0.1-0.4 mA. The tick wakeups are not where the current goes.
One fork-specific fix goes with it: the sleep is also held off while the BLE console still has queued output (bleTxPending()), because on the observer node a half-drained rxlog/pktlog page would otherwise wait for the next connection event \u2014 the bridge drains those on a 2-minute duty cycle, so a slower drain directly costs collected frames.
PWR_DUTY_INSTRUMENT)","text":"A bench build with -D PWR_DUTY_INSTRUMENT (nRF52 only, nothing changes without the flag) prints one line to the USB console every ~10 s:
PWRDUTY awake_ms=\u2026 asleep_ms=\u2026 wakes=\u2026 duty_permille=\u2026 pkt_us=\u2026 pkt_n=\u2026\n awake_ms, asleep_ms and duty_permille are the time between a return from NRF52Board::sleep() and the next entry into it, against the WFE span inside it. This needs powersaving on: without it sleep() is never called.wakes counts the passes through sleep(). BLE and USB events wake the core too, so the duty is not packet cost alone.pkt_us and pkt_n are the CPU time spent in Dispatcher::processRecvPacket() (dedup, crypto, routing) and the number of packets. They do not depend on background wakes. This is the work a filter on the radio side could skip for a packet that is dropped anyway.All counters are cumulative since boot, so take the difference between two lines.
Measured on the XIAO x4, 24. 11. 2026, live mesh, about 440 packets/h (all flood adverts): about 6.8 ms CPU per received packet, mostly the Ed25519 check of the advert signature. The duty went from 0.05 % at rest to 0.13 %. The awake time is a small part of a node's current; the radio's RX and the SoftDevice dominate.
"},{"location":"power/#a-mast-that-runs-flat-bootlock-and-cutoff","title":"A mast that runs flat: bootlock and cutoff","text":"A panel that gets no direct sun in winter (remote-mast faces east, 11/2026: -50 mV a day from mid-November with consumption unchanged) eventually drains the cell. Without protection the node runs until the brown-out, and every bit of light then restarts it on a cell that cannot hold it -- a boot loop at the edge, with the cell deep-discharged on the way.
SenseCap_Solar_repeater builds with NRF52_POWER_MANAGEMENT (upstream code, wired in variants/sensecap_solar) and PWRMGT_RUNTIME (ours), which gives two thresholds, both saved on the node and settable from the console or as an admin over the mesh:
set pwr.bootlock <mV>\\|off 3300 mV (variant.h) at boot, below it the node goes to SYSTEMOFF and the LPCOMP wakes it when the battery recovers set pwr.cutoff <mV>\\|off off while running, three readings in a row (one a minute) below it switch the node off into the same SYSTEMOFF get pwr both, the battery now and at boot, USB, the reason of the last switch-off The cutoff must stay below the bootlock -- a node switched off at the cutoff starts again only past the bootlock, which is the hysteresis (e.g. cutoff 3400, bootlock 3600). The node refuses a threshold above the battery voltage at that moment (it would lock itself out of a mast), USB power disarms the cutoff and skips the boot check, a reading under 1 V counts as an ADC glitch. The values live in /pwr_guard, not in the prefs; without the file the build defaults apply (PWRMGT_BOOTLOCK_DEFAULT, PWRMGT_CUTOFF_DEFAULT).
The wake level is not one of the thresholds: it is the LPCOMP comparing the battery divider with 3/8 VDD, ~3.4-3.7 V on the cell per variant.h, fixed in hardware steps. A bootlock above it means the node wakes, checks, and sleeps again until the cell is past the bootlock -- harmless, each wake is a few ms. The clock goes back to the build epoch after such a restart, as after any power loss (gps duty resyncs it, time sets it).
Why upstream has it off: a fixed 3.3 V lock kept LiFePO4 and LTO nodes from booting (#2377, v1.18.0); a chemistry-aware version is open as #2088 (FS read before the check, per-chemistry thresholds). Ours is narrower -- one board with a known Li-ion cell, two numbers, off for either -- and has to be reconciled with #2088 if that lands.
Not yet verified on hardware: the logic has host tests (test/test_low_voltage_guard), the thresholds and the wake level do not. Bench test with an adjustable supply on the battery terminals: boot at 3.2 V must stay dark; raising it to ~3.8 V must wake the node by itself (get boot then shows RESETREAS=0x00020000, bit 17, wake from LPCOMP); with a cutoff set, lowering the supply below it must switch the node off within ~3 minutes and get pwr after the wake must say last off: Low Voltage.
An audit of the nRF52840 firmware and the Adafruit core found several sources of idle draw that apply to all nRF52 boards, not only SenseCAP Solar. They were measured on 25./26. 11. 2026 on XIAO x4 (nRF52840 + Wio-SX1262, repeater build, bench preset). Setup: no USB host, fed at 5 V through an INA226 read every ~1 s. Each cell was 10 min (20 min for rxps), 38 cells over two rounds. Every knob was switched at runtime between two baseline cells. The baseline repeatability was 0.05 mA, so an effect counts only above 0.1 mA and with the same sign in both rounds. The 5 V pin is VBUS, so USBD and HFXO stay up; read the absolute numbers as this rig and the deltas as the result.
The one that matters: CRYPTOCELL_IRQn sleep insomnia (+2.6 mA). USE_CC310_HW_CRYPTO=1 runs CC310 in polling mode with CRYPTOCELL_IRQn disabled in NVIC. A completed operation leaves the IRQ pending, and a pending IRQ ends sd_app_evt_wait()/__WFE() immediately. NRF52Board::sleep() now clears it before sleeping, as the Adafruit core's wiring.c does. Without the clear, a node comes out of every boot stuck at 14.1 mA instead of 11.5:
Values are round 1 / round 2. In the stuck state the core wakes ~15 000 times a second, against ~990 for the 1024 Hz tick, and it is awake for 80 % of the time. It is not an occasional spike either: 98\u2013100 % of the samples sit above 13 mA. Received LoRa packets do not end it (5 per window). The first BLE connection does; the mechanism is not traced. A mast node that nobody connects to over BLE stays in it. Toggling the clear at runtime on an already clean node changes nothing (+0.01 / +0.02 mA), because the state is decided at boot.
The same run again at 3.3 V without VBUS (27. 11. 2026). Here x4 is fed on its 3V3 pin at 3.25 V, so bench duty reads vbus 0 usbd 0 and HFXO is off. This is the closer match to a node on a cell. The setup was the same: 38 cells, two rounds, all of them valid. Baseline repeatability (detrended SD of the base cells) was 0.009 / 0.015 mA, so the threshold here is 0.03 mA. The baseline is 6.90 mA (22 mW, against 57 mW on the 5 V pin).
The CC310 insomnia costs +3.3 mA, almost half of the whole node. Every sample of those windows sits above 8.5 mA. The core wakes 14 900 times a second, against 986, it is awake 79 % of the time, and cc_pend reads 1.
At this voltage DC/DC is worth 0.6 mA. bench dcdc off at runtime gives +0.63 / +0.60 mA, and A_like (DC/DC off, CC clear off, nfcal 2 s) gives +0.59 / +0.61 mA, the same thing. On the 5 V pin the same switch was below resolution. The late re-enable still changes nothing, because DCDCEN reads 1 after every boot with or without it. So the regulator mode matters, and SoftDevice simply does not turn it off.
bench dcdc off +0.63 mA +0.60 mA bench cc off (runtime) +0.00 mA \u22120.01 mA bench nfcal 2000 \u22120.04 mA (one pair) set radio.rxps max \u22122.30 mA \u22122.30 mA set radio.rxps balanced \u22121.98 mA \u22121.82 mA set radio.rxgain off \u22120.45 mA \u22120.51 mA powersaving off +2.37 mA (one pair) The rxps, rxgain and powersaving deltas match the 5 V run to within 0.3 mA. In relative terms, rxps max now takes a third off the node. Reception from the x1 witness matched what it sent in every cell (base 82 received for 72 sent; x4 also hears other bench traffic). The witness again only detects a gross loss, not a sensitivity loss.
Measured to make no difference, kept anyway (each below 0.1 mA): - DC/DC re-enabled after SoftDevice start (onBootComplete()): +0.02 / \u22120.10 mA at runtime on the 5 V pin, and no difference as a boot flag at either voltage. The premise that S140 puts NRF_POWER back to LDO did not hold on this board. DCDCEN read 1 after every boot, with or without the late enable. The late enable is kept as a harmless safeguard. DC/DC itself does matter at 3.3 V (see above). - Noise-floor calibration every 10 s instead of 2 s (NOISE_FLOOR_CALIB_INTERVAL): +0.08 mA at 5 V and \u22120.04 mA at 3.3 V, one pair each. That is at the edge of resolution and of no practical weight.
Not measured (compile-time or other hardware): - Avoid NRF_SPIM3 (Nordic Errata 195): [nrf52_base] sets -D SPI_32MHZ_INTERFACE=1, which moves the SX1262 SPI bus from NRF_SPIM3 to NRF_SPIM2. SPIClass::endTransaction() disables SPIM3 without the errata workaround, which is worth ~1.2\u20132 mA idle per the errata. A clean baseline of 11.5 mA on this board leaves little room for that. - GPS UART pins disconnected while the GPS is off: NmeaGpsDriver::stopHardware() resets TX/RX via nrf_gpio_cfg_default() after Uart::end(), so the unpowered receiver is not back-powered. - Unused I2C bus switched off: EnvironmentSensorManager::begin() calls Wire.end() when the bus scan finds no device, and enables it again for the i2c CLI command. - SenseCAP Solar battery divider (VBAT_ENABLE): held HIGH (off) at boot and set back to HIGH right after getBattMilliVolts(), instead of staying LOW. initiateShutdown() still drives it LOW when it arms the LPCOMP wake. It saves ~2.8 \u00b5A (4.2 V over 1.5 MOhm). With the old 10 ms settle the reading came out 110-150 mV high (mast-three and second-mast after the OTA of 26.-27. 11. 2026, both at night, remote-mast without the change flat): the ADC node starts high with the divider off. The settle is 100 ms now; still to be checked against a meter, and whether the ADC pin sits near VDD + 0.3 V on a full cell.
Runtime knobs from the same night, for comparison (paired deltas):
knob round 1 round 2 reception (x1 witness)set radio.rxps max \u22122.47 mA \u22122.33 mA 20/21 set radio.rxps balanced \u22121.98 mA \u22121.88 mA 20/21 set radio.rxgain off \u22120.49 mA \u22120.45 mA 10/12 powersaving off +2.66 mA (one pair) 5/6 baseline 83/90 The x1 witness sends zero-hop adverts every ~130 s at 2 dBm. Reception counts are approximate at cell edges, and no knob showed a gross loss. The bench signal is strong, so this does not test sensitivity, and the rxps failure on the live mesh (see above) still stands. powersaving is worth 2.7 mA here without USB, much more than the ~1 mA measured with USB attached (USB keeps HFCLK running).
Tools: tools/power_ab.py --ina <url> (INA226 of a solar controller as the meter, raw samples saved), firmware bench knobs and the night driver are kept with the run log, outside the repository.
i2c command reports nothing at all on the only bus the variant has \u2014 on three separate P1-Pro units (bench-rpt, mast-rpt-two, tth-mast-repeater-one), against a sensor table that expects 38 76 70 44 5C 42 40 41 5A 29 77. So it is the board, not one dead part, and the cross-check for a power measurement has to be a second board.gps duty enabled you cannot measure anything under ~5 mA. A sync window lands in a random cell and adds ~17 mA to a 10-minute average (seen: 40.9 mA against 24.1-24.5 in its neighbours). Put gps off in every cell of such a run and restore gps duty afterwards.See tools/power_ab.py --help for the alternating-cell design that makes these deltas trustworthy in the first place.
This document provides an overview of QR Code formats that can be used for sharing MeshCore channels and contacts. The formats described below are supported by the MeshCore mobile app.
"},{"location":"qr_codes/#add-channel","title":"Add Channel","text":"Example URL:
meshcore://channel/add?name=Public&secret=8b3387e9c5cdea6ac9e5edbaa115cd72\n Parameters:
name: Channel name (URL-encoded)secret: 16-byte secret represented as 32 hex charactersregion_scope: Region Scope (optional, URL-encoded if provided)Example URL:
meshcore://contact/add?name=Example+Contact&public_key=9cd8fcf22a47333b591d96a2b848b73f457b1bb1a3ea2453a885f9e5787765b1&type=1\n Parameters:
name: Contact name (URL-encoded if needed)public_key: 32-byte public key represented as 64 hex characterstype: numeric contact type1: Companion2: Repeater3: Room Server4: SensorThe radio presets are currently stored on the MeshCore App API server.
This allows us to update the presets without releasing new application updates.
The presets can be fetched from https://api.meshcore.nz/api/v1/config
If you'd like a new radio preset to be added, this will need to be brought up for discussion in the MeshCore Discord server, or via the issues section in our GitHub repo.
Before a new preset will be considered for being added, local radio regulations must be researched by the person suggesting the preset, and investigation of the frequencies with an SDR is advised to ensure the least interference to provide a decent user experience.
Once a preset is added, it's unlikely to be changed. Adding too many presets can lead to user frustration, as new users won't know which preset to select during setup.
At this time, presets provided by the MeshCore App API are just suggestions, but you are free to configure any radio settings through the companion applications, provided they comply with local laws/regulations.
Note: We are planning to implement deep linking such as meshcore:// URLs, and QR codes so local mesh networks can easily distribute their own settings, without relying on the internet, or all the companion applications to provide all the settings.
"},{"location":"radio_presets/#json-response","title":"JSON Response","text":"See the example JSON response below, which shows the expected format provided by the API server.
Your application should be programmed to expect any of the JSON keys to be missing from the response, as the format could change at any time without any notification.
Please configure an appropriate User Agent header string when sending your request to the server. We should be able to reach out to you if needed.
Note: Some presets contain an optional network_settings section which defines the path_hash_size to use for this mesh network.
{\n \"config\": {\n \"suggested_radio_settings\": {\n \"info_message\": \"These presets are suggested by the community.\",\n \"entries\": [\n {\n \"title\": \"Australia (Narrow)\",\n \"description\": \"916.575MHz / SF7 / BW62.5 / CR7\",\n \"frequency\": \"916.575\",\n \"spreading_factor\": \"7\",\n \"bandwidth\": \"62.5\",\n \"coding_rate\": \"7\"\n },\n {\n \"title\": \"New Zealand (Narrow)\",\n \"description\": \"917.375MHz / SF7 / BW62.5 / CR5 / 2B\",\n \"frequency\": \"917.375\",\n \"spreading_factor\": \"7\",\n \"bandwidth\": \"62.5\",\n \"coding_rate\": \"5\",\n \"network_settings\": {\n \"path_hash_size\": 2\n }\n },\n {\n \"title\": \"Portugal 868\",\n \"description\": \"869.618MHz / SF7 / BW62.5 / CR6\",\n \"frequency\": \"869.618\",\n \"spreading_factor\": \"7\",\n \"bandwidth\": \"62.5\",\n \"coding_rate\": \"6\"\n }\n ]\n }\n }\n}\n"},{"location":"stats_binary_frames/","title":"Stats Binary Frame Structures","text":"Binary frame structures for companion radio stats commands. All multi-byte integers use little-endian byte order.
"},{"location":"stats_binary_frames/#command-codes","title":"Command Codes","text":"Command Code DescriptionCMD_GET_STATS 56 Get statistics (2-byte command: code + sub-type)"},{"location":"stats_binary_frames/#stats-sub-types","title":"Stats Sub-Types","text":"The CMD_GET_STATS command uses a 2-byte frame structure: - Byte 0: CMD_GET_STATS (56) - Byte 1: Stats sub-type: - STATS_TYPE_CORE (0) - Get core device statistics - STATS_TYPE_RADIO (1) - Get radio statistics - STATS_TYPE_PACKETS (2) - Get packet statistics
RESP_CODE_STATS 24 Statistics response (2-byte response: code + sub-type)"},{"location":"stats_binary_frames/#stats-response-sub-types","title":"Stats Response Sub-Types","text":"The RESP_CODE_STATS response uses a 2-byte header structure: - Byte 0: RESP_CODE_STATS (24) - Byte 1: Stats sub-type (matches command sub-type): - STATS_TYPE_CORE (0) - Core device statistics response - STATS_TYPE_RADIO (1) - Radio statistics response - STATS_TYPE_PACKETS (2) - Packet statistics response
Total Frame Size: 11 bytes
Offset Size Type Field Name Description Range/Notes 0 1 uint8_t response_code Always0x18 (24) - 1 1 uint8_t stats_type Always 0x00 (STATS_TYPE_CORE) - 2 2 uint16_t battery_mv Battery voltage in millivolts 0 - 65,535 4 4 uint32_t uptime_secs Device uptime in seconds 0 - 4,294,967,295 8 2 uint16_t errors Error flags bitmask - 10 1 uint8_t queue_len Outbound packet queue length 0 - 255"},{"location":"stats_binary_frames/#example-structure-cc","title":"Example Structure (C/C++)","text":"struct StatsCore {\n uint8_t response_code; // 0x18\n uint8_t stats_type; // 0x00 (STATS_TYPE_CORE)\n uint16_t battery_mv;\n uint32_t uptime_secs;\n uint16_t errors;\n uint8_t queue_len;\n} __attribute__((packed));\n"},{"location":"stats_binary_frames/#resp_code_stats-stats_type_radio-24-1","title":"RESP_CODE_STATS + STATS_TYPE_RADIO (24, 1)","text":"Total Frame Size: 14 bytes
Offset Size Type Field Name Description Range/Notes 0 1 uint8_t response_code Always0x18 (24) - 1 1 uint8_t stats_type Always 0x01 (STATS_TYPE_RADIO) - 2 2 int16_t noise_floor Radio noise floor in dBm -140 to +10 4 1 int8_t last_rssi Last received signal strength in dBm -128 to +127 5 1 int8_t last_snr SNR scaled by 4 Divide by 4.0 for dB 6 4 uint32_t tx_air_secs Cumulative transmit airtime in seconds 0 - 4,294,967,295 10 4 uint32_t rx_air_secs Cumulative receive airtime in seconds 0 - 4,294,967,295"},{"location":"stats_binary_frames/#example-structure-cc_1","title":"Example Structure (C/C++)","text":"struct StatsRadio {\n uint8_t response_code; // 0x18\n uint8_t stats_type; // 0x01 (STATS_TYPE_RADIO)\n int16_t noise_floor;\n int8_t last_rssi;\n int8_t last_snr; // Divide by 4.0 to get actual SNR in dB\n uint32_t tx_air_secs;\n uint32_t rx_air_secs;\n} __attribute__((packed));\n"},{"location":"stats_binary_frames/#resp_code_stats-stats_type_packets-24-2","title":"RESP_CODE_STATS + STATS_TYPE_PACKETS (24, 2)","text":"Total Frame Size: 26 bytes (legacy) or 30 bytes (includes recv_errors)
0x18 (24) - 1 1 uint8_t stats_type Always 0x02 (STATS_TYPE_PACKETS) - 2 4 uint32_t recv Total packets received 0 - 4,294,967,295 6 4 uint32_t sent Total packets sent 0 - 4,294,967,295 10 4 uint32_t flood_tx Packets sent via flood routing 0 - 4,294,967,295 14 4 uint32_t direct_tx Packets sent via direct routing 0 - 4,294,967,295 18 4 uint32_t flood_rx Packets received via flood routing 0 - 4,294,967,295 22 4 uint32_t direct_rx Packets received via direct routing 0 - 4,294,967,295 26 4 uint32_t recv_errors Receive/CRC errors (RadioLib); present only in 30-byte frame 0 - 4,294,967,295"},{"location":"stats_binary_frames/#notes","title":"Notes","text":"recv = flood_rx + direct_rxsent = flood_tx + direct_txrecv_errors at offset 26.struct StatsPackets {\n uint8_t response_code; // 0x18\n uint8_t stats_type; // 0x02 (STATS_TYPE_PACKETS)\n uint32_t recv;\n uint32_t sent;\n uint32_t flood_tx;\n uint32_t direct_tx;\n uint32_t flood_rx;\n uint32_t direct_rx;\n uint32_t recv_errors; // present when frame size is 30\n} __attribute__((packed));\n"},{"location":"stats_binary_frames/#command-usage-example-python","title":"Command Usage Example (Python)","text":"# Send CMD_GET_STATS command\ndef send_get_stats_core(serial_interface):\n \"\"\"Send command to get core stats\"\"\"\n cmd = bytes([56, 0]) # CMD_GET_STATS (56) + STATS_TYPE_CORE (0)\n serial_interface.write(cmd)\n\ndef send_get_stats_radio(serial_interface):\n \"\"\"Send command to get radio stats\"\"\"\n cmd = bytes([56, 1]) # CMD_GET_STATS (56) + STATS_TYPE_RADIO (1)\n serial_interface.write(cmd)\n\ndef send_get_stats_packets(serial_interface):\n \"\"\"Send command to get packet stats\"\"\"\n cmd = bytes([56, 2]) # CMD_GET_STATS (56) + STATS_TYPE_PACKETS (2)\n serial_interface.write(cmd)\n"},{"location":"stats_binary_frames/#response-parsing-example-python","title":"Response Parsing Example (Python)","text":"import struct\n\ndef parse_stats_core(frame):\n \"\"\"Parse RESP_CODE_STATS + STATS_TYPE_CORE frame (11 bytes)\"\"\"\n response_code, stats_type, battery_mv, uptime_secs, errors, queue_len = \\\n struct.unpack('<B B H I H B', frame)\n assert response_code == 24 and stats_type == 0, \"Invalid response type\"\n return {\n 'battery_mv': battery_mv,\n 'uptime_secs': uptime_secs,\n 'errors': errors,\n 'queue_len': queue_len\n }\n\ndef parse_stats_radio(frame):\n \"\"\"Parse RESP_CODE_STATS + STATS_TYPE_RADIO frame (14 bytes)\"\"\"\n response_code, stats_type, noise_floor, last_rssi, last_snr, tx_air_secs, rx_air_secs = \\\n struct.unpack('<B B h b b I I', frame)\n assert response_code == 24 and stats_type == 1, \"Invalid response type\"\n return {\n 'noise_floor': noise_floor,\n 'last_rssi': last_rssi,\n 'last_snr': last_snr / 4.0, # Unscale SNR\n 'tx_air_secs': tx_air_secs,\n 'rx_air_secs': rx_air_secs\n }\n\ndef parse_stats_packets(frame):\n \"\"\"Parse RESP_CODE_STATS + STATS_TYPE_PACKETS frame (26 or 30 bytes)\"\"\"\n assert len(frame) >= 26, \"STATS_TYPE_PACKETS frame too short\"\n response_code, stats_type, recv, sent, flood_tx, direct_tx, flood_rx, direct_rx = \\\n struct.unpack('<B B I I I I I I', frame[:26])\n assert response_code == 24 and stats_type == 2, \"Invalid response type\"\n result = {\n 'recv': recv,\n 'sent': sent,\n 'flood_tx': flood_tx,\n 'direct_tx': direct_tx,\n 'flood_rx': flood_rx,\n 'direct_rx': direct_rx\n }\n if len(frame) >= 30:\n (recv_errors,) = struct.unpack('<I', frame[26:30])\n result['recv_errors'] = recv_errors\n return result\n"},{"location":"stats_binary_frames/#command-usage-example-javascripttypescript","title":"Command Usage Example (JavaScript/TypeScript)","text":"// Send CMD_GET_STATS command\nconst CMD_GET_STATS = 56;\nconst STATS_TYPE_CORE = 0;\nconst STATS_TYPE_RADIO = 1;\nconst STATS_TYPE_PACKETS = 2;\n\nfunction sendGetStatsCore(serialInterface: SerialPort): void {\n const cmd = new Uint8Array([CMD_GET_STATS, STATS_TYPE_CORE]);\n serialInterface.write(cmd);\n}\n\nfunction sendGetStatsRadio(serialInterface: SerialPort): void {\n const cmd = new Uint8Array([CMD_GET_STATS, STATS_TYPE_RADIO]);\n serialInterface.write(cmd);\n}\n\nfunction sendGetStatsPackets(serialInterface: SerialPort): void {\n const cmd = new Uint8Array([CMD_GET_STATS, STATS_TYPE_PACKETS]);\n serialInterface.write(cmd);\n}\n"},{"location":"stats_binary_frames/#response-parsing-example-javascripttypescript","title":"Response Parsing Example (JavaScript/TypeScript)","text":"interface StatsCore {\n battery_mv: number;\n uptime_secs: number;\n errors: number;\n queue_len: number;\n}\n\ninterface StatsRadio {\n noise_floor: number;\n last_rssi: number;\n last_snr: number;\n tx_air_secs: number;\n rx_air_secs: number;\n}\n\ninterface StatsPackets {\n recv: number;\n sent: number;\n flood_tx: number;\n direct_tx: number;\n flood_rx: number;\n direct_rx: number;\n recv_errors?: number; // present when frame is 30 bytes\n}\n\nfunction parseStatsCore(buffer: ArrayBuffer): StatsCore {\n const view = new DataView(buffer);\n const response_code = view.getUint8(0);\n const stats_type = view.getUint8(1);\n if (response_code !== 24 || stats_type !== 0) {\n throw new Error('Invalid response type');\n }\n return {\n battery_mv: view.getUint16(2, true),\n uptime_secs: view.getUint32(4, true),\n errors: view.getUint16(8, true),\n queue_len: view.getUint8(10)\n };\n}\n\nfunction parseStatsRadio(buffer: ArrayBuffer): StatsRadio {\n const view = new DataView(buffer);\n const response_code = view.getUint8(0);\n const stats_type = view.getUint8(1);\n if (response_code !== 24 || stats_type !== 1) {\n throw new Error('Invalid response type');\n }\n return {\n noise_floor: view.getInt16(2, true),\n last_rssi: view.getInt8(4),\n last_snr: view.getInt8(5) / 4.0, // Unscale SNR\n tx_air_secs: view.getUint32(6, true),\n rx_air_secs: view.getUint32(10, true)\n };\n}\n\nfunction parseStatsPackets(buffer: ArrayBuffer): StatsPackets {\n const view = new DataView(buffer);\n if (buffer.byteLength < 26) {\n throw new Error('STATS_TYPE_PACKETS frame too short');\n }\n const response_code = view.getUint8(0);\n const stats_type = view.getUint8(1);\n if (response_code !== 24 || stats_type !== 2) {\n throw new Error('Invalid response type');\n }\n const result: StatsPackets = {\n recv: view.getUint32(2, true),\n sent: view.getUint32(6, true),\n flood_tx: view.getUint32(10, true),\n direct_tx: view.getUint32(14, true),\n flood_rx: view.getUint32(18, true),\n direct_rx: view.getUint32(22, true)\n };\n if (buffer.byteLength >= 30) {\n result.recv_errors = view.getUint32(26, true);\n }\n return result;\n}\n"},{"location":"stats_binary_frames/#field-size-considerations","title":"Field Size Considerations","text":"Below are the commands you can enter into the Terminal Chat clients:
set freq {frequency}\n Set the LoRa frequency. Example: set freq 915.8 set tx {tx-power-dbm}\n Sets LoRa transmit power in dBm. set name {name}\n Sets your advertisement name. set lat {latitude}\n Sets your advertisement map latitude. (decimal degrees) set lon {longitude}\n Sets your advertisement map longitude. (decimal degrees) set af {air-time-factor}\n Sets the transmit air-time-factor. Note: set dutycycle is not available in Terminal Chat. Every other firmware \u2014 Repeater, Room Server, Sensor and Companion Radio \u2014 routes its set/get commands through the shared radio prefs handler and does support it (see CLI Commands). Terminal Chat is the sole exception: it has its own inline set handler covering only the six options listed above.
time {epoch-secs}\n Set the device clock using UNIX epoch seconds. Example: time 1738242833 advert\n Sends an advertisement packet clock\n Displays current time per device's clock. ver\n Shows the device version and firmware build date. card\n Displays your 'business card', for others to manually import import {card}\n Imports the given card to your contacts. list {n}\n List all contacts by most recent. (optional {n}, is the last n by advertisement date) to\n Shows the name of current recipient contact. (for subsequent 'send' commands) to {name-prefix}\n Sets the recipient to the first matching contact (in 'list') by the name prefix. (ie. you don't have to type whole name) send {text}\n Sends the text message (as DM) to current recipient. reset path\n Resets the path to current recipient, for new path discovery. public {text}\n Sends the text message to the built-in 'public' group channel help\n Lists the available commands."},{"location":"tth-commands/","title":"Console commands of this fork (meshcore-tth)","text":"Warning
Part of an experimental fork, not meant for regular users: its releases are a rolling release on MeshCore dev (see the README).
Everything this fork adds to the text console of a node, on top of upstream's cli_commands.md. Where a command is described there too (the watchdogs, rxps, batt.icon, gps duty, dfu, get boot), this page gives the short form and points to it.
Where a command exists depends on the role and on build flags:
mark builds all repeater, room server and sensor -- every build with a text console repeatersimple_repeater builds observer the *-observer variants of the nRF52 repeaters in the releases (MAX_HEARD_NODES, RXLOG_SIZE, PKTFEED_SIZE, BLE_PIN_CODE) own build only with the named flag -- not in the releases Where it can be sent from: the USB console, the BLE console (observer variants) and the mesh, as admin in the remote CLI of an app -- unless the entry says local only. Replies over the mesh are cut to one packet (~150 B).
"},{"location":"tth-commands/#antispam-repeater","title":"Antispam (repeater)","text":"Forwarding only: what this node hears, logs and feeds to an observer is never affected. Everything is persisted in prefs, so a reboot keeps it.
"},{"location":"tth-commands/#fairnesslimiter-fairness","title":"FairnessLimiter --fairness","text":"Token buckets on forwarded floods, keyed on the 1-byte ids already in the clear: channel hash, sender hash, advert origin. Buckets collide (the hash is masked), and every key is chosen by the sender: it contains runaway floods, it is not security. Direct-routed traffic is never limited. On after flashing (FAIRNESS_ENABLED_DEFAULT).
fairness state, denials per category, caps and refill intervals fairness on\\|off the buckets on/off fairness cap <group> <sender> <advert> burst caps 0..255, 0 = build default (100 / 150 / 30) fairness refill <group_s> <sender_s> <advert_s> one token per interval, seconds, 0 = default (30 / 10 / 600) fairness grid the busiest denied buckets per category -- what is being shed fairness air estimated airtime shed per reason fairness advert [<hours>\\|clear] per-origin advert window: one flood advert per origin per <hours> (0..720, 0 = off, default off); clear forgets the origins seen fairness dryrun [on\\|off] count every verdict but forward anyway (default off) The defaults keep about twice the headroom over 30 days of CZ mesh traffic (the zero-loss frontier was 60 s / cap 60 per channel, 10 s / 60 per sender, 600 s / 12 per advert origin).
"},{"location":"tth-commands/#channel-filter-filter","title":"Channel filter --filter","text":"On channels whose key the node knows (FILTER_CHANNEL_PSKS; the releases know Public, #meshcore and #test) the node decrypts each group text and refuses to forward listed senders. The sender name is plain text in the message: anyone can rename around it.
filter / filter list channels known, drops, the deny list filter add <name> / filter del <name> exact, case-insensitive; spaces allowed, commas not filter clear empty the list"},{"location":"tth-commands/#channel-hash-deny-forward-filter-hash-every-repeater","title":"Channel-hash deny-forward -- filter hash (every repeater)","text":"Keyless: the first byte of a group packet is the channel hash, in the clear, so this works on private channels too. One byte is coarse -- every other channel whose key hashes to the same byte is hit as well; check what else lives on it before adding one.
commandfilter hash drops, passes by a throttle, the list (43 blocked, 43/60 throttled) filter hash add <hex> [secs] block the byte, or let one packet through per secs (1..65535); re-adding changes the interval filter hash del <hex> / filter hash clear A throttle's window lives in RAM: the first match after a boot passes.
"},{"location":"tth-commands/#message-age-filter-age-repeater-with-channel-keys","title":"Message age --filter age (repeater with channel keys)","text":"filter age <min>|off (1..10080, default off): do not forward a group text on a decrypted channel whose sender timestamp is older than <min> by this node's clock. It judges the sender's clock, so a companion that never got a time sync (it stamps 2024) is dropped too -- keep it in days. Inactive while the node's own clock reads before 2026; a clock running ahead makes everything look old.
filter dryrun [on|off]","text":"Count every filter verdict (sender, hash, age) but forward anyway -- try a rule on a live node before it bites. Default off.
Details: cli_commands.md, \"Radio silence watchdog\", \"TX stall watchdog\", \"Reboot into the bootloader\" and \"Why the board last reset\".
commandset radio.silence <min>\\|off / get radio.silence deaf receiver: re-arm RX, then reboot after <min> without a received frame (CRC errors count as heard); each such reboot doubles the threshold for the next boot (up to 16x), the first frame clears it. 1..1440, persisted, default off set radio.txstall <min>\\|off / get radio.txstall repeater only: packets queued and nothing sent for <min> -> re-arm, then reboot. An empty queue never counts. On, 15 min (RADIO_TXSTALL_MIN); a change holds until reboot get radio.reboots reboots done by the watchdogs, survives power loss get boot reset reason and the hardfault record (also printed at boot) dfu [uf2\\|serial\\|ota] local only: reboot into the bootloader -- UF2 drive (default), CDC port for adafruit-nrfutil, or BLE DFU fw ... -ota images only: admin-pushed firmware update, see ota.md"},{"location":"tth-commands/#number-arguments-of-set-all-and-the-companions-serial-cli","title":"Number arguments of set (all, and the companion's serial CLI)","text":"Upstream parses the value of a set with atoi()/atof(): text became 0, 300 became 44 in a one-byte setting, and the result was saved with OK. This fork refuses a value that is not a number or lies outside the range and keeps the old one (Error, must be ...). It applies to set tx (-9 up to the board's MAX_LORA_TX_POWER, else 30, and saved only if the radio takes it: SX1262 -9..22), set radio and tempradio (each field; the timeout 1-10080 min), set freq, set lat/set lon, set flood.max, set flood.max.unscoped, set flood.max.advert (0-64), set int.thresh (0-255), set multi.acks (0-1), set path.hash.mode (0-2), set agc.reset.interval (0-1020), set rxdelay, set txdelay, set direct.txdelay, set adc.multiplier, and on the companion set pin, set adc.multiplier, set tz.offset. No exponent (1e3), no nan/inf.
blink [n] / blink on\\|off repeater flash a spare LED (not the BLE or TX one) n times (default 6, max 999), or until blink off (gives up after 10 min); finds a board on a bench or a node on a mast txpwr [dBm] repeater LoRa output power until reboot, with RadioLib's status; takes -9..30 i2c all scan the I2C bus get chip nRF52 (repeater, room server, sensor) the silicon (nRF52840 AAD0; variant xxF0 and later = rev3) and UICR.APPROTECT: open means SWD can read the whole flash, keys included dio1 own build: PIN_DIAG has the SX1262 raise TX_DONE and compares its IRQ register with the level on the DIO1 pin -- which end of a dead IRQ line is broken radiostat own build: RADIO_DIAG receiver state, interrupt and RX counters, without touching the radio radiokick rx\\|clrirq\\|standby\\|agc own build: RADIO_DIAG one recovery step, gentlest first: re-arm RX, clear latched IRQs, standby + RX, AGC reset; the first that brings recv back names the broken layer A board with a dead DIO1 line still runs with LORA_POLL_IRQ (own build): the IRQ status is polled over SPI.
The text console over BLE (Nordic UART), next to USB. No login of its own: the BLE PIN is the only lock, and the release PIN is the public placeholder 123456. These commands also work as admin over the mesh.
ble on/off, PIN own or build default -- never the PIN itself ble pin <6 digits> set your own PIN (saved, survives a reflash; drops every bond, so paired devices pair again) ble on\\|off persisted; off after flashing (RPT_BLE_DEFAULT_OFF), and ble on is refused while the PIN is the placeholder blepwr [dBm\\|default] TX power of the connection (-40, -20, -16, -12, -8, -4, 0, 2..8), applied to live connections and saved; default returns to the build value (0 dBm) bleconn what the central actually agreed to: interval (and what was requested), latency, supervision timeout A connected central stops the node advertising: if the BLE console cannot be found, look for who is connected (ble shows it).
nodes [offset] heard repeaters and room servers with a key to join several paths, paged rxlog [cursor] every frame heard: type, path, SNR, RSSI; cursor from the previous page (0 = all) pktlog [cursor] raw frames heard, for an observer feed (meshcore-repeater-observer) A page is as big as the caller's reply buffer: ~1000 B on the local console, one packet over the mesh.
"},{"location":"tth-commands/#channel-bot-own-build-bot_channel_psk","title":"Channel bot (own build:BOT_CHANNEL_PSK)","text":"A repeater that answers on one channel without forwarding anything: !link, !path, !snr, !heard, !noise, !ping, !help (narrowed by BOT_COMMANDS), with a per-sender cooldown and an ignore list. bot on the console shows its state.
set radio.rxps off\\|on\\|balanced\\|max, level <1-10> [preamble 16\\|32] / get radio.rxps all, SX1262 only (WITH_RX_POWERSAVING, in the releases) RX duty cycle: the radio sleeps between short listening windows. Off by default. max saved ~2.3 mA on the bench, but a mast on the live mesh lost 16 % of its reception -- see cli_commands.md and power.md set batt.icon on\\|off, set batt.icon.lo\\|hi <mV> all battery level as an icon at the end of the advertised name (off by default; with a name too long for it the icon is left out, and the reply says so) gps duty ... GPS boards the receiver runs only around a clock sync; see cli_commands.md get pwr, set pwr.bootlock <mV>\\|off, set pwr.cutoff <mV>\\|off SenseCAP Solar repeater (PWRMGT_RUNTIME) battery thresholds: don't start below the bootlock, switch a running node off below the cutoff (cutoff < bootlock, none above the battery right now); saved on the node, see power.md clkreboot all reset the clock to the build epoch and reboot -- the only way to move a clock backwards (time and clock sync refuse to)"},{"location":"tth-commands/#sensors","title":"Sensors","text":"command sensor read the live telemetry decoded into one line (sensor list shows only settings) sensor set ina.shunt <mOhm> shunt resistance of an INA219/226/260/3221, saved across reboots"},{"location":"tth-commands/#build-flags","title":"Build flags","text":"The ones that change what a node does; set in platformio.ini / platformio.local.ini (-D NAME=value, the last -D wins).
FAIRNESS_ENABLED_DEFAULT 1 FairnessLimiter on for a node without prefs RADIO_SILENCE_MIN_DEFAULT 0 deaf-receiver watchdog for a node without prefs RADIO_TXSTALL_MIN 15 TX stall watchdog at boot (repeater), 0 = off FILTER_CHANNEL_PSKS releases: Public, #meshcore, #test channel keys the filter can decrypt MAX_HEARD_NODES, RXLOG_SIZE, PKTFEED_SIZE 0 (observer variants: 128 / 512 / 64) the analyzer rings BLE_PIN_CODE, RPT_BLE_DEFAULT_OFF observer variants BLE console, starting off BOT_CHANNEL_PSK, BOT_COMMANDS unset channel bot RADIO_DIAG, PIN_DIAG, LORA_POLL_IRQ unset radio diagnostics, DIO1-less operation FW_OTA -ota images admin-pushed firmware update PATH_HASH_MODE_DEFAULT 1 (2 B per hop) path hash width for a node without prefs ACL_TS_MAX_AHEAD 86400 (s) a client timestamp further ahead of the node's clock is not stored as the replay floor LOCKED_NODE unset a node that keeps its secrets from whoever holds it: get prv.key, get guest.password and get bridge.secret answer Error: locked build to everyone (USB and BLE console, an admin over the mesh); a companion serves only paired BLE (USB, UART and WiFi get the device info and nothing else) and its rescue CLI refuses set pin. Only half of it: whoever can rewrite the flash (SWD with APPROTECT open, an unsigned DFU) still gets the keys -- the other half is a locked bootloader (SWD closed, signed images only), which these builds do not have LOGIN_FAIL_MAX, LOGIN_FAIL_SECS 4, 180 (s) after that many wrong passwords in the window no password is checked until it ends (an admin already in the ACL always gets in) NRF52_POWER_MANAGEMENT, PWRMGT_RUNTIME upstream: off; on in SenseCap_Solar_repeater (the masts) boot protection, and with PWRMGT_RUNTIME the runtime pwr.bootlock / pwr.cutoff above PWRMGT_BOOTLOCK_DEFAULT, PWRMGT_CUTOFF_DEFAULT PWRMGT_VOLTAGE_BOOTLOCK (SenseCAP 3300), 0 (mV) thresholds for a node without /pwr_guard PWR_DUTY_INSTRUMENT unset bench only, nRF52: every ~10 s a PWRDUTY line on the USB console with the time the MCU was awake and asleep, its wakes, and the CPU time spent on received packets. See power.md Prefs saved on the node override the build defaults: a reflash keeps what a node already has; only a new node or one after erase takes them.