1 line
609 KiB
JSON
1 line
609 KiB
JSON
{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"O tomto forku (meshcore-tth) 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. Repeater: antispam (v\u0161echno vyp\u00ednateln\u00e9, nic z toho nen\u00ed v upstreamu) 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. FairnessLimiter \u2013 token buckety na p\u0159epos\u00edlan\u00e9 floody podle 1bajtov\u00fdch identifik\u00e1tor\u016f, kter\u00e9 jsou v paketu stejn\u011b v \u010diteln\u00e9 podob\u011b (hash kan\u00e1lu, hash odes\u00edlatele, p\u016fvodce advertu). Port n\u00e1vrhu Beanowa #1502 , limity p\u0159epo\u010d\u00edtan\u00e9 z 30 dn\u00ed skute\u010dn\u00e9ho provozu CZ meshe. fairness [on|off|grid|cap|refill] ; p\u0159\u00edmo sm\u011brovan\u00fd provoz se neomezuje nikdy. Okno na adverty podle p\u016fvodce \u2013 flood advert ka\u017ed\u00e9ho uzlu se p\u0159epo\u0161le nejv\u00fd\u0161 jednou za N hodin ( fairness advert <h>|clear ), p\u0159evzato z AdvertLimiteru DutchMeshCore . M\u00ed\u0159\u00ed na uzly, kter\u00e9 advertuj\u00ed ka\u017edou minutu. Dry-run \u2013 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. Filtr kan\u00e1l\u016f \u2013 na kan\u00e1lech, jejich\u017e kl\u00ed\u010d repeater zn\u00e1 (Public a #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. Blokace p\u0159epos\u00edl\u00e1n\u00ed podle hashe kan\u00e1lu \u2013 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). Limit st\u00e1\u0159\u00ed zpr\u00e1vy \u2013 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. Diagnostika a provoz 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: Watchdogy r\u00e1dia. Hardwarov\u00fd watchdog chyt\u00ed jen zamrzlou smy\u010dku; dva na\u0161e uzly ale byly nalezeny hluch\u00e9 s b\u011b\u017e\u00edc\u00ed smy\u010dkou a pomohl a\u017e restart. 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. Zaseknut\u00e9 vys\u00edl\u00e1n\u00ed (jen repeater): pakety \u010dekaj\u00ed ve front\u011b a \u010d\u00edta\u010d odeslan\u00fdch se neh\u00fdbe \u2192 znovu nahod\u00ed r\u00e1dio, pak restart. Pr\u00e1zdn\u00e1 fronta se nepo\u010d\u00edt\u00e1. Zapnut\u00fd, 15 min ( 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. Jen observer varianty ( *-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. Taky jen observer varianty: pasivn\u00ed analyz\u00e1tor v konzoli \u2013 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. Jen vlastn\u00ed buildy, ne releasy: kan\u00e1lov\u00fd bot ( 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. Opravy j\u00e1dra Ochrana proti p\u0159ehr\u00e1n\u00ed admin p\u0159\u00edkaz\u016f p\u0159e\u017eije reboot. Upstream si posledn\u00ed timestamp klienta dr\u017e\u00ed jen v RAM, tak\u017ee po ka\u017ed\u00e9m restartu projde libovoln\u00fd zachycen\u00fd p\u0159\u00edkaz znovu \u2013 zachycen\u00fd 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. Hesla nejde h\u00e1dat p\u0159es \u00e9ter plnou rychlost\u00ed. Upstream kontroluje ka\u017ed\u00fd login bez omezen\u00ed a na \u0161patn\u00e9 heslo ani neodpov\u00ed. Po 4 \u0161patn\u00fdch heslech b\u011bhem 3 minut ( 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. P\u0159ehran\u00fd login bez hesla u\u017e nevyvol\u00e1 flood odpov\u011b\u010f. Login klienta z ACL s pr\u00e1zdn\u00fdm heslem nem\u011bl ochranu proti p\u0159ehr\u00e1n\u00ed; \u00fato\u010dn\u00edk t\u00edm nic nez\u00edskal, ale ka\u017ed\u00e1 kopie donutila uzel poslat odpov\u011b\u010f floodem p\u0159es cel\u00fd mesh. TRACE u\u017e nep\u0159ipisuje cestu za konec payloadu; parsov\u00e1n\u00ed TRACE/PATH a Packet::readFrom hl\u00eddaj\u00ed meze. markSeen je zase idempotentn\u00ed (odes\u00edlac\u00ed cesta uj\u00eddala okno deduplikace). Z\u00e1lo\u017en\u00ed v\u00fdpo\u010det v calcMaxPacketMillis u\u017e nepodte\u010de (uzel na tom ohluchl). \u0160\u00ed\u0159ka path hashe se bere z nastaven\u00ed uzlu na v\u0161ech cest\u00e1ch vys\u00edl\u00e1n\u00ed v\u010detn\u011b sendZeroHop ; v\u00fdchoz\u00ed jsou 2bajtov\u00e9 path hashe ( PATH_HASH_MODE_DEFAULT ). Nepoveden\u00e9 vys\u00edl\u00e1n\u00ed se za\u0159ad\u00ed znovu s odstupem, m\u00edsto aby se zahodilo. RSSI ka\u017ed\u00e9ho paketu se zaznamen\u00e1 p\u0159i p\u0159\u00edjmu; ContactInfo se p\u0159ed \u010d\u00e1ste\u010dn\u00fdm vypln\u011bn\u00edm vynuluje. Nap\u00e1jen\u00ed, hodiny, GPS GPS duty cycle ( 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. Uzel bez GPS startuje na \u010dase sestaven\u00ed firmwaru, ne v roce 2024; hodiny a z\u00e1znam o hardfaultu p\u0159e\u017eij\u00ed tepl\u00fd reset ( .noinit ); clkreboot . Na sol\u00e1rn\u00edch uzlech \u017e\u00e1dn\u00e1 blikaj\u00edc\u00ed LED a pomalej\u0161\u00ed BLE advertising. Stav baterie jako ikona na konci advertovan\u00e9ho jm\u00e9na: 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). Voliteln\u00fd RX duty cycle ( 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). Podp\u011b\u0165ov\u00e1 pojistka p\u0159i startu ( 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 ). Senzory a companiony simple_sensor : telemetrie z extern\u00ed stanice po UART ( BudkaLinkSensorManager , jeden LPP kan\u00e1l na veli\u010dinu), sensor read . Senzory, kter\u00e9 jinak m\u011b\u0159\u00ed nep\u0159etr\u017eit\u011b (INA219, INA226, INA260, INA3221, BMP280), mezi \u010dten\u00edmi telemetrie sp\u00ed a m\u011b\u0159\u00ed jen na vy\u017e\u00e1d\u00e1n\u00ed (n\u00e1pad a prvn\u00ed patch pro INA219: Alkel Brostl). \u010cipy INA se rozli\u0161uj\u00ed podle ID, tak\u017ee INA226 u\u017e se nedetekuje jako INA219. Odpor bo\u010dn\u00edku se nastavuje za b\u011bhu a ukl\u00e1d\u00e1 se: sensor set ina.shunt <m\u03a9> . Companion: 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. Ve\u0159ejn\u00e9 buildy: v\u00fdchoz\u00ed nastaven\u00ed pro \u010desk\u00fd mesh 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: r\u00e1dio 869,432 MHz / 62,5 kHz / SF7 / CR5 (v\u0161echny buildy); repeater a room server: zero-hop advert vypnut\u00fd, flood advert ka\u017ed\u00fdch 25 h, duty cycle 10 % ( get dutycycle \u2192 10.0% ; zastaral\u00e9 af je 9); repeater: regiony cz a cs vedle * \u2013 vlastn\u00ed cz-<kraj> p\u0159id\u00e1\u0161 p\u0159es region put cz-xxx cz + region save ; 2bajtov\u00e9 path hashe (v\u00fdchoz\u00ed v tomto forku); repeater: filtr kan\u00e1l\u016f ( 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. Nahr\u00e1n\u00ed releasu 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): P\u0159ipoj desku p\u0159es USB. Klikni na Custom Firmware a vyber .zip pro svou desku. Klikni na Enter DFU mode a vyber s\u00e9riov\u00fd port desky. Deska se restartuje do bootloaderu a objev\u00ed se jako nov\u00fd port. Klikni na Flash! a vyber ten nov\u00fd port. Zhruba 30 s, pak se deska restartuje do nov\u00e9ho firmwaru. Console ve flasheru (nebo jak\u00fdkoli s\u00e9riov\u00fd termin\u00e1l, 115200) ov\u011b\u0159\u00ed v\u00fdsledek: 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. Experiment\u00e1ln\u00ed: aktualizace firmwaru od admina ( *-ota ) 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. V releasu je ke ka\u017ed\u00e9mu *-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. P\u0159es mesh uzel p\u0159ijme jen deltu, a nikdy ne star\u0161\u00ed verzi, ne\u017e m\u00e1 \u2013 vynucuje to uzel, ne n\u00e1stroj. Pln\u00fd obraz nebo n\u00e1vrat ke star\u0161\u00ed verzi jen lok\u00e1ln\u011b ( fw apply downgrade ). fw apply \u010dek\u00e1 na baterii \u2265 3,8 V, pokud uzel neb\u011b\u017e\u00ed z USB. Bal\u00ed\u010dky i 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 . Prvn\u00ed *-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 . Experiment\u00e1ln\u00ed i v r\u00e1mci tohoto forku : obrazy p\u0159ich\u00e1zej\u00ed s ka\u017ed\u00fdm releasem (viz upozorn\u011bn\u00ed naho\u0159e) a nemaj\u00ed druhou banku ani automatick\u00fd n\u00e1vrat. Vadn\u00fd firmware, kter\u00fd nabootuje, b\u011b\u017e\u00ed, dokud nepo\u0161lete dal\u0161\u00ed; takov\u00fd, kter\u00fd nenabootuje, chce USB/BLE DFU v ruce. Vyzkou\u0161eno na lavici (XIAO, USB, mesh, vedlej\u0161\u00ed kan\u00e1l) a od 13. 11. 2026 na dvou na\u0161ich sto\u017e\u00e1rech. Proti obrazu, kter\u00fd nabootuje s mrtv\u00fdm r\u00e1diem, jsou watchdogy r\u00e1dia (viz Diagnostika a provoz): pro uzly, kam pos\u00edl\u00e1te OTA, zapn\u011bte set radio.silence . Stoj\u00ed ~10 kB RAM nav\u00edc. Sestaven\u00ed Raz\u00edtko verze v ka\u017ed\u00e9m nRF52 envu ( 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.","title":"O forku"},{"location":"#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.","title":"O tomto forku (meshcore-tth)"},{"location":"#repeater-antispam-vsechno-vypinatelne-nic-z-toho-neni-v-upstreamu","text":"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. FairnessLimiter \u2013 token buckety na p\u0159epos\u00edlan\u00e9 floody podle 1bajtov\u00fdch identifik\u00e1tor\u016f, kter\u00e9 jsou v paketu stejn\u011b v \u010diteln\u00e9 podob\u011b (hash kan\u00e1lu, hash odes\u00edlatele, p\u016fvodce advertu). Port n\u00e1vrhu Beanowa #1502 , limity p\u0159epo\u010d\u00edtan\u00e9 z 30 dn\u00ed skute\u010dn\u00e9ho provozu CZ meshe. fairness [on|off|grid|cap|refill] ; p\u0159\u00edmo sm\u011brovan\u00fd provoz se neomezuje nikdy. Okno na adverty podle p\u016fvodce \u2013 flood advert ka\u017ed\u00e9ho uzlu se p\u0159epo\u0161le nejv\u00fd\u0161 jednou za N hodin ( fairness advert <h>|clear ), p\u0159evzato z AdvertLimiteru DutchMeshCore . M\u00ed\u0159\u00ed na uzly, kter\u00e9 advertuj\u00ed ka\u017edou minutu. Dry-run \u2013 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. Filtr kan\u00e1l\u016f \u2013 na kan\u00e1lech, jejich\u017e kl\u00ed\u010d repeater zn\u00e1 (Public a #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. Blokace p\u0159epos\u00edl\u00e1n\u00ed podle hashe kan\u00e1lu \u2013 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). Limit st\u00e1\u0159\u00ed zpr\u00e1vy \u2013 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.","title":"Repeater: antispam (v\u0161echno vyp\u00ednateln\u00e9, nic z toho nen\u00ed v upstreamu)"},{"location":"#diagnostika-a-provoz","text":"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: Watchdogy r\u00e1dia. Hardwarov\u00fd watchdog chyt\u00ed jen zamrzlou smy\u010dku; dva na\u0161e uzly ale byly nalezeny hluch\u00e9 s b\u011b\u017e\u00edc\u00ed smy\u010dkou a pomohl a\u017e restart. 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. Zaseknut\u00e9 vys\u00edl\u00e1n\u00ed (jen repeater): pakety \u010dekaj\u00ed ve front\u011b a \u010d\u00edta\u010d odeslan\u00fdch se neh\u00fdbe \u2192 znovu nahod\u00ed r\u00e1dio, pak restart. Pr\u00e1zdn\u00e1 fronta se nepo\u010d\u00edt\u00e1. Zapnut\u00fd, 15 min ( 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. Jen observer varianty ( *-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. Taky jen observer varianty: pasivn\u00ed analyz\u00e1tor v konzoli \u2013 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. Jen vlastn\u00ed buildy, ne releasy: kan\u00e1lov\u00fd bot ( 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.","title":"Diagnostika a provoz"},{"location":"#opravy-jadra","text":"Ochrana proti p\u0159ehr\u00e1n\u00ed admin p\u0159\u00edkaz\u016f p\u0159e\u017eije reboot. Upstream si posledn\u00ed timestamp klienta dr\u017e\u00ed jen v RAM, tak\u017ee po ka\u017ed\u00e9m restartu projde libovoln\u00fd zachycen\u00fd p\u0159\u00edkaz znovu \u2013 zachycen\u00fd 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. Hesla nejde h\u00e1dat p\u0159es \u00e9ter plnou rychlost\u00ed. Upstream kontroluje ka\u017ed\u00fd login bez omezen\u00ed a na \u0161patn\u00e9 heslo ani neodpov\u00ed. Po 4 \u0161patn\u00fdch heslech b\u011bhem 3 minut ( 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. P\u0159ehran\u00fd login bez hesla u\u017e nevyvol\u00e1 flood odpov\u011b\u010f. Login klienta z ACL s pr\u00e1zdn\u00fdm heslem nem\u011bl ochranu proti p\u0159ehr\u00e1n\u00ed; \u00fato\u010dn\u00edk t\u00edm nic nez\u00edskal, ale ka\u017ed\u00e1 kopie donutila uzel poslat odpov\u011b\u010f floodem p\u0159es cel\u00fd mesh. TRACE u\u017e nep\u0159ipisuje cestu za konec payloadu; parsov\u00e1n\u00ed TRACE/PATH a Packet::readFrom hl\u00eddaj\u00ed meze. markSeen je zase idempotentn\u00ed (odes\u00edlac\u00ed cesta uj\u00eddala okno deduplikace). Z\u00e1lo\u017en\u00ed v\u00fdpo\u010det v calcMaxPacketMillis u\u017e nepodte\u010de (uzel na tom ohluchl). \u0160\u00ed\u0159ka path hashe se bere z nastaven\u00ed uzlu na v\u0161ech cest\u00e1ch vys\u00edl\u00e1n\u00ed v\u010detn\u011b sendZeroHop ; v\u00fdchoz\u00ed jsou 2bajtov\u00e9 path hashe ( PATH_HASH_MODE_DEFAULT ). Nepoveden\u00e9 vys\u00edl\u00e1n\u00ed se za\u0159ad\u00ed znovu s odstupem, m\u00edsto aby se zahodilo. RSSI ka\u017ed\u00e9ho paketu se zaznamen\u00e1 p\u0159i p\u0159\u00edjmu; ContactInfo se p\u0159ed \u010d\u00e1ste\u010dn\u00fdm vypln\u011bn\u00edm vynuluje.","title":"Opravy j\u00e1dra"},{"location":"#napajeni-hodiny-gps","text":"GPS duty cycle ( 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. Uzel bez GPS startuje na \u010dase sestaven\u00ed firmwaru, ne v roce 2024; hodiny a z\u00e1znam o hardfaultu p\u0159e\u017eij\u00ed tepl\u00fd reset ( .noinit ); clkreboot . Na sol\u00e1rn\u00edch uzlech \u017e\u00e1dn\u00e1 blikaj\u00edc\u00ed LED a pomalej\u0161\u00ed BLE advertising. Stav baterie jako ikona na konci advertovan\u00e9ho jm\u00e9na: 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). Voliteln\u00fd RX duty cycle ( 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). Podp\u011b\u0165ov\u00e1 pojistka p\u0159i startu ( 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 ).","title":"Nap\u00e1jen\u00ed, hodiny, GPS"},{"location":"#senzory-a-companiony","text":"simple_sensor : telemetrie z extern\u00ed stanice po UART ( BudkaLinkSensorManager , jeden LPP kan\u00e1l na veli\u010dinu), sensor read . Senzory, kter\u00e9 jinak m\u011b\u0159\u00ed nep\u0159etr\u017eit\u011b (INA219, INA226, INA260, INA3221, BMP280), mezi \u010dten\u00edmi telemetrie sp\u00ed a m\u011b\u0159\u00ed jen na vy\u017e\u00e1d\u00e1n\u00ed (n\u00e1pad a prvn\u00ed patch pro INA219: Alkel Brostl). \u010cipy INA se rozli\u0161uj\u00ed podle ID, tak\u017ee INA226 u\u017e se nedetekuje jako INA219. Odpor bo\u010dn\u00edku se nastavuje za b\u011bhu a ukl\u00e1d\u00e1 se: sensor set ina.shunt <m\u03a9> . Companion: 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.","title":"Senzory a companiony"},{"location":"#verejne-buildy-vychozi-nastaveni-pro-cesky-mesh","text":"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: r\u00e1dio 869,432 MHz / 62,5 kHz / SF7 / CR5 (v\u0161echny buildy); repeater a room server: zero-hop advert vypnut\u00fd, flood advert ka\u017ed\u00fdch 25 h, duty cycle 10 % ( get dutycycle \u2192 10.0% ; zastaral\u00e9 af je 9); repeater: regiony cz a cs vedle * \u2013 vlastn\u00ed cz-<kraj> p\u0159id\u00e1\u0161 p\u0159es region put cz-xxx cz + region save ; 2bajtov\u00e9 path hashe (v\u00fdchoz\u00ed v tomto forku); repeater: filtr kan\u00e1l\u016f ( 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.","title":"Ve\u0159ejn\u00e9 buildy: v\u00fdchoz\u00ed nastaven\u00ed pro \u010desk\u00fd mesh"},{"location":"#nahrani-releasu","text":"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): P\u0159ipoj desku p\u0159es USB. Klikni na Custom Firmware a vyber .zip pro svou desku. Klikni na Enter DFU mode a vyber s\u00e9riov\u00fd port desky. Deska se restartuje do bootloaderu a objev\u00ed se jako nov\u00fd port. Klikni na Flash! a vyber ten nov\u00fd port. Zhruba 30 s, pak se deska restartuje do nov\u00e9ho firmwaru. Console ve flasheru (nebo jak\u00fdkoli s\u00e9riov\u00fd termin\u00e1l, 115200) ov\u011b\u0159\u00ed v\u00fdsledek: 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.","title":"Nahr\u00e1n\u00ed releasu"},{"location":"#experimentalni-aktualizace-firmwaru-od-admina-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. V releasu je ke ka\u017ed\u00e9mu *-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. P\u0159es mesh uzel p\u0159ijme jen deltu, a nikdy ne star\u0161\u00ed verzi, ne\u017e m\u00e1 \u2013 vynucuje to uzel, ne n\u00e1stroj. Pln\u00fd obraz nebo n\u00e1vrat ke star\u0161\u00ed verzi jen lok\u00e1ln\u011b ( fw apply downgrade ). fw apply \u010dek\u00e1 na baterii \u2265 3,8 V, pokud uzel neb\u011b\u017e\u00ed z USB. Bal\u00ed\u010dky i 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 . Prvn\u00ed *-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 . Experiment\u00e1ln\u00ed i v r\u00e1mci tohoto forku : obrazy p\u0159ich\u00e1zej\u00ed s ka\u017ed\u00fdm releasem (viz upozorn\u011bn\u00ed naho\u0159e) a nemaj\u00ed druhou banku ani automatick\u00fd n\u00e1vrat. Vadn\u00fd firmware, kter\u00fd nabootuje, b\u011b\u017e\u00ed, dokud nepo\u0161lete dal\u0161\u00ed; takov\u00fd, kter\u00fd nenabootuje, chce USB/BLE DFU v ruce. Vyzkou\u0161eno na lavici (XIAO, USB, mesh, vedlej\u0161\u00ed kan\u00e1l) a od 13. 11. 2026 na dvou na\u0161ich sto\u017e\u00e1rech. Proti obrazu, kter\u00fd nabootuje s mrtv\u00fdm r\u00e1diem, jsou watchdogy r\u00e1dia (viz Diagnostika a provoz): pro uzly, kam pos\u00edl\u00e1te OTA, zapn\u011bte set radio.silence . Stoj\u00ed ~10 kB RAM nav\u00edc.","title":"Experiment\u00e1ln\u00ed: aktualizace firmwaru od admina (*-ota)"},{"location":"#sestaveni","text":"Raz\u00edtko verze v ka\u017ed\u00e9m nRF52 envu ( 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.","title":"Sestaven\u00ed"},{"location":"ble-lora-coexistence/","text":"BLE/LoRa coexistence \u2014 bench reproduction attempt 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. The claim under test 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. Rig 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 . node board role 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. Oracle 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 . What was measured 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. Why idle + weak link does nothing 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. On mast hardware, with the file log on 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 ). file log BLE direct_rx direct_tx lost tx_timeout witness off off 8 8 0 0 +39 off idle, 88 % of window 8 8 0 0 +37 on off 8 8 0 0 +39 on idle, 90 % of window 8 8 0 0 +40 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. Still open 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. Airtime is a hard limit, and the firmware will not enforce it 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. Traps worth remembering USB and BLE consoles share one 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. Weakening the link can lock you out of BLE. Below about \u221216 dBm the node's replies stop arriving and the value is re-applied on every reconnect (and, since 6. 10. 2026, saved). The way back is blepwr over the mesh admin CLI. ~~Runtime 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. The two commands this bench added Both live in examples/simple_repeater/main.cpp and are repeater-only. bleconn \u2014 what the link is actually doing bleconn -> BLE conn: interval 75.00 ms (req 60-80), latency 0, sup timeout 4000 ms [live] 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 blepwr # report: BLE conn tx: 0 dBm, adv tx: 8 dBm blepwr 8 # set, apply to live connections and save blepwr default # forget the saved value, back to RPT_BLE_CONN_TX_POWER 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.","title":"Koexistence BLE/LoRa"},{"location":"ble-lora-coexistence/#blelora-coexistence-bench-reproduction-attempt","text":"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.","title":"BLE/LoRa coexistence \u2014 bench reproduction attempt"},{"location":"ble-lora-coexistence/#the-claim-under-test","text":"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.","title":"The claim under test"},{"location":"ble-lora-coexistence/#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 . node board role 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.","title":"Rig"},{"location":"ble-lora-coexistence/#oracle","text":"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 .","title":"Oracle"},{"location":"ble-lora-coexistence/#what-was-measured","text":"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.","title":"What was measured"},{"location":"ble-lora-coexistence/#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.","title":"Why idle + weak link does nothing"},{"location":"ble-lora-coexistence/#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 ). file log BLE direct_rx direct_tx lost tx_timeout witness off off 8 8 0 0 +39 off idle, 88 % of window 8 8 0 0 +37 on off 8 8 0 0 +39 on idle, 90 % of window 8 8 0 0 +40 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.","title":"On mast hardware, with the file log on"},{"location":"ble-lora-coexistence/#still-open","text":"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.","title":"Still open"},{"location":"ble-lora-coexistence/#airtime-is-a-hard-limit-and-the-firmware-will-not-enforce-it","text":"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.","title":"Airtime is a hard limit, and the firmware will not enforce it"},{"location":"ble-lora-coexistence/#traps-worth-remembering","text":"USB and BLE consoles share one 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. Weakening the link can lock you out of BLE. Below about \u221216 dBm the node's replies stop arriving and the value is re-applied on every reconnect (and, since 6. 10. 2026, saved). The way back is blepwr over the mesh admin CLI. ~~Runtime 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.","title":"Traps worth remembering"},{"location":"ble-lora-coexistence/#the-two-commands-this-bench-added","text":"Both live in examples/simple_repeater/main.cpp and are repeater-only.","title":"The two commands this bench added"},{"location":"ble-lora-coexistence/#bleconn-what-the-link-is-actually-doing","text":"bleconn -> BLE conn: interval 75.00 ms (req 60-80), latency 0, sup timeout 4000 ms [live] 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 .","title":"bleconn \u2014 what the link is actually doing"},{"location":"ble-lora-coexistence/#blepwr-dbm-connection-tx-power-saved","text":"blepwr # report: BLE conn tx: 0 dBm, adv tx: 8 dBm blepwr 8 # set, apply to live connections and save blepwr default # forget the saved value, back to RPT_BLE_CONN_TX_POWER 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.","title":"blepwr [dBm] \u2014 connection TX power, saved"},{"location":"budka-sensor/","text":"Budka link \u2014 a Chytra Budka as a sensor source 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 . Build 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 extends = env:Xiao_nrf52_sensor build_flags = ${env : Xiao_nrf52_sensor.build_flags} ${test_radio.build_flags} ; bench : test band only -D BUDKA_LINK_RX_PIN = 0 ; D0 = the only pad LoRa + I\u00b2C leave free 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). Wiring 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. Telemetry layout channel content 1 the node itself next budka: temperature, humidity, pressure, motion count (generic sensor) next + k UC96 meter k : voltage, current, power (analog input), energy (kWh) 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. Bench result (13. 10. 2026) x1 (sensor, test band) fed by the bench budka; x4 as USB companion: ch2 temp_C 25.3 humidity_% 59.0 generic 29 ch3 voltage_V 4.94 current_A 0.10 analog_in 0.49 energy_kWh 0.111 ch4 voltage_V 4.94 current_A 0.18 analog_in 0.89 energy_kWh 0.311 Not done 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.","title":"Budka jako senzor \u00b7 Budka sensor"},{"location":"budka-sensor/#budka-link-a-chytra-budka-as-a-sensor-source","text":"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 .","title":"Budka link \u2014 a Chytra Budka as a sensor source"},{"location":"budka-sensor/#build","text":"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 extends = env:Xiao_nrf52_sensor build_flags = ${env : Xiao_nrf52_sensor.build_flags} ${test_radio.build_flags} ; bench : test band only -D BUDKA_LINK_RX_PIN = 0 ; D0 = the only pad LoRa + I\u00b2C leave free 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).","title":"Build"},{"location":"budka-sensor/#wiring","text":"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.","title":"Wiring"},{"location":"budka-sensor/#telemetry-layout","text":"channel content 1 the node itself next budka: temperature, humidity, pressure, motion count (generic sensor) next + k UC96 meter k : voltage, current, power (analog input), energy (kWh) 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.","title":"Telemetry layout"},{"location":"budka-sensor/#bench-result-13-10-2026","text":"x1 (sensor, test band) fed by the bench budka; x4 as USB companion: ch2 temp_C 25.3 humidity_% 59.0 generic 29 ch3 voltage_V 4.94 current_A 0.10 analog_in 0.49 energy_kWh 0.111 ch4 voltage_V 4.94 current_A 0.18 analog_in 0.89 energy_kWh 0.311","title":"Bench result (13. 10. 2026)"},{"location":"budka-sensor/#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.","title":"Not done"},{"location":"cli_commands/","text":"CLI Commands This document provides an overview of CLI commands that can be sent to MeshCore Repeaters, Room Servers and Sensors. Navigation Operational Neighbors Posts Statistics Logging Information Configuration Radio System Routing ACL Region Management Region Examples GPS Sensors Bridge Ethernet Operational Reboot the node Usage: - reboot Note: No reply is sent. Power-off the node Usage: - poweroff , or - shutdown Note: No reply is sent. Reset the clock and reboot 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. Sync the clock with the remote device 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. Display current time in UTC 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. Set the time to a specific timestamp 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 ( gps duty is enough \u2014 see docs/power.md ); an attached host \u2014 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; the build epoch , which is where a freshly flashed board starts, and which needs nothing at all. Send a flood advert Usage: - advert Send a zero-hop advert Usage: - advert.zerohop Start an Over-The-Air (OTA) firmware update Usage: - start ota Erase/Factory Reset Usage: - erase Serial Only: Yes Warning: This is destructive! Neighbors (Repeater Only) List nearby neighbors 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} Remove a neighbor 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. Discover zero hop neighbors Usage: - discover.neighbors Posts (Room Server Only) Post a message as the room server 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. Statistics Clear Stats Usage: clear stats System Stats - Battery, Uptime, Queue Length and Debug Flags 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. Value Flag Meaning 1 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. Radio Stats - Noise floor, Last RSSI/SNR, Airtime, Receive errors Usage: stats-radio Serial Only: Yes Packet stats - Packet counters: Received, Sent Usage: stats-packets Serial Only: Yes Logging Begin capture of rx log to node storage Usage: log start End capture of rx log to node storage Usage: log stop Erase captured log Usage: log erase Print the captured log to the serial terminal Usage: log Serial Only: Yes Info Get the Version Usage: ver Show the hardware name Usage: board Configuration Radio View or change this node's radio parameters 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. View or change this node's transmit power 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. Change the radio parameters for a set duration 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 View or change this node's frequency Usage: - get freq - set freq <frequency> Parameters: - frequency : Frequency in MHz Default: 869.618 Note: Requires reboot to apply Serial Only: set freq <frequency> View or change this node's rx boosted gain mode (SX12xx and LR1110, v1.14.1+) 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 View or change the LoRa FEM receive-path gain state on supported boards 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. View or change the LoRa FEM transmit-path gain state on supported boards 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. System View or change this node's name 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. Show battery state as an icon on the advertised name (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. Battery scale for the name icon 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 View or change this node's latitude Usage: - get lat - set lat <degrees> Set by build flag: ADVERT_LAT Default: 0 Parameters: - degrees : Latitude in degrees View or change this node's longitude Usage: - get lon - set lon <degrees> Set by build flag: ADVERT_LON Default: 0 Parameters: - degrees : Longitude in degrees View or change this node's identity (Private Key) 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 Change this node's admin password 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. View or change this node's guest password Usage: - get guest.password - set guest.password <password> Parameters: - password : Guest password Set by build flag: ROOM_PASSWORD (Room Server only) Default: <blank> View or change this node's owner info 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+ Fine-tune the battery reading 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 View this node's public key Usage: get public.key View this node's firmware version Usage: ver View this node's configured role Usage: get role View or change this node's power saving flag (Repeater Only) 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 View or change the RX duty cycle (rxps) -- CUSTOM (TeTeHacko) 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 . Routing View or change this node's repeat flag Usage: - get repeat - set repeat <state> Parameters: - state : on | off Default: on View or change this node's advert path hash size 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. View or change this node's loop detection 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. View or change the retransmit delay factor for flood traffic 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. View or change the retransmit delay factor for direct traffic 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. [Experimental] View or change the processing delay for received traffic 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. View or change the duty cycle limit 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. View or change the airtime factor (duty cycle limit) 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 View or change the local interference threshold Usage: - get int.thresh - set int.thresh <value> Parameters: - value : Interference threshold value Default: 0.0 Enable or disable hardware Channel Activity Detection (CAD) 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 View or change the AGC Reset Interval 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 Radio silence watchdog (repeater, sensor, room server) 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) TX stall watchdog (repeater) 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 Reboot into the bootloader (repeater, sensor, room server; nRF52, local console only) 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. Why the board last reset (repeater, sensor, room server) 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. Enable or disable Multi-Acks support Usage: - get multi.acks - set multi.acks <state> Parameters: - state : 0 (disable) or 1 (enable) Default: 0 View or change the flood advert interval 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) View or change the zero-hop advert interval 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. Limit the number of hops for a flood message Usage: - get flood.max - set flood.max <value> Parameters: - value : Maximum flood hop count (0-64) Default: 64 Limit the number of hops for an unscoped flood message 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. Limit the number of hops for an advert flood message Usage: - get flood.max.advert - set flood.max.advert <value> Parameters: - value : Maximum flood hop count (0-64) for an advert packet Default: 8 ACL Add, update or remove permissions for a companion 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 View the current ACL Usage: - get acl Serial Only: Yes View or change this room server's 'read-only' flag Usage: - get allow.read.only - set allow.read.only <state> Parameters: - state : on (enable) or off (disable) Default: off Region Management (v1.10.+) Bulk-load region lists 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) Save any changes to regions made since reboot Usage: - region save Allow a region Usage: - region allowf <name> Parameters: - name : Region name (or * for wildcard) Note: Setting on wildcard * allows packets without region transport codes Block a region Usage: - region denyf <name> Parameters: - name : Region name (or * for wildcard) Note: Setting on wildcard * drops packets without region transport codes Show information for a region Usage: - region get <name> Parameters: - name : Region name (or * for wildcard) View or change the home region for this node Usage: - region home - region home <name> Parameters: - name : Region name View or change the default scope region for this node Usage: - region default - region default {name|<null>} Parameters: - name : Region name, or to reset/clear Create a new region Usage: - region put <name> [parent_name] Parameters: - name : Region name - parent_name : Parent region name (optional, defaults to wildcard) Define region hierarchy (single line) 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 region save 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 region save Example \u2014 error and partial state: region def a b c|nope d 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 region save Remove a region Usage: - region remove <name> Parameters: - name : Region name Note: Must remove all child regions before the region can be removed View all regions Usage: - region list <filter> Serial Only: Yes Parameters: - filter : allowed | denied Note: Requires firmware 1.12+ Dump all defined regions and flood permissions Usage: - region Serial Only: For firmware older than 1.12.0 Region Examples Example 1: Using F Flag with Named Public Region region load #Europe F <blank line to end region load> region save 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 * F <blank line to end region load> region save 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 * <blank line to end region load> region save 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 #Europe F #UK #London #Manchester #France #Paris #Lyon <blank line to end region load> region save 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 * F #NorthAmerica #USA #NewYork #California #Canada #Ontario #Quebec <blank line to end region load> region save 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 GPS (When GPS support is compiled in) View GPS state 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. Change GPS state 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). View or change the GPS acquisition period 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 ). View or change the first fix timeout 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. View the last GPS fix 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 . Sync this node's clock with GPS time Usage: - gps sync On demand GPS fix 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 . View GPS time to first fix statistics 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 ). View GPS diagnostics Usage: - gps diag GPS anti-spoofing guard (When built with GPS_GUARD ) 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 . Set this node's location based on the GPS coordinates Usage: - gps setloc View or change the GPS advert policy 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. Sensors (When sensor support is compiled in) View the list of sensors on this node Usage: sensor list [start] Parameters: - start : Optional starting index (defaults to 0) Note: Output format: <var_name>=<value>\\n View or change the value of a sensor Usage: - sensor get <key> - sensor set <key> <value> Parameters: - key : Sensor setting name - value : The value to set the sensor to Set the INA current sensor's shunt resistor 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). Bridge (When bridge support is compiled in) View the compiled bridge type Usage: get bridge.type View or change the bridge enabled flag Usage: - get bridge.enabled - set bridge.enabled <state> Parameters: - state : on | off Default: off Add a delay to packets routed through this bridge Usage: - get bridge.delay - set bridge.delay <ms> Parameters: - ms : Delay in milliseconds (0-10000) Default: 500 View or change the source of packets bridged to the external interface Usage: - get bridge.source - set bridge.source <source> Parameters: - source : - logRx : bridges received packets - logTx : bridges transmitted packets Default: logTx View or change the speed of the bridge (RS-232 only) Usage: - get bridge.baud - set bridge.baud <rate> Parameters: - rate : Baud rate ( 9600 , 19200 , 38400 , 57600 , or 115200 ) Default: 115200 View or change the channel used for bridging (ESPNow only) Usage: - get bridge.channel - set bridge.channel <channel> Parameters: - channel : Channel number (1-14) Set the ESP-Now secret Usage: - get bridge.secret - set bridge.secret <secret> Parameters: - secret : ESP-NOW bridge secret, up to 15 characters Default: Varies by board View the bootloader version (nRF52 only) Usage: get bootloader.ver View power management support Usage: get pwrmgt.support View the current power source Usage: get pwrmgt.source Note: Returns an error on boards without power management support. View the boot reset and shutdown reasons Usage: get pwrmgt.bootreason Note: Returns an error on boards without power management support. View the boot voltage Usage: get pwrmgt.bootmv Note: Returns an error on boards without power management support. Ethernet (when Ethernet support is compiled in) 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. View Ethernet connection status 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.","title":"CLI commands"},{"location":"cli_commands/#cli-commands","text":"This document provides an overview of CLI commands that can be sent to MeshCore Repeaters, Room Servers and Sensors.","title":"CLI Commands"},{"location":"cli_commands/#navigation","text":"Operational Neighbors Posts Statistics Logging Information Configuration Radio System Routing ACL Region Management Region Examples GPS Sensors Bridge Ethernet","title":"Navigation"},{"location":"cli_commands/#operational","text":"","title":"Operational"},{"location":"cli_commands/#reboot-the-node","text":"Usage: - reboot Note: No reply is sent.","title":"Reboot the node"},{"location":"cli_commands/#power-off-the-node","text":"Usage: - poweroff , or - shutdown Note: No reply is sent.","title":"Power-off the node"},{"location":"cli_commands/#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.","title":"Reset the clock and reboot"},{"location":"cli_commands/#sync-the-clock-with-the-remote-device","text":"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.","title":"Sync the clock with the remote device"},{"location":"cli_commands/#display-current-time-in-utc","text":"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.","title":"Display current time in UTC"},{"location":"cli_commands/#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 ( gps duty is enough \u2014 see docs/power.md ); an attached host \u2014 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; the build epoch , which is where a freshly flashed board starts, and which needs nothing at all.","title":"Set the time to a specific timestamp"},{"location":"cli_commands/#send-a-flood-advert","text":"Usage: - advert","title":"Send a flood advert"},{"location":"cli_commands/#send-a-zero-hop-advert","text":"Usage: - advert.zerohop","title":"Send a zero-hop advert"},{"location":"cli_commands/#start-an-over-the-air-ota-firmware-update","text":"Usage: - start ota","title":"Start an Over-The-Air (OTA) firmware update"},{"location":"cli_commands/#erasefactory-reset","text":"Usage: - erase Serial Only: Yes Warning: This is destructive!","title":"Erase/Factory Reset"},{"location":"cli_commands/#neighbors-repeater-only","text":"","title":"Neighbors (Repeater Only)"},{"location":"cli_commands/#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}","title":"List nearby neighbors"},{"location":"cli_commands/#remove-a-neighbor","text":"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.","title":"Remove a neighbor"},{"location":"cli_commands/#discover-zero-hop-neighbors","text":"Usage: - discover.neighbors","title":"Discover zero hop neighbors"},{"location":"cli_commands/#posts-room-server-only","text":"","title":"Posts (Room Server Only)"},{"location":"cli_commands/#post-a-message-as-the-room-server","text":"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.","title":"Post a message as the room server"},{"location":"cli_commands/#statistics","text":"","title":"Statistics"},{"location":"cli_commands/#clear-stats","text":"Usage: clear stats","title":"Clear Stats"},{"location":"cli_commands/#system-stats-battery-uptime-queue-length-and-debug-flags","text":"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. Value Flag Meaning 1 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.","title":"System Stats - Battery, Uptime, Queue Length and Debug Flags"},{"location":"cli_commands/#radio-stats-noise-floor-last-rssisnr-airtime-receive-errors","text":"Usage: stats-radio Serial Only: Yes","title":"Radio Stats - Noise floor, Last RSSI/SNR, Airtime, Receive errors"},{"location":"cli_commands/#packet-stats-packet-counters-received-sent","text":"Usage: stats-packets Serial Only: Yes","title":"Packet stats - Packet counters: Received, Sent"},{"location":"cli_commands/#logging","text":"","title":"Logging"},{"location":"cli_commands/#begin-capture-of-rx-log-to-node-storage","text":"Usage: log start","title":"Begin capture of rx log to node storage"},{"location":"cli_commands/#end-capture-of-rx-log-to-node-storage","text":"Usage: log stop","title":"End capture of rx log to node storage"},{"location":"cli_commands/#erase-captured-log","text":"Usage: log erase","title":"Erase captured log"},{"location":"cli_commands/#print-the-captured-log-to-the-serial-terminal","text":"Usage: log Serial Only: Yes","title":"Print the captured log to the serial terminal"},{"location":"cli_commands/#info","text":"","title":"Info"},{"location":"cli_commands/#get-the-version","text":"Usage: ver","title":"Get the Version"},{"location":"cli_commands/#show-the-hardware-name","text":"Usage: board","title":"Show the hardware name"},{"location":"cli_commands/#configuration","text":"","title":"Configuration"},{"location":"cli_commands/#radio","text":"","title":"Radio"},{"location":"cli_commands/#view-or-change-this-nodes-radio-parameters","text":"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.","title":"View or change this node's radio parameters"},{"location":"cli_commands/#view-or-change-this-nodes-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.","title":"View or change this node's transmit power"},{"location":"cli_commands/#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","title":"Change the radio parameters for a set duration"},{"location":"cli_commands/#view-or-change-this-nodes-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>","title":"View or change this node's frequency"},{"location":"cli_commands/#view-or-change-this-nodes-rx-boosted-gain-mode-sx12xx-and-lr1110-v1141","text":"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","title":"View or change this node's rx boosted gain mode (SX12xx and LR1110, v1.14.1+)"},{"location":"cli_commands/#view-or-change-the-lora-fem-receive-path-gain-state-on-supported-boards","text":"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.","title":"View or change the LoRa FEM receive-path gain state on supported boards"},{"location":"cli_commands/#view-or-change-the-lora-fem-transmit-path-gain-state-on-supported-boards","text":"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.","title":"View or change the LoRa FEM transmit-path gain state on supported boards"},{"location":"cli_commands/#system","text":"","title":"System"},{"location":"cli_commands/#view-or-change-this-nodes-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.","title":"View or change this node's name"},{"location":"cli_commands/#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.","title":"Show battery state as an icon on the advertised name"},{"location":"cli_commands/#battery-scale-for-the-name-icon","text":"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","title":"Battery scale for the name icon"},{"location":"cli_commands/#view-or-change-this-nodes-latitude","text":"Usage: - get lat - set lat <degrees> Set by build flag: ADVERT_LAT Default: 0 Parameters: - degrees : Latitude in degrees","title":"View or change this node's latitude"},{"location":"cli_commands/#view-or-change-this-nodes-longitude","text":"Usage: - get lon - set lon <degrees> Set by build flag: ADVERT_LON Default: 0 Parameters: - degrees : Longitude in degrees","title":"View or change this node's longitude"},{"location":"cli_commands/#view-or-change-this-nodes-identity-private-key","text":"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","title":"View or change this node's identity (Private Key)"},{"location":"cli_commands/#change-this-nodes-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.","title":"Change this node's admin password"},{"location":"cli_commands/#view-or-change-this-nodes-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>","title":"View or change this node's guest password"},{"location":"cli_commands/#view-or-change-this-nodes-owner-info","text":"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+","title":"View or change this node's owner info"},{"location":"cli_commands/#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","title":"Fine-tune the battery reading"},{"location":"cli_commands/#view-this-nodes-public-key","text":"Usage: get public.key","title":"View this node's public key"},{"location":"cli_commands/#view-this-nodes-firmware-version","text":"Usage: ver","title":"View this node's firmware version"},{"location":"cli_commands/#view-this-nodes-configured-role","text":"Usage: get role","title":"View this node's configured role"},{"location":"cli_commands/#view-or-change-this-nodes-power-saving-flag-repeater-only","text":"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","title":"View or change this node's power saving flag (Repeater Only)"},{"location":"cli_commands/#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 .","title":"View or change the RX duty cycle (rxps) -- CUSTOM (TeTeHacko)"},{"location":"cli_commands/#routing","text":"","title":"Routing"},{"location":"cli_commands/#view-or-change-this-nodes-repeat-flag","text":"Usage: - get repeat - set repeat <state> Parameters: - state : on | off Default: on","title":"View or change this node's repeat flag"},{"location":"cli_commands/#view-or-change-this-nodes-advert-path-hash-size","text":"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.","title":"View or change this node's advert path hash size"},{"location":"cli_commands/#view-or-change-this-nodes-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.","title":"View or change this node's loop detection"},{"location":"cli_commands/#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.","title":"View or change the retransmit delay factor for flood traffic"},{"location":"cli_commands/#view-or-change-the-retransmit-delay-factor-for-direct-traffic","text":"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.","title":"View or change the retransmit delay factor for direct traffic"},{"location":"cli_commands/#experimental-view-or-change-the-processing-delay-for-received-traffic","text":"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.","title":"[Experimental] View or change the processing delay for received traffic"},{"location":"cli_commands/#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.","title":"View or change the duty cycle limit"},{"location":"cli_commands/#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","title":"View or change the airtime factor (duty cycle limit)"},{"location":"cli_commands/#view-or-change-the-local-interference-threshold","text":"Usage: - get int.thresh - set int.thresh <value> Parameters: - value : Interference threshold value Default: 0.0","title":"View or change the local interference threshold"},{"location":"cli_commands/#enable-or-disable-hardware-channel-activity-detection-cad","text":"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","title":"Enable or disable hardware Channel Activity Detection (CAD)"},{"location":"cli_commands/#view-or-change-the-agc-reset-interval","text":"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","title":"View or change the AGC Reset Interval"},{"location":"cli_commands/#radio-silence-watchdog-repeater-sensor-room-server","text":"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)","title":"Radio silence watchdog (repeater, sensor, room server)"},{"location":"cli_commands/#tx-stall-watchdog-repeater","text":"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","title":"TX stall watchdog (repeater)"},{"location":"cli_commands/#reboot-into-the-bootloader-repeater-sensor-room-server-nrf52-local-console-only","text":"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.","title":"Reboot into the bootloader (repeater, sensor, room server; nRF52, local console only)"},{"location":"cli_commands/#why-the-board-last-reset-repeater-sensor-room-server","text":"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.","title":"Why the board last reset (repeater, sensor, room server)"},{"location":"cli_commands/#enable-or-disable-multi-acks-support","text":"Usage: - get multi.acks - set multi.acks <state> Parameters: - state : 0 (disable) or 1 (enable) Default: 0","title":"Enable or disable Multi-Acks support"},{"location":"cli_commands/#view-or-change-the-flood-advert-interval","text":"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)","title":"View or change the flood advert interval"},{"location":"cli_commands/#view-or-change-the-zero-hop-advert-interval","text":"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.","title":"View or change the zero-hop advert interval"},{"location":"cli_commands/#limit-the-number-of-hops-for-a-flood-message","text":"Usage: - get flood.max - set flood.max <value> Parameters: - value : Maximum flood hop count (0-64) Default: 64","title":"Limit the number of hops for a flood message"},{"location":"cli_commands/#limit-the-number-of-hops-for-an-unscoped-flood-message","text":"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.","title":"Limit the number of hops for an unscoped flood message"},{"location":"cli_commands/#limit-the-number-of-hops-for-an-advert-flood-message","text":"Usage: - get flood.max.advert - set flood.max.advert <value> Parameters: - value : Maximum flood hop count (0-64) for an advert packet Default: 8","title":"Limit the number of hops for an advert flood message"},{"location":"cli_commands/#acl","text":"","title":"ACL"},{"location":"cli_commands/#add-update-or-remove-permissions-for-a-companion","text":"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","title":"Add, update or remove permissions for a companion"},{"location":"cli_commands/#view-the-current-acl","text":"Usage: - get acl Serial Only: Yes","title":"View the current ACL"},{"location":"cli_commands/#view-or-change-this-room-servers-read-only-flag","text":"Usage: - get allow.read.only - set allow.read.only <state> Parameters: - state : on (enable) or off (disable) Default: off","title":"View or change this room server's 'read-only' flag"},{"location":"cli_commands/#region-management-v110","text":"","title":"Region Management (v1.10.+)"},{"location":"cli_commands/#bulk-load-region-lists","text":"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)","title":"Bulk-load region lists"},{"location":"cli_commands/#save-any-changes-to-regions-made-since-reboot","text":"Usage: - region save","title":"Save any changes to regions made since reboot"},{"location":"cli_commands/#allow-a-region","text":"Usage: - region allowf <name> Parameters: - name : Region name (or * for wildcard) Note: Setting on wildcard * allows packets without region transport codes","title":"Allow a region"},{"location":"cli_commands/#block-a-region","text":"Usage: - region denyf <name> Parameters: - name : Region name (or * for wildcard) Note: Setting on wildcard * drops packets without region transport codes","title":"Block a region"},{"location":"cli_commands/#show-information-for-a-region","text":"Usage: - region get <name> Parameters: - name : Region name (or * for wildcard)","title":"Show information for a region"},{"location":"cli_commands/#view-or-change-the-home-region-for-this-node","text":"Usage: - region home - region home <name> Parameters: - name : Region name","title":"View or change the home region for this node"},{"location":"cli_commands/#view-or-change-the-default-scope-region-for-this-node","text":"Usage: - region default - region default {name|<null>} Parameters: - name : Region name, or to reset/clear","title":"View or change the default scope region for this node"},{"location":"cli_commands/#create-a-new-region","text":"Usage: - region put <name> [parent_name] Parameters: - name : Region name - parent_name : Parent region name (optional, defaults to wildcard)","title":"Create a new region"},{"location":"cli_commands/#define-region-hierarchy-single-line","text":"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 region save 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 region save Example \u2014 error and partial state: region def a b c|nope d 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 region save","title":"Define region hierarchy (single line)"},{"location":"cli_commands/#remove-a-region","text":"Usage: - region remove <name> Parameters: - name : Region name Note: Must remove all child regions before the region can be removed","title":"Remove a region"},{"location":"cli_commands/#view-all-regions","text":"Usage: - region list <filter> Serial Only: Yes Parameters: - filter : allowed | denied Note: Requires firmware 1.12+","title":"View all regions"},{"location":"cli_commands/#dump-all-defined-regions-and-flood-permissions","text":"Usage: - region Serial Only: For firmware older than 1.12.0","title":"Dump all defined regions and flood permissions"},{"location":"cli_commands/#region-examples","text":"Example 1: Using F Flag with Named Public Region region load #Europe F <blank line to end region load> region save 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 * F <blank line to end region load> region save 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 * <blank line to end region load> region save 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 #Europe F #UK #London #Manchester #France #Paris #Lyon <blank line to end region load> region save 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 * F #NorthAmerica #USA #NewYork #California #Canada #Ontario #Quebec <blank line to end region load> region save 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","title":"Region Examples"},{"location":"cli_commands/#gps-when-gps-support-is-compiled-in","text":"","title":"GPS (When GPS support is compiled in)"},{"location":"cli_commands/#view-gps-state","text":"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.","title":"View GPS state"},{"location":"cli_commands/#change-gps-state","text":"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).","title":"Change GPS state"},{"location":"cli_commands/#view-or-change-the-gps-acquisition-period","text":"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 ).","title":"View or change the GPS acquisition period"},{"location":"cli_commands/#view-or-change-the-first-fix-timeout","text":"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.","title":"View or change the first fix timeout"},{"location":"cli_commands/#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 .","title":"View the last GPS fix"},{"location":"cli_commands/#sync-this-nodes-clock-with-gps-time","text":"Usage: - gps sync","title":"Sync this node's clock with GPS time"},{"location":"cli_commands/#on-demand-gps-fix","text":"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 .","title":"On demand GPS fix"},{"location":"cli_commands/#view-gps-time-to-first-fix-statistics","text":"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 ).","title":"View GPS time to first fix statistics"},{"location":"cli_commands/#view-gps-diagnostics","text":"Usage: - gps diag","title":"View GPS diagnostics"},{"location":"cli_commands/#gps-anti-spoofing-guard-when-built-with-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 .","title":"GPS anti-spoofing guard (When built with GPS_GUARD)"},{"location":"cli_commands/#set-this-nodes-location-based-on-the-gps-coordinates","text":"Usage: - gps setloc","title":"Set this node's location based on the GPS coordinates"},{"location":"cli_commands/#view-or-change-the-gps-advert-policy","text":"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.","title":"View or change the GPS advert policy"},{"location":"cli_commands/#sensors-when-sensor-support-is-compiled-in","text":"","title":"Sensors (When sensor support is compiled in)"},{"location":"cli_commands/#view-the-list-of-sensors-on-this-node","text":"Usage: sensor list [start] Parameters: - start : Optional starting index (defaults to 0) Note: Output format: <var_name>=<value>\\n","title":"View the list of sensors on this node"},{"location":"cli_commands/#view-or-change-the-value-of-a-sensor","text":"Usage: - sensor get <key> - sensor set <key> <value> Parameters: - key : Sensor setting name - value : The value to set the sensor to","title":"View or change the value of a sensor"},{"location":"cli_commands/#set-the-ina-current-sensors-shunt-resistor","text":"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).","title":"Set the INA current sensor's shunt resistor"},{"location":"cli_commands/#bridge-when-bridge-support-is-compiled-in","text":"","title":"Bridge (When bridge support is compiled in)"},{"location":"cli_commands/#view-the-compiled-bridge-type","text":"Usage: get bridge.type","title":"View the compiled bridge type"},{"location":"cli_commands/#view-or-change-the-bridge-enabled-flag","text":"Usage: - get bridge.enabled - set bridge.enabled <state> Parameters: - state : on | off Default: off","title":"View or change the bridge enabled flag"},{"location":"cli_commands/#add-a-delay-to-packets-routed-through-this-bridge","text":"Usage: - get bridge.delay - set bridge.delay <ms> Parameters: - ms : Delay in milliseconds (0-10000) Default: 500","title":"Add a delay to packets routed through this bridge"},{"location":"cli_commands/#view-or-change-the-source-of-packets-bridged-to-the-external-interface","text":"Usage: - get bridge.source - set bridge.source <source> Parameters: - source : - logRx : bridges received packets - logTx : bridges transmitted packets Default: logTx","title":"View or change the source of packets bridged to the external interface"},{"location":"cli_commands/#view-or-change-the-speed-of-the-bridge-rs-232-only","text":"Usage: - get bridge.baud - set bridge.baud <rate> Parameters: - rate : Baud rate ( 9600 , 19200 , 38400 , 57600 , or 115200 ) Default: 115200","title":"View or change the speed of the bridge (RS-232 only)"},{"location":"cli_commands/#view-or-change-the-channel-used-for-bridging-espnow-only","text":"Usage: - get bridge.channel - set bridge.channel <channel> Parameters: - channel : Channel number (1-14)","title":"View or change the channel used for bridging (ESPNow only)"},{"location":"cli_commands/#set-the-esp-now-secret","text":"Usage: - get bridge.secret - set bridge.secret <secret> Parameters: - secret : ESP-NOW bridge secret, up to 15 characters Default: Varies by board","title":"Set the ESP-Now secret"},{"location":"cli_commands/#view-the-bootloader-version-nrf52-only","text":"Usage: get bootloader.ver","title":"View the bootloader version (nRF52 only)"},{"location":"cli_commands/#view-power-management-support","text":"Usage: get pwrmgt.support","title":"View power management support"},{"location":"cli_commands/#view-the-current-power-source","text":"Usage: get pwrmgt.source Note: Returns an error on boards without power management support.","title":"View the current power source"},{"location":"cli_commands/#view-the-boot-reset-and-shutdown-reasons","text":"Usage: get pwrmgt.bootreason Note: Returns an error on boards without power management support.","title":"View the boot reset and shutdown reasons"},{"location":"cli_commands/#view-the-boot-voltage","text":"Usage: get pwrmgt.bootmv Note: Returns an error on boards without power management support.","title":"View the boot voltage"},{"location":"cli_commands/#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.","title":"Ethernet (when Ethernet support is compiled in)"},{"location":"cli_commands/#view-ethernet-connection-status","text":"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.","title":"View Ethernet connection status"},{"location":"companion_cli/","text":"Companion CLI 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. Navigation Operational Configuration System Radio GPS BLE Wifi UI Operational Reboot the node Usage: - reboot Note: No reply is sent. Power-off the node Usage: - poweroff , or - shutdown Note: No reply is sent. Configuration System View or change this node's name 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. View this node's firmware version Usage: ver Configure this node's timezone Usage: - set tz.offset <offset> - get tz.offset Parameters: - offset : float value of the offset in hours Fine-tune the battery reading 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). View or change the buzzer state 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 Radio parameters are common to all roles and handled by CommonRadioPrefs . View or change this node's radio parameters 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 View or change this node's transmit power 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. View or change this node's frequency Usage: - get freq - set freq <frequency> Parameters: - frequency : Frequency in MHz Default: 869.618 Note: Requires reboot to apply Serial Only: set freq <frequency> GPS View GPS state 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. Change GPS state Usage: - gps <state> Parameters: - state : on | off View or change the GPS acquisition period 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. View the last GPS fix 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 . Sync this node's clock with GPS time Usage: - gps sync On demand GPS fix 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 . View GPS time to first fix statistics 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 ). View GPS diagnostics Usage: - gps diag View or change this node's rx boosted gain mode (SX12xx and LR1110) Usage: - get radio.rxgain - set radio.rxgain <state> Parameters: - state : on | off Default: on View or change the LoRa FEM receive-path gain state on supported boards 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. View or change the LoRa FEM transmit-path gain state on supported boards 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. View or change the duty cycle limit 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 View or change the airtime factor (duty cycle limit) 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 View or change the local interference threshold Usage: - get int.thresh - set int.thresh <value> Parameters: - value : Interference threshold value Default: 0.0 Enable or disable hardware Channel Activity Detection (CAD) 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 View or change the AGC Reset Interval 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 Enable or disable Multi-Acks support Usage: - get multi.acks - set multi.acks <state> Parameters: - state : 0 (disable) or 1 (enable) Default: 0 View or change this node's advert path hash size 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 View or change the retransmit delay factor for flood traffic 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. View or change the retransmit delay factor for direct traffic 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. [Experimental] View or change the processing delay for received traffic 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. BLE Change BLE PIN Usage: - set pin <pin> Parameters: - pin : New BLE PIN Set by build flag: BLE_PIN_CODE Change BLE name 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. Wifi Get status Usage: - get wifi.status - get wifi.ip Toggle Usage: - set wifi.enabled <value> - get wifi.enabled Parameters: - value : 0 (disable) or 1 (enable) Set SSID Usage: - set wifi.ssid <value> - get wifi.ssid Parameters: - value : ssid as a string Set password Usage: - set wifi.pwd <value> - get wifi.pwd Parameters: - value : password string UI Show clock 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) GPS key action 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. Node discovery screen shows nodes names 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. Auto-off screen 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. Display backlight timeout 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. When to turn backlight on 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. Control if eink screen should be blanked 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 ... Keep message previews when the eink screen turns off 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. Maximum number of partial refreshes 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.","title":"Companion CLI"},{"location":"companion_cli/#companion-cli","text":"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.","title":"Companion CLI"},{"location":"companion_cli/#navigation","text":"Operational Configuration System Radio GPS BLE Wifi UI","title":"Navigation"},{"location":"companion_cli/#operational","text":"","title":"Operational"},{"location":"companion_cli/#reboot-the-node","text":"Usage: - reboot Note: No reply is sent.","title":"Reboot the node"},{"location":"companion_cli/#power-off-the-node","text":"Usage: - poweroff , or - shutdown Note: No reply is sent.","title":"Power-off the node"},{"location":"companion_cli/#configuration","text":"","title":"Configuration"},{"location":"companion_cli/#system","text":"","title":"System"},{"location":"companion_cli/#view-or-change-this-nodes-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.","title":"View or change this node's name"},{"location":"companion_cli/#view-this-nodes-firmware-version","text":"Usage: ver","title":"View this node's firmware version"},{"location":"companion_cli/#configure-this-nodes-timezone","text":"Usage: - set tz.offset <offset> - get tz.offset Parameters: - offset : float value of the offset in hours","title":"Configure this node's timezone"},{"location":"companion_cli/#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\" if the board doesn't support it. Same command as on repeaters, for boards whose battery divider resistors vary (e.g. DIY ProMicro / Faketec).","title":"Fine-tune the battery reading"},{"location":"companion_cli/#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.","title":"View or change the buzzer state"},{"location":"companion_cli/#radio","text":"Radio parameters are common to all roles and handled by CommonRadioPrefs .","title":"Radio"},{"location":"companion_cli/#view-or-change-this-nodes-radio-parameters","text":"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","title":"View or change this node's radio parameters"},{"location":"companion_cli/#view-or-change-this-nodes-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.","title":"View or change this node's transmit power"},{"location":"companion_cli/#view-or-change-this-nodes-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>","title":"View or change this node's frequency"},{"location":"companion_cli/#gps","text":"","title":"GPS"},{"location":"companion_cli/#view-gps-state","text":"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.","title":"View GPS state"},{"location":"companion_cli/#change-gps-state","text":"Usage: - gps <state> Parameters: - state : on | off","title":"Change GPS state"},{"location":"companion_cli/#view-or-change-the-gps-acquisition-period","text":"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.","title":"View or change the GPS acquisition period"},{"location":"companion_cli/#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 .","title":"View the last GPS fix"},{"location":"companion_cli/#sync-this-nodes-clock-with-gps-time","text":"Usage: - gps sync","title":"Sync this node's clock with GPS time"},{"location":"companion_cli/#on-demand-gps-fix","text":"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 .","title":"On demand GPS fix"},{"location":"companion_cli/#view-gps-time-to-first-fix-statistics","text":"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 ).","title":"View GPS time to first fix statistics"},{"location":"companion_cli/#view-gps-diagnostics","text":"Usage: - gps diag","title":"View GPS diagnostics"},{"location":"companion_cli/#view-or-change-this-nodes-rx-boosted-gain-mode-sx12xx-and-lr1110","text":"Usage: - get radio.rxgain - set radio.rxgain <state> Parameters: - state : on | off Default: on","title":"View or change this node's rx boosted gain mode (SX12xx and LR1110)"},{"location":"companion_cli/#view-or-change-the-lora-fem-receive-path-gain-state-on-supported-boards","text":"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.","title":"View or change the LoRa FEM receive-path gain state on supported boards"},{"location":"companion_cli/#view-or-change-the-lora-fem-transmit-path-gain-state-on-supported-boards","text":"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.","title":"View or change the LoRa FEM transmit-path gain state on supported boards"},{"location":"companion_cli/#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","title":"View or change the duty cycle limit"},{"location":"companion_cli/#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","title":"View or change the airtime factor (duty cycle limit)"},{"location":"companion_cli/#view-or-change-the-local-interference-threshold","text":"Usage: - get int.thresh - set int.thresh <value> Parameters: - value : Interference threshold value Default: 0.0","title":"View or change the local interference threshold"},{"location":"companion_cli/#enable-or-disable-hardware-channel-activity-detection-cad","text":"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","title":"Enable or disable hardware Channel Activity Detection (CAD)"},{"location":"companion_cli/#view-or-change-the-agc-reset-interval","text":"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","title":"View or change the AGC Reset Interval"},{"location":"companion_cli/#enable-or-disable-multi-acks-support","text":"Usage: - get multi.acks - set multi.acks <state> Parameters: - state : 0 (disable) or 1 (enable) Default: 0","title":"Enable or disable Multi-Acks support"},{"location":"companion_cli/#view-or-change-this-nodes-advert-path-hash-size","text":"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","title":"View or change this node's advert path hash size"},{"location":"companion_cli/#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.","title":"View or change the retransmit delay factor for flood traffic"},{"location":"companion_cli/#view-or-change-the-retransmit-delay-factor-for-direct-traffic","text":"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.","title":"View or change the retransmit delay factor for direct traffic"},{"location":"companion_cli/#experimental-view-or-change-the-processing-delay-for-received-traffic","text":"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.","title":"[Experimental] View or change the processing delay for received traffic"},{"location":"companion_cli/#ble","text":"","title":"BLE"},{"location":"companion_cli/#change-ble-pin","text":"Usage: - set pin <pin> Parameters: - pin : New BLE PIN Set by build flag: BLE_PIN_CODE","title":"Change BLE PIN"},{"location":"companion_cli/#change-ble-name","text":"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.","title":"Change BLE name"},{"location":"companion_cli/#wifi","text":"","title":"Wifi"},{"location":"companion_cli/#get-status","text":"Usage: - get wifi.status - get wifi.ip","title":"Get status"},{"location":"companion_cli/#toggle","text":"Usage: - set wifi.enabled <value> - get wifi.enabled Parameters: - value : 0 (disable) or 1 (enable)","title":"Toggle"},{"location":"companion_cli/#set-ssid","text":"Usage: - set wifi.ssid <value> - get wifi.ssid Parameters: - value : ssid as a string","title":"Set SSID"},{"location":"companion_cli/#set-password","text":"Usage: - set wifi.pwd <value> - get wifi.pwd Parameters: - value : password string","title":"Set password"},{"location":"companion_cli/#ui","text":"","title":"UI"},{"location":"companion_cli/#show-clock","text":"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)","title":"Show clock"},{"location":"companion_cli/#gps-key-action","text":"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.","title":"GPS key action"},{"location":"companion_cli/#node-discovery-screen-shows-nodes-names","text":"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.","title":"Node discovery screen shows nodes names"},{"location":"companion_cli/#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.","title":"Auto-off screen"},{"location":"companion_cli/#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.","title":"Display backlight timeout"},{"location":"companion_cli/#when-to-turn-backlight-on","text":"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.","title":"When to turn backlight on"},{"location":"companion_cli/#control-if-eink-screen-should-be-blanked","text":"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 ...","title":"Control if eink screen should be blanked"},{"location":"companion_cli/#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.","title":"Keep message previews when the eink screen turns off"},{"location":"companion_cli/#maximum-number-of-partial-refreshes","text":"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.","title":"Maximum number of partial refreshes"},{"location":"companion_protocol/","text":"Companion Protocol Last Updated : 2026-03-08 Protocol Version : Companion Firmware v1.12.0+ 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. Official Libraries Please see the following repos for existing MeshCore Companion Protocol libraries. JavaScript: https://github.com/meshcore-dev/meshcore.js Python: https://github.com/meshcore-dev/meshcore_py Important Security Note All secrets, hashes, and cryptographic values shown in this guide are example values only. All hex values, public keys and hashes are for demonstration purposes only Never use example secrets in production Always generate new cryptographically secure random secrets Please implement proper security practices in your implementation This guide is for protocol documentation only Table of Contents BLE Connection Packet Structure Commands Channel Management Message Handling Response Parsing Example Implementation Flow Best Practices Troubleshooting BLE Connection Service and Characteristics MeshCore Companion devices expose a BLE service with the following UUIDs: Service UUID : 6E400001-B5A3-F393-E0A9-E50E24DCCA9E RX Characteristic (App \u2192 Firmware): 6E400002-B5A3-F393-E0A9-E50E24DCCA9E TX Characteristic (Firmware \u2192 App): 6E400003-B5A3-F393-E0A9-E50E24DCCA9E Connection Steps Scan for Devices Scan for BLE devices advertising the MeshCore Service UUID Optionally filter by device name (typically contains \"MeshCore\" prefix) Note the device MAC address for reconnection Connect to GATT Connect to the device using the discovered MAC address Wait for connection to be established Discover Services and Characteristics Discover the service with UUID 6E400001-B5A3-F393-E0A9-E50E24DCCA9E Discover the RX characteristic 6E400002-B5A3-F393-E0A9-E50E24DCCA9E Your app writes to this, the firmware reads from this Discover the TX characteristic 6E400003-B5A3-F393-E0A9-E50E24DCCA9E The firmware writes to this, your app reads from this Enable Notifications Subscribe to notifications on the TX characteristic to receive data from the firmware Send Initial Commands Send CMD_APP_START to identify your app to firmware and get radio settings Send CMD_DEVICE_QUERY to fetch device info and negotiate supported protocol versions Send CMD_SET_DEVICE_TIME to set the firmware clock Send CMD_GET_CONTACTS to fetch all contacts Send CMD_GET_CHANNEL multiple times to fetch all channel slots Send CMD_SYNC_NEXT_MESSAGE to fetch the next message stored in firmware Setup listeners for push codes, such as PUSH_CODE_MSG_WAITING or PUSH_CODE_ADVERT See Commands section for information on other commands Note : MeshCore devices may disconnect after periods of inactivity. Implement auto-reconnect logic with exponential backoff. BLE Write Type When writing commands to the RX characteristic, specify the write type: Write with Response (default): Waits for acknowledgment from device Write without Response : Faster but no acknowledgment Platform-specific : Android : Use BluetoothGattCharacteristic.WRITE_TYPE_DEFAULT or WRITE_TYPE_NO_RESPONSE iOS : Use CBCharacteristicWriteType.withResponse or .withoutResponse Python (bleak) : Use write_gatt_char() with response=True or False Recommendation : Use write with response for reliability. MTU (Maximum Transmission Unit) The default BLE MTU is 23 bytes (20 bytes payload). For larger commands like SET_CHANNEL (50 bytes), you may need to: Request Larger MTU : Request MTU of 512 bytes if supported Android: gatt.requestMtu(512) iOS: peripheral.maximumWriteValueLength(for:) Python (bleak): MTU is negotiated automatically Command Sequencing Critical : Commands must be sent in the correct sequence: After Connection : Wait for BLE connection to be established Wait for services/characteristics to be discovered Wait for notifications to be enabled Now you can safely send commands to the firmware Command-Response Matching : Send one command at a time Wait for a response before sending another command Use a timeout (typically 5 seconds) Match response to command by type (e.g: CMD_GET_CHANNEL \u2192 RESP_CODE_CHANNEL_INFO ) Command Queue Management For reliable operation, implement a command queue. Queue Structure : Maintain a queue of pending commands Track which command is currently waiting for a response Only send next command after receiving response or timeout Error Handling : On timeout, clear current command, process next in queue On error, log error, clear current command, process next Packet Structure The MeshCore protocol uses a binary format with the following structure: Commands : Sent from app to firmware via RX characteristic Responses : Received from firmware via TX characteristic notifications All multi-byte integers : Little-endian byte order (except CayenneLPP which is Big-endian) All strings : UTF-8 encoding Most packets follow this format: [Packet Type (1 byte)] [Data (variable length)] The first byte indicates the packet type (see Response Parsing ). Commands 1. App Start Purpose : Initialize communication with the device. Must be sent first after connection. Command Format : Byte 0: 0x01 Bytes 1-7: Reserved (currently ignored by firmware) Bytes 8+: Application name (UTF-8, optional) Example (hex): 01 00 00 00 00 00 00 00 6d 63 63 6c 69 Response : PACKET_SELF_INFO (0x05) 2. Device Query Purpose : Query device information. Command Format : Byte 0: 0x16 Byte 1: 0x03 Example (hex): 16 03 Response : PACKET_DEVICE_INFO (0x0D) with device information 3. Get Channel Info Purpose : Retrieve information about a specific channel. Command Format : Byte 0: 0x1F Byte 1: Channel Index (0 .. max_channels-1) Example (get channel 1): 1F 01 Response : PACKET_CHANNEL_INFO (0x12) with channel details 4. Set Channel Purpose : Create or update a channel on the device. Command Format : Byte 0: 0x20 Byte 1: Channel Index (0 .. max_channels-1) Bytes 2-33: Channel Name (32 bytes, UTF-8, null-padded) Bytes 34-49: Secret (16 bytes) 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) [16 bytes of secret] Note : The 32-byte secret variant is unsupported and returns PACKET_ERROR . Response : PACKET_OK (0x00) on success, PACKET_ERROR (0x01) on failure 5. Send Channel Message Purpose : Send a text message to a channel. Command Format : Byte 0: 0x03 Byte 1: 0x00 Byte 2: Channel Index (0 .. max_channels-1) Bytes 3-6: Timestamp (32-bit little-endian Unix timestamp, seconds) Bytes 7+: Message Text (UTF-8, variable length) 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 Response : PACKET_MSG_SENT (0x06) on success 6. Send Channel Data Datagram 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 Byte 1: Channel Index (0 .. max_channels-1) Byte 2: Path Length (0xFF = flood, otherwise actual path length) Bytes 3 .. 2+path_len: Path (omitted when path_len == 0xFF) Next 2 bytes (little-endian): Data Type (`data_type`, uint16) Remaining bytes: Binary payload (variable length) Example (flood, DATA_TYPE_DEV , payload A1 B2 C3 , channel 1): 3E 01 FF FF FF A1 B2 C3 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 \u2013 0xFFFE 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 . Registered data_type values 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. Value Constant Purpose 0x0000 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. Receive Channel Data Datagram 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) Byte 1: SNR (signed int8, scaled \u00d74 \u2014 divide by 4.0 to recover dB) Bytes 2-3: Reserved (clients MUST ignore) Byte 4: Channel Index (0 .. max_channels-1) Byte 5: Path Length (actual path length when flooded, otherwise 0xFF for direct) Bytes 6-7: Data Type (uint16 little-endian) Byte 8: Data Length Bytes 9 .. 8+data_len: Payload 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 : Direction path_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 ): if len ( data ) < 9 : return None snr_byte = data [ 1 ] snr = ( snr_byte if snr_byte < 128 else snr_byte - 256 ) / 4.0 channel_idx = data [ 4 ] path_len = data [ 5 ] data_type = int . from_bytes ( data [ 6 : 8 ], 'little' ) data_len = data [ 8 ] if 9 + data_len > len ( data ): return None payload = data [ 9 : 9 + data_len ] return { 'snr' : snr , 'channel_idx' : channel_idx , 'path_len' : path_len , 'data_type' : data_type , 'payload' : bytes ( payload ), } 7. Get Message Purpose : Request the next queued message from the device. Command Format : Byte 0: 0x0A Example (hex): 0A 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. 8. Get Battery and Storage Purpose : Query device battery voltage and storage usage. Command Format : Byte 0: 0x14 Example (hex): 14 Response : PACKET_BATTERY (0x0C) with battery millivolts and storage information Channel Management Channel Types Public Channel Uses a publicly known 16-byte key: 8b3387e9c5cdea6ac9e5edbaa115cd72 Anyone can join this channel, messages should be considered public Used as the default public group chat Hashtag Channels Uses a secret key derived from the channel name It is the first 16 bytes of sha256(\"#test\") For example hashtag channel #test has the key: 9cd8fcf22a47333b591d96a2b848b73f Traffic is encrypted on air, but anyone who knows or guesses the channel name can derive the key. Hashtag channels should not be treated as private. Used as a topic based public group chat, separate from the default public channel Private Channels Uses a randomly generated 16-byte secret key Messages should be considered private between those that know the secret Users should keep the key secret, and only share with those you want to communicate with Used as a secure private group chat Channel Lifecycle Set Channel : Fetch all channel slots, and find one with empty name and all-zero secret Generate or provide a 16-byte secret Send CMD_SET_CHANNEL with name and a 16-byte secret Get Channel : Send CMD_GET_CHANNEL with channel index Parse RESP_CODE_CHANNEL_INFO response Delete Channel : Send CMD_SET_CHANNEL with empty name and all-zero secret Or overwrite with a new channel Message Handling Receiving Messages Messages are received via the TX characteristic (notifications). The device sends: Channel Messages : PACKET_CHANNEL_MSG_RECV (0x08) - Standard format PACKET_CHANNEL_MSG_RECV_V3 (0x11) - Version 3 with SNR Contact Messages : PACKET_CONTACT_MSG_RECV (0x07) - Standard format PACKET_CONTACT_MSG_RECV_V3 (0x10) - Version 3 with SNR Notifications : PACKET_MESSAGES_WAITING (0x83) - Indicates messages are queued Contact Message Format Standard Format ( PACKET_CONTACT_MSG_RECV , 0x07): Byte 0: 0x07 (packet type) Bytes 1-6: Public Key Prefix (6 bytes, hex) Byte 7: Path Length Byte 8: Text Type Bytes 9-12: Timestamp (32-bit little-endian) Bytes 13-16: Signature (4 bytes, only if txt_type == 2) Bytes 17+: Message Text (UTF-8) V3 Format ( PACKET_CONTACT_MSG_RECV_V3 , 0x10): Byte 0: 0x10 (packet type) Byte 1: SNR (signed byte, multiplied by 4) Bytes 2-3: Reserved Bytes 4-9: Public Key Prefix (6 bytes, hex) Byte 10: Path Length Byte 11: Text Type Bytes 12-15: Timestamp (32-bit little-endian) Bytes 16-19: Signature (4 bytes, only if txt_type == 2) Bytes 20+: Message Text (UTF-8) Parsing Pseudocode : def parse_contact_message ( data ): packet_type = data [ 0 ] offset = 1 # Check for V3 format if packet_type == 0x10 : # V3 snr_byte = data [ offset ] snr = (( snr_byte if snr_byte < 128 else snr_byte - 256 ) / 4.0 ) offset += 3 # Skip SNR + reserved pubkey_prefix = data [ offset : offset + 6 ] . hex () offset += 6 path_len = data [ offset ] txt_type = data [ offset + 1 ] offset += 2 timestamp = int . from_bytes ( data [ offset : offset + 4 ], 'little' ) offset += 4 # If txt_type == 2, skip 4-byte signature if txt_type == 2 : offset += 4 message = data [ offset :] . decode ( 'utf-8' ) return { 'pubkey_prefix' : pubkey_prefix , 'path_len' : path_len , 'txt_type' : txt_type , 'timestamp' : timestamp , 'message' : message , 'snr' : snr if packet_type == 0x10 else None } Channel Message Format Standard Format ( PACKET_CHANNEL_MSG_RECV , 0x08): Byte 0: 0x08 (packet type) Byte 1: Channel Index (0 .. max_channels-1) Byte 2: Path Length Byte 3: Text Type Bytes 4-7: Timestamp (32-bit little-endian) Bytes 8+: Message Text (UTF-8) V3 Format ( PACKET_CHANNEL_MSG_RECV_V3 , 0x11): Byte 0: 0x11 (packet type) Byte 1: SNR (signed byte, multiplied by 4) Bytes 2-3: Reserved Byte 4: Channel Index (0 .. max_channels-1) Byte 5: Path Length Byte 6: Text Type Bytes 7-10: Timestamp (32-bit little-endian) Bytes 11+: Message Text (UTF-8) Parsing Pseudocode : def parse_channel_message ( data ): packet_type = data [ 0 ] offset = 1 # Check for V3 format if packet_type == 0x11 : # V3 snr_byte = data [ offset ] snr = (( snr_byte if snr_byte < 128 else snr_byte - 256 ) / 4.0 ) offset += 3 # Skip SNR + reserved channel_idx = data [ offset ] path_len = data [ offset + 1 ] txt_type = data [ offset + 2 ] timestamp = int . from_bytes ( data [ offset + 3 : offset + 7 ], 'little' ) message = data [ offset + 7 :] . decode ( 'utf-8' ) return { 'channel_idx' : channel_idx , 'timestamp' : timestamp , 'message' : message , 'snr' : snr if packet_type == 0x11 else None } Sending Messages 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\") Response Parsing Terminology 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 Types Value Name Description 0x00 PACKET_OK Command succeeded 0x01 PACKET_ERROR Command failed 0x02 PACKET_CONTACT_START Start of contact list 0x03 PACKET_CONTACT Contact information 0x04 PACKET_CONTACT_END End of contact list 0x05 PACKET_SELF_INFO Device self-information 0x06 PACKET_MSG_SENT Message sent confirmation 0x07 PACKET_CONTACT_MSG_RECV Contact message (standard) 0x08 PACKET_CHANNEL_MSG_RECV Channel message (standard) 0x09 PACKET_CURRENT_TIME Current time response 0x0A PACKET_NO_MORE_MSGS No more messages available 0x0C PACKET_BATTERY Battery level 0x0D PACKET_DEVICE_INFO Device information 0x10 PACKET_CONTACT_MSG_RECV_V3 Contact message (V3 with SNR) 0x11 PACKET_CHANNEL_MSG_RECV_V3 Channel message (V3 with SNR) 0x12 PACKET_CHANNEL_INFO Channel information 0x1B PACKET_CHANNEL_DATA_RECV Channel data datagram 0x80 PACKET_ADVERTISEMENT Advertisement packet 0x82 PACKET_ACK Acknowledgment 0x83 PACKET_MESSAGES_WAITING Messages waiting notification 0x88 PACKET_LOG_DATA RF log data (can be ignored) Parsing Responses PACKET_OK (0x00): Byte 0: 0x00 Bytes 1-4: Optional value (32-bit little-endian integer) PACKET_ERROR (0x01): Byte 0: 0x01 Byte 1: Error code (optional) PACKET_CHANNEL_INFO (0x12): Byte 0: 0x12 Byte 1: Channel Index Bytes 2-33: Channel Name (32 bytes, null-terminated) Bytes 34-49: Secret (16 bytes) Note : The device returns the 16-byte channel secret in this response. PACKET_DEVICE_INFO (0x0D): Byte 0: 0x0D Byte 1: Firmware Version (uint8) Bytes 2+: Variable length based on firmware version For firmware version >= 3: Byte 2: Max Contacts Raw (uint8, actual = value * 2) Byte 3: Max Channels (uint8) Bytes 4-7: BLE PIN (32-bit little-endian) Bytes 8-19: Firmware Build (12 bytes, UTF-8, null-padded) Bytes 20-59: Model (40 bytes, UTF-8, null-padded) Bytes 60-79: Version (20 bytes, UTF-8, null-padded) Byte 80: Client repeat enabled/preferred (firmware v9+) Byte 81: Path hash mode (firmware v10+) Parsing Pseudocode : def parse_device_info ( data ): if len ( data ) < 2 : return None fw_ver = data [ 1 ] info = { 'fw_ver' : fw_ver } if fw_ver >= 3 and len ( data ) >= 80 : info [ 'max_contacts' ] = data [ 2 ] * 2 info [ 'max_channels' ] = data [ 3 ] info [ 'ble_pin' ] = int . from_bytes ( data [ 4 : 8 ], 'little' ) info [ 'fw_build' ] = data [ 8 : 20 ] . decode ( 'utf-8' ) . rstrip ( ' \\x00 ' ) . strip () info [ 'model' ] = data [ 20 : 60 ] . decode ( 'utf-8' ) . rstrip ( ' \\x00 ' ) . strip () info [ 'ver' ] = data [ 60 : 80 ] . decode ( 'utf-8' ) . rstrip ( ' \\x00 ' ) . strip () return info PACKET_BATTERY (0x0C): Byte 0: 0x0C Bytes 1-2: Battery Voltage (16-bit little-endian, millivolts) Bytes 3-6: Used Storage (32-bit little-endian, KB) Bytes 7-10: Total Storage (32-bit little-endian, KB) Parsing Pseudocode : def parse_battery ( data ): if len ( data ) < 3 : return None mv = int . from_bytes ( data [ 1 : 3 ], 'little' ) info = { 'battery_mv' : mv } if len ( data ) >= 11 : info [ 'used_kb' ] = int . from_bytes ( data [ 3 : 7 ], 'little' ) info [ 'total_kb' ] = int . from_bytes ( data [ 7 : 11 ], 'little' ) return info PACKET_SELF_INFO (0x05): Byte 0: 0x05 Byte 1: Advertisement Type Byte 2: TX Power Byte 3: Max TX Power Bytes 4-35: Public Key (32 bytes, hex) Bytes 36-39: Advertisement Latitude (32-bit little-endian, divided by 1e6) Bytes 40-43: Advertisement Longitude (32-bit little-endian, divided by 1e6) Byte 44: Multi ACKs Byte 45: Advertisement Location Policy Byte 46: Telemetry Mode (bitfield) Byte 47: Manual Add Contacts (bool) Bytes 48-51: Radio Frequency (32-bit little-endian, divided by 1000.0) Bytes 52-55: Radio Bandwidth (32-bit little-endian, divided by 1000.0) Byte 56: Radio Spreading Factor Byte 57: Radio Coding Rate Bytes 58+: Device Name (UTF-8, variable length, no null terminator required) Parsing Pseudocode : def parse_self_info ( data ): if len ( data ) < 36 : return None offset = 1 info = { 'adv_type' : data [ offset ], 'tx_power' : data [ offset + 1 ], 'max_tx_power' : data [ offset + 2 ], 'public_key' : data [ offset + 3 : offset + 35 ] . hex () } offset += 35 lat = int . from_bytes ( data [ offset : offset + 4 ], 'little' ) / 1e6 lon = int . from_bytes ( data [ offset + 4 : offset + 8 ], 'little' ) / 1e6 info [ 'adv_lat' ] = lat info [ 'adv_lon' ] = lon offset += 8 info [ 'multi_acks' ] = data [ offset ] info [ 'adv_loc_policy' ] = data [ offset + 1 ] telemetry_mode = data [ offset + 2 ] info [ 'telemetry_mode_env' ] = ( telemetry_mode >> 4 ) & 0b11 info [ 'telemetry_mode_loc' ] = ( telemetry_mode >> 2 ) & 0b11 info [ 'telemetry_mode_base' ] = telemetry_mode & 0b11 info [ 'manual_add_contacts' ] = data [ offset + 3 ] > 0 offset += 4 freq = int . from_bytes ( data [ offset : offset + 4 ], 'little' ) / 1000.0 bw = int . from_bytes ( data [ offset + 4 : offset + 8 ], 'little' ) / 1000.0 info [ 'radio_freq' ] = freq info [ 'radio_bw' ] = bw info [ 'radio_sf' ] = data [ offset + 8 ] info [ 'radio_cr' ] = data [ offset + 9 ] offset += 10 if offset < len ( data ): name_bytes = data [ offset :] info [ 'name' ] = name_bytes . decode ( 'utf-8' ) . rstrip ( ' \\x00 ' ) . strip () return info PACKET_MSG_SENT (0x06): Byte 0: 0x06 Byte 1: Route Flag (0 = direct, 1 = flood) Bytes 2-5: Tag / Expected ACK (4 bytes, little-endian) Bytes 6-9: Suggested Timeout (32-bit little-endian, milliseconds) PACKET_ACK (0x82): Byte 0: 0x82 Bytes 1-6: ACK Code (6 bytes, hex) Error Codes 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 : Code Constant (firmware) Description 1 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. Frame Handling BLE implementations enqueue and deliver one protocol frame per BLE write/notification at the firmware layer. Apps should treat each characteristic write/notification as exactly one companion protocol frame Apps should still validate frame lengths before parsing Future transports or firmware revisions may differ, so avoid assuming fixed payload sizes for variable-length responses Response Handling Command-Response Pattern : Send command via RX characteristic Wait for response via TX characteristic (notification) Match response to command using sequence numbers or command type Handle timeout (typically 5 seconds) Use command queue to prevent concurrent commands Asynchronous Messages : Device may send messages at any time via TX characteristic Handle PACKET_MESSAGES_WAITING (0x83) by polling GET_MESSAGE command Parse incoming messages and route to appropriate handlers Validate frame length before decoding Response Matching : Match responses to commands by expected packet type: APP_START \u2192 PACKET_SELF_INFO DEVICE_QUERY \u2192 PACKET_DEVICE_INFO GET_CHANNEL \u2192 PACKET_CHANNEL_INFO SET_CHANNEL \u2192 PACKET_OK or PACKET_ERROR SEND_CHANNEL_MESSAGE \u2192 PACKET_MSG_SENT GET_MESSAGE \u2192 PACKET_CHANNEL_MSG_RECV , PACKET_CONTACT_MSG_RECV , PACKET_CHANNEL_DATA_RECV , or PACKET_NO_MORE_MSGS SEND_CHANNEL_DATA \u2192 PACKET_OK or PACKET_ERROR GET_BATTERY \u2192 PACKET_BATTERY Timeout Handling : Default timeout: 5 seconds per command On timeout: Log error, clear current command, proceed to next in queue Some commands may take longer (e.g., SET_CHANNEL may need 1-2 seconds) Consider longer timeout for channel operations Error Recovery : On PACKET_ERROR : Log error code, clear current command On connection loss: Clear command queue, attempt reconnection On invalid response: Log warning, clear current command, proceed Example Implementation Flow Initialization # 1. Scan for MeshCore device device = scan_for_device ( \"MeshCore\" ) # 2. Connect to BLE GATT gatt = connect_to_device ( device ) # 3. Discover services and characteristics service = discover_service ( gatt , \"6E400001-B5A3-F393-E0A9-E50E24DCCA9E\" ) rx_char = discover_characteristic ( service , \"6E400002-B5A3-F393-E0A9-E50E24DCCA9E\" ) tx_char = discover_characteristic ( service , \"6E400003-B5A3-F393-E0A9-E50E24DCCA9E\" ) # 4. Enable notifications on TX characteristic enable_notifications ( tx_char , on_notification_received ) # 5. Send AppStart command send_command ( rx_char , build_app_start ()) wait_for_response ( PACKET_SELF_INFO ) Creating a Private Channel # 1. Generate 16-byte secret secret_16_bytes = generate_secret ( 16 ) # Use CSPRNG secret_hex = secret_16_bytes . hex () # 2. Build SET_CHANNEL command channel_name = \"YourChannelName\" channel_index = 1 # Use 1-7 for private channels command = build_set_channel ( channel_index , channel_name , secret_16_bytes ) # 3. Send command send_command ( rx_char , command ) response = wait_for_response ( PACKET_OK ) # 4. Store secret locally store_channel_secret ( channel_index , secret_hex ) Sending a Message # 1. Build channel message command channel_index = 1 message = \"Hello, MeshCore!\" timestamp = int ( time . time ()) command = build_channel_message ( channel_index , message , timestamp ) # 2. Send command send_command ( rx_char , command ) response = wait_for_response ( PACKET_MSG_SENT ) Receiving Messages def on_notification_received ( data ): packet_type = data [ 0 ] if packet_type == PACKET_CHANNEL_MSG_RECV or packet_type == PACKET_CHANNEL_MSG_RECV_V3 : message = parse_channel_message ( data ) handle_channel_message ( message ) elif packet_type == PACKET_MESSAGES_WAITING : # Poll for messages send_command ( rx_char , build_get_message ()) Best Practices Connection Management : Implement auto-reconnect with exponential backoff Handle disconnections gracefully Store last connected device address for quick reconnection Secret Management : Always use cryptographically secure random number generators Store secrets securely (encrypted storage) Never log or transmit secrets in plain text Message Handling : Send CMD_SYNC_NEXT_MESSAGE when PUSH_CODE_MSG_WAITING is received Implement message deduplication to avoid displaying the same message twice Channel Management : Fetch all channel slots even if you encounter an empty slot Ideally save new channels into the first empty slot Error Handling : Implement timeouts for all commands (typically 5 seconds) Handle RESP_CODE_ERR responses appropriately Troubleshooting Connection Issues Device not found : Ensure device is powered on and advertising Connection timeout : Check Bluetooth permissions and device proximity GATT errors : Ensure proper service/characteristic discovery Command Issues No response : Verify notifications are enabled, check connection state Error responses : Verify command format and check error code Timeout : Increase timeout value or try again Message Issues Messages not received : Poll GET_MESSAGE command periodically Duplicate messages : Implement message deduplication using timestamp/content as a unique id Message truncation : Send long messages as separate shorter messages","title":"Companion protocol"},{"location":"companion_protocol/#companion-protocol","text":"Last Updated : 2026-03-08 Protocol Version : Companion Firmware v1.12.0+ 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.","title":"Companion Protocol"},{"location":"companion_protocol/#official-libraries","text":"Please see the following repos for existing MeshCore Companion Protocol libraries. JavaScript: https://github.com/meshcore-dev/meshcore.js Python: https://github.com/meshcore-dev/meshcore_py","title":"Official Libraries"},{"location":"companion_protocol/#important-security-note","text":"All secrets, hashes, and cryptographic values shown in this guide are example values only. All hex values, public keys and hashes are for demonstration purposes only Never use example secrets in production Always generate new cryptographically secure random secrets Please implement proper security practices in your implementation This guide is for protocol documentation only","title":"Important Security Note"},{"location":"companion_protocol/#table-of-contents","text":"BLE Connection Packet Structure Commands Channel Management Message Handling Response Parsing Example Implementation Flow Best Practices Troubleshooting","title":"Table of Contents"},{"location":"companion_protocol/#ble-connection","text":"","title":"BLE Connection"},{"location":"companion_protocol/#service-and-characteristics","text":"MeshCore Companion devices expose a BLE service with the following UUIDs: Service UUID : 6E400001-B5A3-F393-E0A9-E50E24DCCA9E RX Characteristic (App \u2192 Firmware): 6E400002-B5A3-F393-E0A9-E50E24DCCA9E TX Characteristic (Firmware \u2192 App): 6E400003-B5A3-F393-E0A9-E50E24DCCA9E","title":"Service and Characteristics"},{"location":"companion_protocol/#connection-steps","text":"Scan for Devices Scan for BLE devices advertising the MeshCore Service UUID Optionally filter by device name (typically contains \"MeshCore\" prefix) Note the device MAC address for reconnection Connect to GATT Connect to the device using the discovered MAC address Wait for connection to be established Discover Services and Characteristics Discover the service with UUID 6E400001-B5A3-F393-E0A9-E50E24DCCA9E Discover the RX characteristic 6E400002-B5A3-F393-E0A9-E50E24DCCA9E Your app writes to this, the firmware reads from this Discover the TX characteristic 6E400003-B5A3-F393-E0A9-E50E24DCCA9E The firmware writes to this, your app reads from this Enable Notifications Subscribe to notifications on the TX characteristic to receive data from the firmware Send Initial Commands Send CMD_APP_START to identify your app to firmware and get radio settings Send CMD_DEVICE_QUERY to fetch device info and negotiate supported protocol versions Send CMD_SET_DEVICE_TIME to set the firmware clock Send CMD_GET_CONTACTS to fetch all contacts Send CMD_GET_CHANNEL multiple times to fetch all channel slots Send CMD_SYNC_NEXT_MESSAGE to fetch the next message stored in firmware Setup listeners for push codes, such as PUSH_CODE_MSG_WAITING or PUSH_CODE_ADVERT See Commands section for information on other commands Note : MeshCore devices may disconnect after periods of inactivity. Implement auto-reconnect logic with exponential backoff.","title":"Connection Steps"},{"location":"companion_protocol/#ble-write-type","text":"When writing commands to the RX characteristic, specify the write type: Write with Response (default): Waits for acknowledgment from device Write without Response : Faster but no acknowledgment Platform-specific : Android : Use BluetoothGattCharacteristic.WRITE_TYPE_DEFAULT or WRITE_TYPE_NO_RESPONSE iOS : Use CBCharacteristicWriteType.withResponse or .withoutResponse Python (bleak) : Use write_gatt_char() with response=True or False Recommendation : Use write with response for reliability.","title":"BLE Write Type"},{"location":"companion_protocol/#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: Request Larger MTU : Request MTU of 512 bytes if supported Android: gatt.requestMtu(512) iOS: peripheral.maximumWriteValueLength(for:) Python (bleak): MTU is negotiated automatically","title":"MTU (Maximum Transmission Unit)"},{"location":"companion_protocol/#command-sequencing","text":"Critical : Commands must be sent in the correct sequence: After Connection : Wait for BLE connection to be established Wait for services/characteristics to be discovered Wait for notifications to be enabled Now you can safely send commands to the firmware Command-Response Matching : Send one command at a time Wait for a response before sending another command Use a timeout (typically 5 seconds) Match response to command by type (e.g: CMD_GET_CHANNEL \u2192 RESP_CODE_CHANNEL_INFO )","title":"Command Sequencing"},{"location":"companion_protocol/#command-queue-management","text":"For reliable operation, implement a command queue. Queue Structure : Maintain a queue of pending commands Track which command is currently waiting for a response Only send next command after receiving response or timeout Error Handling : On timeout, clear current command, process next in queue On error, log error, clear current command, process next","title":"Command Queue Management"},{"location":"companion_protocol/#packet-structure","text":"The MeshCore protocol uses a binary format with the following structure: Commands : Sent from app to firmware via RX characteristic Responses : Received from firmware via TX characteristic notifications All multi-byte integers : Little-endian byte order (except CayenneLPP which is Big-endian) All strings : UTF-8 encoding Most packets follow this format: [Packet Type (1 byte)] [Data (variable length)] The first byte indicates the packet type (see Response Parsing ).","title":"Packet Structure"},{"location":"companion_protocol/#commands","text":"","title":"Commands"},{"location":"companion_protocol/#1-app-start","text":"Purpose : Initialize communication with the device. Must be sent first after connection. Command Format : Byte 0: 0x01 Bytes 1-7: Reserved (currently ignored by firmware) Bytes 8+: Application name (UTF-8, optional) Example (hex): 01 00 00 00 00 00 00 00 6d 63 63 6c 69 Response : PACKET_SELF_INFO (0x05)","title":"1. App Start"},{"location":"companion_protocol/#2-device-query","text":"Purpose : Query device information. Command Format : Byte 0: 0x16 Byte 1: 0x03 Example (hex): 16 03 Response : PACKET_DEVICE_INFO (0x0D) with device information","title":"2. Device Query"},{"location":"companion_protocol/#3-get-channel-info","text":"Purpose : Retrieve information about a specific channel. Command Format : Byte 0: 0x1F Byte 1: Channel Index (0 .. max_channels-1) Example (get channel 1): 1F 01 Response : PACKET_CHANNEL_INFO (0x12) with channel details","title":"3. Get Channel Info"},{"location":"companion_protocol/#4-set-channel","text":"Purpose : Create or update a channel on the device. Command Format : Byte 0: 0x20 Byte 1: Channel Index (0 .. max_channels-1) Bytes 2-33: Channel Name (32 bytes, UTF-8, null-padded) Bytes 34-49: Secret (16 bytes) 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) [16 bytes of secret] Note : The 32-byte secret variant is unsupported and returns PACKET_ERROR . Response : PACKET_OK (0x00) on success, PACKET_ERROR (0x01) on failure","title":"4. Set Channel"},{"location":"companion_protocol/#5-send-channel-message","text":"Purpose : Send a text message to a channel. Command Format : Byte 0: 0x03 Byte 1: 0x00 Byte 2: Channel Index (0 .. max_channels-1) Bytes 3-6: Timestamp (32-bit little-endian Unix timestamp, seconds) Bytes 7+: Message Text (UTF-8, variable length) 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 Response : PACKET_MSG_SENT (0x06) on success","title":"5. Send Channel Message"},{"location":"companion_protocol/#6-send-channel-data-datagram","text":"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 Byte 1: Channel Index (0 .. max_channels-1) Byte 2: Path Length (0xFF = flood, otherwise actual path length) Bytes 3 .. 2+path_len: Path (omitted when path_len == 0xFF) Next 2 bytes (little-endian): Data Type (`data_type`, uint16) Remaining bytes: Binary payload (variable length) Example (flood, DATA_TYPE_DEV , payload A1 B2 C3 , channel 1): 3E 01 FF FF FF A1 B2 C3 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 \u2013 0xFFFE 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 .","title":"6. Send Channel Data Datagram"},{"location":"companion_protocol/#registered-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. Value Constant Purpose 0x0000 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.","title":"Registered data_type values"},{"location":"companion_protocol/#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) Byte 1: SNR (signed int8, scaled \u00d74 \u2014 divide by 4.0 to recover dB) Bytes 2-3: Reserved (clients MUST ignore) Byte 4: Channel Index (0 .. max_channels-1) Byte 5: Path Length (actual path length when flooded, otherwise 0xFF for direct) Bytes 6-7: Data Type (uint16 little-endian) Byte 8: Data Length Bytes 9 .. 8+data_len: Payload 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 : Direction path_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 ): if len ( data ) < 9 : return None snr_byte = data [ 1 ] snr = ( snr_byte if snr_byte < 128 else snr_byte - 256 ) / 4.0 channel_idx = data [ 4 ] path_len = data [ 5 ] data_type = int . from_bytes ( data [ 6 : 8 ], 'little' ) data_len = data [ 8 ] if 9 + data_len > len ( data ): return None payload = data [ 9 : 9 + data_len ] return { 'snr' : snr , 'channel_idx' : channel_idx , 'path_len' : path_len , 'data_type' : data_type , 'payload' : bytes ( payload ), }","title":"Receive Channel Data Datagram"},{"location":"companion_protocol/#7-get-message","text":"Purpose : Request the next queued message from the device. Command Format : Byte 0: 0x0A Example (hex): 0A 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.","title":"7. Get Message"},{"location":"companion_protocol/#8-get-battery-and-storage","text":"Purpose : Query device battery voltage and storage usage. Command Format : Byte 0: 0x14 Example (hex): 14 Response : PACKET_BATTERY (0x0C) with battery millivolts and storage information","title":"8. Get Battery and Storage"},{"location":"companion_protocol/#channel-management","text":"","title":"Channel Management"},{"location":"companion_protocol/#channel-types","text":"Public Channel Uses a publicly known 16-byte key: 8b3387e9c5cdea6ac9e5edbaa115cd72 Anyone can join this channel, messages should be considered public Used as the default public group chat Hashtag Channels Uses a secret key derived from the channel name It is the first 16 bytes of sha256(\"#test\") For example hashtag channel #test has the key: 9cd8fcf22a47333b591d96a2b848b73f Traffic is encrypted on air, but anyone who knows or guesses the channel name can derive the key. Hashtag channels should not be treated as private. Used as a topic based public group chat, separate from the default public channel Private Channels Uses a randomly generated 16-byte secret key Messages should be considered private between those that know the secret Users should keep the key secret, and only share with those you want to communicate with Used as a secure private group chat","title":"Channel Types"},{"location":"companion_protocol/#channel-lifecycle","text":"Set Channel : Fetch all channel slots, and find one with empty name and all-zero secret Generate or provide a 16-byte secret Send CMD_SET_CHANNEL with name and a 16-byte secret Get Channel : Send CMD_GET_CHANNEL with channel index Parse RESP_CODE_CHANNEL_INFO response Delete Channel : Send CMD_SET_CHANNEL with empty name and all-zero secret Or overwrite with a new channel","title":"Channel Lifecycle"},{"location":"companion_protocol/#message-handling","text":"","title":"Message Handling"},{"location":"companion_protocol/#receiving-messages","text":"Messages are received via the TX characteristic (notifications). The device sends: Channel Messages : PACKET_CHANNEL_MSG_RECV (0x08) - Standard format PACKET_CHANNEL_MSG_RECV_V3 (0x11) - Version 3 with SNR Contact Messages : PACKET_CONTACT_MSG_RECV (0x07) - Standard format PACKET_CONTACT_MSG_RECV_V3 (0x10) - Version 3 with SNR Notifications : PACKET_MESSAGES_WAITING (0x83) - Indicates messages are queued","title":"Receiving Messages"},{"location":"companion_protocol/#contact-message-format","text":"Standard Format ( PACKET_CONTACT_MSG_RECV , 0x07): Byte 0: 0x07 (packet type) Bytes 1-6: Public Key Prefix (6 bytes, hex) Byte 7: Path Length Byte 8: Text Type Bytes 9-12: Timestamp (32-bit little-endian) Bytes 13-16: Signature (4 bytes, only if txt_type == 2) Bytes 17+: Message Text (UTF-8) V3 Format ( PACKET_CONTACT_MSG_RECV_V3 , 0x10): Byte 0: 0x10 (packet type) Byte 1: SNR (signed byte, multiplied by 4) Bytes 2-3: Reserved Bytes 4-9: Public Key Prefix (6 bytes, hex) Byte 10: Path Length Byte 11: Text Type Bytes 12-15: Timestamp (32-bit little-endian) Bytes 16-19: Signature (4 bytes, only if txt_type == 2) Bytes 20+: Message Text (UTF-8) Parsing Pseudocode : def parse_contact_message ( data ): packet_type = data [ 0 ] offset = 1 # Check for V3 format if packet_type == 0x10 : # V3 snr_byte = data [ offset ] snr = (( snr_byte if snr_byte < 128 else snr_byte - 256 ) / 4.0 ) offset += 3 # Skip SNR + reserved pubkey_prefix = data [ offset : offset + 6 ] . hex () offset += 6 path_len = data [ offset ] txt_type = data [ offset + 1 ] offset += 2 timestamp = int . from_bytes ( data [ offset : offset + 4 ], 'little' ) offset += 4 # If txt_type == 2, skip 4-byte signature if txt_type == 2 : offset += 4 message = data [ offset :] . decode ( 'utf-8' ) return { 'pubkey_prefix' : pubkey_prefix , 'path_len' : path_len , 'txt_type' : txt_type , 'timestamp' : timestamp , 'message' : message , 'snr' : snr if packet_type == 0x10 else None }","title":"Contact Message Format"},{"location":"companion_protocol/#channel-message-format","text":"Standard Format ( PACKET_CHANNEL_MSG_RECV , 0x08): Byte 0: 0x08 (packet type) Byte 1: Channel Index (0 .. max_channels-1) Byte 2: Path Length Byte 3: Text Type Bytes 4-7: Timestamp (32-bit little-endian) Bytes 8+: Message Text (UTF-8) V3 Format ( PACKET_CHANNEL_MSG_RECV_V3 , 0x11): Byte 0: 0x11 (packet type) Byte 1: SNR (signed byte, multiplied by 4) Bytes 2-3: Reserved Byte 4: Channel Index (0 .. max_channels-1) Byte 5: Path Length Byte 6: Text Type Bytes 7-10: Timestamp (32-bit little-endian) Bytes 11+: Message Text (UTF-8) Parsing Pseudocode : def parse_channel_message ( data ): packet_type = data [ 0 ] offset = 1 # Check for V3 format if packet_type == 0x11 : # V3 snr_byte = data [ offset ] snr = (( snr_byte if snr_byte < 128 else snr_byte - 256 ) / 4.0 ) offset += 3 # Skip SNR + reserved channel_idx = data [ offset ] path_len = data [ offset + 1 ] txt_type = data [ offset + 2 ] timestamp = int . from_bytes ( data [ offset + 3 : offset + 7 ], 'little' ) message = data [ offset + 7 :] . decode ( 'utf-8' ) return { 'channel_idx' : channel_idx , 'timestamp' : timestamp , 'message' : message , 'snr' : snr if packet_type == 0x11 else None }","title":"Channel Message Format"},{"location":"companion_protocol/#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\")","title":"Sending Messages"},{"location":"companion_protocol/#response-parsing","text":"","title":"Response Parsing"},{"location":"companion_protocol/#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.","title":"Terminology"},{"location":"companion_protocol/#packet-types","text":"Value Name Description 0x00 PACKET_OK Command succeeded 0x01 PACKET_ERROR Command failed 0x02 PACKET_CONTACT_START Start of contact list 0x03 PACKET_CONTACT Contact information 0x04 PACKET_CONTACT_END End of contact list 0x05 PACKET_SELF_INFO Device self-information 0x06 PACKET_MSG_SENT Message sent confirmation 0x07 PACKET_CONTACT_MSG_RECV Contact message (standard) 0x08 PACKET_CHANNEL_MSG_RECV Channel message (standard) 0x09 PACKET_CURRENT_TIME Current time response 0x0A PACKET_NO_MORE_MSGS No more messages available 0x0C PACKET_BATTERY Battery level 0x0D PACKET_DEVICE_INFO Device information 0x10 PACKET_CONTACT_MSG_RECV_V3 Contact message (V3 with SNR) 0x11 PACKET_CHANNEL_MSG_RECV_V3 Channel message (V3 with SNR) 0x12 PACKET_CHANNEL_INFO Channel information 0x1B PACKET_CHANNEL_DATA_RECV Channel data datagram 0x80 PACKET_ADVERTISEMENT Advertisement packet 0x82 PACKET_ACK Acknowledgment 0x83 PACKET_MESSAGES_WAITING Messages waiting notification 0x88 PACKET_LOG_DATA RF log data (can be ignored)","title":"Packet Types"},{"location":"companion_protocol/#parsing-responses","text":"PACKET_OK (0x00): Byte 0: 0x00 Bytes 1-4: Optional value (32-bit little-endian integer) PACKET_ERROR (0x01): Byte 0: 0x01 Byte 1: Error code (optional) PACKET_CHANNEL_INFO (0x12): Byte 0: 0x12 Byte 1: Channel Index Bytes 2-33: Channel Name (32 bytes, null-terminated) Bytes 34-49: Secret (16 bytes) Note : The device returns the 16-byte channel secret in this response. PACKET_DEVICE_INFO (0x0D): Byte 0: 0x0D Byte 1: Firmware Version (uint8) Bytes 2+: Variable length based on firmware version For firmware version >= 3: Byte 2: Max Contacts Raw (uint8, actual = value * 2) Byte 3: Max Channels (uint8) Bytes 4-7: BLE PIN (32-bit little-endian) Bytes 8-19: Firmware Build (12 bytes, UTF-8, null-padded) Bytes 20-59: Model (40 bytes, UTF-8, null-padded) Bytes 60-79: Version (20 bytes, UTF-8, null-padded) Byte 80: Client repeat enabled/preferred (firmware v9+) Byte 81: Path hash mode (firmware v10+) Parsing Pseudocode : def parse_device_info ( data ): if len ( data ) < 2 : return None fw_ver = data [ 1 ] info = { 'fw_ver' : fw_ver } if fw_ver >= 3 and len ( data ) >= 80 : info [ 'max_contacts' ] = data [ 2 ] * 2 info [ 'max_channels' ] = data [ 3 ] info [ 'ble_pin' ] = int . from_bytes ( data [ 4 : 8 ], 'little' ) info [ 'fw_build' ] = data [ 8 : 20 ] . decode ( 'utf-8' ) . rstrip ( ' \\x00 ' ) . strip () info [ 'model' ] = data [ 20 : 60 ] . decode ( 'utf-8' ) . rstrip ( ' \\x00 ' ) . strip () info [ 'ver' ] = data [ 60 : 80 ] . decode ( 'utf-8' ) . rstrip ( ' \\x00 ' ) . strip () return info PACKET_BATTERY (0x0C): Byte 0: 0x0C Bytes 1-2: Battery Voltage (16-bit little-endian, millivolts) Bytes 3-6: Used Storage (32-bit little-endian, KB) Bytes 7-10: Total Storage (32-bit little-endian, KB) Parsing Pseudocode : def parse_battery ( data ): if len ( data ) < 3 : return None mv = int . from_bytes ( data [ 1 : 3 ], 'little' ) info = { 'battery_mv' : mv } if len ( data ) >= 11 : info [ 'used_kb' ] = int . from_bytes ( data [ 3 : 7 ], 'little' ) info [ 'total_kb' ] = int . from_bytes ( data [ 7 : 11 ], 'little' ) return info PACKET_SELF_INFO (0x05): Byte 0: 0x05 Byte 1: Advertisement Type Byte 2: TX Power Byte 3: Max TX Power Bytes 4-35: Public Key (32 bytes, hex) Bytes 36-39: Advertisement Latitude (32-bit little-endian, divided by 1e6) Bytes 40-43: Advertisement Longitude (32-bit little-endian, divided by 1e6) Byte 44: Multi ACKs Byte 45: Advertisement Location Policy Byte 46: Telemetry Mode (bitfield) Byte 47: Manual Add Contacts (bool) Bytes 48-51: Radio Frequency (32-bit little-endian, divided by 1000.0) Bytes 52-55: Radio Bandwidth (32-bit little-endian, divided by 1000.0) Byte 56: Radio Spreading Factor Byte 57: Radio Coding Rate Bytes 58+: Device Name (UTF-8, variable length, no null terminator required) Parsing Pseudocode : def parse_self_info ( data ): if len ( data ) < 36 : return None offset = 1 info = { 'adv_type' : data [ offset ], 'tx_power' : data [ offset + 1 ], 'max_tx_power' : data [ offset + 2 ], 'public_key' : data [ offset + 3 : offset + 35 ] . hex () } offset += 35 lat = int . from_bytes ( data [ offset : offset + 4 ], 'little' ) / 1e6 lon = int . from_bytes ( data [ offset + 4 : offset + 8 ], 'little' ) / 1e6 info [ 'adv_lat' ] = lat info [ 'adv_lon' ] = lon offset += 8 info [ 'multi_acks' ] = data [ offset ] info [ 'adv_loc_policy' ] = data [ offset + 1 ] telemetry_mode = data [ offset + 2 ] info [ 'telemetry_mode_env' ] = ( telemetry_mode >> 4 ) & 0b11 info [ 'telemetry_mode_loc' ] = ( telemetry_mode >> 2 ) & 0b11 info [ 'telemetry_mode_base' ] = telemetry_mode & 0b11 info [ 'manual_add_contacts' ] = data [ offset + 3 ] > 0 offset += 4 freq = int . from_bytes ( data [ offset : offset + 4 ], 'little' ) / 1000.0 bw = int . from_bytes ( data [ offset + 4 : offset + 8 ], 'little' ) / 1000.0 info [ 'radio_freq' ] = freq info [ 'radio_bw' ] = bw info [ 'radio_sf' ] = data [ offset + 8 ] info [ 'radio_cr' ] = data [ offset + 9 ] offset += 10 if offset < len ( data ): name_bytes = data [ offset :] info [ 'name' ] = name_bytes . decode ( 'utf-8' ) . rstrip ( ' \\x00 ' ) . strip () return info PACKET_MSG_SENT (0x06): Byte 0: 0x06 Byte 1: Route Flag (0 = direct, 1 = flood) Bytes 2-5: Tag / Expected ACK (4 bytes, little-endian) Bytes 6-9: Suggested Timeout (32-bit little-endian, milliseconds) PACKET_ACK (0x82): Byte 0: 0x82 Bytes 1-6: ACK Code (6 bytes, hex)","title":"Parsing Responses"},{"location":"companion_protocol/#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 : Code Constant (firmware) Description 1 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.","title":"Error Codes"},{"location":"companion_protocol/#frame-handling","text":"BLE implementations enqueue and deliver one protocol frame per BLE write/notification at the firmware layer. Apps should treat each characteristic write/notification as exactly one companion protocol frame Apps should still validate frame lengths before parsing Future transports or firmware revisions may differ, so avoid assuming fixed payload sizes for variable-length responses","title":"Frame Handling"},{"location":"companion_protocol/#response-handling","text":"Command-Response Pattern : Send command via RX characteristic Wait for response via TX characteristic (notification) Match response to command using sequence numbers or command type Handle timeout (typically 5 seconds) Use command queue to prevent concurrent commands Asynchronous Messages : Device may send messages at any time via TX characteristic Handle PACKET_MESSAGES_WAITING (0x83) by polling GET_MESSAGE command Parse incoming messages and route to appropriate handlers Validate frame length before decoding Response Matching : Match responses to commands by expected packet type: APP_START \u2192 PACKET_SELF_INFO DEVICE_QUERY \u2192 PACKET_DEVICE_INFO GET_CHANNEL \u2192 PACKET_CHANNEL_INFO SET_CHANNEL \u2192 PACKET_OK or PACKET_ERROR SEND_CHANNEL_MESSAGE \u2192 PACKET_MSG_SENT GET_MESSAGE \u2192 PACKET_CHANNEL_MSG_RECV , PACKET_CONTACT_MSG_RECV , PACKET_CHANNEL_DATA_RECV , or PACKET_NO_MORE_MSGS SEND_CHANNEL_DATA \u2192 PACKET_OK or PACKET_ERROR GET_BATTERY \u2192 PACKET_BATTERY Timeout Handling : Default timeout: 5 seconds per command On timeout: Log error, clear current command, proceed to next in queue Some commands may take longer (e.g., SET_CHANNEL may need 1-2 seconds) Consider longer timeout for channel operations Error Recovery : On PACKET_ERROR : Log error code, clear current command On connection loss: Clear command queue, attempt reconnection On invalid response: Log warning, clear current command, proceed","title":"Response Handling"},{"location":"companion_protocol/#example-implementation-flow","text":"","title":"Example Implementation Flow"},{"location":"companion_protocol/#initialization","text":"# 1. Scan for MeshCore device device = scan_for_device ( \"MeshCore\" ) # 2. Connect to BLE GATT gatt = connect_to_device ( device ) # 3. Discover services and characteristics service = discover_service ( gatt , \"6E400001-B5A3-F393-E0A9-E50E24DCCA9E\" ) rx_char = discover_characteristic ( service , \"6E400002-B5A3-F393-E0A9-E50E24DCCA9E\" ) tx_char = discover_characteristic ( service , \"6E400003-B5A3-F393-E0A9-E50E24DCCA9E\" ) # 4. Enable notifications on TX characteristic enable_notifications ( tx_char , on_notification_received ) # 5. Send AppStart command send_command ( rx_char , build_app_start ()) wait_for_response ( PACKET_SELF_INFO )","title":"Initialization"},{"location":"companion_protocol/#creating-a-private-channel","text":"# 1. Generate 16-byte secret secret_16_bytes = generate_secret ( 16 ) # Use CSPRNG secret_hex = secret_16_bytes . hex () # 2. Build SET_CHANNEL command channel_name = \"YourChannelName\" channel_index = 1 # Use 1-7 for private channels command = build_set_channel ( channel_index , channel_name , secret_16_bytes ) # 3. Send command send_command ( rx_char , command ) response = wait_for_response ( PACKET_OK ) # 4. Store secret locally store_channel_secret ( channel_index , secret_hex )","title":"Creating a Private Channel"},{"location":"companion_protocol/#sending-a-message","text":"# 1. Build channel message command channel_index = 1 message = \"Hello, MeshCore!\" timestamp = int ( time . time ()) command = build_channel_message ( channel_index , message , timestamp ) # 2. Send command send_command ( rx_char , command ) response = wait_for_response ( PACKET_MSG_SENT )","title":"Sending a Message"},{"location":"companion_protocol/#receiving-messages_1","text":"def on_notification_received ( data ): packet_type = data [ 0 ] if packet_type == PACKET_CHANNEL_MSG_RECV or packet_type == PACKET_CHANNEL_MSG_RECV_V3 : message = parse_channel_message ( data ) handle_channel_message ( message ) elif packet_type == PACKET_MESSAGES_WAITING : # Poll for messages send_command ( rx_char , build_get_message ())","title":"Receiving Messages"},{"location":"companion_protocol/#best-practices","text":"Connection Management : Implement auto-reconnect with exponential backoff Handle disconnections gracefully Store last connected device address for quick reconnection Secret Management : Always use cryptographically secure random number generators Store secrets securely (encrypted storage) Never log or transmit secrets in plain text Message Handling : Send CMD_SYNC_NEXT_MESSAGE when PUSH_CODE_MSG_WAITING is received Implement message deduplication to avoid displaying the same message twice Channel Management : Fetch all channel slots even if you encounter an empty slot Ideally save new channels into the first empty slot Error Handling : Implement timeouts for all commands (typically 5 seconds) Handle RESP_CODE_ERR responses appropriately","title":"Best Practices"},{"location":"companion_protocol/#troubleshooting","text":"","title":"Troubleshooting"},{"location":"companion_protocol/#connection-issues","text":"Device not found : Ensure device is powered on and advertising Connection timeout : Check Bluetooth permissions and device proximity GATT errors : Ensure proper service/characteristic discovery","title":"Connection Issues"},{"location":"companion_protocol/#command-issues","text":"No response : Verify notifications are enabled, check connection state Error responses : Verify command format and check error code Timeout : Increase timeout value or try again","title":"Command Issues"},{"location":"companion_protocol/#message-issues","text":"Messages not received : Poll GET_MESSAGE command periodically Duplicate messages : Implement message deduplication using timestamp/content as a unique id Message truncation : Send long messages as separate shorter messages","title":"Message Issues"},{"location":"en/","text":"About this fork (meshcore-tth) \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. Repeater: antispam (all of it off-switchable, none of it upstream) 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. FairnessLimiter -- token buckets on forwarded floods, keyed on the 1-byte ids already in the clear (channel hash, sender hash, advert origin). Port of Beanow's proposal #1502 , limits re-sized from 30 days of real CZ traffic. fairness [on|off|grid|cap|refill] ; direct-routed traffic is never limited. Per-origin advert window -- each node's flood advert forwarded at most once per N hours ( fairness advert <h>|clear ), ported from DutchMeshCore 's AdvertLimiter. Aimed at nodes that re-advertise every minute. Dry-run -- fairness dryrun on counts every verdict but forwards anyway; fairness air reports the airtime shed (or that would be) per reason. Channel filter -- on channels whose key the repeater knows (Public and #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. Channel-hash deny-forward -- 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. Message age limit -- 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. Diagnostics and operations 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: Radio watchdogs. The hardware watchdog only catches a frozen loop; two of our nodes were found deaf with the loop running, and only a reboot helped. 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. Stalled TX (repeater only): packets wait in the queue and the sent counter does not move -> re-arm the radio, then reboot. An empty queue never counts. On, 15 min ( 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 variants only ( *-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. Also observer variants only: a passive analyzer in the console -- 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. Own builds only, not in the releases: channel bot ( 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. Core fixes Replay protection of admin commands survives a reboot. Upstream keeps a client's last timestamp in RAM only, so after every restart any captured command is accepted again -- a captured 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. Passwords can no longer be guessed over the air at full speed. Upstream checks every login without a limit and does not even answer a wrong one. After 4 wrong passwords within 3 minutes ( 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. A replayed blank-password login no longer floods a reply. A login from a client in the ACL with an empty password had no replay check; replayed, it gained nothing, but every copy made the node flood its reply over the mesh. TRACE no longer appends its path past the end of the payload; TRACE/PATH parsing and 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). Path-hash width comes from the node's prefs on every TX path, including sendZeroHop ; 2-byte path hashes are the default ( PATH_HASH_MODE_DEFAULT ). Failed transmits are re-queued with backoff instead of dropped. Per-packet RSSI captured at RX; ContactInfo zeroed before a partial fill. Power, clock, GPS GPS duty cycle ( 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. A node without GPS starts at its build epoch, not in 2024; the clock and a hardfault record survive a warm reset ( .noinit ); clkreboot . No blinking LED and slower BLE advertising on solar nodes. Battery level as an icon at the end of the advertised name: 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). Optional RX duty cycle ( 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). The nRF52 boot undervoltage lock ( 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 ). Sensors and companions simple_sensor : telemetry from an external station over UART ( BudkaLinkSensorManager , one LPP channel per meter), sensor read . Sensors that would otherwise convert continuously (INA219, INA226, INA260, INA3221, BMP280) sleep between telemetry reads and measure on demand (idea and first INA219 patch: Alkel Brostl). INA chips are told apart by their ID, so an INA226 is no longer taken for an INA219. The shunt is set at runtime and saved: sensor set ina.shunt <mOhm> . Companion: 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. Public builds: Czech mesh defaults 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: radio 869.432 MHz / 62.5 kHz / SF7 / CR5 (all builds); repeater and room server: zero-hop advert off, flood advert every 25 h, 10 % duty cycle ( get dutycycle \u2192 10.0% ; the deprecated af reads 9); repeater: regions cz and cs next to * -- add your own cz-<kraj> with region put cz-xxx cz + region save ; 2-byte path hashes (this fork's default); repeater: the channel filter ( 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. Flashing a release 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): Connect the board over USB. Click Custom Firmware and choose the .zip for your board. Click Enter DFU mode and pick the board's serial port. The board restarts into its bootloader and shows up as a new port. Click Flash! and pick that new port. About 30 s, then the board restarts into the new firmware. Console in the flasher (or any serial terminal, 115200) checks the result: 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. Experimental: firmware update pushed by the admin ( *-ota ) 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. Each *-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. Over the mesh a node takes only a delta, and never an older version than it runs -- enforced by the node, not by the tool. A full image or a step back only locally ( fw apply downgrade ). fw apply wants the battery at 3.8 V or more unless the node runs on USB. Packages and 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 . The first *-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 . Experimental even within this fork : the images come with every release (see the warning above) and have no second bank and no automatic rollback. A bad firmware that boots keeps running until you push the next one; one that does not boot needs USB/BLE DFU in hand. Tried on the bench (XIAO, USB, mesh, side channel) and on two of our masts since 13. 11. 2026. The radio watchdogs (see Diagnostics and operations) catch an image that boots with a dead radio: switch set radio.silence on for nodes you push to. Costs ~10 kB of RAM. Build Version stamping in every nRF52 env ( 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.","title":"English"},{"location":"en/#about-this-fork-meshcore-tth","text":"\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.","title":"About this fork (meshcore-tth)"},{"location":"en/#repeater-antispam-all-of-it-off-switchable-none-of-it-upstream","text":"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. FairnessLimiter -- token buckets on forwarded floods, keyed on the 1-byte ids already in the clear (channel hash, sender hash, advert origin). Port of Beanow's proposal #1502 , limits re-sized from 30 days of real CZ traffic. fairness [on|off|grid|cap|refill] ; direct-routed traffic is never limited. Per-origin advert window -- each node's flood advert forwarded at most once per N hours ( fairness advert <h>|clear ), ported from DutchMeshCore 's AdvertLimiter. Aimed at nodes that re-advertise every minute. Dry-run -- fairness dryrun on counts every verdict but forwards anyway; fairness air reports the airtime shed (or that would be) per reason. Channel filter -- on channels whose key the repeater knows (Public and #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. Channel-hash deny-forward -- 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. Message age limit -- 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.","title":"Repeater: antispam (all of it off-switchable, none of it upstream)"},{"location":"en/#diagnostics-and-operations","text":"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: Radio watchdogs. The hardware watchdog only catches a frozen loop; two of our nodes were found deaf with the loop running, and only a reboot helped. 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. Stalled TX (repeater only): packets wait in the queue and the sent counter does not move -> re-arm the radio, then reboot. An empty queue never counts. On, 15 min ( 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 variants only ( *-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. Also observer variants only: a passive analyzer in the console -- 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. Own builds only, not in the releases: channel bot ( 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.","title":"Diagnostics and operations"},{"location":"en/#core-fixes","text":"Replay protection of admin commands survives a reboot. Upstream keeps a client's last timestamp in RAM only, so after every restart any captured command is accepted again -- a captured 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. Passwords can no longer be guessed over the air at full speed. Upstream checks every login without a limit and does not even answer a wrong one. After 4 wrong passwords within 3 minutes ( 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. A replayed blank-password login no longer floods a reply. A login from a client in the ACL with an empty password had no replay check; replayed, it gained nothing, but every copy made the node flood its reply over the mesh. TRACE no longer appends its path past the end of the payload; TRACE/PATH parsing and 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). Path-hash width comes from the node's prefs on every TX path, including sendZeroHop ; 2-byte path hashes are the default ( PATH_HASH_MODE_DEFAULT ). Failed transmits are re-queued with backoff instead of dropped. Per-packet RSSI captured at RX; ContactInfo zeroed before a partial fill.","title":"Core fixes"},{"location":"en/#power-clock-gps","text":"GPS duty cycle ( 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. A node without GPS starts at its build epoch, not in 2024; the clock and a hardfault record survive a warm reset ( .noinit ); clkreboot . No blinking LED and slower BLE advertising on solar nodes. Battery level as an icon at the end of the advertised name: 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). Optional RX duty cycle ( 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). The nRF52 boot undervoltage lock ( 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 ).","title":"Power, clock, GPS"},{"location":"en/#sensors-and-companions","text":"simple_sensor : telemetry from an external station over UART ( BudkaLinkSensorManager , one LPP channel per meter), sensor read . Sensors that would otherwise convert continuously (INA219, INA226, INA260, INA3221, BMP280) sleep between telemetry reads and measure on demand (idea and first INA219 patch: Alkel Brostl). INA chips are told apart by their ID, so an INA226 is no longer taken for an INA219. The shunt is set at runtime and saved: sensor set ina.shunt <mOhm> . Companion: 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.","title":"Sensors and companions"},{"location":"en/#public-builds-czech-mesh-defaults","text":"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: radio 869.432 MHz / 62.5 kHz / SF7 / CR5 (all builds); repeater and room server: zero-hop advert off, flood advert every 25 h, 10 % duty cycle ( get dutycycle \u2192 10.0% ; the deprecated af reads 9); repeater: regions cz and cs next to * -- add your own cz-<kraj> with region put cz-xxx cz + region save ; 2-byte path hashes (this fork's default); repeater: the channel filter ( 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.","title":"Public builds: Czech mesh defaults"},{"location":"en/#flashing-a-release","text":"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): Connect the board over USB. Click Custom Firmware and choose the .zip for your board. Click Enter DFU mode and pick the board's serial port. The board restarts into its bootloader and shows up as a new port. Click Flash! and pick that new port. About 30 s, then the board restarts into the new firmware. Console in the flasher (or any serial terminal, 115200) checks the result: 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.","title":"Flashing a release"},{"location":"en/#experimental-firmware-update-pushed-by-the-admin-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. Each *-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. Over the mesh a node takes only a delta, and never an older version than it runs -- enforced by the node, not by the tool. A full image or a step back only locally ( fw apply downgrade ). fw apply wants the battery at 3.8 V or more unless the node runs on USB. Packages and 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 . The first *-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 . Experimental even within this fork : the images come with every release (see the warning above) and have no second bank and no automatic rollback. A bad firmware that boots keeps running until you push the next one; one that does not boot needs USB/BLE DFU in hand. Tried on the bench (XIAO, USB, mesh, side channel) and on two of our masts since 13. 11. 2026. The radio watchdogs (see Diagnostics and operations) catch an image that boots with a dead radio: switch set radio.silence on for nodes you push to. Costs ~10 kB of RAM.","title":"Experimental: firmware update pushed by the admin (*-ota)"},{"location":"en/#build","text":"Version stamping in every nRF52 env ( 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.","title":"Build"},{"location":"faq/","text":"Frequently Asked Questions A list of frequently-asked questions and answers for MeshCore Frequently Asked Questions 1. Introduction 1.1. Q: What is MeshCore? 1.2. Q: What do you need to start using MeshCore? 1.2.1. Hardware 1.2.2. Firmware 1.2.3. Companion Radio Firmware 1.2.4. Repeater 1.2.5. Room Server 2. Initial Setup 2.1. Q: How many devices do I need to start using MeshCore? 2.2. Q: Does MeshCore cost any money? 2.3. Q: What frequencies are supported by MeshCore? 2.4. Q: What is an \"advert\" in MeshCore? 2.5. Q: Is there a hop limit? 3. Server Administration 3.1. Q: How do you configure a repeater or a room server? 3.2. Q: Do I need to set the location for a repeater? 3.3. Q: What is the password to administer a repeater or a room server? 3.4. Q: What is the password to join a room server? 3.5. Q: Can I retrieve a repeater's private key or set a repeater's private key? 3.6. Q: The first byte of my repeater's public key collides with an existing repeater on the mesh. How do I get a new private key with a matching public key that has its first byte of my choosing? 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? 3.8. Q: How do I make my repeater an observer on the mesh? 3.9. Q: What is multibyte support? What do 1-byte, 2-byte, 3-byte adverts and messages mean? 3.9.1. Q: What path hash sizes will my repeater forward? 3.9.2. Q: What determines a packet's path hash size? 3.9.3. Q: How do I change my companion's path hash size? 3.9.4. Q: What does the CLI command path.hash.mode do on a repeater? 3.9.5. Q: Why use 2- or 3-byte path hash for adverts? 3.9.6. Q: When can we move away from 1-byte path hash for channel and direct messages? 4. T-Deck Related 4.1. Q: Is there a user guide for T-Deck, T-Pager, T-Watch, or T-Display Pro? 4.2. Q: What are the steps to get a T-Deck into DFU (Device Firmware Update) mode? 4.3. Q: Why is my T-Deck Plus not getting any satellite lock? 4.4. Q: Why is my OG (non-Plus) T-Deck not getting any satellite lock? 4.5. Q: What size of SD card does the T-Deck support? 4.6. Q: What is the public key for the default public channel? 4.7. Q: How do I get maps on T-Deck? 4.8. Q: Where do the map tiles go? 4.9. Q: How to unlock deeper map zoom and server management features on T-Deck? 4.10. Q: How to decipher the diagnostics screen on T-Deck? 4.11. Q: The T-Deck sound is too loud? 4.12. Q: Can you customize the sound? 4.13. Q: What is the 'Import from Clipboard' feature on the t-deck and is there a way to manually add nodes without having to receive adverts? 4.14. Q: How to capture a screenshot on T-Deck? 5. General 5.1. Q: What are BW, SF, and CR? 5.2. Q: Do MeshCore clients repeat? 5.3. Q: What happens when a node learns a route via a mobile repeater, and that repeater is gone? 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? 5.5. Q: Do public channels always flood? Do private channels always flood? 5.6. Q: What is the public key for the default public channel? 5.7. Q: Is MeshCore open source? 5.8. Q: How can I support MeshCore? 5.9. Q: How do I build MeshCore firmware from source? 5.10. Q: Are there other MeshCore related open source projects? 5.11. Q: Does MeshCore support ATAK? 5.12. Q: How do I add a node to the MeshCore Map? 5.13. Q: Can I use a Raspberry Pi to update a MeshCore radio? 5.14. Q: Are there projects built around MeshCore? 5.15. Q: Are there client applications for Windows or Mac? 5.16. Q: Are there any resources that compare MeshCore to other LoRa systems? 6. Troubleshooting 6.1. Q: My client says another client or a repeater or a room server was last seen many, many days ago. 6.2. Q: A repeater or a client or a room server I expect to see on my discover list (on T-Deck) or contact list (on a smart device client) are not listed. 6.3. Q: How to connect to a repeater via BLE (Bluetooth)? 6.4. Q: My companion isn't showing up over Bluetooth? 6.5. Q: I can't connect via Bluetooth, what is the Bluetooth pairing code? 6.6. Q: My Heltec V3 keeps disconnecting from my smartphone. It can't hold a solid Bluetooth connection. 6.7. Q: My RAK/T1000-E/xiao_nRF52 device seems to be corrupted, how do I wipe it clean to start fresh? 6.8. Q: WebFlasher fails on Linux with failed to open 7. Other Questions: 7.1. Q: How to update nRF (RAK, T114, Seeed XIAO) companion, repeater and room server firmware over the air using the new simpler DFU app? 7.1.1 Q: Can I update Seeed Studio Wio Tracker L1 Pro using OTA? 7.2. Q: How to update ESP32-based devices over the air? 7.3. Q: Is there a way to lower the chance of a failed OTA device firmware update (DFU)? 7.4. Q: are the MeshCore logo and font available? 7.5. Q: What is the format of a contact or channel QR code? 7.6. Q: How do I connect to the companion via Wi-Fi, e.g. using a Heltec V3? 7.7. Q: I have a Station G2, or a Heltec V4, or an Ikoka Stick, or a radio with an EByte E22-900M30S or an EByte E22-900M33S module, what should their transmit power be set to? 7.8. Q: How do I use Ethernet with a RAK4631? 1. Introduction 1.1. Q: What is MeshCore? 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: MeshCore is the routing and firmware etc., available on GitHub under MIT license There are clients made by the community, such as the web clients, these are free to use, and some are open source too The cross-platform mobile app developed by Liam Cottle for Android/iOS/PC etc. is free to download and use The T-Deck firmware is developed by Scott at Ripple Radios, the creator of MeshCore, is also free to flash on your devices and use 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. 1.2. Q: What do you need to start using MeshCore? A: Everything you need for MeshCore is available at: Main Website: https://meshcore.io Firmware Flasher: https://flasher.meshcore.io MeshCore Firmware on GitHub: https://github.com/meshcore-dev/MeshCore MeshCore Companion Web App: https://app.meshcore.nz MeshCore Map: https://map.meshcore.io Liam Cottle's MeshCore Technical Presentation You need LoRa hardware devices to run MeshCore firmware as clients or server (repeater and room server). 1.2.1. Hardware 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. 1.2.2. Firmware MeshCore has four firmware types that are not available on other LoRa systems. MeshCore has the following: 1.2.3. Companion Radio Firmware 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 1.2.4. Repeater 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. 1.2.5. Room Server 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. 2. Initial Setup 2.1. Q: How many devices do I need to start using MeshCore? 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. 2.2. Q: Does MeshCore cost any money? 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. 2.3. Q: What frequencies are supported by MeshCore? 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. 2.4. Q: What is an \"advert\" in MeshCore? 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\". Zero hop means your advert is broadcast to anyone that can hear it, and that's it. Flooded means it's broadcast and then repeated by all the repeaters that hear it. 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. 2.5. Q: Is there a hop limit? 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. 3. Server Administration 3.1. Q: How do you configure a repeater or a room server? 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: After a repeater or room server firmware is flashed onto a LoRa device, go to https://config.meshcore.io and use the web user interface to connect to the LoRa device via USB serial. From there you can set the name of the server, its frequency and other related settings, location, passwords etc. 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 3.2. Q: Do I need to set the location for a repeater? 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. 3.3. Q: What is the password to administer a repeater or a room server? 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} 3.4. Q: What is the password to join a room server? 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} 3.5. Q: Can I retrieve a repeater's private key or set a repeater's private key? 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. 3.6. Q: The first byte of my repeater's public key collides with an existing repeater on the mesh. How do I get a new private key with a matching public key that has its first byte of my choosing? 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. 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? 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 3.8. Q: How do I make my repeater an observer on the mesh? A: The observer instruction is available here: https://analyzer.letsmesh.net/observer/onboard 3.9. Q: What is multibyte support? What do 1-byte, 2-byte, 3-byte adverts and messages mean? 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. 3.9.1. Q: What path hash sizes will my repeater forward? 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. 3.9.2. Q: What determines a packet's path hash size? 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. 3.9.3. Q: How do I change my companion's path hash size? 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. 3.9.4. Q: What does the CLI command path.hash.mode do on a repeater? 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 \u2502 path.hash.mode \u2502 Advert path hash size \u2502 \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 \u2502 0 \u2502 1 byte (default) \u2502 \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 \u2502 1 \u2502 2 bytes \u2502 \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 \u2502 2 \u2502 3 bytes \u2502 \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 It is safe to set your 1.14+ repeaters to mode 1 or 2. 3.9.5. Q: Why use 2- or 3-byte path hash for adverts? 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. 3.9.6. Q: When can we move away from 1-byte path hash for channel and direct messages? 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. 4. T-Deck Related 4.1. Q: Is there a user guide for T-Deck, T-Pager, T-Watch, or T-Display Pro? A: Yes, it is available on https://buymeacoffee.com/ripplebiz/ultra-v7-7-guide-meshcore-users 4.2. Q: What are the steps to get a T-Deck into DFU (Device Firmware Update) mode? A: Device off Connect USB cable to device Hold down trackball (keep holding) Turn on device Hear USB connection sound Release trackball T-Deck in DFU mode now At this point you can begin flashing using https://flasher.meshcore.io 4.3. Q: Why is my T-Deck Plus not getting any satellite lock? 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 4.4. Q: Why is my OG (non-Plus) T-Deck not getting any satellite lock? 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. 4.5. Q: What size of SD card does the T-Deck support? A: Users have had no issues using 16GB or 32GB SD cards. Format the SD card to FAT32 . 4.6. Q: What is the public key for the default public channel? 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 4.7. Q: How do I get maps on T-Deck? A: You need map tiles. You can get pre-downloaded map tiles here (a good way to support development): https://buymeacoffee.com/ripplebiz/e/342543 (Europe) https://buymeacoffee.com/ripplebiz/e/342542 (US) 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 4.8. Q: Where do the map tiles go? Once you have the tiles downloaded, copy the \\tiles folder to the root of your T-Deck's SD card. 4.9. Q: How to unlock deeper map zoom and server management features on T-Deck? 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 4.10. Q: How to decipher the diagnostics screen on T-Deck? 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) #define PAYLOAD_TYPE_RESPONSE 0x01 // response to REQ or ANON_REQ (prefixed with dest/src hashes, MAC) (enc data: timestamp, blob) #define PAYLOAD_TYPE_TXT_MSG 0x02 // a plain text message (prefixed with dest/src hashes, MAC) (enc data: timestamp, text) #define PAYLOAD_TYPE_ACK 0x03 // a simple ack #define PAYLOAD_TYPE_ADVERT 0x04 // a node advertising its Identity #define PAYLOAD_TYPE_GRP_TXT 0x05 // an (unverified) group text message (prefixed with channel hash, MAC) (enc data: timestamp, \"name: msg\") #define PAYLOAD_TYPE_GRP_DATA 0x06 // an (unverified) group datagram (prefixed with channel hash, MAC) (enc data: data_type, data_len, blob) #define PAYLOAD_TYPE_ANON_REQ 0x07 // generic request (prefixed with dest_hash, ephemeral pub_key, MAC) (enc data: ...) #define PAYLOAD_TYPE_PATH 0x08 // returned path (prefixed with dest/src hashes, MAC) (enc data: path, extra) Source 4.11. Q: The T-Deck sound is too loud? 4.12. Q: Can you customize the sound? 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.mp3 error.mp3 alert.mp3 new-advert.mp3 existing-advert.mp3 4.13. Q: What is the 'Import from Clipboard' feature on the t-deck and is there a way to manually add nodes without having to receive adverts? A: '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://...\") 4.14. Q: How to capture a screenshot on T-Deck? 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. 5. General 5.1. Q: What are BW, SF, and CR? 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 5.2. Q: Do MeshCore clients repeat? 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. 5.3. Q: What happens when a node learns a route via a mobile repeater, and that repeater is gone? 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. 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? 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 5.5. Q: Do public channels always flood? Do private channels always flood? 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 5.6. Q: What is the public key for the default public channel? 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 5.7. Q: Is MeshCore open source? 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 5.8. Q: How can I support MeshCore? 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 5.9. Q: How do I build MeshCore firmware from source? 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 sudo apt install libpython3-dev sudo apt install python3-venv Mac: python3 should be already installed. Then it should be the same for all platforms: python3 -m venv meshcore-venv cd meshcore-venv && source bin/activate pip install -U platformio git clone https://github.com/meshcore-dev/meshcore.git cd meshcore 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 then you'll find firmware.zip in .pio/build/RAK_4631_repeater 5.10. Q: Are there other MeshCore related open source projects? 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 5.11. Q: Does MeshCore support ATAK? A: ATAK is not currently on MeshCore's roadmap. MeshCore would not be best suited to ATAK because MeshCore: clients do not repeat and therefore you would need a network of repeaters in place will not have a stable path where all clients are constantly moving between repeaters 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 5.12. Q: How do I add a node to the MeshCore Map ? 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. 5.13. Q: Can I use a Raspberry Pi to update a MeshCore radio? 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: Download the firmware file from https://flasher.meshcore.io . Go to the website in a browser and find the section that has the firmware you need. Click the Download button, right-click on the file you need, for example: Heltec_v3_companion_radio_ble-v1.7.1-165fb33.bin Non-merged bin keeps the existing Bluetooth pairing database. Heltec_v3_companion_radio_usb-v1.7.1-165fb33-merged.bin Merged bin overwrites everything including the bootloader and existing Bluetooth pairing database, but keeps configurations. Right-click on the file name and copy the link. Here is an example: https://flasher.meshcore.io/releases/download/companion-v1.7.1/Heltec_v3_companion_radio_ble-v1.7.1-165fb33.bin Run: wget 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. If the above wget command only downloads a very small file (10K bytes instead of more than 100K byte), use this command instead: 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\" Confirm the ttyXXXX device path on your Raspberry Pi. Go to the /dev directory and run the ls command to find your device path. It is usually /dev/ttyUSB0 for ESP devices. Install esptool from the shell. pip install esptool --break-system-packages Flash the firmware. For non-merged bin: esptool.py -p /dev/ttyUSB0 --chip esp32-s3 write_flash 0x10000 <non-merged_firmware>.bin For merged bin: esptool.py -p /dev/ttyUSB0 --chip esp32-s3 write_flash 0x00000 <merged_firmware>.bin Instructions for nRF devices: For nRF devices (e.g. RAK, Heltec T114) you need the following: Download the firmware file from https://flasher.meshcore.io . Go to the website in a browser and find the section that has the firmware you need. You need the ZIP version for the adafruit flash tool below. Click the Download button, right-click on the ZIP file, for example: RAK_4631_companion_radio_ble-v1.7.1-165fb33.zip Right-click on the file name and copy the link. Here is an example: https://flasher.meshcore.io/releases/download/companion-v1.7.1/RAK_4631_companion_radio_ble-v1.7.1-165fb33.zip Run: wget 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. Confirm the ttyXXXX device path on your Raspberry Pi. Go to the /dev directory and run the ls command to find your device path. It is usually /dev/ttyACM0 for nRF devices. Install adafruit-nrfutil. pip install adafruit-nrfutil --break-system-packages Flash the nRF device. adafruit-nrfutil --verbose dfu serial --package RAK_4631_companion_radio_usb-v1.7.1-165fb33.zip -p /dev/ttyACM0 -b 115200 --singlebank --touch 1200 To 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 picocom To start managing your USB serial-connected device using picocom, use the following command: picocom -b 115200 /dev/ttyUSB0 --imap lfcrlf From here, reference repeater and room server command line commands in the MeshCore docs here: https://docs.meshcore.io/cli_commands 5.14. Q: Are there projects built around MeshCore? 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. 5.15. Q: Are there client applications for Windows or Mac? 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. 5.16. Q: Are there any resources that compare MeshCore to other LoRa systems? A: Here is a list of MeshCore comparison resources: The Comms Channel on YouTube: https://www.youtube.com/watch?v=guDoKGs02Us MeshCore Advantages by MCarper: https://github.com/mikecarper/meshfirmware/blob/main/MeshCoreAdvantages.md MeshCore vs Meshtastic by austinmesh.org: https://www.austinmesh.org/learn/meshcore-vs-meshtastic 6. Troubleshooting 6.1. Q: My client says another client or a repeater or a room server was last seen many, many days ago. 6.2. Q: A repeater or a client or a room server I expect to see on my discover list (on T-Deck) or contact list (on a smart device client) are not listed. A: If your client is a T-Deck, it may not have its time set (no GPS installed, no GPS lock, or wrong GPS baud rate). If you are using the Android or iOS client, the other client, repeater, or room server may have the wrong time. 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. 6.3. Q: How to connect to a repeater via BLE (Bluetooth)? 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. 6.4. Q: My companion isn't showing up over Bluetooth? A: Make sure that you flashed the Bluetooth companion firmware and not the USB-only companion firmware. 6.5. Q: I can't connect via Bluetooth, what is the Bluetooth pairing code? A: The default Bluetooth pairing code is 123456 6.6. Q: My Heltec V3 keeps disconnecting from my smartphone. It can't hold a solid Bluetooth connection. 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. 6.7. Q: My RAK/T1000-E/xiao_nRF52/... device seems to be corrupted, how do I wipe it clean to start fresh? 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 6.8. Q: WebFlasher fails on Linux with failed to open 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 7. Other Questions: 7.1. Q: How to update nRF (RAK, T114, Seeed XIAO) companion, repeater and room server firmware over the air using the new simpler DFU app? A: The steps below work on both Android and iOS as nRF has made both apps' user interface the same on both platforms: Download nRF's DFU app from iOS App Store or Android's Play Store, you can find the app by searching for nrf dfu , the app's full name is nRF Device Firmware Update On https://flasher.meshcore.io , download the ZIP version of the firmware for your nRF device (e.g. RAK or Heltec T114 or Seeed Studio's Xiao) From the MeshCore app, log in remotely to the repeater you want to update with admin privileges Go to the Command Line tab, type start ota and hit enter. You should see OK to confirm the repeater device is now in OTA mode Run the DFU app, then tap Settings in the top-right corner Enable Packet receipt notifications , and change Number of Packets to 10 for RAK, 8 for T114. 8 also works for RAK. Select the firmware zip file you downloaded Select the device you want to update. If the device you want to update is not on the list, try enabling OTA on the device again If the device is not found, enable Force Scanning in the DFU app Tap Upload to begin OTA update If it fails, try toggling Bluetooth on your phone. If that doesn't work, try rebooting your phone. If you keep getting failures at the \"Enabling Bootloader\" step, try forgetting the nRF board in your iOS or Android device's Bluetooth settings and re-pair it through the DFU app. Wait for the update to complete. It can take a few minutes. It is strongly recommended that you install and use the OTAFIX bootloader at https://github.com/oltaco/Adafruit_nRF52_Bootloader_OTAFIX . To update a companion node over OTA, it must be running companion firmware v1.15 or greater. Please see the MeshCore Blog for additional information on OTA firmware flashing: https://blog.meshcore.io/2026/04/06/otafix-bootloader https://blog.meshcore.io/2026/04/02/nrf-ota-update 7.1.1 Q: Can I update Seeed Studio Wio Tracker L1 Pro using OTA? A: 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. 7.2. Q: How to update ESP32-based devices over the air? A: For ESP32-based devices (e.g. Heltec V3): On https://flasher.meshcore.io , download the non-merged version of the firmware for your ESP32 device (e.g. Heltec_v3_repeater-v1.6.2-4449fd3.bin , no \"merged\" in the file name). From the MeshCore app, log in remotely to the repeater you want to update with admin privileges. Go to the Command Line tab, type start ota and hit enter. You should see OK to confirm the repeater device is now in OTA mode. The command start ota on an ESP32-based device starts a Wi-Fi hotspot named MeshCore OTA . From your phone or computer connect to the 'MeshCore OTA' hotspot. From a browser, go to http://192.168.4.1/update and upload the non-merged bin from the flasher. 7.3. Q: Is there a way to lower the chance of a failed OTA device firmware update (DFU)? 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: Heltec Automation Mesh Node T114 / HT-nRF5262 Nologo ProMicro NRF52840 (aka SuperMini NRF52840) Seeed Studio SenseCAP Card Tracker T1000-E Seeed Studio Wio Tracker L1 Seeed Studio XIAO nRF52840 BLE Seeed Studio XIAO nRF52840 BLE SENSE RAK 4631 RAK WisMesh Tag (new 28/11/2025) 7.4. Q: Are the MeshCore logo and font available? A: Yes, it is on the MeshCore GitHub repo here: https://github.com/meshcore-dev/MeshCore/tree/main/logo 7.5. Q: What is the format of a contact or channel QR code? A: Channel: meshcore://channel/add?name=<name>&secret=<secret> Contact: meshcore://contact/add?name=<name>&public_key=<secret>&type=<type> Where &type is: chat = 1 repeater = 2 room = 3 sensor = 4 7.6. Q: How do I connect to the companion via Wi-Fi, e.g. using a Heltec V3? A: 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. 7.7. Q: I have a Station G2, or a Heltec V4, or an Ikoka Stick, or a radio with an EByte E22-900M30S or an EByte E22-900M33S module, what should their transmit power be set to? 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) 7.8. Q: How do I use Ethernet with a RAK4631? 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.","title":"FAQ"},{"location":"faq/#frequently-asked-questions","text":"A list of frequently-asked questions and answers for MeshCore Frequently Asked Questions 1. Introduction 1.1. Q: What is MeshCore? 1.2. Q: What do you need to start using MeshCore? 1.2.1. Hardware 1.2.2. Firmware 1.2.3. Companion Radio Firmware 1.2.4. Repeater 1.2.5. Room Server 2. Initial Setup 2.1. Q: How many devices do I need to start using MeshCore? 2.2. Q: Does MeshCore cost any money? 2.3. Q: What frequencies are supported by MeshCore? 2.4. Q: What is an \"advert\" in MeshCore? 2.5. Q: Is there a hop limit? 3. Server Administration 3.1. Q: How do you configure a repeater or a room server? 3.2. Q: Do I need to set the location for a repeater? 3.3. Q: What is the password to administer a repeater or a room server? 3.4. Q: What is the password to join a room server? 3.5. Q: Can I retrieve a repeater's private key or set a repeater's private key? 3.6. Q: The first byte of my repeater's public key collides with an existing repeater on the mesh. How do I get a new private key with a matching public key that has its first byte of my choosing? 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? 3.8. Q: How do I make my repeater an observer on the mesh? 3.9. Q: What is multibyte support? What do 1-byte, 2-byte, 3-byte adverts and messages mean? 3.9.1. Q: What path hash sizes will my repeater forward? 3.9.2. Q: What determines a packet's path hash size? 3.9.3. Q: How do I change my companion's path hash size? 3.9.4. Q: What does the CLI command path.hash.mode do on a repeater? 3.9.5. Q: Why use 2- or 3-byte path hash for adverts? 3.9.6. Q: When can we move away from 1-byte path hash for channel and direct messages? 4. T-Deck Related 4.1. Q: Is there a user guide for T-Deck, T-Pager, T-Watch, or T-Display Pro? 4.2. Q: What are the steps to get a T-Deck into DFU (Device Firmware Update) mode? 4.3. Q: Why is my T-Deck Plus not getting any satellite lock? 4.4. Q: Why is my OG (non-Plus) T-Deck not getting any satellite lock? 4.5. Q: What size of SD card does the T-Deck support? 4.6. Q: What is the public key for the default public channel? 4.7. Q: How do I get maps on T-Deck? 4.8. Q: Where do the map tiles go? 4.9. Q: How to unlock deeper map zoom and server management features on T-Deck? 4.10. Q: How to decipher the diagnostics screen on T-Deck? 4.11. Q: The T-Deck sound is too loud? 4.12. Q: Can you customize the sound? 4.13. Q: What is the 'Import from Clipboard' feature on the t-deck and is there a way to manually add nodes without having to receive adverts? 4.14. Q: How to capture a screenshot on T-Deck? 5. General 5.1. Q: What are BW, SF, and CR? 5.2. Q: Do MeshCore clients repeat? 5.3. Q: What happens when a node learns a route via a mobile repeater, and that repeater is gone? 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? 5.5. Q: Do public channels always flood? Do private channels always flood? 5.6. Q: What is the public key for the default public channel? 5.7. Q: Is MeshCore open source? 5.8. Q: How can I support MeshCore? 5.9. Q: How do I build MeshCore firmware from source? 5.10. Q: Are there other MeshCore related open source projects? 5.11. Q: Does MeshCore support ATAK? 5.12. Q: How do I add a node to the MeshCore Map? 5.13. Q: Can I use a Raspberry Pi to update a MeshCore radio? 5.14. Q: Are there projects built around MeshCore? 5.15. Q: Are there client applications for Windows or Mac? 5.16. Q: Are there any resources that compare MeshCore to other LoRa systems? 6. Troubleshooting 6.1. Q: My client says another client or a repeater or a room server was last seen many, many days ago. 6.2. Q: A repeater or a client or a room server I expect to see on my discover list (on T-Deck) or contact list (on a smart device client) are not listed. 6.3. Q: How to connect to a repeater via BLE (Bluetooth)? 6.4. Q: My companion isn't showing up over Bluetooth? 6.5. Q: I can't connect via Bluetooth, what is the Bluetooth pairing code? 6.6. Q: My Heltec V3 keeps disconnecting from my smartphone. It can't hold a solid Bluetooth connection. 6.7. Q: My RAK/T1000-E/xiao_nRF52 device seems to be corrupted, how do I wipe it clean to start fresh? 6.8. Q: WebFlasher fails on Linux with failed to open 7. Other Questions: 7.1. Q: How to update nRF (RAK, T114, Seeed XIAO) companion, repeater and room server firmware over the air using the new simpler DFU app? 7.1.1 Q: Can I update Seeed Studio Wio Tracker L1 Pro using OTA? 7.2. Q: How to update ESP32-based devices over the air? 7.3. Q: Is there a way to lower the chance of a failed OTA device firmware update (DFU)? 7.4. Q: are the MeshCore logo and font available? 7.5. Q: What is the format of a contact or channel QR code? 7.6. Q: How do I connect to the companion via Wi-Fi, e.g. using a Heltec V3? 7.7. Q: I have a Station G2, or a Heltec V4, or an Ikoka Stick, or a radio with an EByte E22-900M30S or an EByte E22-900M33S module, what should their transmit power be set to? 7.8. Q: How do I use Ethernet with a RAK4631?","title":"Frequently Asked Questions"},{"location":"faq/#1-introduction","text":"","title":"1. Introduction"},{"location":"faq/#11-q-what-is-meshcore","text":"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: MeshCore is the routing and firmware etc., available on GitHub under MIT license There are clients made by the community, such as the web clients, these are free to use, and some are open source too The cross-platform mobile app developed by Liam Cottle for Android/iOS/PC etc. is free to download and use The T-Deck firmware is developed by Scott at Ripple Radios, the creator of MeshCore, is also free to flash on your devices and use 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.","title":"1.1. Q: What is MeshCore?"},{"location":"faq/#12-q-what-do-you-need-to-start-using-meshcore","text":"A: Everything you need for MeshCore is available at: Main Website: https://meshcore.io Firmware Flasher: https://flasher.meshcore.io MeshCore Firmware on GitHub: https://github.com/meshcore-dev/MeshCore MeshCore Companion Web App: https://app.meshcore.nz MeshCore Map: https://map.meshcore.io Liam Cottle's MeshCore Technical Presentation You need LoRa hardware devices to run MeshCore firmware as clients or server (repeater and room server).","title":"1.2. Q: What do you need to start using MeshCore?"},{"location":"faq/#121-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.","title":"1.2.1. Hardware"},{"location":"faq/#122-firmware","text":"MeshCore has four firmware types that are not available on other LoRa systems. MeshCore has the following:","title":"1.2.2. Firmware"},{"location":"faq/#123-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","title":"1.2.3. Companion Radio Firmware"},{"location":"faq/#124-repeater","text":"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.","title":"1.2.4. Repeater"},{"location":"faq/#125-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.","title":"1.2.5. Room Server"},{"location":"faq/#2-initial-setup","text":"","title":"2. Initial Setup"},{"location":"faq/#21-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.","title":"2.1. Q: How many devices do I need to start using MeshCore?"},{"location":"faq/#22-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.","title":"2.2. Q: Does MeshCore cost any money?"},{"location":"faq/#23-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.","title":"2.3. Q: What frequencies are supported by MeshCore?"},{"location":"faq/#24-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\". Zero hop means your advert is broadcast to anyone that can hear it, and that's it. Flooded means it's broadcast and then repeated by all the repeaters that hear it. 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.","title":"2.4. Q: What is an \"advert\" in MeshCore?"},{"location":"faq/#25-q-is-there-a-hop-limit","text":"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.","title":"2.5. Q: Is there a hop limit?"},{"location":"faq/#3-server-administration","text":"","title":"3. Server Administration"},{"location":"faq/#31-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: After a repeater or room server firmware is flashed onto a LoRa device, go to https://config.meshcore.io and use the web user interface to connect to the LoRa device via USB serial. From there you can set the name of the server, its frequency and other related settings, location, passwords etc. 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","title":"3.1. Q: How do you configure a repeater or a room server?"},{"location":"faq/#32-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.","title":"3.2. Q: Do I need to set the location for a repeater?"},{"location":"faq/#33-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}","title":"3.3. Q: What is the password to administer a repeater or a room server?"},{"location":"faq/#34-q-what-is-the-password-to-join-a-room-server","text":"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}","title":"3.4. Q: What is the password to join a room server?"},{"location":"faq/#35-q-can-i-retrieve-a-repeaters-private-key-or-set-a-repeaters-private-key","text":"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.","title":"3.5. Q: Can I retrieve a repeater's private key or set a repeater's private key?"},{"location":"faq/#36-q-the-first-byte-of-my-repeaters-public-key-collides-with-an-existing-repeater-on-the-mesh-how-do-i-get-a-new-private-key-with-a-matching-public-key-that-has-its-first-byte-of-my-choosing","text":"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.","title":"3.6. Q: The first byte of my repeater's public key collides with an existing repeater on the mesh. How do I get a new private key with a matching public key that has its first byte of my choosing?"},{"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","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","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?"},{"location":"faq/#38-q-how-do-i-make-my-repeater-an-observer-on-the-mesh","text":"A: The observer instruction is available here: https://analyzer.letsmesh.net/observer/onboard","title":"3.8. Q: How do I make my repeater an observer on the mesh?"},{"location":"faq/#39-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.","title":"3.9. Q: What is multibyte support? What do 1-byte, 2-byte, 3-byte adverts and messages mean?"},{"location":"faq/#391-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.","title":"3.9.1. Q: What path hash sizes will my repeater forward?"},{"location":"faq/#392-q-what-determines-a-packets-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.","title":"3.9.2. Q: What determines a packet's path hash size?"},{"location":"faq/#393-q-how-do-i-change-my-companions-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.","title":"3.9.3. Q: How do I change my companion's path hash size?"},{"location":"faq/#394-q-what-does-the-cli-command-pathhashmode-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 \u2502 path.hash.mode \u2502 Advert path hash size \u2502 \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 \u2502 0 \u2502 1 byte (default) \u2502 \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 \u2502 1 \u2502 2 bytes \u2502 \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 \u2502 2 \u2502 3 bytes \u2502 \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 It is safe to set your 1.14+ repeaters to mode 1 or 2.","title":"3.9.4. Q: What does the CLI command path.hash.mode do on a repeater?"},{"location":"faq/#395-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.","title":"3.9.5. Q: Why use 2- or 3-byte path hash for adverts?"},{"location":"faq/#396-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.","title":"3.9.6. Q: When can we move away from 1-byte path hash for channel and direct messages?"},{"location":"faq/#4-t-deck-related","text":"","title":"4. T-Deck Related"},{"location":"faq/#41-q-is-there-a-user-guide-for-t-deck-t-pager-t-watch-or-t-display-pro","text":"A: Yes, it is available on https://buymeacoffee.com/ripplebiz/ultra-v7-7-guide-meshcore-users","title":"4.1. Q: Is there a user guide for T-Deck, T-Pager, T-Watch, or T-Display Pro?"},{"location":"faq/#42-q-what-are-the-steps-to-get-a-t-deck-into-dfu-device-firmware-update-mode","text":"A: Device off Connect USB cable to device Hold down trackball (keep holding) Turn on device Hear USB connection sound Release trackball T-Deck in DFU mode now At this point you can begin flashing using https://flasher.meshcore.io","title":"4.2. Q: What are the steps to get a T-Deck into DFU (Device Firmware Update) mode?"},{"location":"faq/#43-q-why-is-my-t-deck-plus-not-getting-any-satellite-lock","text":"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","title":"4.3. Q: Why is my T-Deck Plus not getting any satellite lock?"},{"location":"faq/#44-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.","title":"4.4. Q: Why is my OG (non-Plus) T-Deck not getting any satellite lock?"},{"location":"faq/#45-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 .","title":"4.5. Q: What size of SD card does the T-Deck support?"},{"location":"faq/#46-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","title":"4.6. Q: What is the public key for the default public channel?"},{"location":"faq/#47-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): https://buymeacoffee.com/ripplebiz/e/342543 (Europe) https://buymeacoffee.com/ripplebiz/e/342542 (US) 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","title":"4.7. Q: How do I get maps on T-Deck?"},{"location":"faq/#48-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.","title":"4.8. Q: Where do the map tiles go?"},{"location":"faq/#49-q-how-to-unlock-deeper-map-zoom-and-server-management-features-on-t-deck","text":"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","title":"4.9. Q: How to unlock deeper map zoom and server management features on T-Deck?"},{"location":"faq/#410-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) #define PAYLOAD_TYPE_RESPONSE 0x01 // response to REQ or ANON_REQ (prefixed with dest/src hashes, MAC) (enc data: timestamp, blob) #define PAYLOAD_TYPE_TXT_MSG 0x02 // a plain text message (prefixed with dest/src hashes, MAC) (enc data: timestamp, text) #define PAYLOAD_TYPE_ACK 0x03 // a simple ack #define PAYLOAD_TYPE_ADVERT 0x04 // a node advertising its Identity #define PAYLOAD_TYPE_GRP_TXT 0x05 // an (unverified) group text message (prefixed with channel hash, MAC) (enc data: timestamp, \"name: msg\") #define PAYLOAD_TYPE_GRP_DATA 0x06 // an (unverified) group datagram (prefixed with channel hash, MAC) (enc data: data_type, data_len, blob) #define PAYLOAD_TYPE_ANON_REQ 0x07 // generic request (prefixed with dest_hash, ephemeral pub_key, MAC) (enc data: ...) #define PAYLOAD_TYPE_PATH 0x08 // returned path (prefixed with dest/src hashes, MAC) (enc data: path, extra) Source","title":"4.10. Q: How to decipher the diagnostics screen on T-Deck?"},{"location":"faq/#411-q-the-t-deck-sound-is-too-loud","text":"","title":"4.11. Q: The T-Deck sound is too loud?"},{"location":"faq/#412-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.mp3 error.mp3 alert.mp3 new-advert.mp3 existing-advert.mp3","title":"4.12. Q: Can you customize the sound?"},{"location":"faq/#413-q-what-is-the-import-from-clipboard-feature-on-the-t-deck-and-is-there-a-way-to-manually-add-nodes-without-having-to-receive-adverts","text":"A: '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://...\")","title":"4.13. Q: What is the 'Import from Clipboard' feature on the t-deck and is there a way to manually add nodes without having to receive adverts?"},{"location":"faq/#414-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.","title":"4.14. Q: How to capture a screenshot on T-Deck?"},{"location":"faq/#5-general","text":"","title":"5. General"},{"location":"faq/#51-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","title":"5.1. Q: What are BW, SF, and CR?"},{"location":"faq/#52-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.","title":"5.2. Q: Do MeshCore clients repeat?"},{"location":"faq/#53-q-what-happens-when-a-node-learns-a-route-via-a-mobile-repeater-and-that-repeater-is-gone","text":"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.","title":"5.3. Q: What happens when a node learns a route via a mobile repeater, and that repeater is gone?"},{"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","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","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?"},{"location":"faq/#55-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","title":"5.5. Q: Do public channels always flood? Do private channels always flood?"},{"location":"faq/#56-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","title":"5.6. Q: What is the public key for the default public channel?"},{"location":"faq/#57-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","title":"5.7. Q: Is MeshCore open source?"},{"location":"faq/#58-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","title":"5.8. Q: How can I support MeshCore?"},{"location":"faq/#59-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 sudo apt install libpython3-dev sudo apt install python3-venv Mac: python3 should be already installed. Then it should be the same for all platforms: python3 -m venv meshcore-venv cd meshcore-venv && source bin/activate pip install -U platformio git clone https://github.com/meshcore-dev/meshcore.git cd meshcore 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 then you'll find firmware.zip in .pio/build/RAK_4631_repeater","title":"5.9. Q: How do I build MeshCore firmware from source?"},{"location":"faq/#510-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","title":"5.10. Q: Are there other MeshCore related open source projects?"},{"location":"faq/#511-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: clients do not repeat and therefore you would need a network of repeaters in place will not have a stable path where all clients are constantly moving between repeaters 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","title":"5.11. Q: Does MeshCore support ATAK?"},{"location":"faq/#512-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.","title":"5.12. Q: How do I add a node to the MeshCore Map?"},{"location":"faq/#513-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: Download the firmware file from https://flasher.meshcore.io . Go to the website in a browser and find the section that has the firmware you need. Click the Download button, right-click on the file you need, for example: Heltec_v3_companion_radio_ble-v1.7.1-165fb33.bin Non-merged bin keeps the existing Bluetooth pairing database. Heltec_v3_companion_radio_usb-v1.7.1-165fb33-merged.bin Merged bin overwrites everything including the bootloader and existing Bluetooth pairing database, but keeps configurations. Right-click on the file name and copy the link. Here is an example: https://flasher.meshcore.io/releases/download/companion-v1.7.1/Heltec_v3_companion_radio_ble-v1.7.1-165fb33.bin Run: wget 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. If the above wget command only downloads a very small file (10K bytes instead of more than 100K byte), use this command instead: 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\" Confirm the ttyXXXX device path on your Raspberry Pi. Go to the /dev directory and run the ls command to find your device path. It is usually /dev/ttyUSB0 for ESP devices. Install esptool from the shell. pip install esptool --break-system-packages Flash the firmware. For non-merged bin: esptool.py -p /dev/ttyUSB0 --chip esp32-s3 write_flash 0x10000 <non-merged_firmware>.bin For merged bin: esptool.py -p /dev/ttyUSB0 --chip esp32-s3 write_flash 0x00000 <merged_firmware>.bin Instructions for nRF devices: For nRF devices (e.g. RAK, Heltec T114) you need the following: Download the firmware file from https://flasher.meshcore.io . Go to the website in a browser and find the section that has the firmware you need. You need the ZIP version for the adafruit flash tool below. Click the Download button, right-click on the ZIP file, for example: RAK_4631_companion_radio_ble-v1.7.1-165fb33.zip Right-click on the file name and copy the link. Here is an example: https://flasher.meshcore.io/releases/download/companion-v1.7.1/RAK_4631_companion_radio_ble-v1.7.1-165fb33.zip Run: wget 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. Confirm the ttyXXXX device path on your Raspberry Pi. Go to the /dev directory and run the ls command to find your device path. It is usually /dev/ttyACM0 for nRF devices. Install adafruit-nrfutil. pip install adafruit-nrfutil --break-system-packages Flash the nRF device. adafruit-nrfutil --verbose dfu serial --package RAK_4631_companion_radio_usb-v1.7.1-165fb33.zip -p /dev/ttyACM0 -b 115200 --singlebank --touch 1200 To 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 picocom To start managing your USB serial-connected device using picocom, use the following command: picocom -b 115200 /dev/ttyUSB0 --imap lfcrlf From here, reference repeater and room server command line commands in the MeshCore docs here: https://docs.meshcore.io/cli_commands","title":"5.13. Q: Can I use a Raspberry Pi to update a MeshCore radio?"},{"location":"faq/#514-q-are-there-projects-built-around-meshcore","text":"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.","title":"5.14. Q: Are there projects built around MeshCore?"},{"location":"faq/#515-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.","title":"5.15. Q: Are there client applications for Windows or Mac?"},{"location":"faq/#516-q-are-there-any-resources-that-compare-meshcore-to-other-lora-systems","text":"A: Here is a list of MeshCore comparison resources: The Comms Channel on YouTube: https://www.youtube.com/watch?v=guDoKGs02Us MeshCore Advantages by MCarper: https://github.com/mikecarper/meshfirmware/blob/main/MeshCoreAdvantages.md MeshCore vs Meshtastic by austinmesh.org: https://www.austinmesh.org/learn/meshcore-vs-meshtastic","title":"5.16. Q: Are there any resources that compare MeshCore to other LoRa systems?"},{"location":"faq/#6-troubleshooting","text":"","title":"6. Troubleshooting"},{"location":"faq/#61-q-my-client-says-another-client-or-a-repeater-or-a-room-server-was-last-seen-many-many-days-ago","text":"","title":"6.1. Q: My client says another client or a repeater or a room server was last seen many, many days ago."},{"location":"faq/#62-q-a-repeater-or-a-client-or-a-room-server-i-expect-to-see-on-my-discover-list-on-t-deck-or-contact-list-on-a-smart-device-client-are-not-listed","text":"A: If your client is a T-Deck, it may not have its time set (no GPS installed, no GPS lock, or wrong GPS baud rate). If you are using the Android or iOS client, the other client, repeater, or room server may have the wrong time. 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.","title":"6.2. Q: A repeater or a client or a room server I expect to see on my discover list (on T-Deck) or contact list (on a smart device client) are not listed."},{"location":"faq/#63-q-how-to-connect-to-a-repeater-via-ble-bluetooth","text":"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.","title":"6.3. Q: How to connect to a repeater via BLE (Bluetooth)?"},{"location":"faq/#64-q-my-companion-isnt-showing-up-over-bluetooth","text":"A: Make sure that you flashed the Bluetooth companion firmware and not the USB-only companion firmware.","title":"6.4. Q: My companion isn't showing up over Bluetooth?"},{"location":"faq/#65-q-i-cant-connect-via-bluetooth-what-is-the-bluetooth-pairing-code","text":"A: The default Bluetooth pairing code is 123456","title":"6.5. Q: I can't connect via Bluetooth, what is the Bluetooth pairing code?"},{"location":"faq/#66-q-my-heltec-v3-keeps-disconnecting-from-my-smartphone-it-cant-hold-a-solid-bluetooth-connection","text":"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.","title":"6.6. Q: My Heltec V3 keeps disconnecting from my smartphone. It can't hold a solid Bluetooth connection."},{"location":"faq/#67-q-my-rakt1000-exiao_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","title":"6.7. Q: My RAK/T1000-E/xiao_nRF52/... device seems to be corrupted, how do I wipe it clean to start fresh?"},{"location":"faq/#68-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","title":"6.8. Q: WebFlasher fails on Linux with failed to open"},{"location":"faq/#7-other-questions","text":"","title":"7. Other Questions:"},{"location":"faq/#71-q-how-to-update-nrf-rak-t114-seeed-xiao-companion-repeater-and-room-server-firmware-over-the-air-using-the-new-simpler-dfu-app","text":"A: The steps below work on both Android and iOS as nRF has made both apps' user interface the same on both platforms: Download nRF's DFU app from iOS App Store or Android's Play Store, you can find the app by searching for nrf dfu , the app's full name is nRF Device Firmware Update On https://flasher.meshcore.io , download the ZIP version of the firmware for your nRF device (e.g. RAK or Heltec T114 or Seeed Studio's Xiao) From the MeshCore app, log in remotely to the repeater you want to update with admin privileges Go to the Command Line tab, type start ota and hit enter. You should see OK to confirm the repeater device is now in OTA mode Run the DFU app, then tap Settings in the top-right corner Enable Packet receipt notifications , and change Number of Packets to 10 for RAK, 8 for T114. 8 also works for RAK. Select the firmware zip file you downloaded Select the device you want to update. If the device you want to update is not on the list, try enabling OTA on the device again If the device is not found, enable Force Scanning in the DFU app Tap Upload to begin OTA update If it fails, try toggling Bluetooth on your phone. If that doesn't work, try rebooting your phone. If you keep getting failures at the \"Enabling Bootloader\" step, try forgetting the nRF board in your iOS or Android device's Bluetooth settings and re-pair it through the DFU app. Wait for the update to complete. It can take a few minutes. It is strongly recommended that you install and use the OTAFIX bootloader at https://github.com/oltaco/Adafruit_nRF52_Bootloader_OTAFIX . To update a companion node over OTA, it must be running companion firmware v1.15 or greater. Please see the MeshCore Blog for additional information on OTA firmware flashing: https://blog.meshcore.io/2026/04/06/otafix-bootloader https://blog.meshcore.io/2026/04/02/nrf-ota-update","title":"7.1. Q: How to update nRF (RAK, T114, Seeed XIAO) companion, repeater and room server firmware over the air using the new simpler DFU app?"},{"location":"faq/#711-q-can-i-update-seeed-studio-wio-tracker-l1-pro-using-ota","text":"A: 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.","title":"7.1.1 Q: Can I update Seeed Studio Wio Tracker L1 Pro using OTA?"},{"location":"faq/#72-q-how-to-update-esp32-based-devices-over-the-air","text":"A: For ESP32-based devices (e.g. Heltec V3): On https://flasher.meshcore.io , download the non-merged version of the firmware for your ESP32 device (e.g. Heltec_v3_repeater-v1.6.2-4449fd3.bin , no \"merged\" in the file name). From the MeshCore app, log in remotely to the repeater you want to update with admin privileges. Go to the Command Line tab, type start ota and hit enter. You should see OK to confirm the repeater device is now in OTA mode. The command start ota on an ESP32-based device starts a Wi-Fi hotspot named MeshCore OTA . From your phone or computer connect to the 'MeshCore OTA' hotspot. From a browser, go to http://192.168.4.1/update and upload the non-merged bin from the flasher.","title":"7.2. Q: How to update ESP32-based devices over the air?"},{"location":"faq/#73-q-is-there-a-way-to-lower-the-chance-of-a-failed-ota-device-firmware-update-dfu","text":"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: Heltec Automation Mesh Node T114 / HT-nRF5262 Nologo ProMicro NRF52840 (aka SuperMini NRF52840) Seeed Studio SenseCAP Card Tracker T1000-E Seeed Studio Wio Tracker L1 Seeed Studio XIAO nRF52840 BLE Seeed Studio XIAO nRF52840 BLE SENSE RAK 4631 RAK WisMesh Tag (new 28/11/2025)","title":"7.3. Q: Is there a way to lower the chance of a failed OTA device firmware update (DFU)?"},{"location":"faq/#74-q-are-the-meshcore-logo-and-font-available","text":"A: Yes, it is on the MeshCore GitHub repo here: https://github.com/meshcore-dev/MeshCore/tree/main/logo","title":"7.4. Q: Are the MeshCore logo and font available?"},{"location":"faq/#75-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 = 1 repeater = 2 room = 3 sensor = 4","title":"7.5. Q: What is the format of a contact or channel QR code?"},{"location":"faq/#76-q-how-do-i-connect-to-the-companion-via-wi-fi-eg-using-a-heltec-v3","text":"A: 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.","title":"7.6. Q: How do I connect to the companion via Wi-Fi, e.g. using a Heltec V3?"},{"location":"faq/#77-q-i-have-a-station-g2-or-a-heltec-v4-or-an-ikoka-stick-or-a-radio-with-an-ebyte-e22-900m30s-or-an-ebyte-e22-900m33s-module-what-should-their-transmit-power-be-set-to","text":"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)","title":"7.7. Q: I have a Station G2, or a Heltec V4, or an Ikoka Stick, or a radio with an EByte E22-900M30S or an EByte E22-900M33S module, what should their transmit power be set to?"},{"location":"faq/#78-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.","title":"7.8. Q: How do I use Ethernet with a RAK4631?"},{"location":"kiss_modem_protocol/","text":"MeshCore KISS Modem Protocol 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. Serial Configuration 115200 baud, 8N1, no flow control. Frame Format Standard KISS framing per the KA9Q/K3MC specification. Byte Name Description 0xC0 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 \u2502 FEND \u2502 Type Byte \u2502 Data (escaped) \u2502 FEND \u2502 \u2502 0xC0 \u2502 1 byte \u2502 0-510 bytes \u2502 0xC0 \u2502 \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 Type Byte 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 number Maximum unescaped frame size: 512 bytes. Standard KISS Commands Host to TNC Command Value Data Description Data 0x00 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) TNC to Host 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). Host Output Backpressure 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. CSMA Behavior The TNC implements p-persistent CSMA for half-duplex operation: When a packet is queued, monitor carrier detect When the channel clears, generate a random value 0-255 If the value is less than or equal to P (Persistence), wait TXDELAY then transmit Otherwise, wait SlotTime and repeat from step 1 In full-duplex mode, CSMA is bypassed and packets transmit after TXDELAY. SetHardware Extensions (0x06) 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. Frame Format \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 \u2502 FEND \u2502 0x06 \u2502 Sub-command \u2502 Data (escaped) \u2502 FEND \u2502 \u2502 0xC0 \u2502 \u2502 1 byte \u2502 variable \u2502 0xC0 \u2502 \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 Request Sub-commands (Host to TNC) 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 - Response Sub-commands (TNC to Host) 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. Sub-command Value Data Identity 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) Error Codes 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 Unsolicited Events 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. Data Formats Radio Parameters (SetRadio / Radio response) 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) Version (Version response) Field Size Description Version 1 byte Firmware version Reserved 1 byte Always 0 Encrypted (Encrypted response) Field Size Description MAC 2 bytes HMAC-SHA256 truncated to 2 bytes Ciphertext variable AES-128 block-encrypted data with zero padding Airtime (Airtime response) All values little-endian. Field Size Description Airtime 4 bytes uint32_t, estimated air time in milliseconds Noise Floor (NoiseFloor response) 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). Capabilities (Capabilities response) 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. Field Size Description Feature bits 4 bytes uint32_t, see below Bit Value Description 0 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. AGC Reset Interval (SetAgcResetInterval / AgcResetInterval response) All values little-endian. Field Size Description Seconds 2 bytes uint16_t, 0 = disabled, maximum 1020 The 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. FEM State (SetFemState / FemState response) 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 0 0x01 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 mask FemState response data: Field Size Description Capability mask 1 byte Bits this board can control Value mask 1 byte Current state; always 0 for uncontrollable bits Example: 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. RX Boosted Gain (SetRxBoostedGain / RxBoostedGain response) 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. Field Size Description Status 1 byte 0x00 = power-saving, 0x01 = boosted 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. Stats (Stats response) All values little-endian. Field Size Description RX 4 bytes Packets received TX 4 bytes Packets transmitted Errors 4 bytes Receive errors Battery (Battery response) All values little-endian. Field Size Description Millivolts 2 bytes uint16_t, battery voltage in mV MCU Temperature (MCUTemp response) 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. Device Name (DeviceName response) Field Size Description Name variable UTF-8 string, no null terminator Reboot Sends an OK response, flushes serial, then reboots the device. The host should expect the connection to drop. Sensor Permissions (GetSensors) Bit Value Description 0 0x01 Base (battery) 1 0x02 Location (GPS) 2 0x04 Environment (temp, humidity, pressure) Use 0x07 for all permissions. Sensor Data (Sensors response) Data returned in CayenneLPP format. See CayenneLPP documentation for parsing. Cryptographic Algorithms 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 Notes Data payload limit (255 bytes) matches MeshCore MAX_TRANS_UNIT; no change needed for KISS \u201c1024+ recommended\u201d (that applies to general TNCs, not MeshCore) Modem generates identity on first boot (stored in flash) All multi-byte values are little-endian unless stated otherwise SNR values in RxMeta are multiplied by 4 for 0.25 dB precision TxDone is sent as a SetHardware event after each transmission Standard KISS clients receive only type 0x00 data frames and can safely ignore all SetHardware (0x06) frames See packet_format.md for packet format","title":"KISS modem protocol"},{"location":"kiss_modem_protocol/#meshcore-kiss-modem-protocol","text":"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.","title":"MeshCore KISS Modem Protocol"},{"location":"kiss_modem_protocol/#serial-configuration","text":"115200 baud, 8N1, no flow control.","title":"Serial Configuration"},{"location":"kiss_modem_protocol/#frame-format","text":"Standard KISS framing per the KA9Q/K3MC specification. Byte Name Description 0xC0 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 \u2502 FEND \u2502 Type Byte \u2502 Data (escaped) \u2502 FEND \u2502 \u2502 0xC0 \u2502 1 byte \u2502 0-510 bytes \u2502 0xC0 \u2502 \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","title":"Frame Format"},{"location":"kiss_modem_protocol/#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 number Maximum unescaped frame size: 512 bytes.","title":"Type Byte"},{"location":"kiss_modem_protocol/#standard-kiss-commands","text":"","title":"Standard KISS Commands"},{"location":"kiss_modem_protocol/#host-to-tnc","text":"Command Value Data Description Data 0x00 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)","title":"Host to TNC"},{"location":"kiss_modem_protocol/#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).","title":"TNC to Host"},{"location":"kiss_modem_protocol/#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.","title":"Host Output Backpressure"},{"location":"kiss_modem_protocol/#csma-behavior","text":"The TNC implements p-persistent CSMA for half-duplex operation: When a packet is queued, monitor carrier detect When the channel clears, generate a random value 0-255 If the value is less than or equal to P (Persistence), wait TXDELAY then transmit Otherwise, wait SlotTime and repeat from step 1 In full-duplex mode, CSMA is bypassed and packets transmit after TXDELAY.","title":"CSMA Behavior"},{"location":"kiss_modem_protocol/#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.","title":"SetHardware Extensions (0x06)"},{"location":"kiss_modem_protocol/#frame-format_1","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 \u2502 FEND \u2502 0x06 \u2502 Sub-command \u2502 Data (escaped) \u2502 FEND \u2502 \u2502 0xC0 \u2502 \u2502 1 byte \u2502 variable \u2502 0xC0 \u2502 \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","title":"Frame Format"},{"location":"kiss_modem_protocol/#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 -","title":"Request Sub-commands (Host to TNC)"},{"location":"kiss_modem_protocol/#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. Sub-command Value Data Identity 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)","title":"Response Sub-commands (TNC to Host)"},{"location":"kiss_modem_protocol/#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","title":"Error Codes"},{"location":"kiss_modem_protocol/#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.","title":"Unsolicited Events"},{"location":"kiss_modem_protocol/#data-formats","text":"","title":"Data Formats"},{"location":"kiss_modem_protocol/#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)","title":"Radio Parameters (SetRadio / Radio response)"},{"location":"kiss_modem_protocol/#version-version-response","text":"Field Size Description Version 1 byte Firmware version Reserved 1 byte Always 0","title":"Version (Version response)"},{"location":"kiss_modem_protocol/#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","title":"Encrypted (Encrypted response)"},{"location":"kiss_modem_protocol/#airtime-airtime-response","text":"All values little-endian. Field Size Description Airtime 4 bytes uint32_t, estimated air time in milliseconds","title":"Airtime (Airtime response)"},{"location":"kiss_modem_protocol/#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).","title":"Noise Floor (NoiseFloor response)"},{"location":"kiss_modem_protocol/#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. Field Size Description Feature bits 4 bytes uint32_t, see below Bit Value Description 0 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.","title":"Capabilities (Capabilities response)"},{"location":"kiss_modem_protocol/#agc-reset-interval-setagcresetinterval-agcresetinterval-response","text":"All values little-endian. Field Size Description Seconds 2 bytes uint16_t, 0 = disabled, maximum 1020 The 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.","title":"AGC Reset Interval (SetAgcResetInterval / AgcResetInterval response)"},{"location":"kiss_modem_protocol/#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 0 0x01 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 mask FemState response data: Field Size Description Capability mask 1 byte Bits this board can control Value mask 1 byte Current state; always 0 for uncontrollable bits Example: 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.","title":"FEM State (SetFemState / FemState response)"},{"location":"kiss_modem_protocol/#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. Field Size Description Status 1 byte 0x00 = power-saving, 0x01 = boosted 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.","title":"RX Boosted Gain (SetRxBoostedGain / RxBoostedGain response)"},{"location":"kiss_modem_protocol/#stats-stats-response","text":"All values little-endian. Field Size Description RX 4 bytes Packets received TX 4 bytes Packets transmitted Errors 4 bytes Receive errors","title":"Stats (Stats response)"},{"location":"kiss_modem_protocol/#battery-battery-response","text":"All values little-endian. Field Size Description Millivolts 2 bytes uint16_t, battery voltage in mV","title":"Battery (Battery response)"},{"location":"kiss_modem_protocol/#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.","title":"MCU Temperature (MCUTemp response)"},{"location":"kiss_modem_protocol/#device-name-devicename-response","text":"Field Size Description Name variable UTF-8 string, no null terminator","title":"Device Name (DeviceName response)"},{"location":"kiss_modem_protocol/#reboot","text":"Sends an OK response, flushes serial, then reboots the device. The host should expect the connection to drop.","title":"Reboot"},{"location":"kiss_modem_protocol/#sensor-permissions-getsensors","text":"Bit Value Description 0 0x01 Base (battery) 1 0x02 Location (GPS) 2 0x04 Environment (temp, humidity, pressure) Use 0x07 for all permissions.","title":"Sensor Permissions (GetSensors)"},{"location":"kiss_modem_protocol/#sensor-data-sensors-response","text":"Data returned in CayenneLPP format. See CayenneLPP documentation for parsing.","title":"Sensor Data (Sensors response)"},{"location":"kiss_modem_protocol/#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","title":"Cryptographic Algorithms"},{"location":"kiss_modem_protocol/#notes","text":"Data payload limit (255 bytes) matches MeshCore MAX_TRANS_UNIT; no change needed for KISS \u201c1024+ recommended\u201d (that applies to general TNCs, not MeshCore) Modem generates identity on first boot (stored in flash) All multi-byte values are little-endian unless stated otherwise SNR values in RxMeta are multiplied by 4 for 0.25 dB precision TxDone is sent as a SetHardware event after each transmission Standard KISS clients receive only type 0x00 data frames and can safely ignore all SetHardware (0x06) frames See packet_format.md for packet format","title":"Notes"},{"location":"meshcore/","text":"Introduction Welcome to the MeshCore documentation. Below are a few quick start guides. Frequently Asked Questions CLI Commands Companion Protocol Packet Format QR Codes 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. Documentation Source","title":"Introduction"},{"location":"meshcore/#introduction","text":"Welcome to the MeshCore documentation. Below are a few quick start guides. Frequently Asked Questions CLI Commands Companion Protocol Packet Format QR Codes 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. Documentation Source","title":"Introduction"},{"location":"nrf52_power_management/","text":"nRF52 Power Management Overview 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. Features Boot Voltage Protection Checks battery voltage immediately after boot and before mesh operations commence If voltage is below a configurable threshold (e.g., 3300mV), the device configures voltage wake (LPCOMP + VBUS) and enters protective shutdown (SYSTEMOFF) Prevents boot loops when battery is critically low Skipped when external power (USB VBUS) is detected Voltage Wake (LPCOMP + VBUS) Configures the nRF52's Low Power Comparator (LPCOMP) before entering SYSTEMOFF Enables USB VBUS detection so external power can wake the device Device automatically wakes when battery voltage rises above recovery threshold or when VBUS is detected Early Boot Register Capture Captures RESETREAS (reset reason) and GPREGRET2 (shutdown reason) before SystemInit() clears them Allows firmware to determine why it booted (cold boot, watchdog, LPCOMP wake, etc.) Allows firmware to determine why it last shut down (user request, low voltage, boot protection) Shutdown Reason Tracking 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 Supported Boards 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. Technical Details Architecture 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). Early Boot Capture 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. Board Implementation To enable power management on a board variant: Enable in platformio.ini : -D NRF52_POWER_MANAGEMENT Define configuration in variant.h : #define PWRMGT_VOLTAGE_BOOTLOCK 3300 // Won't boot below this voltage (mV) #define PWRMGT_LPCOMP_AIN 7 // AIN channel for voltage sensing #define PWRMGT_LPCOMP_REFSEL 2 // REFSEL (0-6=1/8..7/8, 7=ARef, 8-15=1/16..15/16) Implement in board .cpp file : #ifdef NRF52_POWER_MANAGEMENT const PowerMgtConfig power_config = { . lpcomp_ain_channel = PWRMGT_LPCOMP_AIN , . lpcomp_refsel = PWRMGT_LPCOMP_REFSEL , . voltage_bootlock = PWRMGT_VOLTAGE_BOOTLOCK }; void MyBoard::initiateShutdown ( uint8_t reason ) { // Board-specific shutdown preparation (e.g., disable peripherals) bool enable_lpcomp = ( reason == SHUTDOWN_REASON_LOW_VOLTAGE || reason == SHUTDOWN_REASON_BOOT_PROTECT ); if ( enable_lpcomp ) { configureVoltageWake ( power_config . lpcomp_ain_channel , power_config . lpcomp_refsel ); } enterSystemOff ( reason ); } #endif void MyBoard::begin () { NRF52Board :: begin (); // or NRF52BoardDCDC::begin() // ... board setup ... #ifdef NRF52_POWER_MANAGEMENT checkBootVoltage ( & power_config ); #endif } For user-initiated shutdowns, powerOff() remains board-specific. Power management only arms LPCOMP for automated shutdown reasons (boot protection/low voltage). Declare override in board .h file : #ifdef NRF52_POWER_MANAGEMENT void initiateShutdown ( uint8_t reason ) override ; #endif Voltage Wake Configuration The 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 V Important : 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). SoftDevice Compatibility 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. CLI Commands Power management status can be queried via the CLI: Command Description get 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 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. Debug Output When MESH_DEBUG=1 is enabled, the power management module outputs: DEBUG: PWRMGT: Reset = Wake from LPCOMP (0x20000); Shutdown = Low Voltage (0x4C) DEBUG: PWRMGT: Boot voltage = 3450 mV (threshold = 3300 mV) DEBUG: PWRMGT: LPCOMP wake configured (AIN7, ref=3/8 VDD) Phase 2 (Planned) Runtime voltage monitoring Voltage state machine (Normal -> Warning -> Critical -> Shutdown) Configurable thresholds Load shedding callbacks for power reduction Deep sleep integration Scheduled wake-up Extended sleep with periodic monitoring References nRF52840 Product Specification - POWER nRF52840 Product Specification - LPCOMP SoftDevice S140 API - Power Management","title":"nRF52 power management"},{"location":"nrf52_power_management/#nrf52-power-management","text":"","title":"nRF52 Power Management"},{"location":"nrf52_power_management/#overview","text":"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.","title":"Overview"},{"location":"nrf52_power_management/#features","text":"","title":"Features"},{"location":"nrf52_power_management/#boot-voltage-protection","text":"Checks battery voltage immediately after boot and before mesh operations commence If voltage is below a configurable threshold (e.g., 3300mV), the device configures voltage wake (LPCOMP + VBUS) and enters protective shutdown (SYSTEMOFF) Prevents boot loops when battery is critically low Skipped when external power (USB VBUS) is detected","title":"Boot Voltage Protection"},{"location":"nrf52_power_management/#voltage-wake-lpcomp-vbus","text":"Configures the nRF52's Low Power Comparator (LPCOMP) before entering SYSTEMOFF Enables USB VBUS detection so external power can wake the device Device automatically wakes when battery voltage rises above recovery threshold or when VBUS is detected","title":"Voltage Wake (LPCOMP + VBUS)"},{"location":"nrf52_power_management/#early-boot-register-capture","text":"Captures RESETREAS (reset reason) and GPREGRET2 (shutdown reason) before SystemInit() clears them Allows firmware to determine why it booted (cold boot, watchdog, LPCOMP wake, etc.) Allows firmware to determine why it last shut down (user request, low voltage, boot protection)","title":"Early Boot Register Capture"},{"location":"nrf52_power_management/#shutdown-reason-tracking","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","title":"Shutdown Reason Tracking"},{"location":"nrf52_power_management/#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.","title":"Supported Boards"},{"location":"nrf52_power_management/#technical-details","text":"","title":"Technical Details"},{"location":"nrf52_power_management/#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).","title":"Architecture"},{"location":"nrf52_power_management/#early-boot-capture","text":"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.","title":"Early Boot Capture"},{"location":"nrf52_power_management/#board-implementation","text":"To enable power management on a board variant: Enable in platformio.ini : -D NRF52_POWER_MANAGEMENT Define configuration in variant.h : #define PWRMGT_VOLTAGE_BOOTLOCK 3300 // Won't boot below this voltage (mV) #define PWRMGT_LPCOMP_AIN 7 // AIN channel for voltage sensing #define PWRMGT_LPCOMP_REFSEL 2 // REFSEL (0-6=1/8..7/8, 7=ARef, 8-15=1/16..15/16) Implement in board .cpp file : #ifdef NRF52_POWER_MANAGEMENT const PowerMgtConfig power_config = { . lpcomp_ain_channel = PWRMGT_LPCOMP_AIN , . lpcomp_refsel = PWRMGT_LPCOMP_REFSEL , . voltage_bootlock = PWRMGT_VOLTAGE_BOOTLOCK }; void MyBoard::initiateShutdown ( uint8_t reason ) { // Board-specific shutdown preparation (e.g., disable peripherals) bool enable_lpcomp = ( reason == SHUTDOWN_REASON_LOW_VOLTAGE || reason == SHUTDOWN_REASON_BOOT_PROTECT ); if ( enable_lpcomp ) { configureVoltageWake ( power_config . lpcomp_ain_channel , power_config . lpcomp_refsel ); } enterSystemOff ( reason ); } #endif void MyBoard::begin () { NRF52Board :: begin (); // or NRF52BoardDCDC::begin() // ... board setup ... #ifdef NRF52_POWER_MANAGEMENT checkBootVoltage ( & power_config ); #endif } For user-initiated shutdowns, powerOff() remains board-specific. Power management only arms LPCOMP for automated shutdown reasons (boot protection/low voltage). Declare override in board .h file : #ifdef NRF52_POWER_MANAGEMENT void initiateShutdown ( uint8_t reason ) override ; #endif","title":"Board Implementation"},{"location":"nrf52_power_management/#voltage-wake-configuration","text":"The 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 V Important : 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).","title":"Voltage Wake Configuration"},{"location":"nrf52_power_management/#softdevice-compatibility","text":"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.","title":"SoftDevice Compatibility"},{"location":"nrf52_power_management/#cli-commands","text":"Power management status can be queried via the CLI: Command Description get 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 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.","title":"CLI Commands"},{"location":"nrf52_power_management/#debug-output","text":"When MESH_DEBUG=1 is enabled, the power management module outputs: DEBUG: PWRMGT: Reset = Wake from LPCOMP (0x20000); Shutdown = Low Voltage (0x4C) DEBUG: PWRMGT: Boot voltage = 3450 mV (threshold = 3300 mV) DEBUG: PWRMGT: LPCOMP wake configured (AIN7, ref=3/8 VDD)","title":"Debug Output"},{"location":"nrf52_power_management/#phase-2-planned","text":"Runtime voltage monitoring Voltage state machine (Normal -> Warning -> Critical -> Shutdown) Configurable thresholds Load shedding callbacks for power reduction Deep sleep integration Scheduled wake-up Extended sleep with periodic monitoring","title":"Phase 2 (Planned)"},{"location":"nrf52_power_management/#references","text":"nRF52840 Product Specification - POWER nRF52840 Product Specification - LPCOMP SoftDevice S140 API - Power Management","title":"References"},{"location":"number_allocations/","text":"Number Allocations This document lists unique numbers/identifiers used in various MeshCore protocol payloads. Group Data Types 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)","title":"Number allocations"},{"location":"number_allocations/#number-allocations","text":"This document lists unique numbers/identifiers used in various MeshCore protocol payloads.","title":"Number Allocations"},{"location":"number_allocations/#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)","title":"Group Data Types"},{"location":"ota/","text":"Admin-pushed firmware update (experimental -ota images) 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. What a release carries For every <board>_<role>-ota / -observer-ota image: file what <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 meshcore-ota -s SHA256SUMS.sig < SHA256SUMS sha256sum -c --ignore-missing SHA256SUMS 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). On the node fw status state, battery, the running image's size and sha256 prefix fw ver target and build epoch a package for this image needs fw begin <bytes> [sid] start a transfer fw w <offset> <base64> one 96 B chunk (text) fw missing what is still missing fw verify queue the full check, poll fw status fw apply battery gate, then rewrite and reboot fw apply downgrade local console only: an older (or the same) image fw abort What the node checks before it touches its own image: The manifest , as soon as it is in: an Ed25519 signature by the key the image was built with ( [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. Over the mesh: only a delta, and only a newer build. An older or equal one is refused right after the manifest; a full image is refused when the transfer begins. Locally a full image is fine, and an older one takes 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. When an update goes wrong 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 for <min> (persisted, off by default); catches an OTA that boots with a dead radio set radio.txstall <min> the same when the TX queue stalls (repeater only, on at 15 min by default, a change holds until reboot) get radio.reboots watchdog reboots so far (survives power loss) get boot why the board last reset, plus the hardfault record 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. Tools # a delta for the node's image, from the latest release tools/ota_pack.py fetch Xiao_nrf52_repeater-ota --base <sha8 from fw status> # over the mesh, through a companion (USB port or tcp://host:port), as admin tools/ota_mesh_push.py /dev/serial/by-id/<companion> <node pubkey prefix> pkg.mcfw --apply # over the node's own USB console tools/ota_push.py /dev/serial/by-id/<node> pkg.mcfw --apply From a phone 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. Off the shared channel: --side tools/ota_mesh_push.py <companion> <node> pkg.mcfw --apply \\ --side 869.525,62.5,7,5 --duty 10 --gap 1 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. The companion must be in direct range of the node, and it must be a companion firmware that retunes its own radio. An openHop virtual companion answers set_radio with OK and stays put; the tool checks that and stops, and the node returns within 3 minutes. The companion's preset is put back at the end -- unless the tool is killed hard; then set_radio it back yourself. The example preset sits inside 869.4-869.65 MHz (10 % duty) between the CZ mesh (869.432/62.5) and EU Narrow (869.618/62.5). The node keeps its TX power on the side channel: pick a band where that power is allowed. 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. Your own builds 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] pubkey = <tools/ota_pack.py pubkey --key your.key> 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.","title":"Aktualizace od admina \u00b7 OTA"},{"location":"ota/#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.","title":"Admin-pushed firmware update (experimental -ota images)"},{"location":"ota/#what-a-release-carries","text":"For every <board>_<role>-ota / -observer-ota image: file what <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 meshcore-ota -s SHA256SUMS.sig < SHA256SUMS sha256sum -c --ignore-missing SHA256SUMS 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).","title":"What a release carries"},{"location":"ota/#on-the-node","text":"fw status state, battery, the running image's size and sha256 prefix fw ver target and build epoch a package for this image needs fw begin <bytes> [sid] start a transfer fw w <offset> <base64> one 96 B chunk (text) fw missing what is still missing fw verify queue the full check, poll fw status fw apply battery gate, then rewrite and reboot fw apply downgrade local console only: an older (or the same) image fw abort What the node checks before it touches its own image: The manifest , as soon as it is in: an Ed25519 signature by the key the image was built with ( [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. Over the mesh: only a delta, and only a newer build. An older or equal one is refused right after the manifest; a full image is refused when the transfer begins. Locally a full image is fine, and an older one takes 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.","title":"On the node"},{"location":"ota/#when-an-update-goes-wrong","text":"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 for <min> (persisted, off by default); catches an OTA that boots with a dead radio set radio.txstall <min> the same when the TX queue stalls (repeater only, on at 15 min by default, a change holds until reboot) get radio.reboots watchdog reboots so far (survives power loss) get boot why the board last reset, plus the hardfault record 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.","title":"When an update goes wrong"},{"location":"ota/#tools","text":"# a delta for the node's image, from the latest release tools/ota_pack.py fetch Xiao_nrf52_repeater-ota --base <sha8 from fw status> # over the mesh, through a companion (USB port or tcp://host:port), as admin tools/ota_mesh_push.py /dev/serial/by-id/<companion> <node pubkey prefix> pkg.mcfw --apply # over the node's own USB console tools/ota_push.py /dev/serial/by-id/<node> pkg.mcfw --apply","title":"Tools"},{"location":"ota/#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.","title":"From a phone"},{"location":"ota/#off-the-shared-channel-side","text":"tools/ota_mesh_push.py <companion> <node> pkg.mcfw --apply \\ --side 869.525,62.5,7,5 --duty 10 --gap 1 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. The companion must be in direct range of the node, and it must be a companion firmware that retunes its own radio. An openHop virtual companion answers set_radio with OK and stays put; the tool checks that and stops, and the node returns within 3 minutes. The companion's preset is put back at the end -- unless the tool is killed hard; then set_radio it back yourself. The example preset sits inside 869.4-869.65 MHz (10 % duty) between the CZ mesh (869.432/62.5) and EU Narrow (869.618/62.5). The node keeps its TX power on the side channel: pick a band where that power is allowed. 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.","title":"Off the shared channel: --side"},{"location":"ota/#your-own-builds","text":"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] pubkey = <tools/ota_pack.py pubkey --key your.key> 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.","title":"Your own builds"},{"location":"packet_format/","text":"Packet Format This document describes the MeshCore packet format. 0xYY indicates YY in hex notation. 0bYY indicates YY in binary notation. Bit 0 indicates the bit furthest to the right: 0000000X Bit 7 indicates the bit furthest to the left: X0000000 Version 1 Packet Format This is the protocol level packet structure used in MeshCore firmware v1.12.0 [header][transport_codes(optional)][path_length][path][payload] header - 1 byte 8-bit Format: 0bVVPPPPRR - V=Version - P=PayloadType - R=RouteType Bits 0-1 - 2-bits - Route Type 0x00 / 0b00 - ROUTE_TYPE_TRANSPORT_FLOOD - Flood Routing + Transport Codes 0x01 / 0b01 - ROUTE_TYPE_FLOOD - Flood Routing 0x02 / 0b10 - ROUTE_TYPE_DIRECT - Direct Routing 0x03 / 0b11 - ROUTE_TYPE_TRANSPORT_DIRECT - Direct Routing + Transport Codes Bits 2-5 - 4-bits - Payload Type 0x00 / 0b0000 - PAYLOAD_TYPE_REQ - Request (destination/source hashes + MAC) 0x01 / 0b0001 - PAYLOAD_TYPE_RESPONSE - Response to REQ or ANON_REQ 0x02 / 0b0010 - PAYLOAD_TYPE_TXT_MSG - Plain text message 0x03 / 0b0011 - PAYLOAD_TYPE_ACK - Acknowledgment 0x04 / 0b0100 - PAYLOAD_TYPE_ADVERT - Node advertisement 0x05 / 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 request 0x08 / 0b1000 - PAYLOAD_TYPE_PATH - Returned path 0x09 / 0b1001 - PAYLOAD_TYPE_TRACE - Trace a path, collecting SNR for each hop 0x0A / 0b1010 - PAYLOAD_TYPE_MULTIPART - Packet is part of a sequence of packets 0x0B / 0b1011 - PAYLOAD_TYPE_CONTROL - Control packet data (unencrypted) 0x0C / 0b1100 - reserved 0x0D / 0b1101 - reserved 0x0E / 0b1110 - reserved 0x0F / 0b1111 - PAYLOAD_TYPE_RAW_CUSTOM - Custom packet (raw bytes, custom encryption) Bits 6-7 - 2-bits - Payload Version 0x00 / 0b00 - v1 - 1-byte src/dest hashes, 2-byte MAC 0x01 / 0b01 - v2 - Future version (e.g., 2-byte hashes, 4-byte MAC) 0x02 / 0b10 - v3 - Future version 0x03 / 0b11 - v4 - Future version transport_codes - 4 bytes (optional) Only present for ROUTE_TYPE_TRANSPORT_FLOOD and ROUTE_TYPE_TRANSPORT_DIRECT transport_code_1 - 2 bytes - uint16_t - calculated from region scope transport_code_2 - 2 bytes - uint16_t - reserved path_length - 1 byte - Encoded path metadata Bits 0-5 store path hash count / hop count ( 0-63 ) Bits 6-7 store path hash size minus 1 0b00 : 1-byte path hashes 0b01 : 2-byte path hashes 0b10 : 3-byte path hashes 0b11 : reserved / unsupported path - hop_count * hash_size bytes - Path to use for Direct Routing or flood path tracking Up to a maximum of 64 bytes, defined by MAX_PATH_SIZE Effective byte length is calculated from the encoded hop count and hash size, not taken directly from path_length v1.12.0 firmware and older only handled legacy 1-byte path hashes and dropped packets whose path bytes exceeded 64 bytes payload - variable length - Payload Data Up to a maximum 184 bytes, defined by MAX_PACKET_PAYLOAD Generally this is the remainder of the raw packet data The firmware parses this data based on the provided Payload Type v1.12.0 firmware and older drops packets with payload sizes larger than 184 Packet Format Field Size (bytes) Description header 1 Contains routing type, payload type, and payload version transport_codes 4 (optional) 2x 16-bit transport codes (if ROUTE_TYPE_TRANSPORT_*) path_length 1 Encodes path hash size in bits 6-7 and hop count in bits 0-5 path up to 64 ( MAX_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. Header Format Bit 0 means the lowest bit (1s place) Bits Mask Field Description 0-1 0x03 Route Type Flood, Direct, etc 2-5 0x3C Payload Type Request, Response, ACK, etc 6-7 0xC0 Payload Version Versioning of the payload format Route Types 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 Path Length Encoding path_length is not a raw byte count. It packs both hash size and hop count: Bits Field Meaning 0-5 Hop Count Number of path hashes ( 0-63 ) 6-7 Hash Size Code Stored as hash_size - 1 Hash size codes: Bits 6-7 Hash Size Notes 0b00 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 bytes 0x05 : 5 hops using 1-byte hashes, so path is 5 bytes 0x45 : 5 hops using 2-byte hashes, so path is 10 bytes 0x8A : 10 hops using 3-byte hashes, so path is 30 bytes Payload Types Value Name Description 0x00 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) Payload Versions 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","title":"Packet format"},{"location":"packet_format/#packet-format","text":"This document describes the MeshCore packet format. 0xYY indicates YY in hex notation. 0bYY indicates YY in binary notation. Bit 0 indicates the bit furthest to the right: 0000000X Bit 7 indicates the bit furthest to the left: X0000000","title":"Packet Format"},{"location":"packet_format/#version-1-packet-format","text":"This is the protocol level packet structure used in MeshCore firmware v1.12.0 [header][transport_codes(optional)][path_length][path][payload] header - 1 byte 8-bit Format: 0bVVPPPPRR - V=Version - P=PayloadType - R=RouteType Bits 0-1 - 2-bits - Route Type 0x00 / 0b00 - ROUTE_TYPE_TRANSPORT_FLOOD - Flood Routing + Transport Codes 0x01 / 0b01 - ROUTE_TYPE_FLOOD - Flood Routing 0x02 / 0b10 - ROUTE_TYPE_DIRECT - Direct Routing 0x03 / 0b11 - ROUTE_TYPE_TRANSPORT_DIRECT - Direct Routing + Transport Codes Bits 2-5 - 4-bits - Payload Type 0x00 / 0b0000 - PAYLOAD_TYPE_REQ - Request (destination/source hashes + MAC) 0x01 / 0b0001 - PAYLOAD_TYPE_RESPONSE - Response to REQ or ANON_REQ 0x02 / 0b0010 - PAYLOAD_TYPE_TXT_MSG - Plain text message 0x03 / 0b0011 - PAYLOAD_TYPE_ACK - Acknowledgment 0x04 / 0b0100 - PAYLOAD_TYPE_ADVERT - Node advertisement 0x05 / 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 request 0x08 / 0b1000 - PAYLOAD_TYPE_PATH - Returned path 0x09 / 0b1001 - PAYLOAD_TYPE_TRACE - Trace a path, collecting SNR for each hop 0x0A / 0b1010 - PAYLOAD_TYPE_MULTIPART - Packet is part of a sequence of packets 0x0B / 0b1011 - PAYLOAD_TYPE_CONTROL - Control packet data (unencrypted) 0x0C / 0b1100 - reserved 0x0D / 0b1101 - reserved 0x0E / 0b1110 - reserved 0x0F / 0b1111 - PAYLOAD_TYPE_RAW_CUSTOM - Custom packet (raw bytes, custom encryption) Bits 6-7 - 2-bits - Payload Version 0x00 / 0b00 - v1 - 1-byte src/dest hashes, 2-byte MAC 0x01 / 0b01 - v2 - Future version (e.g., 2-byte hashes, 4-byte MAC) 0x02 / 0b10 - v3 - Future version 0x03 / 0b11 - v4 - Future version transport_codes - 4 bytes (optional) Only present for ROUTE_TYPE_TRANSPORT_FLOOD and ROUTE_TYPE_TRANSPORT_DIRECT transport_code_1 - 2 bytes - uint16_t - calculated from region scope transport_code_2 - 2 bytes - uint16_t - reserved path_length - 1 byte - Encoded path metadata Bits 0-5 store path hash count / hop count ( 0-63 ) Bits 6-7 store path hash size minus 1 0b00 : 1-byte path hashes 0b01 : 2-byte path hashes 0b10 : 3-byte path hashes 0b11 : reserved / unsupported path - hop_count * hash_size bytes - Path to use for Direct Routing or flood path tracking Up to a maximum of 64 bytes, defined by MAX_PATH_SIZE Effective byte length is calculated from the encoded hop count and hash size, not taken directly from path_length v1.12.0 firmware and older only handled legacy 1-byte path hashes and dropped packets whose path bytes exceeded 64 bytes payload - variable length - Payload Data Up to a maximum 184 bytes, defined by MAX_PACKET_PAYLOAD Generally this is the remainder of the raw packet data The firmware parses this data based on the provided Payload Type v1.12.0 firmware and older drops packets with payload sizes larger than 184","title":"Version 1 Packet Format"},{"location":"packet_format/#packet-format_1","text":"Field Size (bytes) Description header 1 Contains routing type, payload type, and payload version transport_codes 4 (optional) 2x 16-bit transport codes (if ROUTE_TYPE_TRANSPORT_*) path_length 1 Encodes path hash size in bits 6-7 and hop count in bits 0-5 path up to 64 ( MAX_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.","title":"Packet Format"},{"location":"packet_format/#header-format","text":"Bit 0 means the lowest bit (1s place) Bits Mask Field Description 0-1 0x03 Route Type Flood, Direct, etc 2-5 0x3C Payload Type Request, Response, ACK, etc 6-7 0xC0 Payload Version Versioning of the payload format","title":"Header Format"},{"location":"packet_format/#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","title":"Route Types"},{"location":"packet_format/#path-length-encoding","text":"path_length is not a raw byte count. It packs both hash size and hop count: Bits Field Meaning 0-5 Hop Count Number of path hashes ( 0-63 ) 6-7 Hash Size Code Stored as hash_size - 1 Hash size codes: Bits 6-7 Hash Size Notes 0b00 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 bytes 0x05 : 5 hops using 1-byte hashes, so path is 5 bytes 0x45 : 5 hops using 2-byte hashes, so path is 10 bytes 0x8A : 10 hops using 3-byte hashes, so path is 30 bytes","title":"Path Length Encoding"},{"location":"packet_format/#payload-types","text":"Value Name Description 0x00 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)","title":"Payload Types"},{"location":"packet_format/#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","title":"Payload Versions"},{"location":"payloads/","text":"Payload Format Inside each MeshCore Packet is a payload, identified by the payload type in the packet header. The types of payloads are: Node advertisement. Acknowledgment. Returned path. Request (destination/source hashes + MAC). Response to REQ or ANON_REQ. Plain text message. Anonymous request. Group text message (unverified). Group datagram (unverified). Multi-part packet Control data packet Custom packet (raw bytes, custom encryption). This document defines the structure of each of these payload types. NOTE: all 16 and 32-bit integer fields are Little Endian. Important concepts: Node hash: the first byte of the node's public key Node advertisement 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 below Appdata 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 node Appdata Flags Value Name Description 0x01 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 Acknowledgement 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 Returned path, request, response, and plain text message 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 Returned path 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 Request 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 body For the common chat/server helpers in BaseChatMesh , the current request type values are: Value Name Description 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 Get stats Gets information about the node, possibly including the following: Battery level (millivolts) Current transmit queue length Current free queue length Last RSSI value Number of received packets Number of sent packets Total airtime (seconds) Total uptime (seconds) Number of packets sent as flood Number of packets sent directly Number of packets received as flood Number of packets received directly Error flags Last SNR value Number of direct route duplicates Number of flood route duplicates Number posted (?) Number of post pushes (?) Get Telemetry Field Size (bytes) Description timestamp 4 sender time (unix timestamp) req type 1 0x03 (request sub type) permission mask 1 bitwise inverse mask to AND to permissions (0 = get ALL telem values) Get Min/Max/Ave (Sensor nodes) Field Size (bytes) Description timestamp 4 sender time (unix timestamp) req type 1 0x04 (request sub type) start 4 starting time, seconds ago end 4 ending time, seconds ago reserved 2 should be zeroes Subscribe to Telemetry push - (Sensor nodes) Field Size (bytes) Description timestamp 4 sender time (unix timestamp) req type 1 0x08 (request sub type) push tag 4 32-bit tag to be used in telemetry push _REPLY payloads timeout secs 2 subscription timeout (seconds) reserved 1 should be zero min deltas len 1 byte length of LPP encoded min_deltas min deltas (variable) LPP encoded min_deltas Unsubscribe from Telemetry push - (Sensor nodes) Field Size (bytes) Description timestamp 4 sender time (unix timestamp) req type 1 0x09 (request sub type) Get Access List Field Size (bytes) Description timestamp 4 sender time (unix timestamp) req type 1 0x05 (request sub type) reserved 2 should be zeroes Get Neighbors Not defined in BaseChatMesh . Get Owner Info Not defined in BaseChatMesh . Response Field Size (bytes) Description content rest of payload application-defined response body Response contents are opaque application data. There is no single generic response envelope beyond the encrypted payload wrapper shown above. Plain text message 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 table txt_type Value Description Message content 0x00 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) Anonymous request 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 Room server login 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 Repeater/Sensor login Field Size (bytes) Description timestamp 4 sender time (unix timestamp) password rest of message password for repeater/sensor Repeater - Regions request 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 Repeater - Owner info request 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 Repeater - Clock and status request 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 Group text message 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. Group datagram 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 details The 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) Control data Field Size (bytes) Description flags 1 upper 4 bits is sub_type data rest of payload typically unencrypted data DISCOVER_REQ (sub_type) 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) DISCOVER_RESP (sub_type) 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) Custom packet Custom packets have no defined format.","title":"Payloads"},{"location":"payloads/#payload-format","text":"Inside each MeshCore Packet is a payload, identified by the payload type in the packet header. The types of payloads are: Node advertisement. Acknowledgment. Returned path. Request (destination/source hashes + MAC). Response to REQ or ANON_REQ. Plain text message. Anonymous request. Group text message (unverified). Group datagram (unverified). Multi-part packet Control data packet Custom packet (raw bytes, custom encryption). This document defines the structure of each of these payload types. NOTE: all 16 and 32-bit integer fields are Little Endian.","title":"Payload Format"},{"location":"payloads/#important-concepts","text":"Node hash: the first byte of the node's public key","title":"Important concepts:"},{"location":"payloads/#node-advertisement","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 below Appdata 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 node Appdata Flags Value Name Description 0x01 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","title":"Node advertisement"},{"location":"payloads/#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","title":"Acknowledgement"},{"location":"payloads/#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","title":"Returned path, request, response, and plain text message"},{"location":"payloads/#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","title":"Returned path"},{"location":"payloads/#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 body For the common chat/server helpers in BaseChatMesh , the current request type values are: Value Name Description 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","title":"Request"},{"location":"payloads/#get-stats","text":"Gets information about the node, possibly including the following: Battery level (millivolts) Current transmit queue length Current free queue length Last RSSI value Number of received packets Number of sent packets Total airtime (seconds) Total uptime (seconds) Number of packets sent as flood Number of packets sent directly Number of packets received as flood Number of packets received directly Error flags Last SNR value Number of direct route duplicates Number of flood route duplicates Number posted (?) Number of post pushes (?)","title":"Get stats"},{"location":"payloads/#get-telemetry","text":"Field Size (bytes) Description timestamp 4 sender time (unix timestamp) req type 1 0x03 (request sub type) permission mask 1 bitwise inverse mask to AND to permissions (0 = get ALL telem values)","title":"Get Telemetry"},{"location":"payloads/#get-minmaxave-sensor-nodes","text":"Field Size (bytes) Description timestamp 4 sender time (unix timestamp) req type 1 0x04 (request sub type) start 4 starting time, seconds ago end 4 ending time, seconds ago reserved 2 should be zeroes","title":"Get Min/Max/Ave (Sensor nodes)"},{"location":"payloads/#subscribe-to-telemetry-push-sensor-nodes","text":"Field Size (bytes) Description timestamp 4 sender time (unix timestamp) req type 1 0x08 (request sub type) push tag 4 32-bit tag to be used in telemetry push _REPLY payloads timeout secs 2 subscription timeout (seconds) reserved 1 should be zero min deltas len 1 byte length of LPP encoded min_deltas min deltas (variable) LPP encoded min_deltas","title":"Subscribe to Telemetry push - (Sensor nodes)"},{"location":"payloads/#unsubscribe-from-telemetry-push-sensor-nodes","text":"Field Size (bytes) Description timestamp 4 sender time (unix timestamp) req type 1 0x09 (request sub type)","title":"Unsubscribe from Telemetry push - (Sensor nodes)"},{"location":"payloads/#get-access-list","text":"Field Size (bytes) Description timestamp 4 sender time (unix timestamp) req type 1 0x05 (request sub type) reserved 2 should be zeroes","title":"Get Access List"},{"location":"payloads/#get-neighbors","text":"Not defined in BaseChatMesh .","title":"Get Neighbors"},{"location":"payloads/#get-owner-info","text":"Not defined in BaseChatMesh .","title":"Get Owner Info"},{"location":"payloads/#response","text":"Field Size (bytes) Description content rest of payload application-defined response body Response contents are opaque application data. There is no single generic response envelope beyond the encrypted payload wrapper shown above.","title":"Response"},{"location":"payloads/#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 table txt_type Value Description Message content 0x00 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)","title":"Plain text message"},{"location":"payloads/#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","title":"Anonymous request"},{"location":"payloads/#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","title":"Room server login"},{"location":"payloads/#repeatersensor-login","text":"Field Size (bytes) Description timestamp 4 sender time (unix timestamp) password rest of message password for repeater/sensor","title":"Repeater/Sensor login"},{"location":"payloads/#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","title":"Repeater - Regions request"},{"location":"payloads/#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","title":"Repeater - Owner info request"},{"location":"payloads/#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","title":"Repeater - Clock and status request"},{"location":"payloads/#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.","title":"Group text message"},{"location":"payloads/#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 details The 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)","title":"Group datagram"},{"location":"payloads/#control-data","text":"Field Size (bytes) Description flags 1 upper 4 bits is sub_type data rest of payload typically unencrypted data","title":"Control data"},{"location":"payloads/#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)","title":"DISCOVER_REQ (sub_type)"},{"location":"payloads/#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)","title":"DISCOVER_RESP (sub_type)"},{"location":"payloads/#custom-packet","text":"Custom packets have no defined format.","title":"Custom packet"},{"location":"power/","text":"Power saving on a solar repeater \u2014 what it costs, measured 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. The order that matters lever measured verdict GPS running continuously 46.0 mA (spread 43.7-47.5) 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. GPS is the whole game 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): with sky ( mast-three ): duty, asleep, fix, 7 sats \u2014 got a fix, set the clock, cut power to the receiver; without (indoors, 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. BLE: two defaults that were quietly expensive The blinking LED. Bluefruit drives 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. The advertising rate. Upstream leaves the slow interval at 244 units = 152.5 ms, i.e. three channels ~6.5 times a second, forever. 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. RX duty cycle (rxps) 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 mA max (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): phase development build public release together rxps off 0/120 1/120 1/240 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. MCU sleep 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. CPU time per received packet ( PWR_DUTY_INSTRUMENT ) 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 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. A mast that runs flat: bootlock and cutoff 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: default 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 . nRF52 sleep & peripheral fixes 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 : boot with before first BLE connection after it both fixes 11.51 / 11.51 mA 11.48 / 11.49 mA no CC clear 14.13 / 14.15 mA 11.38 / 11.52 mA no CC clear, no late DC/DC (= old main) 14.04 / 14.14 mA 11.50 / 11.55 mA no late DC/DC 11.43 / 11.53 mA 11.51 / 11.53 mA 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). boot with before first BLE connection after it both fixes 6.91 / 6.92 mA 6.89 / 6.88 mA no CC clear 10.16 / 10.16 mA 6.91 / 6.89 mA no CC clear, no late DC/DC (= old main) 10.18 / 10.18 mA 6.89 / 6.94 mA no late DC/DC 6.90 / 6.91 mA 6.93 / 6.92 mA 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. knob (3.3 V) round 1 round 2 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. Measuring this yourself \u2014 two traps A solar node measured on its USB side measures the CHARGER. With a charging cell the meter reads 500-700 mA, pulsing, and the node's own tens of mA ride on top of a drifting number. Wait for the charge to finish (it fell 0.71 \u2192 0.53 \u2192 0.22 \u2192 0.05 A over about an hour here) or the numbers are fiction. There is no INA226 on this board to cross-check with \u2014 the 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 . With 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.","title":"Nap\u00e1jen\u00ed \u00b7 power"},{"location":"power/#power-saving-on-a-solar-repeater-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.","title":"Power saving on a solar repeater \u2014 what it costs, measured"},{"location":"power/#the-order-that-matters","text":"lever measured verdict GPS running continuously 46.0 mA (spread 43.7-47.5) 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.","title":"The order that matters"},{"location":"power/#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): with sky ( mast-three ): duty, asleep, fix, 7 sats \u2014 got a fix, set the clock, cut power to the receiver; without (indoors, 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.","title":"GPS is the whole game"},{"location":"power/#ble-two-defaults-that-were-quietly-expensive","text":"The blinking LED. Bluefruit drives 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. The advertising rate. Upstream leaves the slow interval at 244 units = 152.5 ms, i.e. three channels ~6.5 times a second, forever. 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.","title":"BLE: two defaults that were quietly expensive"},{"location":"power/#rx-duty-cycle-rxps","text":"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 mA max (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): phase development build public release together rxps off 0/120 1/120 1/240 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.","title":"RX duty cycle (rxps)"},{"location":"power/#mcu-sleep","text":"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.","title":"MCU sleep"},{"location":"power/#cpu-time-per-received-packet-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 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.","title":"CPU time per received packet (PWR_DUTY_INSTRUMENT)"},{"location":"power/#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: default 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 .","title":"A mast that runs flat: bootlock and cutoff"},{"location":"power/#nrf52-sleep-peripheral-fixes","text":"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 : boot with before first BLE connection after it both fixes 11.51 / 11.51 mA 11.48 / 11.49 mA no CC clear 14.13 / 14.15 mA 11.38 / 11.52 mA no CC clear, no late DC/DC (= old main) 14.04 / 14.14 mA 11.50 / 11.55 mA no late DC/DC 11.43 / 11.53 mA 11.51 / 11.53 mA 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). boot with before first BLE connection after it both fixes 6.91 / 6.92 mA 6.89 / 6.88 mA no CC clear 10.16 / 10.16 mA 6.91 / 6.89 mA no CC clear, no late DC/DC (= old main) 10.18 / 10.18 mA 6.89 / 6.94 mA no late DC/DC 6.90 / 6.91 mA 6.93 / 6.92 mA 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. knob (3.3 V) round 1 round 2 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.","title":"nRF52 sleep & peripheral fixes"},{"location":"power/#measuring-this-yourself-two-traps","text":"A solar node measured on its USB side measures the CHARGER. With a charging cell the meter reads 500-700 mA, pulsing, and the node's own tens of mA ride on top of a drifting number. Wait for the charge to finish (it fell 0.71 \u2192 0.53 \u2192 0.22 \u2192 0.05 A over about an hour here) or the numbers are fiction. There is no INA226 on this board to cross-check with \u2014 the 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 . With 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.","title":"Measuring this yourself \u2014 two traps"},{"location":"qr_codes/","text":"QR Codes 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. Add Channel Example URL : meshcore://channel/add?name=Public&secret=8b3387e9c5cdea6ac9e5edbaa115cd72 Parameters : name : Channel name (URL-encoded) secret : 16-byte secret represented as 32 hex characters region_scope : Region Scope (optional, URL-encoded if provided) Supported by MeshCore App v1.47.0+ Add Contact Example URL : meshcore://contact/add?name=Example+Contact&public_key=9cd8fcf22a47333b591d96a2b848b73f457b1bb1a3ea2453a885f9e5787765b1&type=1 Parameters : name : Contact name (URL-encoded if needed) public_key : 32-byte public key represented as 64 hex characters type : numeric contact type 1 : Companion 2 : Repeater 3 : Room Server 4 : Sensor","title":"QR codes"},{"location":"qr_codes/#qr-codes","text":"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.","title":"QR Codes"},{"location":"qr_codes/#add-channel","text":"Example URL : meshcore://channel/add?name=Public&secret=8b3387e9c5cdea6ac9e5edbaa115cd72 Parameters : name : Channel name (URL-encoded) secret : 16-byte secret represented as 32 hex characters region_scope : Region Scope (optional, URL-encoded if provided) Supported by MeshCore App v1.47.0+","title":"Add Channel"},{"location":"qr_codes/#add-contact","text":"Example URL : meshcore://contact/add?name=Example+Contact&public_key=9cd8fcf22a47333b591d96a2b848b73f457b1bb1a3ea2453a885f9e5787765b1&type=1 Parameters : name : Contact name (URL-encoded if needed) public_key : 32-byte public key represented as 64 hex characters type : numeric contact type 1 : Companion 2 : Repeater 3 : Room Server 4 : Sensor","title":"Add Contact"},{"location":"radio_presets/","text":"Radio Presets The 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. JSON Response 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. { \"config\" : { \"suggested_radio_settings\" : { \"info_message\" : \"These presets are suggested by the community.\" , \"entries\" : [ { \"title\" : \"Australia (Narrow)\" , \"description\" : \"916.575MHz / SF7 / BW62.5 / CR7\" , \"frequency\" : \"916.575\" , \"spreading_factor\" : \"7\" , \"bandwidth\" : \"62.5\" , \"coding_rate\" : \"7\" }, { \"title\" : \"New Zealand (Narrow)\" , \"description\" : \"917.375MHz / SF7 / BW62.5 / CR5 / 2B\" , \"frequency\" : \"917.375\" , \"spreading_factor\" : \"7\" , \"bandwidth\" : \"62.5\" , \"coding_rate\" : \"5\" , \"network_settings\" : { \"path_hash_size\" : 2 } }, { \"title\" : \"Portugal 868\" , \"description\" : \"869.618MHz / SF7 / BW62.5 / CR6\" , \"frequency\" : \"869.618\" , \"spreading_factor\" : \"7\" , \"bandwidth\" : \"62.5\" , \"coding_rate\" : \"6\" } ] } } }","title":"Radio presets"},{"location":"radio_presets/#radio-presets","text":"The 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.","title":"Radio Presets"},{"location":"radio_presets/#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. { \"config\" : { \"suggested_radio_settings\" : { \"info_message\" : \"These presets are suggested by the community.\" , \"entries\" : [ { \"title\" : \"Australia (Narrow)\" , \"description\" : \"916.575MHz / SF7 / BW62.5 / CR7\" , \"frequency\" : \"916.575\" , \"spreading_factor\" : \"7\" , \"bandwidth\" : \"62.5\" , \"coding_rate\" : \"7\" }, { \"title\" : \"New Zealand (Narrow)\" , \"description\" : \"917.375MHz / SF7 / BW62.5 / CR5 / 2B\" , \"frequency\" : \"917.375\" , \"spreading_factor\" : \"7\" , \"bandwidth\" : \"62.5\" , \"coding_rate\" : \"5\" , \"network_settings\" : { \"path_hash_size\" : 2 } }, { \"title\" : \"Portugal 868\" , \"description\" : \"869.618MHz / SF7 / BW62.5 / CR6\" , \"frequency\" : \"869.618\" , \"spreading_factor\" : \"7\" , \"bandwidth\" : \"62.5\" , \"coding_rate\" : \"6\" } ] } } }","title":"JSON Response"},{"location":"stats_binary_frames/","text":"Stats Binary Frame Structures Binary frame structures for companion radio stats commands. All multi-byte integers use little-endian byte order. Command Codes Command Code Description CMD_GET_STATS 56 Get statistics (2-byte command: code + sub-type) Stats Sub-Types 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 Response Codes Response Code Description RESP_CODE_STATS 24 Statistics response (2-byte response: code + sub-type) Stats Response Sub-Types 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 RESP_CODE_STATS + STATS_TYPE_CORE (24, 0) Total Frame Size: 11 bytes Offset Size Type Field Name Description Range/Notes 0 1 uint8_t response_code Always 0x18 (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 Example Structure (C/C++) struct StatsCore { uint8_t response_code ; // 0x18 uint8_t stats_type ; // 0x00 (STATS_TYPE_CORE) uint16_t battery_mv ; uint32_t uptime_secs ; uint16_t errors ; uint8_t queue_len ; } __attribute__ (( packed )); RESP_CODE_STATS + STATS_TYPE_RADIO (24, 1) Total Frame Size: 14 bytes Offset Size Type Field Name Description Range/Notes 0 1 uint8_t response_code Always 0x18 (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 Example Structure (C/C++) struct StatsRadio { uint8_t response_code ; // 0x18 uint8_t stats_type ; // 0x01 (STATS_TYPE_RADIO) int16_t noise_floor ; int8_t last_rssi ; int8_t last_snr ; // Divide by 4.0 to get actual SNR in dB uint32_t tx_air_secs ; uint32_t rx_air_secs ; } __attribute__ (( packed )); RESP_CODE_STATS + STATS_TYPE_PACKETS (24, 2) Total Frame Size: 26 bytes (legacy) or 30 bytes (includes recv_errors ) Offset Size Type Field Name Description Range/Notes 0 1 uint8_t response_code Always 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 Notes Counters are cumulative from boot and may wrap. recv = flood_rx + direct_rx sent = flood_tx + direct_tx Clients should accept frame length \u2265 26; if length \u2265 30, parse recv_errors at offset 26. Example Structure (C/C++) struct StatsPackets { uint8_t response_code ; // 0x18 uint8_t stats_type ; // 0x02 (STATS_TYPE_PACKETS) uint32_t recv ; uint32_t sent ; uint32_t flood_tx ; uint32_t direct_tx ; uint32_t flood_rx ; uint32_t direct_rx ; uint32_t recv_errors ; // present when frame size is 30 } __attribute__ (( packed )); Command Usage Example (Python) # Send CMD_GET_STATS command def send_get_stats_core ( serial_interface ): \"\"\"Send command to get core stats\"\"\" cmd = bytes ([ 56 , 0 ]) # CMD_GET_STATS (56) + STATS_TYPE_CORE (0) serial_interface . write ( cmd ) def send_get_stats_radio ( serial_interface ): \"\"\"Send command to get radio stats\"\"\" cmd = bytes ([ 56 , 1 ]) # CMD_GET_STATS (56) + STATS_TYPE_RADIO (1) serial_interface . write ( cmd ) def send_get_stats_packets ( serial_interface ): \"\"\"Send command to get packet stats\"\"\" cmd = bytes ([ 56 , 2 ]) # CMD_GET_STATS (56) + STATS_TYPE_PACKETS (2) serial_interface . write ( cmd ) Response Parsing Example (Python) import struct def parse_stats_core ( frame ): \"\"\"Parse RESP_CODE_STATS + STATS_TYPE_CORE frame (11 bytes)\"\"\" response_code , stats_type , battery_mv , uptime_secs , errors , queue_len = \\ struct . unpack ( '<B B H I H B' , frame ) assert response_code == 24 and stats_type == 0 , \"Invalid response type\" return { 'battery_mv' : battery_mv , 'uptime_secs' : uptime_secs , 'errors' : errors , 'queue_len' : queue_len } def parse_stats_radio ( frame ): \"\"\"Parse RESP_CODE_STATS + STATS_TYPE_RADIO frame (14 bytes)\"\"\" response_code , stats_type , noise_floor , last_rssi , last_snr , tx_air_secs , rx_air_secs = \\ struct . unpack ( '<B B h b b I I' , frame ) assert response_code == 24 and stats_type == 1 , \"Invalid response type\" return { 'noise_floor' : noise_floor , 'last_rssi' : last_rssi , 'last_snr' : last_snr / 4.0 , # Unscale SNR 'tx_air_secs' : tx_air_secs , 'rx_air_secs' : rx_air_secs } def parse_stats_packets ( frame ): \"\"\"Parse RESP_CODE_STATS + STATS_TYPE_PACKETS frame (26 or 30 bytes)\"\"\" assert len ( frame ) >= 26 , \"STATS_TYPE_PACKETS frame too short\" response_code , stats_type , recv , sent , flood_tx , direct_tx , flood_rx , direct_rx = \\ struct . unpack ( '<B B I I I I I I' , frame [: 26 ]) assert response_code == 24 and stats_type == 2 , \"Invalid response type\" result = { 'recv' : recv , 'sent' : sent , 'flood_tx' : flood_tx , 'direct_tx' : direct_tx , 'flood_rx' : flood_rx , 'direct_rx' : direct_rx } if len ( frame ) >= 30 : ( recv_errors ,) = struct . unpack ( '<I' , frame [ 26 : 30 ]) result [ 'recv_errors' ] = recv_errors return result Command Usage Example (JavaScript/TypeScript) // Send CMD_GET_STATS command const CMD_GET_STATS = 56 ; const STATS_TYPE_CORE = 0 ; const STATS_TYPE_RADIO = 1 ; const STATS_TYPE_PACKETS = 2 ; function sendGetStatsCore ( serialInterface : SerialPort ) : void { const cmd = new Uint8Array ([ CMD_GET_STATS , STATS_TYPE_CORE ]); serialInterface . write ( cmd ); } function sendGetStatsRadio ( serialInterface : SerialPort ) : void { const cmd = new Uint8Array ([ CMD_GET_STATS , STATS_TYPE_RADIO ]); serialInterface . write ( cmd ); } function sendGetStatsPackets ( serialInterface : SerialPort ) : void { const cmd = new Uint8Array ([ CMD_GET_STATS , STATS_TYPE_PACKETS ]); serialInterface . write ( cmd ); } Response Parsing Example (JavaScript/TypeScript) interface StatsCore { battery_mv : number ; uptime_secs : number ; errors : number ; queue_len : number ; } interface StatsRadio { noise_floor : number ; last_rssi : number ; last_snr : number ; tx_air_secs : number ; rx_air_secs : number ; } interface StatsPackets { recv : number ; sent : number ; flood_tx : number ; direct_tx : number ; flood_rx : number ; direct_rx : number ; recv_errors? : number ; // present when frame is 30 bytes } function parseStatsCore ( buffer : ArrayBuffer ) : StatsCore { const view = new DataView ( buffer ); const response_code = view . getUint8 ( 0 ); const stats_type = view . getUint8 ( 1 ); if ( response_code !== 24 || stats_type !== 0 ) { throw new Error ( 'Invalid response type' ); } return { battery_mv : view.getUint16 ( 2 , true ), uptime_secs : view.getUint32 ( 4 , true ), errors : view.getUint16 ( 8 , true ), queue_len : view.getUint8 ( 10 ) }; } function parseStatsRadio ( buffer : ArrayBuffer ) : StatsRadio { const view = new DataView ( buffer ); const response_code = view . getUint8 ( 0 ); const stats_type = view . getUint8 ( 1 ); if ( response_code !== 24 || stats_type !== 1 ) { throw new Error ( 'Invalid response type' ); } return { noise_floor : view.getInt16 ( 2 , true ), last_rssi : view.getInt8 ( 4 ), last_snr : view.getInt8 ( 5 ) / 4.0 , // Unscale SNR tx_air_secs : view.getUint32 ( 6 , true ), rx_air_secs : view.getUint32 ( 10 , true ) }; } function parseStatsPackets ( buffer : ArrayBuffer ) : StatsPackets { const view = new DataView ( buffer ); if ( buffer . byteLength < 26 ) { throw new Error ( 'STATS_TYPE_PACKETS frame too short' ); } const response_code = view . getUint8 ( 0 ); const stats_type = view . getUint8 ( 1 ); if ( response_code !== 24 || stats_type !== 2 ) { throw new Error ( 'Invalid response type' ); } const result : StatsPackets = { recv : view.getUint32 ( 2 , true ), sent : view.getUint32 ( 6 , true ), flood_tx : view.getUint32 ( 10 , true ), direct_tx : view.getUint32 ( 14 , true ), flood_rx : view.getUint32 ( 18 , true ), direct_rx : view.getUint32 ( 22 , true ) }; if ( buffer . byteLength >= 30 ) { result . recv_errors = view . getUint32 ( 26 , true ); } return result ; } Field Size Considerations Packet counters (uint32_t): May wrap after extended high-traffic operation. Time fields (uint32_t): Max ~136 years. SNR (int8_t, scaled by 4): Range -32 to +31.75 dB, 0.25 dB precision.","title":"Stats binary frames"},{"location":"stats_binary_frames/#stats-binary-frame-structures","text":"Binary frame structures for companion radio stats commands. All multi-byte integers use little-endian byte order.","title":"Stats Binary Frame Structures"},{"location":"stats_binary_frames/#command-codes","text":"Command Code Description CMD_GET_STATS 56 Get statistics (2-byte command: code + sub-type)","title":"Command Codes"},{"location":"stats_binary_frames/#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","title":"Stats Sub-Types"},{"location":"stats_binary_frames/#response-codes","text":"Response Code Description RESP_CODE_STATS 24 Statistics response (2-byte response: code + sub-type)","title":"Response Codes"},{"location":"stats_binary_frames/#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","title":"Stats Response Sub-Types"},{"location":"stats_binary_frames/#resp_code_stats-stats_type_core-24-0","text":"Total Frame Size: 11 bytes Offset Size Type Field Name Description Range/Notes 0 1 uint8_t response_code Always 0x18 (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","title":"RESP_CODE_STATS + STATS_TYPE_CORE (24, 0)"},{"location":"stats_binary_frames/#example-structure-cc","text":"struct StatsCore { uint8_t response_code ; // 0x18 uint8_t stats_type ; // 0x00 (STATS_TYPE_CORE) uint16_t battery_mv ; uint32_t uptime_secs ; uint16_t errors ; uint8_t queue_len ; } __attribute__ (( packed ));","title":"Example Structure (C/C++)"},{"location":"stats_binary_frames/#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 Always 0x18 (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","title":"RESP_CODE_STATS + STATS_TYPE_RADIO (24, 1)"},{"location":"stats_binary_frames/#example-structure-cc_1","text":"struct StatsRadio { uint8_t response_code ; // 0x18 uint8_t stats_type ; // 0x01 (STATS_TYPE_RADIO) int16_t noise_floor ; int8_t last_rssi ; int8_t last_snr ; // Divide by 4.0 to get actual SNR in dB uint32_t tx_air_secs ; uint32_t rx_air_secs ; } __attribute__ (( packed ));","title":"Example Structure (C/C++)"},{"location":"stats_binary_frames/#resp_code_stats-stats_type_packets-24-2","text":"Total Frame Size: 26 bytes (legacy) or 30 bytes (includes recv_errors ) Offset Size Type Field Name Description Range/Notes 0 1 uint8_t response_code Always 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","title":"RESP_CODE_STATS + STATS_TYPE_PACKETS (24, 2)"},{"location":"stats_binary_frames/#notes","text":"Counters are cumulative from boot and may wrap. recv = flood_rx + direct_rx sent = flood_tx + direct_tx Clients should accept frame length \u2265 26; if length \u2265 30, parse recv_errors at offset 26.","title":"Notes"},{"location":"stats_binary_frames/#example-structure-cc_2","text":"struct StatsPackets { uint8_t response_code ; // 0x18 uint8_t stats_type ; // 0x02 (STATS_TYPE_PACKETS) uint32_t recv ; uint32_t sent ; uint32_t flood_tx ; uint32_t direct_tx ; uint32_t flood_rx ; uint32_t direct_rx ; uint32_t recv_errors ; // present when frame size is 30 } __attribute__ (( packed ));","title":"Example Structure (C/C++)"},{"location":"stats_binary_frames/#command-usage-example-python","text":"# Send CMD_GET_STATS command def send_get_stats_core ( serial_interface ): \"\"\"Send command to get core stats\"\"\" cmd = bytes ([ 56 , 0 ]) # CMD_GET_STATS (56) + STATS_TYPE_CORE (0) serial_interface . write ( cmd ) def send_get_stats_radio ( serial_interface ): \"\"\"Send command to get radio stats\"\"\" cmd = bytes ([ 56 , 1 ]) # CMD_GET_STATS (56) + STATS_TYPE_RADIO (1) serial_interface . write ( cmd ) def send_get_stats_packets ( serial_interface ): \"\"\"Send command to get packet stats\"\"\" cmd = bytes ([ 56 , 2 ]) # CMD_GET_STATS (56) + STATS_TYPE_PACKETS (2) serial_interface . write ( cmd )","title":"Command Usage Example (Python)"},{"location":"stats_binary_frames/#response-parsing-example-python","text":"import struct def parse_stats_core ( frame ): \"\"\"Parse RESP_CODE_STATS + STATS_TYPE_CORE frame (11 bytes)\"\"\" response_code , stats_type , battery_mv , uptime_secs , errors , queue_len = \\ struct . unpack ( '<B B H I H B' , frame ) assert response_code == 24 and stats_type == 0 , \"Invalid response type\" return { 'battery_mv' : battery_mv , 'uptime_secs' : uptime_secs , 'errors' : errors , 'queue_len' : queue_len } def parse_stats_radio ( frame ): \"\"\"Parse RESP_CODE_STATS + STATS_TYPE_RADIO frame (14 bytes)\"\"\" response_code , stats_type , noise_floor , last_rssi , last_snr , tx_air_secs , rx_air_secs = \\ struct . unpack ( '<B B h b b I I' , frame ) assert response_code == 24 and stats_type == 1 , \"Invalid response type\" return { 'noise_floor' : noise_floor , 'last_rssi' : last_rssi , 'last_snr' : last_snr / 4.0 , # Unscale SNR 'tx_air_secs' : tx_air_secs , 'rx_air_secs' : rx_air_secs } def parse_stats_packets ( frame ): \"\"\"Parse RESP_CODE_STATS + STATS_TYPE_PACKETS frame (26 or 30 bytes)\"\"\" assert len ( frame ) >= 26 , \"STATS_TYPE_PACKETS frame too short\" response_code , stats_type , recv , sent , flood_tx , direct_tx , flood_rx , direct_rx = \\ struct . unpack ( '<B B I I I I I I' , frame [: 26 ]) assert response_code == 24 and stats_type == 2 , \"Invalid response type\" result = { 'recv' : recv , 'sent' : sent , 'flood_tx' : flood_tx , 'direct_tx' : direct_tx , 'flood_rx' : flood_rx , 'direct_rx' : direct_rx } if len ( frame ) >= 30 : ( recv_errors ,) = struct . unpack ( '<I' , frame [ 26 : 30 ]) result [ 'recv_errors' ] = recv_errors return result","title":"Response Parsing Example (Python)"},{"location":"stats_binary_frames/#command-usage-example-javascripttypescript","text":"// Send CMD_GET_STATS command const CMD_GET_STATS = 56 ; const STATS_TYPE_CORE = 0 ; const STATS_TYPE_RADIO = 1 ; const STATS_TYPE_PACKETS = 2 ; function sendGetStatsCore ( serialInterface : SerialPort ) : void { const cmd = new Uint8Array ([ CMD_GET_STATS , STATS_TYPE_CORE ]); serialInterface . write ( cmd ); } function sendGetStatsRadio ( serialInterface : SerialPort ) : void { const cmd = new Uint8Array ([ CMD_GET_STATS , STATS_TYPE_RADIO ]); serialInterface . write ( cmd ); } function sendGetStatsPackets ( serialInterface : SerialPort ) : void { const cmd = new Uint8Array ([ CMD_GET_STATS , STATS_TYPE_PACKETS ]); serialInterface . write ( cmd ); }","title":"Command Usage Example (JavaScript/TypeScript)"},{"location":"stats_binary_frames/#response-parsing-example-javascripttypescript","text":"interface StatsCore { battery_mv : number ; uptime_secs : number ; errors : number ; queue_len : number ; } interface StatsRadio { noise_floor : number ; last_rssi : number ; last_snr : number ; tx_air_secs : number ; rx_air_secs : number ; } interface StatsPackets { recv : number ; sent : number ; flood_tx : number ; direct_tx : number ; flood_rx : number ; direct_rx : number ; recv_errors? : number ; // present when frame is 30 bytes } function parseStatsCore ( buffer : ArrayBuffer ) : StatsCore { const view = new DataView ( buffer ); const response_code = view . getUint8 ( 0 ); const stats_type = view . getUint8 ( 1 ); if ( response_code !== 24 || stats_type !== 0 ) { throw new Error ( 'Invalid response type' ); } return { battery_mv : view.getUint16 ( 2 , true ), uptime_secs : view.getUint32 ( 4 , true ), errors : view.getUint16 ( 8 , true ), queue_len : view.getUint8 ( 10 ) }; } function parseStatsRadio ( buffer : ArrayBuffer ) : StatsRadio { const view = new DataView ( buffer ); const response_code = view . getUint8 ( 0 ); const stats_type = view . getUint8 ( 1 ); if ( response_code !== 24 || stats_type !== 1 ) { throw new Error ( 'Invalid response type' ); } return { noise_floor : view.getInt16 ( 2 , true ), last_rssi : view.getInt8 ( 4 ), last_snr : view.getInt8 ( 5 ) / 4.0 , // Unscale SNR tx_air_secs : view.getUint32 ( 6 , true ), rx_air_secs : view.getUint32 ( 10 , true ) }; } function parseStatsPackets ( buffer : ArrayBuffer ) : StatsPackets { const view = new DataView ( buffer ); if ( buffer . byteLength < 26 ) { throw new Error ( 'STATS_TYPE_PACKETS frame too short' ); } const response_code = view . getUint8 ( 0 ); const stats_type = view . getUint8 ( 1 ); if ( response_code !== 24 || stats_type !== 2 ) { throw new Error ( 'Invalid response type' ); } const result : StatsPackets = { recv : view.getUint32 ( 2 , true ), sent : view.getUint32 ( 6 , true ), flood_tx : view.getUint32 ( 10 , true ), direct_tx : view.getUint32 ( 14 , true ), flood_rx : view.getUint32 ( 18 , true ), direct_rx : view.getUint32 ( 22 , true ) }; if ( buffer . byteLength >= 30 ) { result . recv_errors = view . getUint32 ( 26 , true ); } return result ; }","title":"Response Parsing Example (JavaScript/TypeScript)"},{"location":"stats_binary_frames/#field-size-considerations","text":"Packet counters (uint32_t): May wrap after extended high-traffic operation. Time fields (uint32_t): Max ~136 years. SNR (int8_t, scaled by 4): Range -32 to +31.75 dB, 0.25 dB precision.","title":"Field Size Considerations"},{"location":"terminal_chat_cli/","text":"Terminal Chat CLI Below are the commands you can enter into the Terminal Chat clients: set freq {frequency} Set the LoRa frequency. Example: set freq 915.8 set tx {tx-power-dbm} Sets LoRa transmit power in dBm. set name {name} Sets your advertisement name. set lat {latitude} Sets your advertisement map latitude. (decimal degrees) set lon {longitude} Sets your advertisement map longitude. (decimal degrees) set af {air-time-factor} 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} Set the device clock using UNIX epoch seconds. Example: time 1738242833 advert Sends an advertisement packet clock Displays current time per device's clock. ver Shows the device version and firmware build date. card Displays your 'business card', for others to manually import import {card} Imports the given card to your contacts. list {n} List all contacts by most recent. (optional {n}, is the last n by advertisement date) to Shows the name of current recipient contact. (for subsequent 'send' commands) to {name-prefix} 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} Sends the text message (as DM) to current recipient. reset path Resets the path to current recipient, for new path discovery. public {text} Sends the text message to the built-in 'public' group channel help Lists the available commands.","title":"Terminal chat CLI"},{"location":"terminal_chat_cli/#terminal-chat-cli","text":"Below are the commands you can enter into the Terminal Chat clients: set freq {frequency} Set the LoRa frequency. Example: set freq 915.8 set tx {tx-power-dbm} Sets LoRa transmit power in dBm. set name {name} Sets your advertisement name. set lat {latitude} Sets your advertisement map latitude. (decimal degrees) set lon {longitude} Sets your advertisement map longitude. (decimal degrees) set af {air-time-factor} 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} Set the device clock using UNIX epoch seconds. Example: time 1738242833 advert Sends an advertisement packet clock Displays current time per device's clock. ver Shows the device version and firmware build date. card Displays your 'business card', for others to manually import import {card} Imports the given card to your contacts. list {n} List all contacts by most recent. (optional {n}, is the last n by advertisement date) to Shows the name of current recipient contact. (for subsequent 'send' commands) to {name-prefix} 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} Sends the text message (as DM) to current recipient. reset path Resets the path to current recipient, for new path discovery. public {text} Sends the text message to the built-in 'public' group channel help Lists the available commands.","title":"Terminal Chat CLI"},{"location":"tth-commands/","text":"Console commands of this fork (meshcore-tth) 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 repeater simple_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). Antispam (repeater) 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. FairnessLimiter -- fairness 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 ). command 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). Channel filter -- filter 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. command 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 Channel-hash deny-forward -- filter hash (every repeater) 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. command filter 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. Message age -- filter age (repeater with channel keys) 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] Count every filter verdict (sender, hash, age) but forward anyway -- try a rule on a live node before it bites. Default off. Radio watchdogs and board upkeep (all) Details: cli_commands.md , \"Radio silence watchdog\", \"TX stall watchdog\", \"Reboot into the bootloader\" and \"Why the board last reset\". command set 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 Number arguments of set (all, and the companion's serial CLI) 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 . Diagnostics command where 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. BLE console (observer) 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. command 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). Passive analyzer (observer) command 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. Channel bot (own build: BOT_CHANNEL_PSK ) 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. Power and clock command where 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) Sensors 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 Build flags The ones that change what a node does; set in platformio.ini / platformio.local.ini ( -D NAME=value , the last -D wins). flag default 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.","title":"P\u0159\u00edkazy konzole \u00b7 console commands"},{"location":"tth-commands/#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 repeater simple_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).","title":"Console commands of this fork (meshcore-tth)"},{"location":"tth-commands/#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.","title":"Antispam (repeater)"},{"location":"tth-commands/#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 ). command 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).","title":"FairnessLimiter -- fairness"},{"location":"tth-commands/#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. command 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","title":"Channel filter -- filter"},{"location":"tth-commands/#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. command filter 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.","title":"Channel-hash deny-forward -- filter hash (every repeater)"},{"location":"tth-commands/#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.","title":"Message age -- filter age (repeater with channel keys)"},{"location":"tth-commands/#filter-dryrun-onoff","text":"Count every filter verdict (sender, hash, age) but forward anyway -- try a rule on a live node before it bites. Default off.","title":"filter dryrun [on|off]"},{"location":"tth-commands/#radio-watchdogs-and-board-upkeep-all","text":"Details: cli_commands.md , \"Radio silence watchdog\", \"TX stall watchdog\", \"Reboot into the bootloader\" and \"Why the board last reset\". command set 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","title":"Radio watchdogs and board upkeep (all)"},{"location":"tth-commands/#number-arguments-of-set-all-and-the-companions-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 .","title":"Number arguments of set (all, and the companion's serial CLI)"},{"location":"tth-commands/#diagnostics","text":"command where 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.","title":"Diagnostics"},{"location":"tth-commands/#ble-console-observer","text":"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. command 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).","title":"BLE console (observer)"},{"location":"tth-commands/#passive-analyzer-observer","text":"command 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.","title":"Passive analyzer (observer)"},{"location":"tth-commands/#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.","title":"Channel bot (own build: BOT_CHANNEL_PSK)"},{"location":"tth-commands/#power-and-clock","text":"command where 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)","title":"Power and clock"},{"location":"tth-commands/#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","title":"Sensors"},{"location":"tth-commands/#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). flag default 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.","title":"Build flags"}]} |