Files
meshcore-tth/search/search_index.json
T

1 line
375 KiB
JSON

{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"],"fields":{"title":{"boost":1000.0},"text":{"boost":1.0},"tags":{"boost":1000000.0}}},"docs":[{"location":"","title":"O tomto forku (meshcore-tth)","text":"<p>English version below -- experimental firmware, not meant for regular users.</p> <p>Warning</p> <p>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 <code>dev</code>, 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).</p> <p>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 <code>main</code> a <code>dev</code> 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 <code>CUSTOM (TeTeHacko)</code>. Nic z toho nem\u011bn\u00ed protokol na r\u00e1diu.</p>"},{"location":"#repeater-antispam-vsechno-vypinatelne-nic-z-toho-neni-v-upstreamu","title":"Repeater: antispam (v\u0161echno vyp\u00ednateln\u00e9, nic z toho nen\u00ed v upstreamu)","text":"<p>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; <code>fairness off</code> ho vypne natrvalo. Okno na adverty, filtry a dry-run jsou vypnut\u00e9, dokud je nezapnete.</p> <ul> <li>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. <code>fairness [on|off|grid|cap|refill]</code>; p\u0159\u00edmo sm\u011brovan\u00fd provoz se neomezuje nikdy.</li> <li>Okno na adverty podle p\u016fvodce \u2013 flood advert ka\u017ed\u00e9ho uzlu se p\u0159epo\u0161le nejv\u00fd\u0161 jednou za N hodin (<code>fairness advert &lt;h&gt;|clear</code>), p\u0159evzato z AdvertLimiteru DutchMeshCore. M\u00ed\u0159\u00ed na uzly, kter\u00e9 advertuj\u00ed ka\u017edou minutu.</li> <li>Dry-run \u2013 <code>fairness dryrun on</code> zapo\u010d\u00edt\u00e1 ka\u017ed\u00fd verdikt, ale p\u0159epo\u0161le i tak; <code>fairness air</code> uk\u00e1\u017ee u\u0161et\u0159en\u00fd (nebo u\u0161et\u0159iteln\u00fd) airtime podle d\u016fvodu.</li> <li>Filtr kan\u00e1l\u016f \u2013 na kan\u00e1lech, jejich\u017e kl\u00ed\u010d repeater zn\u00e1 (Public a <code>#hashtag</code> kan\u00e1ly), p\u0159estane p\u0159epos\u00edlat zpr\u00e1vy uveden\u00fdch jmen odes\u00edlatel\u016f (<code>filter add|del|list</code>). Jm\u00e9no se d\u00e1 podvrhnout: je to brzda na utr\u017een\u00e9ho bota, ne bezpe\u010dnost.</li> <li>Blokace p\u0159epos\u00edl\u00e1n\u00ed podle hashe kan\u00e1lu \u2013 <code>filter hash add &lt;hex&gt; [s]</code>: 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 <code>s</code> se kan\u00e1l neod\u0159\u00edzne, ale p\u0159i\u0161krt\u00ed (jeden paket za <code>s</code> sekund).</li> <li>Limit st\u00e1\u0159\u00ed zpr\u00e1vy \u2013 <code>filter age &lt;min&gt;|off</code> (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.</li> <li><code>filter dryrun on</code> zapo\u010d\u00edt\u00e1 ka\u017ed\u00fd verdikt <code>filter</code>, ale p\u0159epo\u0161le i tak.</li> </ul>"},{"location":"#diagnostika-a-provoz","title":"Diagnostika a provoz","text":"<p>V\u0161echny p\u0159\u00edkazy forku, kde je kter\u00fd build m\u00e1 a v\u00fdchoz\u00ed hodnoty: docs/tth-commands.md.</p> <p>Repeater, room server i senzor (v\u0161echno s textovou konzol\u00ed) maj\u00ed:</p> <ul> <li>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.</li> <li><code>set radio.silence &lt;min&gt;</code> \u2013 hluch\u00fd p\u0159ij\u00edma\u010d: kdy\u017e se za <code>&lt;min&gt;</code> 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 (<code>0</code>) \u2013 pr\u00e1h volte s rezervou nad nejdel\u0161\u00ed b\u011b\u017en\u00e9 ticho na m\u00edst\u011b.</li> <li>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 (<code>RADIO_TXSTALL_MIN</code>); <code>set radio.txstall &lt;min&gt;|off</code> plat\u00ed jen do restartu.</li> <li><code>get radio.reboots</code> \u2013 kolik restart\u016f watchdogy ud\u011blaly (p\u0159e\u017eije i v\u00fdpadek nap\u00e1jen\u00ed); <code>get boot</code> \u2013 pro\u010d se deska naposledy resetovala a z\u00e1znam o hardfaultu (vyp\u00ed\u0161e se i p\u0159i startu).</li> <li><code>dfu [uf2|serial|ota]</code> \u2013 spolehliv\u00fd reboot do bootloaderu (jen z lok\u00e1ln\u00ed konzole); <code>i2c</code> \u2013 sken sb\u011brnice.</li> </ul> <p>Repeater nav\u00edc:</p> <ul> <li><code>blink</code> (rozblik\u00e1 LED, i p\u0159es mesh \u2013 najdete uzel na sto\u017e\u00e1ru), <code>txpwr</code> (vys\u00edlac\u00ed v\u00fdkon do restartu, s verdiktem RadioLibu), \u010d\u00edta\u010de chyb vys\u00edl\u00e1n\u00ed ve stavov\u00e9 odpov\u011bdi.</li> <li>Jen observer varianty (<code>*-observer</code>): textov\u00e1 konzole p\u0159es BLE vedle USB, <code>ble on|off</code> ulo\u017een\u00e9 p\u0159es reboot (<code>RPT_BLE_DEFAULT_OFF</code>: startuje vypnut\u00e9), vlastn\u00ed BLE PIN (<code>ble pin</code>), ulo\u017een\u00fd vys\u00edlac\u00ed v\u00fdkon spojen\u00ed (<code>blepwr</code>), <code>bleconn</code>, neblokuj\u00edc\u00ed BLE vys\u00edl\u00e1n\u00ed a parametry spojen\u00ed, kter\u00e9 vydr\u017e\u00ed i na slab\u00e9m linku.</li> <li>Taky jen observer varianty: pasivn\u00ed analyz\u00e1tor v konzoli \u2013 <code>nodes</code> (sly\u0161en\u00e9 repeatery a roomy, kl\u00ed\u010d pro spojen\u00ed v\u00edce cest), <code>rxlog</code> (ka\u017ed\u00fd sly\u0161en\u00fd r\u00e1mec: typ, cesta, SNR, RSSI), <code>pktlog</code> (surov\u00e9 r\u00e1mce pro feed observeru), velk\u00e9 str\u00e1nkovan\u00e9 odpov\u011bdi.</li> <li>Jen vlastn\u00ed buildy, ne releasy:</li> <li>kan\u00e1lov\u00fd bot (<code>BOT_CHANNEL_PSK</code>: <code>!link</code>, <code>!path</code>, <code>!snr</code>, <code>!heard</code>, <code>!noise</code>, <code>!ping</code>, <code>!help</code>, v\u00fdb\u011br p\u0159es <code>BOT_COMMANDS</code>, cooldown na odes\u00edlatele, ignore list) \u2013 odpov\u00edd\u00e1, ani\u017e by p\u0159epos\u00edlal;</li> <li><code>RADIO_DIAG</code>: <code>radiostat</code> (stav p\u0159ij\u00edma\u010de SX1262 bez z\u00e1sahu) a <code>radiokick rx|clrirq|standby|agc</code> (jeden krok obnovy, od nejjemn\u011bj\u0161\u00edho \u2013 prvn\u00ed, kter\u00fd pom\u016f\u017ee, uk\u00e1\u017ee rozbitou vrstvu);</li> <li><code>PIN_DIAG</code>: <code>dio1</code> (stav p\u0159eru\u0161en\u00ed v \u010dipu proti \u00farovni na pinu \u2013 kter\u00fd konec mrtv\u00e9 linky DIO1 je p\u0159eru\u0161en\u00fd);</li> <li><code>LORA_POLL_IRQ</code>: provoz bez DIO1 pro desku s mrtvou linkou p\u0159eru\u0161en\u00ed.</li> </ul>"},{"location":"#opravy-jadra","title":"Opravy j\u00e1dra","text":"<ul> <li>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 <code>reboot</code> 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 (<code>/s_acl_ts0|1</code>, 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 (<code>ACL_TS_MAX_AHEAD</code>) 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.</li> <li>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 (<code>LOGIN_FAIL_MAX</code>, <code>LOGIN_FAIL_SECS</code>) 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.</li> <li>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.</li> <li>TRACE u\u017e nep\u0159ipisuje cestu za konec payloadu; parsov\u00e1n\u00ed TRACE/PATH a <code>Packet::readFrom</code> hl\u00eddaj\u00ed meze.</li> <li><code>markSeen</code> je zase idempotentn\u00ed (odes\u00edlac\u00ed cesta uj\u00eddala okno deduplikace).</li> <li>Z\u00e1lo\u017en\u00ed v\u00fdpo\u010det v <code>calcMaxPacketMillis</code> u\u017e nepodte\u010de (uzel na tom ohluchl).</li> <li>\u0160\u00ed\u0159ka path hashe se bere z nastaven\u00ed uzlu na v\u0161ech cest\u00e1ch vys\u00edl\u00e1n\u00ed v\u010detn\u011b <code>sendZeroHop</code>; v\u00fdchoz\u00ed jsou 2bajtov\u00e9 path hashe (<code>PATH_HASH_MODE_DEFAULT</code>).</li> <li>Nepoveden\u00e9 vys\u00edl\u00e1n\u00ed se za\u0159ad\u00ed znovu s odstupem, m\u00edsto aby se zahodilo.</li> <li>RSSI ka\u017ed\u00e9ho paketu se zaznamen\u00e1 p\u0159i p\u0159\u00edjmu; <code>ContactInfo</code> se p\u0159ed \u010d\u00e1ste\u010dn\u00fdm vypln\u011bn\u00edm vynuluje.</li> </ul>"},{"location":"#napajeni-hodiny-gps","title":"Nap\u00e1jen\u00ed, hodiny, GPS","text":"<ul> <li>GPS duty cycle (<code>gps duty</code>), 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.</li> <li>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 (<code>.noinit</code>); <code>clkreboot</code>.</li> <li>Na sol\u00e1rn\u00edch uzlech \u017e\u00e1dn\u00e1 blikaj\u00edc\u00ed LED a pomalej\u0161\u00ed BLE advertising.</li> <li>Stav baterie jako ikona na konci advertovan\u00e9ho jm\u00e9na: <code>set batt.icon on</code>, prahy <code>set batt.icon.lo|hi &lt;mV&gt;</code> (v\u00fdchoz\u00ed vypnut\u00e9; dlouh\u00e9 jm\u00e9no ikonu nepojme a p\u0159\u00edkaz na to upozorn\u00ed).</li> <li>Voliteln\u00fd RX duty cycle (<code>set radio.rxps off|on|balanced|max</code>, jemn\u011bji <code>level &lt;1-10&gt;</code>; port PowerSaving z EasySkyMesh): SX1262 mezi kr\u00e1tk\u00fdmi okny poslechu sp\u00ed. Ve ve\u0159ejn\u00fdch buildech je zabudovan\u00fd a vypnut\u00fd; <code>max</code> 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).</li> <li>Podp\u011b\u0165ov\u00e1 pojistka p\u0159i startu (<code>PWRMGT_VOLTAGE_BOOTLOCK</code>) 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 <code>SenseCap_Solar_repeater</code> (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 <code>set pwr.bootlock &lt;mV&gt;|off</code> (v\u00fdchoz\u00ed 3300, pod n\u00edm uzel nenab\u011bhne a sp\u00ed, dokud se \u010dl\u00e1nek nezotav\u00ed) a <code>set pwr.cutoff &lt;mV&gt;|off</code> (v\u00fdchoz\u00ed vypnuto, pod n\u00edm se b\u011b\u017e\u00edc\u00ed uzel vypne); <code>get pwr</code> (docs/power.md).</li> </ul>"},{"location":"#senzory-a-companiony","title":"Senzory a companiony","text":"<ul> <li><code>simple_sensor</code>: telemetrie z extern\u00ed stanice po UART (<code>BudkaLinkSensorManager</code>, jeden LPP kan\u00e1l na veli\u010dinu), <code>sensor read</code>.</li> <li>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: <code>sensor set ina.shunt &lt;m\u03a9&gt;</code>.</li> <li>Companion: <code>gps duty</code> 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 <code>set pin</code>) 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.</li> </ul>"},{"location":"#verejne-buildy-vychozi-nastaveni-pro-cesky-mesh","title":"Ve\u0159ejn\u00e9 buildy: v\u00fdchoz\u00ed nastaven\u00ed pro \u010desk\u00fd mesh","text":"<p>Releasy z tohoto repozit\u00e1\u0159e (<code>pub-release</code>) 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:</p> <ul> <li>r\u00e1dio 869,432 MHz / 62,5 kHz / SF7 / CR5 (v\u0161echny buildy);</li> <li>repeater a room server: zero-hop advert vypnut\u00fd, flood advert ka\u017ed\u00fdch 25 h, duty cycle 10 % (<code>get dutycycle</code> \u2192 <code>10.0%</code>; zastaral\u00e9 <code>af</code> je 9);</li> <li>repeater: regiony <code>cz</code> a <code>cs</code> vedle <code>*</code> \u2013 vlastn\u00ed <code>cz-&lt;kraj&gt;</code> p\u0159id\u00e1\u0161 p\u0159es <code>region put cz-xxx cz</code> + <code>region save</code>;</li> <li>2bajtov\u00e9 path hashe (v\u00fdchoz\u00ed v tomto forku);</li> <li>repeater: filtr kan\u00e1l\u016f (<code>filter add &lt;jm\u00e9no&gt;</code>) je zabudovan\u00fd pro Public, <code>#meshcore</code> a <code>#test</code>, s pr\u00e1zdn\u00fdm seznamem \u2013 ned\u011bl\u00e1 nic, dokud do n\u011bj nep\u0159id\u00e1\u0161 jm\u00e9no.</li> </ul> <p>Plat\u00ed jen pro uzel bez ulo\u017een\u00e9ho nastaven\u00ed (nov\u00fd nebo po <code>erase</code>): 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.</p> <p>BLE PIN companionu je ve\u0159ejn\u00fd <code>123456</code> (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.</p> <p>Varianty observer (<code>*_repeater-observer-*</code>) nRF52 repeater\u016f (XIAO, SenseCAP Solar, RAK4631, T1000-E, Heltec T114) p\u0159id\u00e1vaj\u00ed buffery <code>nodes</code> / <code>rxlog</code> / <code>pktlog</code> 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 (<code>RPT_BLE_DEFAULT_OFF</code>). Nem\u00e1 vlastn\u00ed p\u0159ihl\u00e1\u0161en\u00ed, jen BLE PIN, a PIN v buildu je ve\u0159ejn\u00fd z\u00e1stupn\u00fd <code>123456</code>. Nejd\u0159\u00edv si proto nastav vlastn\u00ed \u2013 v USB konzoli, nebo jako admin p\u0159es mesh (vzd\u00e1len\u00e9 CLI v aplikaci): <code>ble pin &lt;6 \u010d\u00edslic&gt;</code> (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 <code>ble on</code> \u2013 dokud je PIN z\u00e1stupn\u00fd, tyhle buildy ho odm\u00edtnou. <code>ble</code> uk\u00e1\u017ee, jestli je PIN <code>own</code> nebo <code>build default</code>, samotn\u00fd PIN nikdy. Releasy do <code>tth-654d53f3</code> <code>ble pin</code> nemaj\u00ed: BLE tam nech vypnut\u00e9 a pou\u017e\u00edvej USB.</p>"},{"location":"#nahrani-releasu","title":"Nahr\u00e1n\u00ed releasu","text":"<p>Ka\u017ed\u00fd release je automatick\u00fd build nad upstreamov\u00fdm <code>dev</code> (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.</p> <p>Soubory jsou v Releases. Release se jmenuje podle upstreamov\u00e9 verze a data, nap\u0159. <code>v1.18.0+tth.20261112</code> (druh\u00fd t\u00e9ho\u017e dne <code>.2</code>), a v popisu m\u00e1 zm\u011bny od p\u0159edchoz\u00edho releasu. Pro ka\u017edou desku a roli je jedna sada (<code>&lt;deska&gt;_&lt;role&gt;-&lt;release&gt;</code>, nap\u0159. <code>Xiao_nrf52_repeater-v1.18.0+tth.20261112.zip</code>): <code>.zip</code> a <code>.uf2</code> pro nRF52, <code>.bin</code> pro ESP32 (<code>-merged.bin</code> je cel\u00fd obraz pro pr\u00e1zdnou desku, oby\u010dejn\u00fd <code>.bin</code> aktualizace). Kontroln\u00ed sou\u010dty jsou v <code>SHA256SUMS</code>. Releasy do 12. 11. 2026 se jmenovaly <code>tth-&lt;sha&gt;</code>.</p> <p>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> <ol> <li>P\u0159ipoj desku p\u0159es USB.</li> <li>Klikni na Custom Firmware a vyber <code>.zip</code> pro svou desku.</li> <li>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.</li> <li>Klikni na Flash! a vyber ten nov\u00fd port. Zhruba 30 s, pak se deska restartuje do nov\u00e9ho firmwaru.</li> <li>Console ve flasheru (nebo jak\u00fdkoli s\u00e9riov\u00fd termin\u00e1l, 115200) ov\u011b\u0159\u00ed v\u00fdsledek: <code>ver</code> uk\u00e1\u017ee <code>v1.xx.x-tth&lt;sha&gt;</code>, stejn\u011b jako \u0159\u00e1dek \u201eVerze v uzlu\u201c v popisu releasu.</li> </ol> <p>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.</p> <p>Vyzkou\u0161eno na XIAO (repeater-observer, 3. 11. 2026). ESP32 <code>.bin</code> p\u0159es stejn\u00e9 tla\u010d\u00edtko Custom Firmware tu vyzkou\u0161en\u00e9 nen\u00ed.</p> <p>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 <code>.uf2</code>. Nebo <code>adafruit-nrfutil dfu serial -pkg &lt;soubor&gt;.zip -p &lt;port&gt; -b 115200</code> s deskou v bootloaderu.</p> <p>Nov\u00fd uzel po nahr\u00e1n\u00ed nastav v konzoli: <code>set name &lt;jm\u00e9no&gt;</code>, <code>password &lt;admin heslo&gt;</code> (nejv\u00fd\u0161 15 znak\u016f), vlastn\u00ed region p\u0159es <code>region put cz-&lt;kraj&gt; cz</code> + <code>region save</code>. 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 <code>set repeat off</code>, dokud nen\u00ed na m\u00edst\u011b.</p>"},{"location":"#experimentalni-aktualizace-firmwaru-od-admina-ota","title":"Experiment\u00e1ln\u00ed: aktualizace firmwaru od admina (<code>*-ota</code>)","text":"<p>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 <code>*-ota</code> / <code>*-observer-ota</code>. Ten um\u00ed p\u0159ijmout nov\u00fd firmware od admina p\u0159\u00edkazy <code>fw \u2026</code>: 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 <code>fw apply</code>, 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.</p> <ul> <li>V releasu je ke ka\u017ed\u00e9mu <code>*-ota</code> obrazu pln\u00fd bal\u00ed\u010dek <code>&lt;deska&gt;_&lt;role&gt;-ota-&lt;release&gt;.mcfw</code> (jen p\u0159es USB/BLE) a delta <code>\u2026.from-&lt;star\u0161\u00ed release&gt;.mcfw</code> od ka\u017ed\u00e9ho dr\u017een\u00e9ho p\u0159edchoz\u00edho releasu, typicky jednotky kB.</li> <li>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 (<code>fw apply downgrade</code>). <code>fw apply</code> \u010dek\u00e1 na baterii \u2265 3,8 V, pokud uzel neb\u011b\u017e\u00ed z USB.</li> <li>Bal\u00ed\u010dky i <code>SHA256SUMS</code> jsou podepsan\u00e9 kl\u00ed\u010dem <code>meshcore-ota@tth-pub</code> a <code>*-ota</code> obraz jin\u00fd podpis nep\u0159ijme. Ov\u011b\u0159en\u00ed sta\u017een\u00fdch soubor\u016f: <code>ssh-keygen -Y verify -f tools/ota_allowed_signers -I meshcore-ota@tth-pub -n meshcore-ota -s SHA256SUMS.sig &lt; SHA256SUMS</code>. Vlastn\u00ed build s vlastn\u00edm kl\u00ed\u010dem: <code>[ota] pubkey</code> v <code>platformio.local.ini</code>.</li> <li>Prvn\u00ed <code>*-ota</code> obraz se nahraje oby\u010dejn\u011b (viz v\u00fd\u0161e), dal\u0161\u00ed u\u017e jako delta. N\u00e1stroje: <code>tools/ota_push.py</code> (USB), <code>tools/ota_mesh_push.py</code> (p\u0159es mesh skrz companion; pot\u0159ebuje pythonovou knihovnu <code>meshcore</code>, admin heslo bere z <code>[secrets] admin_pw</code> v <code>platformio.local.ini</code>; s <code>--side</code> jde p\u0159enos po vedlej\u0161\u00edm kan\u00e1lu mimo sd\u00edlen\u00fd mesh), <code>tools/ota_pack.py info</code>. P\u0159enos samotn\u00fd je OTA engine kolekce tth.meshcore (modul <code>meshcore_fw_ota</code>), 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.</li> <li>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 <code>set radio.silence</code>. Stoj\u00ed ~10 kB RAM nav\u00edc.</li> </ul>"},{"location":"#sestaveni","title":"Sestaven\u00ed","text":"<ul> <li>Raz\u00edtko verze v ka\u017ed\u00e9m nRF52 envu (<code>v1.18.0-tth&lt;sha&gt;</code>, <code>+</code> = neuklizen\u00fd strom), z\u00e1kladn\u00ed verze z upstreamov\u00e9ho tagu (<code>tools/build_version.py</code>).</li> <li><code>tools/</code>: 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 (<code>tools/config.example.ini</code>).</li> <li><code>hardware/cavity-box</code>: parametrick\u00e1 krabi\u010dka pro dutinov\u00fd filtr na sto\u017e\u00e1r.</li> </ul>"},{"location":"ble-lora-coexistence/","title":"BLE/LoRa coexistence \u2014 bench reproduction attempt","text":"<p>Working notes for the DIRECT-forward loss seen on <code>mast-three</code> (SenseCap Solar, <code>SenseCap_Solar_repeater_ble</code>). 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.</p>"},{"location":"ble-lora-coexistence/#the-claim-under-test","title":"The claim under test","text":"<p>Commit <code>f6e9aeca</code> 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 (<code>startTransmit</code> fail / send-complete timeout).</p> <p>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.</p>"},{"location":"ble-lora-coexistence/#rig","title":"Rig","text":"<p>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 <code>RX_BOOSTED_GAIN</code> hears a few mW just fine. The override is compile-time (<code>platformio.local.ini</code>) because <code>MyMesh.cpp</code> seeds <code>_prefs.freq</code> from <code>LORA_FREQ</code>, so the firmware cannot come up on the production frequency even after <code>erase</code>.</p> node board role <code>bench-board</code> XIAO nRF52840 + Wio-SX1262 forwarder under test <code>bench-board</code> same paired control / radiating witness <code>bench-board</code>, <code>bench-board</code> same probe sources <code>bench-rpt</code> SenseCap Solar Node forwarder, mast-identical hardware <code>tth-s2-rpt</code> same paired control <p>Paired controls differ only in <code>ADVERT_NAME</code>, verified by diffing strings in the ELF. Any other difference invalidates them.</p>"},{"location":"ble-lora-coexistence/#oracle","title":"Oracle","text":"<p>The measured quantity is the node's own <code>direct_rx \u2212 direct_tx</code> from <code>stats-packets</code>: 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. <code>tx_start_fail</code> and <code>tx_timeout</code> are the mechanism-level counters. A second repeater with <code>repeat off</code> acts as a radiating witness, so \"counted a TX\" can be distinguished from \"actually radiated\".</p> <p>Route forcing: a contact is injected into the sender's companion with an explicit <code>out_path</code>, so the DM must traverse the node under test. <code>out_path_len</code> is not a hop count \u2014 it is a packed byte, top two bits = hash size \u2212 1, low six = hop count (<code>Packet.h:85</code>). One hop with a 2-byte hash is <code>0x41</code>, not <code>1</code>. The receiver reads the size out of the packet (<code>Mesh.cpp:93</code>), so a forced path works regardless of the node's <code>path.hash.mode</code>.</p>"},{"location":"ble-lora-coexistence/#what-was-measured","title":"What was measured","text":"<p>All cells at a verified 22.50 ms connection interval \u2014 <code>bleconn</code> reports the parameters actually negotiated, because <code>bleOnSecured()</code> only requests them and the central may refuse. Without that read-back none of the null results below would mean anything.</p> <code>blepwr</code> \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 <p>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.</p> <p>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.</p>"},{"location":"ble-lora-coexistence/#why-idle-weak-link-does-nothing","title":"Why idle + weak link does nothing","text":"<p>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 <code>poll</code> mode in the harness.</p> <p>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.</p>"},{"location":"ble-lora-coexistence/#on-mast-hardware-with-the-file-log-on","title":"On mast hardware, with the file log on","text":"<p>Two SenseCap Solar nodes (<code>bench-rpt</code> forwarder, <code>tth-s2-rpt</code> 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 (<code>bleconn</code>).</p> 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 <p>The logging condition was real, not nominal: <code>log</code> 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.</p> <p>Ten cells, 80 forced forwards, zero lost, <code>tx_timeout</code> and <code>tx_start_fail</code> 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.</p>"},{"location":"ble-lora-coexistence/#still-open","title":"Still open","text":"<p>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.</p> <p>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 <code>mast-three</code> itself \u2014 the counters (<code>stats-packets</code>, and now <code>bleconn</code> to prove which interval is actually in force) are all reachable over its BLE console.</p>"},{"location":"ble-lora-coexistence/#airtime-is-a-hard-limit-and-the-firmware-will-not-enforce-it","title":"Airtime is a hard limit, and the firmware will not enforce it","text":"<p>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 <code>airtime_factor</code> defaults to 0 (= 100 %) and is clamped to 9, so the lowest duty MeshCore can enforce is 10 %. The first sweep consumed <code>tx_air_secs</code> 27 s in 18 minutes of uptime, a rate of ~2.5 %. Budget the probes: <code>stats-radio.tx_air_secs</code> is the ground truth, and the harness aborts before crossing a configured cap.</p> <p><code>stats-core.queue_len</code> and <code>errors</code> are a required control, not decoration: when the airtime budget runs out the Dispatcher defers a forward (<code>next_tx_time</code>, <code>Dispatcher.cpp:101</code>), which looks identical to loss in the counters. Both were zero throughout.</p>"},{"location":"ble-lora-coexistence/#traps-worth-remembering","title":"Traps worth remembering","text":"<ul> <li>USB and BLE consoles share one <code>command[160]</code>. 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.</li> <li><code>Bluefruit.setTxPower()</code> is advertising-only (see the commit message for <code>blepwr</code>); the connection runs at the SoftDevice default 0 dBm.</li> <li>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 <code>blepwr</code> over the mesh admin CLI.</li> <li>~~Runtime <code>set tx</code> 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: <code>RadioLibWrapper::setTxPower()</code> discarded RadioLib's status, so a refused request looked exactly like an accepted one. Re-measured 2026-08-04 on the repeater build with <code>txpwr</code> confirming each step, x1 transmitting and x4 as witness:</li> </ul> <code>txpwr</code> witness <code>last_rssi</code> +22 0 dBm (saturated) +14 \u22121 dBm (saturated) +6 \u22127 dBm 0 \u221218 dBm \u22129 \u221228 dBm <p>31 dB of command produced 28 dB of RSSI, and the witness <code>recv</code> 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.</p> <p>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.</p>"},{"location":"ble-lora-coexistence/#the-two-commands-this-bench-added","title":"The two commands this bench added","text":"<p>Both live in <code>examples/simple_repeater/main.cpp</code> and are repeater-only.</p>"},{"location":"ble-lora-coexistence/#bleconn-what-the-link-is-actually-doing","title":"<code>bleconn</code> \u2014 what the link is actually doing","text":"<pre><code>bleconn\n-&gt; BLE conn: interval 75.00 ms (req 60-80), latency 0, sup timeout 4000 ms [live]\n</code></pre> <p>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 <code>f6e9aeca</code> (widening the requested interval to 60\u201380 ms) is in force on a node you cannot see. The trailing <code>[live]</code> / <code>[last]</code> 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 <code>nothing seen yet</code>.</p>"},{"location":"ble-lora-coexistence/#blepwr-dbm-connection-tx-power-saved","title":"<code>blepwr [dBm]</code> \u2014 connection TX power, saved","text":"<pre><code>blepwr # report: BLE conn tx: 0 dBm, adv tx: 8 dBm\nblepwr 8 # set, apply to live connections and save\nblepwr default # forget the saved value, back to RPT_BLE_CONN_TX_POWER\n</code></pre> <p>The reply carries how many live connections accepted the value (<code>OK - BLE conn tx 8 dBm (1/1 conn), saved</code>) 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 <code>/ble_pwr</code> 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 <code>RPT_BLE_CONN_TX_POWER</code>, which mast-three's env sets to 8).</p> <p>Sets <code>BLE_GAP_TX_POWER_ROLE_CONN</code>, which is independent of <code>Bluefruit.setTxPower()</code> \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 <code>RPT_BLE_CONN_TX_POWER</code>.</p> <p>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 (<code>blepwr 0</code>), 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.</p>"},{"location":"budka-sensor/","title":"Budka link \u2014 a Chytra Budka as a sensor source","text":"<p>A Chytra Budka (ESP32-S3 bird box) sends its readings over a one-way UART line to a XIAO nRF52840 running <code>simple_sensor</code>; 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, <code>firmware/MESHCORE.md</code>.</p>"},{"location":"budka-sensor/#build","title":"Build","text":"<p><code>BudkaLinkSensorManager</code> (<code>src/helpers/sensors/</code>) replaces the variant's <code>EnvironmentSensorManager</code> when the env defines <code>BUDKA_LINK_RX_PIN</code>; every other env is unchanged.</p> <pre><code>[env:Xiao_x1_budka] ; platformio.local.ini\nextends = env:Xiao_nrf52_sensor\nbuild_flags =\n ${env:Xiao_nrf52_sensor.build_flags}\n ${test_radio.build_flags} ; bench: test band only\n -D BUDKA_LINK_RX_PIN=0 ; D0 = the only pad LoRa + I\u00b2C leave free\n</code></pre> <p>Optional: <code>BUDKA_LINK_TX_PIN</code> (default <code>LED_GREEN</code> \u2014 nothing is ever sent, the idle-high line keeps that LED dark), <code>BUDKA_LINK_BAUD</code> (115200), <code>BUDKA_LINK_METERS</code> (3), <code>BUDKA_LINK_STALE_MS</code> (120 s).</p>"},{"location":"budka-sensor/#wiring","title":"Wiring","text":"<p>Budka <code>mc_tx</code> 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.</p>"},{"location":"budka-sensor/#telemetry-layout","title":"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) <p>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.</p> <p>Read it with <code>.tth/tools/budka_telem.py &lt;companion-port&gt; &lt;sensor-name&gt;</code>. The sensor answers only clients in its ACL \u2014 a request from anyone else is dropped (<code>recv matches no peers</code> in a <code>MESH_DEBUG</code> build). Add the companion from the sensor's USB console with <code>setperm &lt;companion-pubkey&gt; 1</code>, or log in as admin. The port may be a pyserial URL (<code>socket://\u2026</code> for an openHop companion), and the name may be the sensor's public key when the companion does not have it yet.</p>"},{"location":"budka-sensor/#bench-result-13-10-2026","title":"Bench result (13. 10. 2026)","text":"<p>x1 (sensor, test band) fed by the bench budka; x4 as USB companion:</p> <pre><code>ch2 temp_C 25.3 humidity_% 59.0 generic 29\nch3 voltage_V 4.94 current_A 0.10 analog_in 0.49 energy_kWh 0.111\nch4 voltage_V 4.94 current_A 0.18 analog_in 0.89 energy_kWh 0.311\n</code></pre>"},{"location":"budka-sensor/#not-done","title":"Not done","text":"<p>Alerts (reed opened, budka WiFi down) and the return direction (mesh \u2192 budka). The sensor build has no <code>dfu</code> console command \u2014 reflash with <code>pio run -t upload</code>, one touch per power session.</p>"},{"location":"cli_commands/","title":"CLI Commands","text":"<p>This document provides an overview of CLI commands that can be sent to MeshCore Repeaters, Room Servers and Sensors.</p>"},{"location":"cli_commands/#navigation","title":"Navigation","text":"<ul> <li>Operational</li> <li>Neighbors</li> <li>Posts</li> <li>Statistics</li> <li>Logging</li> <li>Information</li> <li>Configuration</li> <li>Radio</li> <li>System</li> <li>Routing</li> <li>ACL</li> <li>Region Management<ul> <li>Region Examples</li> </ul> </li> <li>GPS</li> <li>Sensors</li> <li>Bridge</li> <li>Ethernet</li> </ul>"},{"location":"cli_commands/#operational","title":"Operational","text":""},{"location":"cli_commands/#reboot-the-node","title":"Reboot the node","text":"<p>Usage: - <code>reboot</code></p> <p>Note: No reply is sent.</p>"},{"location":"cli_commands/#power-off-the-node","title":"Power-off the node","text":"<p>Usage: - <code>poweroff</code>, or - <code>shutdown</code></p> <p>Note: No reply is sent.</p>"},{"location":"cli_commands/#reset-the-clock-and-reboot","title":"Reset the clock and reboot","text":"<p>Usage: - <code>clkreboot</code></p> <p>Note: No reply is sent.</p> <p>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: <code>time</code> and <code>clock sync</code> both refuse to.</p>"},{"location":"cli_commands/#sync-the-clock-with-the-remote-device","title":"Sync the clock with the remote device","text":"<p>Usage: - <code>clock sync</code></p> <p>Takes the time from the packet's <code>sender_timestamp</code>, so it works only over the remote admin CLI, never from the USB or BLE console \u2014 those pass <code>sender_timestamp = 0</code> (they share one command buffer, see <code>examples/simple_repeater/main.cpp</code>), and <code>0 &gt; curr</code> is never true, so a local <code>clock sync</code> always answers <code>ERR: clock cannot go backwards</code>. Use <code>time &lt;epoch&gt;</code> locally.</p>"},{"location":"cli_commands/#display-current-time-in-utc","title":"Display current time in UTC","text":"<p>Usage: - <code>clock</code></p> <p>Reply: <code>HH:MM - D/M/YYYY UTC (epoch &lt;seconds&gt;)</code></p> <p>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.</p>"},{"location":"cli_commands/#set-the-time-to-a-specific-timestamp","title":"Set the time to a specific timestamp","text":"<p>Usage: - <code>time &lt;epoch_seconds&gt;</code></p> <p>Parameters: - <code>epoch_seconds</code>: Unix epoch time</p> <p>Refuses to go backwards (<code>secs &gt; curr</code>), answering <code>(ERR: clock cannot go backwards)</code>. That reply usually means the clock was already right, so treat it as success and judge by reading <code>clock</code> back.</p> <p>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 <code>millis()</code>. 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:</p> <ul> <li>GPS (<code>gps duty</code> is enough \u2014 see <code>docs/power.md</code>);</li> <li>an attached host \u2014 <code>tools/ble_cli.py &lt;MAC&gt; \"time {epoch}\"</code>, the <code>meshcore-ble-bridge</code>/<code>meshcore-serial-bridge</code> scrape, or <code>tools/xiao_uf2_flash.sh</code>, which sets it right after every flash;</li> <li>the build epoch, which is where a freshly flashed board starts, and which needs nothing at all.</li> </ul>"},{"location":"cli_commands/#send-a-flood-advert","title":"Send a flood advert","text":"<p>Usage: - <code>advert</code></p>"},{"location":"cli_commands/#send-a-zero-hop-advert","title":"Send a zero-hop advert","text":"<p>Usage: - <code>advert.zerohop</code></p>"},{"location":"cli_commands/#start-an-over-the-air-ota-firmware-update","title":"Start an Over-The-Air (OTA) firmware update","text":"<p>Usage: - <code>start ota</code></p>"},{"location":"cli_commands/#erasefactory-reset","title":"Erase/Factory Reset","text":"<p>Usage: - <code>erase</code></p> <p>Serial Only: Yes</p> <p>Warning: This is destructive!</p>"},{"location":"cli_commands/#neighbors-repeater-only","title":"Neighbors (Repeater Only)","text":""},{"location":"cli_commands/#list-nearby-neighbors","title":"List nearby neighbors","text":"<p>Usage: - <code>neighbors</code></p> <p>Note: The output of this command is limited to the 8 most recent adverts.</p> <p>Note: Each line is encoded as <code>{pubkey-prefix}:{timestamp}:{snr*4}</code></p>"},{"location":"cli_commands/#remove-a-neighbor","title":"Remove a neighbor","text":"<p>Usage: - <code>neighbor.remove &lt;pubkey_prefix&gt;</code></p> <p>Parameters: - <code>pubkey_prefix</code>: 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.</p> <p>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.</p>"},{"location":"cli_commands/#discover-zero-hop-neighbors","title":"Discover zero hop neighbors","text":"<p>Usage: - <code>discover.neighbors</code></p>"},{"location":"cli_commands/#posts-room-server-only","title":"Posts (Room Server Only)","text":""},{"location":"cli_commands/#post-a-message-as-the-room-server","title":"Post a message as the room server","text":"<p>Usage: - <code>room.post &lt;message&gt;</code></p> <p>Parameters: - <code>message</code>: The text of the post</p> <p>Note: The post is stored and pushed to logged-in clients like a client's post, with the room server as its author.</p>"},{"location":"cli_commands/#statistics","title":"Statistics","text":""},{"location":"cli_commands/#clear-stats","title":"Clear Stats","text":"<p>Usage: <code>clear stats</code></p>"},{"location":"cli_commands/#system-stats-battery-uptime-queue-length-and-debug-flags","title":"System Stats - Battery, Uptime, Queue Length and Debug Flags","text":"<p>Usage: - <code>stats-core</code></p> <p>Serial Only: Yes</p> <p>Note: Output format: <code>{\"battery_mv\":&lt;mV&gt;,\"uptime_secs\":&lt;secs&gt;,\"errors\":&lt;flags&gt;,\"queue_len\":&lt;count&gt;}</code></p> <p>Note: <code>errors</code> is a bitmask shown as \"Debug flags\" in the app's repeater status.</p> Value Flag Meaning 1 <code>ERR_EVENT_FULL</code> A packet failed to send because the memory pool was full. 2 <code>ERR_EVENT_CAD_TIMEOUT</code> After waiting 4 seconds for a gap, a packet was transmitted into a busy network. 4 <code>ERR_EVENT_STARTRX_TIMEOUT</code> The radio was out of receive mode for more than 8 seconds. <p>Flags stay set until the node reboots or <code>clear stats</code> is run.</p>"},{"location":"cli_commands/#radio-stats-noise-floor-last-rssisnr-airtime-receive-errors","title":"Radio Stats - Noise floor, Last RSSI/SNR, Airtime, Receive errors","text":"<p>Usage: <code>stats-radio</code></p> <p>Serial Only: Yes</p>"},{"location":"cli_commands/#packet-stats-packet-counters-received-sent","title":"Packet stats - Packet counters: Received, Sent","text":"<p>Usage: <code>stats-packets</code></p> <p>Serial Only: Yes</p>"},{"location":"cli_commands/#logging","title":"Logging","text":""},{"location":"cli_commands/#begin-capture-of-rx-log-to-node-storage","title":"Begin capture of rx log to node storage","text":"<p>Usage: <code>log start</code></p>"},{"location":"cli_commands/#end-capture-of-rx-log-to-node-storage","title":"End capture of rx log to node storage","text":"<p>Usage: <code>log stop</code></p>"},{"location":"cli_commands/#erase-captured-log","title":"Erase captured log","text":"<p>Usage: <code>log erase</code></p>"},{"location":"cli_commands/#print-the-captured-log-to-the-serial-terminal","title":"Print the captured log to the serial terminal","text":"<p>Usage: <code>log</code></p> <p>Serial Only: Yes</p>"},{"location":"cli_commands/#info","title":"Info","text":""},{"location":"cli_commands/#get-the-version","title":"Get the Version","text":"<p>Usage: <code>ver</code></p>"},{"location":"cli_commands/#show-the-hardware-name","title":"Show the hardware name","text":"<p>Usage: <code>board</code></p>"},{"location":"cli_commands/#configuration","title":"Configuration","text":""},{"location":"cli_commands/#radio","title":"Radio","text":""},{"location":"cli_commands/#view-or-change-this-nodes-radio-parameters","title":"View or change this node's radio parameters","text":"<p>Usage: - <code>get radio</code> - <code>set radio &lt;freq&gt;,&lt;bw&gt;,&lt;sf&gt;,&lt;cr&gt;</code></p> <p>Parameters: - <code>freq</code>: Frequency in MHz - <code>bw</code>: Bandwidth in kHz - <code>sf</code>: Spreading factor (5-12) - <code>cr</code>: Coding rate (5-8)</p> <p>Set by build flag: <code>LORA_FREQ</code>, <code>LORA_BW</code>, <code>LORA_SF</code>, <code>LORA_CR</code></p> <p>Default: <code>869.618,62.5,8,5</code></p> <p>Note: Requires reboot to apply</p> <p>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.</p>"},{"location":"cli_commands/#view-or-change-this-nodes-transmit-power","title":"View or change this node's transmit power","text":"<p>Usage: - <code>get tx</code> - <code>set tx &lt;dbm&gt;</code></p> <p>Parameters: - <code>dbm</code>: Power level in dBm (-9 to 22 on SX126x; meshcore-tth refuses values out of range or not taken by the radio)</p> <p>Set by build flag: <code>LORA_TX_POWER</code></p> <p>Default: Varies by board</p> <p>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.</p>"},{"location":"cli_commands/#change-the-radio-parameters-for-a-set-duration","title":"Change the radio parameters for a set duration","text":"<p>Usage: - <code>tempradio &lt;freq&gt;,&lt;bw&gt;,&lt;sf&gt;,&lt;cr&gt;,&lt;timeout_mins&gt;</code></p> <p>Parameters: - <code>freq</code>: Frequency in MHz (300-2500) - <code>bw</code>: Bandwidth in kHz (7.8-500) - <code>sf</code>: Spreading factor (5-12) - <code>cr</code>: Coding rate (5-8) - <code>timeout_mins</code>: Duration in minutes (must be &gt; 0)</p> <p>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.</p> <p>Note: This is not saved to preferences and will clear on reboot</p>"},{"location":"cli_commands/#view-or-change-this-nodes-frequency","title":"View or change this node's frequency","text":"<p>Usage: - <code>get freq</code> - <code>set freq &lt;frequency&gt;</code></p> <p>Parameters: - <code>frequency</code>: Frequency in MHz</p> <p>Default: <code>869.618</code></p> <p>Note: Requires reboot to apply Serial Only: <code>set freq &lt;frequency&gt;</code></p>"},{"location":"cli_commands/#view-or-change-this-nodes-rx-boosted-gain-mode-sx12xx-and-lr1110-v1141","title":"View or change this node's rx boosted gain mode (SX12xx and LR1110, v1.14.1+)","text":"<p>Usage: - <code>get radio.rxgain</code> - <code>set radio.rxgain &lt;state&gt;</code></p> <p>Parameters: - <code>state</code>: <code>on</code>|<code>off</code></p> <p>Default: <code>on</code></p> <p>Temporary Note: If you upgraded from an older version to 1.14.1 without erasing flash, this setting is <code>off</code> because of #2118</p>"},{"location":"cli_commands/#view-or-change-the-lora-fem-receive-path-gain-state-on-supported-boards","title":"View or change the LoRa FEM receive-path gain state on supported boards","text":"<p>Usage: - <code>get radio.fem.rxgain</code> - <code>set radio.fem.rxgain &lt;state&gt;</code></p> <p>Parameters: - <code>state</code>: <code>on</code>|<code>off</code></p> <p>Notes: - This controls the external LoRa FEM receive-path LNA where the board supports it. - This is separate from <code>radio.rxgain</code>, which controls the radio chip receive gain mode.</p>"},{"location":"cli_commands/#view-or-change-the-lora-fem-transmit-path-gain-state-on-supported-boards","title":"View or change the LoRa FEM transmit-path gain state on supported boards","text":"<p>Usage: - <code>get radio.fem.txgain</code> - <code>set radio.fem.txgain &lt;state&gt;</code></p> <p>Parameters: - <code>state</code>: <code>on</code>|<code>off</code></p> <p>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. <code>on</code> selects PA PL1 high/short and <code>off</code> 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. <code>get</code> reports the configured state, which may lead the hardware until the node next transmits.</p>"},{"location":"cli_commands/#system","title":"System","text":""},{"location":"cli_commands/#view-or-change-this-nodes-name","title":"View or change this node's name","text":"<p>Usage: - <code>get name</code> - <code>set name &lt;name&gt;</code></p> <p>Parameters: - <code>name</code>: Node name</p> <p>Set by build flag: <code>ADVERT_NAME</code></p> <p>Default: Varies by board</p> <p>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.</p>"},{"location":"cli_commands/#show-battery-state-as-an-icon-on-the-advertised-name","title":"Show battery state as an icon on the advertised name","text":"<p>(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.</p> <p>Usage: - <code>get batt.icon</code> - <code>set batt.icon on|off</code></p> <p>Default: <code>off</code></p> <p>Glyphs: <code>\u2600</code> permanently (solar node), then one of <code>\u2581\u2582\u2583\u2584\u2585\u2586\u2587\u2588</code> for the charge level -- or <code>\u26a1</code> instead of the level while the node runs on external power (USB), where VBAT reads the charger rather than the cell.</p> <p>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 <code>set</code> and <code>get</code> say so.</p> <p>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.</p> <p>Note: Switching is hysteretic (<code>BATT_ICON_HYST_MV</code>, 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.</p>"},{"location":"cli_commands/#battery-scale-for-the-name-icon","title":"Battery scale for the name icon","text":"<p>Usage: - <code>get batt.icon.lo</code> / <code>set batt.icon.lo &lt;millivolts&gt;</code> - <code>get batt.icon.hi</code> / <code>set batt.icon.hi &lt;millivolts&gt;</code></p> <p>Set by build flag: <code>BATT_ICON_LO_MV</code>, <code>BATT_ICON_HI_MV</code></p> <p>Default: <code>3300</code> and <code>4200</code> -- the same 1S Li-Ion scale the dashboards use, so the icon and the Grafana percentage tell one story.</p> <p>Parameters: - <code>millivolts</code>: <code>2500</code>..<code>4500</code>, or <code>0</code> to use the build default</p>"},{"location":"cli_commands/#view-or-change-this-nodes-latitude","title":"View or change this node's latitude","text":"<p>Usage: - <code>get lat</code> - <code>set lat &lt;degrees&gt;</code></p> <p>Set by build flag: <code>ADVERT_LAT</code></p> <p>Default: <code>0</code></p> <p>Parameters: - <code>degrees</code>: Latitude in degrees</p>"},{"location":"cli_commands/#view-or-change-this-nodes-longitude","title":"View or change this node's longitude","text":"<p>Usage: - <code>get lon</code> - <code>set lon &lt;degrees&gt;</code></p> <p>Set by build flag: <code>ADVERT_LON</code></p> <p>Default: <code>0</code></p> <p>Parameters: - <code>degrees</code>: Longitude in degrees</p>"},{"location":"cli_commands/#view-or-change-this-nodes-identity-private-key","title":"View or change this node's identity (Private Key)","text":"<p>Usage: - <code>get prv.key</code> - <code>set prv.key &lt;private_key&gt;</code></p> <p>Parameters: - <code>private_key</code>: Private key in hex format (64 hex characters)</p> <p>Serial Only: - <code>get prv.key</code>: Yes - <code>set prv.key</code>: No</p> <p>Note: Requires reboot to take effect after setting</p>"},{"location":"cli_commands/#change-this-nodes-admin-password","title":"Change this node's admin password","text":"<p>Usage: - <code>password &lt;new_password&gt;</code></p> <p>Parameters: - <code>new_password</code>: New admin password</p> <p>Set by build flag: <code>ADMIN_PASSWORD</code></p> <p>Default: <code>password</code></p> <p>Note: Command reply echoes the updated password for confirmation.</p> <p>Note: Any node using this password will be added to the admin ACL list.</p>"},{"location":"cli_commands/#view-or-change-this-nodes-guest-password","title":"View or change this node's guest password","text":"<p>Usage: - <code>get guest.password</code> - <code>set guest.password &lt;password&gt;</code></p> <p>Parameters: - <code>password</code>: Guest password</p> <p>Set by build flag: <code>ROOM_PASSWORD</code> (Room Server only)</p> <p>Default: <code>&lt;blank&gt;</code></p>"},{"location":"cli_commands/#view-or-change-this-nodes-owner-info","title":"View or change this node's owner info","text":"<p>Usage: - <code>get owner.info</code> - <code>set owner.info &lt;text&gt;</code></p> <p>Parameters: - <code>text</code>: Owner information text</p> <p>Default: <code>&lt;blank&gt;</code></p> <p>Note: <code>|</code> characters are translated to newlines</p> <p>Note: Requires firmware 1.12+</p>"},{"location":"cli_commands/#fine-tune-the-battery-reading","title":"Fine-tune the battery reading","text":"<p>Usage: - <code>get adc.multiplier</code> - <code>set adc.multiplier &lt;value&gt;</code></p> <p>Parameters: - <code>value</code>: ADC multiplier (0.0-10.0)</p> <p>Default: <code>0.0</code> (value defined by board)</p> <p>Note: Returns \"Error: unsupported by this board\" if hardware doesn't support it</p>"},{"location":"cli_commands/#view-this-nodes-public-key","title":"View this node's public key","text":"<p>Usage: <code>get public.key</code></p>"},{"location":"cli_commands/#view-this-nodes-firmware-version","title":"View this node's firmware version","text":"<p>Usage: <code>ver</code></p>"},{"location":"cli_commands/#view-this-nodes-configured-role","title":"View this node's configured role","text":"<p>Usage: <code>get role</code></p>"},{"location":"cli_commands/#view-or-change-this-nodes-power-saving-flag-repeater-only","title":"View or change this node's power saving flag (Repeater Only)","text":"<p>Usage: - <code>powersaving</code> - <code>powersaving on</code> - <code>powersaving off</code></p> <p>Parameters: - <code>on</code>: enable power saving - <code>off</code>: disable power saving</p> <p>Default: <code>off</code></p> <p>Note: When enabled, device enters sleep mode between radio transmissions</p>"},{"location":"cli_commands/#view-or-change-the-rx-duty-cycle-rxps-custom-tetehacko","title":"View or change the RX duty cycle (rxps) -- CUSTOM (TeTeHacko)","text":"<p>Usage: - <code>get radio.rxps</code> - <code>set radio.rxps off|on|balanced|max</code> - <code>set radio.rxps level &lt;1-10&gt; [preamble &lt;16|32&gt;]</code> - <code>set radio.rxps max preamble &lt;16|32&gt;</code></p> <p>The SX1262 sleeps between short listening windows (<code>SetRxDutyCycle</code>) 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 <code>supported=no</code>). Present only in builds with <code>-D WITH_RX_POWERSAVING</code> (the public releases have it) and off until you set it; the setting is saved.</p> <p>Parameters: - <code>on</code> (= <code>conservative</code>, level 3), <code>balanced</code> (level 6), <code>max</code> (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. - <code>level &lt;n&gt;</code>: the same scale by number; without <code>preamble</code> it follows the SF. 9 (<code>overdrive</code>) and 10 (<code>riskyWorkingMax</code>) are past the datasheet's timing condition -- 10 is known to lose packets. - <code>&lt;rx_us&gt; &lt;sleep_us&gt;</code>: raw window lengths.</p> <p><code>get radio.rxps</code> shows the requested and the effective state (<code>desired=on,effective=armed</code>), the window lengths and two error counters. If arming fails three times in a row, the radio falls back to continuous RX by itself (<code>effective=continuous</code>, <code>fail</code> counts up). The noise-floor calibration also runs in continuous RX.</p> <p>Default: <code>off</code></p> <p>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): <code>max</code> saves ~2.3 mA (cell repeatability 0.3 mA). A 3-board zero-hop test lost nothing on <code>max</code> (0/240 over two runs, the second on the public release). See <code>docs/power.md</code>.</p>"},{"location":"cli_commands/#routing","title":"Routing","text":""},{"location":"cli_commands/#view-or-change-this-nodes-repeat-flag","title":"View or change this node's repeat flag","text":"<p>Usage: - <code>get repeat</code> - <code>set repeat &lt;state&gt;</code></p> <p>Parameters: - <code>state</code>: <code>on</code>|<code>off</code></p> <p>Default: <code>on</code></p>"},{"location":"cli_commands/#view-or-change-this-nodes-advert-path-hash-size","title":"View or change this node's advert path hash size","text":"<p>Usage: - <code>get path.hash.mode</code> - <code>set path.hash.mode &lt;value&gt;</code></p> <p>Parameters: - <code>value</code>: Path hash size (0-2) - <code>0</code>: 1 Byte hash size (256 unique ids)[64 max flood] - <code>1</code>: 2 Byte hash size (65,536 unique ids)[32 max flood] - <code>2</code>: 3 Byte hash size (16,777,216 unique ids)[21 max flood] - <code>3</code>: DO NOT USE (Reserved) </p> <p>Default: <code>0</code></p> <p>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 &gt;= 1.14. This feature was added in firmware 1.14</p> <p>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 &gt;=1.14 has reached a criticality for effective network flooding before implementing higher ID/hash sizes. </p>"},{"location":"cli_commands/#view-or-change-this-nodes-loop-detection","title":"View or change this node's loop detection","text":"<p>Usage: - <code>get loop.detect</code> - <code>set loop.detect &lt;state&gt;</code></p> <p>Parameters: - <code>state</code>: - <code>off</code>: no loop detection is performed - <code>minimal</code>: 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) - <code>moderate</code>: 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) - <code>strict</code>: 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)</p> <p>Default: <code>off</code></p> <p>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</p> <p>Example: If preference is <code>loop.detect minimal</code>, 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. </p>"},{"location":"cli_commands/#view-or-change-the-retransmit-delay-factor-for-flood-traffic","title":"View or change the retransmit delay factor for flood traffic","text":"<p>Usage: - <code>get txdelay</code> - <code>set txdelay &lt;value&gt;</code></p> <p>Parameters: - <code>value</code>: Transmit delay factor (0-2)</p> <p>Default: <code>0.5</code></p> <p>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. <code>0</code> disables the window entirely.</p>"},{"location":"cli_commands/#view-or-change-the-retransmit-delay-factor-for-direct-traffic","title":"View or change the retransmit delay factor for direct traffic","text":"<p>Usage: - <code>get direct.txdelay</code> - <code>set direct.txdelay &lt;value&gt;</code></p> <p>Parameters: - <code>value</code>: Direct transmit delay factor (0-2)</p> <p>Default: <code>0.3</code> (Repeater) - <code>0.2</code> (Room Server, Sensor)</p> <p>Note: Same collision-avoidance random window as <code>txdelay</code>, 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.</p>"},{"location":"cli_commands/#experimental-view-or-change-the-processing-delay-for-received-traffic","title":"[Experimental] View or change the processing delay for received traffic","text":"<p>Usage: - <code>get rxdelay</code> - <code>set rxdelay &lt;value&gt;</code></p> <p>Parameters: - <code>value</code>: Receive delay base (0-20)</p> <p>Default: <code>0.0</code></p> <p>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.</p>"},{"location":"cli_commands/#view-or-change-the-duty-cycle-limit","title":"View or change the duty cycle limit","text":"<p>Usage: - <code>get dutycycle</code> - <code>set dutycycle &lt;value&gt;</code></p> <p>Parameters: - <code>value</code>: Duty cycle percentage (1-100)</p> <p>Default: <code>50%</code> (equivalent to airtime factor 1.0)</p> <p>Examples: - <code>set dutycycle 100</code> \u2014 no duty cycle limit - <code>set dutycycle 50</code> \u2014 50% duty cycle (default) - <code>set dutycycle 10</code> \u2014 10% duty cycle - <code>set dutycycle 1</code> \u2014 1% duty cycle (strictest EU requirement)</p> <p>Note: Added in firmware v1.15.0</p> <p>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.</p>"},{"location":"cli_commands/#view-or-change-the-airtime-factor-duty-cycle-limit","title":"View or change the airtime factor (duty cycle limit)","text":"<p>Deprecated as of firmware v1.15.0. Use <code>get/set dutycycle</code> instead.</p> <p>Usage: - <code>get af</code> - <code>set af &lt;value&gt;</code></p> <p>Parameters: - <code>value</code>: 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: - <code>af = 1</code> \u2192 ~50% duty - <code>af = 2</code> \u2192 ~33% duty - <code>af = 3</code> \u2192 ~25% duty - <code>af = 9</code> \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).</p> <p>Default: <code>1.0</code></p>"},{"location":"cli_commands/#view-or-change-the-local-interference-threshold","title":"View or change the local interference threshold","text":"<p>Usage: - <code>get int.thresh</code> - <code>set int.thresh &lt;value&gt;</code></p> <p>Parameters: - <code>value</code>: Interference threshold value</p> <p>Default: <code>0.0</code></p>"},{"location":"cli_commands/#enable-or-disable-hardware-channel-activity-detection-cad","title":"Enable or disable hardware Channel Activity Detection (CAD)","text":"<p>Usage: - <code>get cad</code> - <code>set cad &lt;on|off&gt;</code></p> <p>Description: When enabled, the radio performs a hardware Channel Activity Detection scan before transmitting and defers if the channel is busy. Runs independently of <code>int.thresh</code> \u2014 either, both, or none may be active.</p> <p>Parameters: - <code>on|off</code>: Enable or disable hardware CAD</p> <p>Default: <code>off</code></p>"},{"location":"cli_commands/#view-or-change-the-agc-reset-interval","title":"View or change the AGC Reset Interval","text":"<p>Usage: - <code>get agc.reset.interval</code> - <code>set agc.reset.interval &lt;value&gt;</code></p> <p>Parameters: - <code>value</code>: Interval in seconds, 0-1020, rounded down to a multiple of 4 (17 becomes 16). 0 to disable.</p> <p>Default: <code>0.0</code></p>"},{"location":"cli_commands/#radio-silence-watchdog-repeater-sensor-room-server","title":"Radio silence watchdog (repeater, sensor, room server)","text":"<p>Usage: - <code>get radio.silence</code> - <code>set radio.silence &lt;minutes&gt;</code> - <code>get radio.reboots</code></p> <p>Parameters: - <code>minutes</code>: 1-1440, or <code>0</code>/<code>off</code> to disable.</p> <p>Description: Recovers a receiver that has gone deaf while the node keeps running (the hardware watchdog only catches a frozen loop). After <code>minutes</code> 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.</p> <p>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. <code>get radio.silence</code> shows the threshold, the current multiplier, how long the receiver has been quiet and the stage (0 healthy, 1 re-armed). <code>get radio.reboots</code> counts the reboots done by this watchdog; it survives power loss. Pick a threshold well above the longest quiet spell the site normally has.</p> <p>Default: <code>0</code> (off)</p>"},{"location":"cli_commands/#tx-stall-watchdog-repeater","title":"TX stall watchdog (repeater)","text":"<p>Usage: - <code>get radio.txstall</code> - <code>set radio.txstall &lt;minutes&gt;</code></p> <p>Parameters: - <code>minutes</code>: 1-1440, or <code>0</code>/<code>off</code> to disable. Not saved: the build default (<code>RADIO_TXSTALL_MIN</code>) is back after a reboot.</p> <p>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 <code>minutes</code>, 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. <code>get radio.txstall</code> 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 <code>get radio.reboots</code> and are logged with the queue numbers.</p> <p>Default: <code>15</code></p>"},{"location":"cli_commands/#reboot-into-the-bootloader-repeater-sensor-room-server-nrf52-local-console-only","title":"Reboot into the bootloader (repeater, sensor, room server; nRF52, local console only)","text":"<p>Usage: - <code>dfu [uf2|serial|ota]</code></p> <p>Description: Reboots straight into the Adafruit bootloader: <code>uf2</code> (default) brings up the UF2 drive, <code>serial</code> only the CDC port for <code>adafruit-nrfutil</code>, <code>ota</code> BLE DFU. Refused over the mesh, where it would leave the node waiting in the bootloader with no way back.</p>"},{"location":"cli_commands/#why-the-board-last-reset-repeater-sensor-room-server","title":"Why the board last reset (repeater, sensor, room server)","text":"<p>Usage: - <code>get boot</code></p> <p>Description: The reset reason latched at boot (<code>RESETREAS</code> on nRF52: <code>0x1</code> reset pin, <code>0x2</code> watchdog, <code>0x4</code> software reset, <code>0x8</code> lockup, <code>0</code> 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.</p>"},{"location":"cli_commands/#enable-or-disable-multi-acks-support","title":"Enable or disable Multi-Acks support","text":"<p>Usage: - <code>get multi.acks</code> - <code>set multi.acks &lt;state&gt;</code></p> <p>Parameters: - <code>state</code>: <code>0</code> (disable) or <code>1</code> (enable)</p> <p>Default: <code>0</code></p>"},{"location":"cli_commands/#view-or-change-the-flood-advert-interval","title":"View or change the flood advert interval","text":"<p>Usage: - <code>get flood.advert.interval</code> - <code>set flood.advert.interval &lt;hours&gt;</code></p> <p>Parameters: - <code>hours</code>: Interval in hours (3-168)</p> <p>Default: <code>47</code> (Repeater, Room Server) - <code>0</code>, disabled (Sensor)</p>"},{"location":"cli_commands/#view-or-change-the-zero-hop-advert-interval","title":"View or change the zero-hop advert interval","text":"<p>Usage: - <code>get advert.interval</code> - <code>set advert.interval &lt;minutes&gt;</code></p> <p>Parameters: - <code>minutes</code>: Interval in minutes rounded down to the nearest multiple of 2 (61 becomes 60) (60-240)</p> <p>Default: <code>2</code> on a factory-fresh node, then <code>0</code> (disabled) once configured.</p> <p>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 <code>0</code>, 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.</p>"},{"location":"cli_commands/#limit-the-number-of-hops-for-a-flood-message","title":"Limit the number of hops for a flood message","text":"<p>Usage: - <code>get flood.max</code> - <code>set flood.max &lt;value&gt;</code></p> <p>Parameters: - <code>value</code>: Maximum flood hop count (0-64)</p> <p>Default: <code>64</code></p>"},{"location":"cli_commands/#limit-the-number-of-hops-for-an-unscoped-flood-message","title":"Limit the number of hops for an unscoped flood message","text":"<p>Usage: - <code>get flood.max.unscoped</code> - <code>set flood.max.unscoped &lt;value&gt;</code></p> <p>Parameters: - <code>value</code>: Maximum flood hop count (0-64) for a packet without a scope (no region set)</p> <p>Default: <code>64</code> - (<code>0xFF</code> indicates it hasn't been set, will track flood.max until it is.)</p> <p>Note: An alternative to <code>region denyf *</code>, setting <code>flood.max.unscoped</code> to a lower value such as <code>3</code> would allow for local unscoped messages to propagate, while preventing noisy neighbors from flooding a local region.</p>"},{"location":"cli_commands/#limit-the-number-of-hops-for-an-advert-flood-message","title":"Limit the number of hops for an advert flood message","text":"<p>Usage: - <code>get flood.max.advert</code> - <code>set flood.max.advert &lt;value&gt;</code></p> <p>Parameters: - <code>value</code>: Maximum flood hop count (0-64) for an advert packet</p> <p>Default: <code>8</code></p>"},{"location":"cli_commands/#acl","title":"ACL","text":""},{"location":"cli_commands/#add-update-or-remove-permissions-for-a-companion","title":"Add, update or remove permissions for a companion","text":"<p>Usage: - <code>setperm &lt;pubkey&gt; &lt;permissions&gt;</code></p> <p>Parameters: - <code>pubkey</code>: Companion public key - <code>permissions</code>: - <code>0</code>: Guest - <code>1</code>: Read-only - <code>2</code>: Read-write - <code>3</code>: Admin</p> <p>Note: Removes the entry when <code>permissions</code> is omitted</p>"},{"location":"cli_commands/#view-the-current-acl","title":"View the current ACL","text":"<p>Usage: - <code>get acl</code></p> <p>Serial Only: Yes</p>"},{"location":"cli_commands/#view-or-change-this-room-servers-read-only-flag","title":"View or change this room server's 'read-only' flag","text":"<p>Usage: - <code>get allow.read.only</code> - <code>set allow.read.only &lt;state&gt;</code></p> <p>Parameters: - <code>state</code>: <code>on</code> (enable) or <code>off</code> (disable)</p> <p>Default: <code>off</code></p>"},{"location":"cli_commands/#region-management-v110","title":"Region Management (v1.10.+)","text":""},{"location":"cli_commands/#bulk-load-region-lists","title":"Bulk-load region lists","text":"<p>Usage: - <code>region load</code> - <code>region load &lt;name&gt; [flood_flag]</code></p> <p>Parameters: - <code>name</code>: A name of a region. <code>*</code> represents the wildcard region</p> <p>Note: <code>flood_flag</code>: Optional <code>F</code> to allow flooding</p> <p>Note: Indentation creates parent-child relationships (max 8 levels)</p> <p>Note: <code>region load</code> with an empty name will not work remotely (it's interactive)</p>"},{"location":"cli_commands/#save-any-changes-to-regions-made-since-reboot","title":"Save any changes to regions made since reboot","text":"<p>Usage: - <code>region save</code></p>"},{"location":"cli_commands/#allow-a-region","title":"Allow a region","text":"<p>Usage: - <code>region allowf &lt;name&gt;</code></p> <p>Parameters: - <code>name</code>: Region name (or <code>*</code> for wildcard)</p> <p>Note: Setting on wildcard <code>*</code> allows packets without region transport codes</p>"},{"location":"cli_commands/#block-a-region","title":"Block a region","text":"<p>Usage: - <code>region denyf &lt;name&gt;</code></p> <p>Parameters: - <code>name</code>: Region name (or <code>*</code> for wildcard)</p> <p>Note: Setting on wildcard <code>*</code> drops packets without region transport codes</p>"},{"location":"cli_commands/#show-information-for-a-region","title":"Show information for a region","text":"<p>Usage: - <code>region get &lt;name&gt;</code></p> <p>Parameters: - <code>name</code>: Region name (or <code>*</code> for wildcard)</p>"},{"location":"cli_commands/#view-or-change-the-home-region-for-this-node","title":"View or change the home region for this node","text":"<p>Usage: - <code>region home</code> - <code>region home &lt;name&gt;</code></p> <p>Parameters: - <code>name</code>: Region name</p>"},{"location":"cli_commands/#view-or-change-the-default-scope-region-for-this-node","title":"View or change the default scope region for this node","text":"<p>Usage: - <code>region default</code> - <code>region default {name|&lt;null&gt;}</code></p> <p>Parameters: - <code>name</code>: Region name, or to reset/clear"},{"location":"cli_commands/#create-a-new-region","title":"Create a new region","text":"<p>Usage: - <code>region put &lt;name&gt; [parent_name]</code></p> <p>Parameters: - <code>name</code>: Region name - <code>parent_name</code>: Parent region name (optional, defaults to wildcard)</p>"},{"location":"cli_commands/#define-region-hierarchy-single-line","title":"Define region hierarchy (single line)","text":"<p>Usage: - <code>region def &lt;token&gt; [&lt;token&gt; ...]</code></p> <p>Parameters (tokens): Space-separated. A logical cursor starts at the wildcard <code>*</code>.</p> <ul> <li><code>name</code> \u2014 Create <code>name</code> as a child of the current cursor (equivalent to <code>region put name</code> with the cursor as parent). Cursor moves to <code>name</code>.</li> <li><code>name|jump</code> (or <code>name,jump</code>) \u2014 Create <code>name</code> as a child of the current cursor, then move the cursor to <code>jump</code> (must already exist on the node, or have been created earlier in this command). <code>jump</code> is not the parent of <code>name</code>; use this form to pop back up and start another branch.</li> </ul> <p>Behavior: Each created region defaults to flood-allowed (same as <code>region put</code>). The reply is the resulting region tree (same format as bare <code>region</code>); review it before running <code>region save</code> to persist. On error, the reply is <code>Err - ...</code> and any regions placed before the failure remain on the node, just like a partial chain of <code>region put</code>.</p> <p>Existing regions: <code>region def</code> 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, <code>region remove</code> the unwanted regions first.</p> <p>Limits: Repeater serial accepts one line up to 160 characters. For larger trees, split across multiple <code>region def</code> commands; the cursor resets to <code>*</code> between commands, so lead the next command with <code>child|ancestor</code> to reposition. Each token splits at most once on <code>|</code> \u2014 <code>region def a|b|c|d</code> is not a flat-list shorthand; see the flat-list example below.</p> <p>Example \u2014 linear chain (each token becomes a child of the previous): <pre><code>region def a b c d e\nregion save\n</code></pre></p> <p>Example \u2014 branched tree (equivalent to <code>region put a</code>, <code>region put b a</code>, <code>region put c b</code>, <code>region put d c</code>, <code>region put e b</code>, <code>region put f e</code>): <pre><code>region def a b c d|b e f\nregion save\n</code></pre></p> <p>Example \u2014 error and partial state: <pre><code>region def a b c|nope d\n</code></pre> The reply is <code>Err - unknown jump: nope</code>. <code>a</code>, <code>b</code>, and <code>c</code> were placed before the failure; <code>d</code> was not. Run <code>region</code> to inspect, then re-run with a corrected jump or repair with <code>region remove</code> / <code>region put</code>.</p> <p>Example \u2014 flat list (each region a child of <code>*</code>). Use <code>|*</code> after each token to pop the cursor back to the root before the next token: <pre><code>region def a|* b|* c|* d|* e|* f\nregion save\n</code></pre></p>"},{"location":"cli_commands/#remove-a-region","title":"Remove a region","text":"<p>Usage: - <code>region remove &lt;name&gt;</code></p> <p>Parameters: - <code>name</code>: Region name</p> <p>Note: Must remove all child regions before the region can be removed </p>"},{"location":"cli_commands/#view-all-regions","title":"View all regions","text":"<p>Usage: - <code>region list &lt;filter&gt;</code></p> <p>Serial Only: Yes</p> <p>Parameters: - <code>filter</code>: <code>allowed</code>|<code>denied</code></p> <p>Note: Requires firmware 1.12+</p>"},{"location":"cli_commands/#dump-all-defined-regions-and-flood-permissions","title":"Dump all defined regions and flood permissions","text":"<p>Usage: - <code>region</code></p> <p>Serial Only: For firmware older than 1.12.0</p>"},{"location":"cli_commands/#region-examples","title":"Region Examples","text":"<p>Example 1: Using F Flag with Named Public Region <pre><code>region load\n#Europe F\n&lt;blank line to end region load&gt;\nregion save\n</code></pre></p> <p>Explanation: - Creates a region named <code>#Europe</code> with flooding enabled - Packets from this region will be flooded to other nodes</p> <p>Example 2: Using Wildcard with F Flag <pre><code>region load \n* F\n&lt;blank line to end region load&gt;\nregion save\n</code></pre></p> <p>Explanation: - Creates a wildcard region <code>*</code> with flooding enabled - Enables flooding for all regions automatically - Applies only to packets without transport codes</p> <p>Example 3: Using Wildcard Without F Flag <pre><code>region load \n*\n&lt;blank line to end region load&gt;\nregion save\n</code></pre> Explanation: - Creates a wildcard region <code>*</code> without flooding - This region exists but doesn't affect packet distribution - Used as a default/empty region</p> <p>Example 4: Nested Public Region with F Flag <pre><code>region load \n#Europe F\n #UK\n #London\n #Manchester\n #France\n #Paris\n #Lyon\n&lt;blank line to end region load&gt;\nregion save\n</code></pre></p> <p>Explanation: - Creates <code>#Europe</code> region with flooding enabled - Adds nested child regions (<code>#UK</code>, <code>#France</code>) - All nested regions inherit the flooding flag from parent</p> <p>Example 5: Wildcard with Nested Public Regions <pre><code>region load \n* F\n #NorthAmerica\n #USA\n #NewYork\n #California\n #Canada\n #Ontario\n #Quebec\n&lt;blank line to end region load&gt;\nregion save\n</code></pre></p> <p>Explanation: - Creates wildcard region <code>*</code> with flooding enabled - Adds nested <code>#NorthAmerica</code> hierarchy - Enables flooding for all child regions automatically - Useful for global networks with specific regional rules</p>"},{"location":"cli_commands/#gps-when-gps-support-is-compiled-in","title":"GPS (When GPS support is compiled in)","text":""},{"location":"cli_commands/#view-gps-state","title":"View GPS state","text":"<p>Usage: - <code>gps</code></p> <p>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, <code>waiting</code> means the receiver is off between acquisitions; the last fix remains available. <code>off(hw)</code> means a hardware GPS switch is off.</p>"},{"location":"cli_commands/#change-gps-state","title":"Change GPS state","text":"<p>Usage: - <code>gps &lt;state&gt;</code></p> <p>Parameters: - <code>state</code>: <code>on</code>|<code>off</code>|<code>duty</code></p> <p>Default: <code>off</code></p> <p>Note: In duty-cycle mode <code>gps</code> answers <code>duty, {awake|asleep}, {fix|no fix}, {sat count} sats</code>.</p> <p><code>gps duty</code> 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 <code>gps period</code>, 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 <code>gps period</code> to 0. The position still comes from prefs (see <code>set advert.loc</code>), so duty mode does not affect what a repeater advertises. <code>gps on</code> / <code>gps off</code> leave duty mode. Build-time knobs: <code>GPS_DUTY_SYNC_INTERVAL_SECS</code> (86400), <code>GPS_DUTY_MAX_AWAKE_SECS</code> (300, the cap on one attempt) and <code>GPS_DUTY_RETRY_SECS</code> (21600, backoff after a window with no fix).</p>"},{"location":"cli_commands/#view-or-change-the-gps-acquisition-period","title":"View or change the GPS acquisition period","text":"<p>Usage: - <code>gps period</code> - <code>gps period &lt;value&gt;</code></p> <p>Parameters: - <code>value</code>: <code>0</code> for continuous tracking, or a period. The value can be postfixed with <code>s</code>, <code>m</code>, <code>h</code> or <code>d</code> to specify the unit (seconds by default).</p> <p>Note: A periodic acquisition stops after receiving a valid fix, then resumes after the configured period. Without a fix it stops after 5 minutes (<code>GPS_PERIODIC_ACQUISITION_TIMEOUT_MS</code>), or, until the first fix since boot, after the first fix timeout (see <code>gps firstfix</code>).</p>"},{"location":"cli_commands/#view-or-change-the-first-fix-timeout","title":"View or change the first fix timeout","text":"<p>Usage: - <code>gps firstfix</code> - <code>gps firstfix &lt;value&gt;</code></p> <p>Parameters: - <code>value</code>: <code>0</code> for no limit, or a duration up to <code>1d</code>. The value can be postfixed with <code>s</code>, <code>m</code>, <code>h</code> or <code>d</code> to specify the unit (seconds by default).</p> <p>Default: <code>1h</code> (<code>GPS_FIRST_FIX_TIMEOUT_MS</code>)</p> <p>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.</p>"},{"location":"cli_commands/#view-the-last-gps-fix","title":"View the last GPS fix","text":"<p>Usage: - <code>gps fix</code></p> <p>Output: - <code>&gt; Fix (n sat): &lt;lat&gt;, &lt;lon&gt;</code>: the GPS currently has a fix. - <code>&gt; Last fix &lt;age&gt; ago (n sat)[, acq &lt;time&gt;]: &lt;lat&gt;, &lt;lon&gt;</code>: position of the last valid fix; <code>acq</code> is shown only while the receiver is running and shows how for how long the gps has been trying to get a fix. - <code>&gt; No fix[, acq &lt;time&gt;]</code>: no valid fix since the node started.</p> <p>Note: Ages and durations are given in <code>s</code>, <code>m</code> or <code>h</code>.</p>"},{"location":"cli_commands/#sync-this-nodes-clock-with-gps-time","title":"Sync this node's clock with GPS time","text":"<p>Usage: - <code>gps sync</code></p>"},{"location":"cli_commands/#on-demand-gps-fix","title":"On demand GPS fix","text":"<p>Usage: - <code>gps once</code> - <code>gps once -s</code></p> <p>Parameters: - <code>-s</code>: also sync this node's clock with GPS time (as <code>gps sync</code>)</p> <p>Note: Starts an acquisition now. If the GPS is off, it is switched and kept on until a valid fix and then turned off.</p> <p>Reply: <code>OK - turning on and acquiring</code> (GPS was off), <code>OK - waking gps</code> (periodic mode, receiver off between acquisitions) or <code>OK - gps already on</code>. <code>Error, gps hw switch off</code> if a hardware GPS switch is off, <code>Error, gps once not supported</code>.</p>"},{"location":"cli_commands/#view-gps-time-to-first-fix-statistics","title":"View GPS time to first fix statistics","text":"<p>Usage: - <code>gps fix_stats</code></p> <p>Output: <code>&gt; ttf:&lt;last&gt;/&lt;max&gt; ok:&lt;n&gt; miss:&lt;n&gt;</code>: 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 (<code>ok</code>) or without one (<code>miss</code>).</p>"},{"location":"cli_commands/#view-gps-diagnostics","title":"View GPS diagnostics","text":"<p>Usage: - <code>gps diag</code></p>"},{"location":"cli_commands/#gps-anti-spoofing-guard-when-built-with-gps_guard","title":"GPS anti-spoofing guard (When built with <code>GPS_GUARD</code>)","text":"<p>With <code>GPS_GUARD</code>, a fix becomes the node's last fix (position, telemetry, adverts) only after it passes plausibility checks: at least <code>GPS_GUARD_MIN_SATS</code> satellites, HDOP \u2264 <code>GPS_GUARD_MAX_HDOP10</code>/10, inside the optional build-time region (<code>GPS_GUARD_LAT_MIN/MAX</code>, <code>GPS_GUARD_LON_MIN/MAX</code>), within the fence around the node's configured <code>lat</code>/<code>lon</code> (if set), no jump faster than <code>GPS_GUARD_MAX_SPEED_KMH</code>, and <code>GPS_GUARD_STABLE_FIXES</code> consistent fixes in a row. An unverified position is never reported.</p> <p>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 <code>GPS_GUARD_TIME_MAX_STEP</code> seconds for the first sync and within clock drift (<code>GPS_GUARD_TIME_DRIFT_BASE</code> s + <code>GPS_GUARD_TIME_DRIFT_PPM</code>) afterwards. Setting the clock manually (<code>time</code>, <code>clock sync</code>) resets that anchor. A clock outside that window (e.g. a bogus date in 2080) is corrected by the first trusted fix.</p> <p>Covers serial NMEA receivers (<code>MicroNMEALocationProvider</code>).</p> <p>Usage: - <code>gps guard</code>: status, e.g. <code>&gt; ok 7sat time ok +1s</code>, <code>&gt; rej region time rej nofix</code>, <code>&gt; ok 7sat time wait</code> (last check passed, no current trusted fix to check again, e.g. GPS asleep between periodic fixes), or <code>... ALERT gps-clk +3600s 75m</code> when a trusted fix has disagreed with the clock by the same offset for <code>GPS_GUARD_ALERT_MIN</code> minutes. - <code>gps guard on</code>, <code>gps guard off</code>: turn the guard on or off (saved, default on). While off, every fix and GPS time is accepted and <code>gps guard</code> shows <code>off</code>. - <code>gps guard accept</code>: while an alert is active, confirm that the GPS time is right and apply it to the clock. - <code>gps fence</code>, <code>gps fence &lt;metres&gt;</code>: fence radius around the configured <code>lat</code>/<code>lon</code> (<code>0</code> = off). Default <code>GPS_GUARD_FENCE_M</code> (1000); a value set here is saved. - <code>gps ref</code>: the reference position; follows <code>set lat</code>, <code>set lon</code> and <code>gps setloc</code>.</p>"},{"location":"cli_commands/#set-this-nodes-location-based-on-the-gps-coordinates","title":"Set this node's location based on the GPS coordinates","text":"<p>Usage: - <code>gps setloc</code></p>"},{"location":"cli_commands/#view-or-change-the-gps-advert-policy","title":"View or change the GPS advert policy","text":"<p>Usage: - <code>get advert.loc</code> - <code>set advert.loc &lt;policy&gt;</code> - <code>gps advert</code> - <code>gps advert &lt;policy&gt;</code></p> <p>Parameters: - <code>policy</code>: <code>none</code>|<code>share</code>|<code>prefs</code> - <code>none</code>: don't include location in adverts - <code>share</code>: share gps location (from SensorManager) - <code>prefs</code>: location stored in node's lat and lon settings (can be different from gps value)</p> <p>Default: <code>prefs</code></p> <p>Note: <code>gps advert</code> 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 <code>get/set</code> commands instead.</p>"},{"location":"cli_commands/#sensors-when-sensor-support-is-compiled-in","title":"Sensors (When sensor support is compiled in)","text":""},{"location":"cli_commands/#view-the-list-of-sensors-on-this-node","title":"View the list of sensors on this node","text":"<p>Usage: <code>sensor list [start]</code></p> <p>Parameters: - <code>start</code>: Optional starting index (defaults to 0)</p> <p>Note: Output format: <code>&lt;var_name&gt;=&lt;value&gt;\\n</code></p>"},{"location":"cli_commands/#view-or-change-the-value-of-a-sensor","title":"View or change the value of a sensor","text":"<p>Usage: - <code>sensor get &lt;key&gt;</code> - <code>sensor set &lt;key&gt; &lt;value&gt;</code></p> <p>Parameters: - <code>key</code>: Sensor setting name - <code>value</code>: The value to set the sensor to</p>"},{"location":"cli_commands/#set-the-ina-current-sensors-shunt-resistor","title":"Set the INA current sensor's shunt resistor","text":"<p>Usage: - <code>sensor get ina.shunt</code> - <code>sensor set ina.shunt &lt;mOhm&gt;</code></p> <p>Parameters: - <code>mOhm</code>: the shunt on the module, in milliohms (<code>10</code> for a shunt marked <code>R010</code>, <code>100</code> for <code>R100</code>); <code>0</code> = the build's value (100 mOhm unless the build sets <code>TELEM_INA219_SHUNT_VALUE</code> / <code>TELEM_INA226_SHUNT_VALUE</code> / <code>TELEM_INA3221_SHUNT_VALUE</code>)</p> <p>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 <code>ina.shunt</code>. 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).</p>"},{"location":"cli_commands/#bridge-when-bridge-support-is-compiled-in","title":"Bridge (When bridge support is compiled in)","text":""},{"location":"cli_commands/#view-the-compiled-bridge-type","title":"View the compiled bridge type","text":"<p>Usage: <code>get bridge.type</code></p>"},{"location":"cli_commands/#view-or-change-the-bridge-enabled-flag","title":"View or change the bridge enabled flag","text":"<p>Usage: - <code>get bridge.enabled</code> - <code>set bridge.enabled &lt;state&gt;</code></p> <p>Parameters: - <code>state</code>: <code>on</code>|<code>off</code></p> <p>Default: <code>off</code></p>"},{"location":"cli_commands/#add-a-delay-to-packets-routed-through-this-bridge","title":"Add a delay to packets routed through this bridge","text":"<p>Usage: - <code>get bridge.delay</code> - <code>set bridge.delay &lt;ms&gt;</code></p> <p>Parameters: - <code>ms</code>: Delay in milliseconds (0-10000)</p> <p>Default: <code>500</code></p>"},{"location":"cli_commands/#view-or-change-the-source-of-packets-bridged-to-the-external-interface","title":"View or change the source of packets bridged to the external interface","text":"<p>Usage: - <code>get bridge.source</code> - <code>set bridge.source &lt;source&gt;</code></p> <p>Parameters: - <code>source</code>: - <code>logRx</code>: bridges received packets - <code>logTx</code>: bridges transmitted packets</p> <p>Default: <code>logTx</code></p>"},{"location":"cli_commands/#view-or-change-the-speed-of-the-bridge-rs-232-only","title":"View or change the speed of the bridge (RS-232 only)","text":"<p>Usage: - <code>get bridge.baud</code> - <code>set bridge.baud &lt;rate&gt;</code></p> <p>Parameters: - <code>rate</code>: Baud rate (<code>9600</code>, <code>19200</code>, <code>38400</code>, <code>57600</code>, or <code>115200</code>)</p> <p>Default: <code>115200</code></p>"},{"location":"cli_commands/#view-or-change-the-channel-used-for-bridging-espnow-only","title":"View or change the channel used for bridging (ESPNow only)","text":"<p>Usage: - <code>get bridge.channel</code> - <code>set bridge.channel &lt;channel&gt;</code></p> <p>Parameters: - <code>channel</code>: Channel number (1-14)</p>"},{"location":"cli_commands/#set-the-esp-now-secret","title":"Set the ESP-Now secret","text":"<p>Usage: - <code>get bridge.secret</code> - <code>set bridge.secret &lt;secret&gt;</code></p> <p>Parameters: - <code>secret</code>: ESP-NOW bridge secret, up to 15 characters</p> <p>Default: Varies by board</p>"},{"location":"cli_commands/#view-the-bootloader-version-nrf52-only","title":"View the bootloader version (nRF52 only)","text":"<p>Usage: <code>get bootloader.ver</code></p>"},{"location":"cli_commands/#view-power-management-support","title":"View power management support","text":"<p>Usage: <code>get pwrmgt.support</code></p>"},{"location":"cli_commands/#view-the-current-power-source","title":"View the current power source","text":"<p>Usage: <code>get pwrmgt.source</code></p> <p>Note: Returns an error on boards without power management support.</p>"},{"location":"cli_commands/#view-the-boot-reset-and-shutdown-reasons","title":"View the boot reset and shutdown reasons","text":"<p>Usage: <code>get pwrmgt.bootreason</code></p> <p>Note: Returns an error on boards without power management support.</p>"},{"location":"cli_commands/#view-the-boot-voltage","title":"View the boot voltage","text":"<p>Usage: <code>get pwrmgt.bootmv</code></p> <p>Note: Returns an error on boards without power management support.</p>"},{"location":"cli_commands/#ethernet-when-ethernet-support-is-compiled-in","title":"Ethernet (when Ethernet support is compiled in)","text":"<p>Ethernet support is available on RAK4631 boards with a RAK13800 (W5100S) Ethernet module. Use the <code>_ethernet</code> firmware variants (e.g. <code>RAK_4631_repeater_ethernet</code>) to enable this feature.</p>"},{"location":"cli_commands/#view-ethernet-connection-status","title":"View Ethernet connection status","text":"<p>Usage: - <code>eth.status</code></p> <p>Output: - <code>ETH: &lt;ip&gt;:&lt;port&gt;</code> when connected (e.g. <code>ETH: 192.168.1.50:23</code>) - <code>ETH: not connected</code> when Ethernet is not active</p> <p>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. <code>nc</code>, PuTTY) to access the same CLI available over serial.</p>"},{"location":"companion_cli/","title":"Companion CLI","text":"<p>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.</p>"},{"location":"companion_cli/#navigation","title":"Navigation","text":"<ul> <li>Operational</li> <li>Configuration</li> <li>System</li> <li>Radio</li> <li>GPS</li> <li>BLE</li> <li>Wifi</li> <li>UI</li> </ul>"},{"location":"companion_cli/#operational","title":"Operational","text":""},{"location":"companion_cli/#reboot-the-node","title":"Reboot the node","text":"<p>Usage: - <code>reboot</code></p> <p>Note: No reply is sent.</p>"},{"location":"companion_cli/#power-off-the-node","title":"Power-off the node","text":"<p>Usage: - <code>poweroff</code>, or - <code>shutdown</code></p> <p>Note: No reply is sent.</p>"},{"location":"companion_cli/#configuration","title":"Configuration","text":""},{"location":"companion_cli/#system","title":"System","text":""},{"location":"companion_cli/#view-or-change-this-nodes-name","title":"View or change this node's name","text":"<p>Usage: - <code>get name</code> - <code>set name &lt;name&gt;</code></p> <p>Parameters: - <code>name</code>: Node name</p> <p>Set by build flag: <code>ADVERT_NAME</code></p> <p>Default: Varies by board</p> <p>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.</p>"},{"location":"companion_cli/#view-this-nodes-firmware-version","title":"View this node's firmware version","text":"<p>Usage: <code>ver</code></p>"},{"location":"companion_cli/#configure-this-nodes-timezone","title":"Configure this node's timezone","text":"<p>Usage: - <code>set tz.offset &lt;offset&gt;</code> - <code>get tz.offset</code></p> <p>Parameters: - <code>offset</code>: float value of the offset in hours</p>"},{"location":"companion_cli/#fine-tune-the-battery-reading","title":"Fine-tune the battery reading","text":"<p>Usage: - <code>get adc.multiplier</code> - <code>set adc.multiplier &lt;value&gt;</code></p> <p>Parameters: - <code>value</code>: ADC multiplier (0.0-10.0)</p> <p>Default: <code>0.0</code> (value defined by board)</p> <p>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).</p>"},{"location":"companion_cli/#view-or-change-the-buzzer-state","title":"View or change the buzzer state","text":"<p>Usage: - <code>get buzzer</code> - <code>set buzzer &lt;state&gt;</code></p> <p>Parameters: - <code>state</code>: <code>on</code>|<code>off</code></p> <p>Default: <code>on</code></p> <p>Note: Only available on boards with a buzzer (<code>PIN_BUZZER</code>). This is the same setting as the buzzer toggle in the device UI.</p>"},{"location":"companion_cli/#radio","title":"Radio","text":"<p>Radio parameters are common to all roles and handled by <code>CommonRadioPrefs</code>.</p>"},{"location":"companion_cli/#view-or-change-this-nodes-radio-parameters","title":"View or change this node's radio parameters","text":"<p>Usage: - <code>get radio</code> - <code>set radio &lt;freq&gt;,&lt;bw&gt;,&lt;sf&gt;,&lt;cr&gt;</code></p> <p>Parameters: - <code>freq</code>: Frequency in MHz - <code>bw</code>: Bandwidth in kHz - <code>sf</code>: Spreading factor (5-12) - <code>cr</code>: Coding rate (5-8)</p> <p>Set by build flag: <code>LORA_FREQ</code>, <code>LORA_BW</code>, <code>LORA_SF</code>, <code>LORA_CR</code></p> <p>Default: <code>869.618,62.5,8,5</code></p> <p>Note: Requires reboot to apply</p>"},{"location":"companion_cli/#view-or-change-this-nodes-transmit-power","title":"View or change this node's transmit power","text":"<p>Usage: - <code>get tx</code> - <code>set tx &lt;dbm&gt;</code></p> <p>Parameters: - <code>dbm</code>: Power level in dBm (-9 to 22 on SX126x; meshcore-tth refuses values out of range or not taken by the radio)</p> <p>Set by build flag: <code>LORA_TX_POWER</code></p> <p>Default: Varies by board</p> <p>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.</p>"},{"location":"companion_cli/#view-or-change-this-nodes-frequency","title":"View or change this node's frequency","text":"<p>Usage: - <code>get freq</code> - <code>set freq &lt;frequency&gt;</code></p> <p>Parameters: - <code>frequency</code>: Frequency in MHz</p> <p>Default: <code>869.618</code></p> <p>Note: Requires reboot to apply Serial Only: <code>set freq &lt;frequency&gt;</code></p>"},{"location":"companion_cli/#gps","title":"GPS","text":""},{"location":"companion_cli/#view-gps-state","title":"View GPS state","text":"<p>Usage: - <code>gps</code></p> <p>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, <code>waiting</code> means the receiver is off between acquisitions; the last fix remains available. <code>off(hw)</code> means a hardware GPS switch is off.</p>"},{"location":"companion_cli/#change-gps-state","title":"Change GPS state","text":"<p>Usage: - <code>gps &lt;state&gt;</code></p> <p>Parameters: - <code>state</code>: <code>on</code>|<code>off</code></p>"},{"location":"companion_cli/#view-or-change-the-gps-acquisition-period","title":"View or change the GPS acquisition period","text":"<p>Usage: - <code>gps period</code> - <code>gps period &lt;value&gt;</code></p> <p>Parameters: - <code>value</code>: <code>0</code> for continuous tracking, or a period. The value can be postfixed with <code>s</code>, <code>m</code>, <code>h</code> or <code>d</code> to specify the unit (seconds by default).</p> <p>Note: A periodic acquisition stops after receiving a valid fix, then resumes after the configured period.</p>"},{"location":"companion_cli/#view-the-last-gps-fix","title":"View the last GPS fix","text":"<p>Usage: - <code>gps fix</code></p> <p>Output: - <code>&gt; Fix (n sat): &lt;lat&gt;, &lt;lon&gt;</code>: the GPS currently has a fix. - <code>&gt; Last fix &lt;age&gt; ago (n sat)[, acq &lt;time&gt;]: &lt;lat&gt;, &lt;lon&gt;</code>: position of the last valid fix; <code>acq</code> is shown only while the receiver is running and shows how for how long the gps has been trying to get a fix. - <code>&gt; No fix[, acq &lt;time&gt;]</code>: no valid fix since the node started.</p> <p>Note: Ages and durations are given in <code>s</code>, <code>m</code> or <code>h</code>.</p>"},{"location":"companion_cli/#sync-this-nodes-clock-with-gps-time","title":"Sync this node's clock with GPS time","text":"<p>Usage: - <code>gps sync</code></p>"},{"location":"companion_cli/#on-demand-gps-fix","title":"On demand GPS fix","text":"<p>Usage: - <code>gps once</code> - <code>gps once -s</code></p> <p>Parameters: - <code>-s</code>: also sync this node's clock with GPS time (as <code>gps sync</code>)</p> <p>Note: Starts an acquisition now. If the GPS is off, it is switched and kept on until a valid fix and then turned off.</p> <p>Reply: <code>OK - turning on and acquiring</code> (GPS was off), <code>OK - waking gps</code> (periodic mode, receiver off between acquisitions) or <code>OK - gps already on</code>. <code>Error, gps hw switch off</code> if a hardware GPS switch is off, <code>Error, gps once not supported</code>.</p>"},{"location":"companion_cli/#view-gps-time-to-first-fix-statistics","title":"View GPS time to first fix statistics","text":"<p>Usage: - <code>gps fix_stats</code></p> <p>Output: <code>&gt; ttf:&lt;last&gt;/&lt;max&gt; ok:&lt;n&gt; miss:&lt;n&gt;</code>: 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 (<code>ok</code>) or without one (<code>miss</code>).</p>"},{"location":"companion_cli/#view-gps-diagnostics","title":"View GPS diagnostics","text":"<p>Usage: - <code>gps diag</code></p>"},{"location":"companion_cli/#view-or-change-this-nodes-rx-boosted-gain-mode-sx12xx-and-lr1110","title":"View or change this node's rx boosted gain mode (SX12xx and LR1110)","text":"<p>Usage: - <code>get radio.rxgain</code> - <code>set radio.rxgain &lt;state&gt;</code></p> <p>Parameters: - <code>state</code>: <code>on</code>|<code>off</code></p> <p>Default: <code>on</code></p>"},{"location":"companion_cli/#view-or-change-the-lora-fem-receive-path-gain-state-on-supported-boards","title":"View or change the LoRa FEM receive-path gain state on supported boards","text":"<p>Usage: - <code>get radio.fem.rxgain</code> - <code>set radio.fem.rxgain &lt;state&gt;</code></p> <p>Parameters: - <code>state</code>: <code>on</code>|<code>off</code></p> <p>Notes: - This controls the external LoRa FEM receive-path LNA where the board supports it. - This is separate from <code>radio.rxgain</code>, which controls the radio chip receive gain mode.</p>"},{"location":"companion_cli/#view-or-change-the-lora-fem-transmit-path-gain-state-on-supported-boards","title":"View or change the LoRa FEM transmit-path gain state on supported boards","text":"<p>Usage: - <code>get radio.fem.txgain</code> - <code>set radio.fem.txgain &lt;state&gt;</code></p> <p>Parameters: - <code>state</code>: <code>on</code>|<code>off</code></p> <p>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. <code>on</code> selects PA PL1 high/short and <code>off</code> 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. <code>get</code> reports the configured state, which may lead the hardware until the node next transmits.</p>"},{"location":"companion_cli/#view-or-change-the-duty-cycle-limit","title":"View or change the duty cycle limit","text":"<p>Usage: - <code>get dutycycle</code> - <code>set dutycycle &lt;value&gt;</code></p> <p>Parameters: - <code>value</code>: Duty cycle percentage (1-100)</p> <p>Default: <code>50%</code> (equivalent to airtime factor 1.0)</p> <p>Examples: - <code>set dutycycle 100</code> \u2014 no duty cycle limit - <code>set dutycycle 50</code> \u2014 50% duty cycle (default) - <code>set dutycycle 10</code> \u2014 10% duty cycle - <code>set dutycycle 1</code> \u2014 1% duty cycle (strictest EU requirement)</p> <p>Note: Added in firmware v1.15.0</p>"},{"location":"companion_cli/#view-or-change-the-airtime-factor-duty-cycle-limit","title":"View or change the airtime factor (duty cycle limit)","text":"<p>Deprecated as of firmware v1.15.0. Use <code>get/set dutycycle</code> instead.</p> <p>Usage: - <code>get af</code> - <code>set af &lt;value&gt;</code></p> <p>Parameters: - <code>value</code>: 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: - <code>af = 1</code> \u2192 ~50% duty - <code>af = 2</code> \u2192 ~33% duty - <code>af = 3</code> \u2192 ~25% duty - <code>af = 9</code> \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).</p> <p>Default: <code>1.0</code></p>"},{"location":"companion_cli/#view-or-change-the-local-interference-threshold","title":"View or change the local interference threshold","text":"<p>Usage: - <code>get int.thresh</code> - <code>set int.thresh &lt;value&gt;</code></p> <p>Parameters: - <code>value</code>: Interference threshold value</p> <p>Default: <code>0.0</code></p>"},{"location":"companion_cli/#enable-or-disable-hardware-channel-activity-detection-cad","title":"Enable or disable hardware Channel Activity Detection (CAD)","text":"<p>Usage: - <code>get cad</code> - <code>set cad &lt;on|off&gt;</code></p> <p>Description: When enabled, the radio performs a hardware Channel Activity Detection scan before transmitting and defers if the channel is busy. Runs independently of <code>int.thresh</code> \u2014 either, both, or none may be active.</p> <p>Parameters: - <code>on|off</code>: Enable or disable hardware CAD</p> <p>Default: <code>off</code></p>"},{"location":"companion_cli/#view-or-change-the-agc-reset-interval","title":"View or change the AGC Reset Interval","text":"<p>Usage: - <code>get agc.reset.interval</code> - <code>set agc.reset.interval &lt;value&gt;</code></p> <p>Parameters: - <code>value</code>: Interval in seconds, 0-1020, rounded down to a multiple of 4 (17 becomes 16). 0 to disable.</p> <p>Default: <code>0.0</code></p>"},{"location":"companion_cli/#enable-or-disable-multi-acks-support","title":"Enable or disable Multi-Acks support","text":"<p>Usage: - <code>get multi.acks</code> - <code>set multi.acks &lt;state&gt;</code></p> <p>Parameters: - <code>state</code>: <code>0</code> (disable) or <code>1</code> (enable)</p> <p>Default: <code>0</code></p>"},{"location":"companion_cli/#view-or-change-this-nodes-advert-path-hash-size","title":"View or change this node's advert path hash size","text":"<p>Usage: - <code>get path.hash.mode</code> - <code>set path.hash.mode &lt;value&gt;</code></p> <p>Parameters: - <code>value</code>: Path hash size (0-2) - <code>0</code>: 1 Byte hash size (256 unique ids)[64 max flood] - <code>1</code>: 2 Byte hash size (65,536 unique ids)[32 max flood] - <code>2</code>: 3 Byte hash size (16,777,216 unique ids)[21 max flood] - <code>3</code>: DO NOT USE (Reserved) </p> <p>Default: <code>0</code></p> <p>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 &gt;= 1.14. This feature was added in firmware 1.14</p>"},{"location":"companion_cli/#view-or-change-the-retransmit-delay-factor-for-flood-traffic","title":"View or change the retransmit delay factor for flood traffic","text":"<p>Usage: - <code>get txdelay</code> - <code>set txdelay &lt;value&gt;</code></p> <p>Parameters: - <code>value</code>: Transmit delay factor (0-2)</p> <p>Default: <code>0.5</code></p> <p>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. <code>0</code> disables the window entirely.</p>"},{"location":"companion_cli/#view-or-change-the-retransmit-delay-factor-for-direct-traffic","title":"View or change the retransmit delay factor for direct traffic","text":"<p>Usage: - <code>get direct.txdelay</code> - <code>set direct.txdelay &lt;value&gt;</code></p> <p>Parameters: - <code>value</code>: Direct transmit delay factor (0-2)</p> <p>Default: <code>0.3</code> (Repeater) - <code>0.2</code> (Room Server, Sensor)</p> <p>Note: Same collision-avoidance random window as <code>txdelay</code>, 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.</p>"},{"location":"companion_cli/#experimental-view-or-change-the-processing-delay-for-received-traffic","title":"[Experimental] View or change the processing delay for received traffic","text":"<p>Usage: - <code>get rxdelay</code> - <code>set rxdelay &lt;value&gt;</code></p> <p>Parameters: - <code>value</code>: Receive delay base (0-20)</p> <p>Default: <code>0.0</code></p> <p>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.</p>"},{"location":"companion_cli/#ble","title":"BLE","text":""},{"location":"companion_cli/#change-ble-pin","title":"Change BLE PIN","text":"<p>Usage: - <code>set pin &lt;pin&gt;</code></p> <p>Parameters: - <code>pin</code>: New BLE PIN</p> <p>Set by build flag: <code>BLE_PIN_CODE</code></p>"},{"location":"companion_cli/#change-ble-name","title":"Change BLE name","text":"<p>Usage: - <code>get ble.name</code> - <code>set ble.name &lt;name&gt;</code></p> <p>Parameters: - <code>name</code>: New BLE name</p> <p>Note: By default the BLE name is <code>Meshcore-</code> followed by the node name. If <code>&lt;name&gt;</code> is empty the BLE name will be reset to the aforementioned default. These commands require a reboot to take effect.</p>"},{"location":"companion_cli/#wifi","title":"Wifi","text":""},{"location":"companion_cli/#get-status","title":"Get status","text":"<p>Usage: - <code>get wifi.status</code> - <code>get wifi.ip</code></p>"},{"location":"companion_cli/#toggle","title":"Toggle","text":"<p>Usage: - <code>set wifi.enabled &lt;value&gt;</code> - <code>get wifi.enabled</code></p> <p>Parameters: - <code>value</code>: <code>0</code> (disable) or <code>1</code> (enable)</p>"},{"location":"companion_cli/#set-ssid","title":"Set SSID","text":"<p>Usage: - <code>set wifi.ssid &lt;value&gt;</code> - <code>get wifi.ssid</code></p> <p>Parameters: - <code>value</code>: ssid as a string</p>"},{"location":"companion_cli/#set-password","title":"Set password","text":"<p>Usage: - <code>set wifi.pwd &lt;value&gt;</code> - <code>get wifi.pwd</code></p> <p>Parameters: - <code>value</code>: password string</p>"},{"location":"companion_cli/#ui","title":"UI","text":""},{"location":"companion_cli/#show-clock","title":"Show clock","text":"<p>Usage: - <code>set ui.show_clock &lt;state&gt;</code> - <code>get ui.show_clock</code></p> <p>Parameters: - <code>state</code>: <code>0</code> (disable) or <code>1</code> (enable)</p> <p>Default: <code>0</code> (or <code>UI_SHOW_CLOCK</code> build flag)</p>"},{"location":"companion_cli/#gps-key-action","title":"GPS key action","text":"<p>Usage: - <code>set ui.gps_action &lt;action&gt;</code> - <code>get ui.gps_action</code></p> <p>Parameters: - <code>action</code>: <code>toggle</code> (or <code>0</code>) to switch the GPS on and off, <code>once</code> (or <code>trigger</code>, <code>1</code>) to acquire a fix on demand, as <code>gps once</code></p> <p>Default: <code>toggle</code>, or <code>once</code> on boards with a GPS switch</p> <p>Note: Only used by the <code>ui-new</code> screens for now.</p>"},{"location":"companion_cli/#node-discovery-screen-shows-nodes-names","title":"Node discovery screen shows nodes names","text":"<p>Usage: - <code>set ui.nd_name &lt;state&gt;</code> - <code>get ui.nd_name</code></p> <p>Parameters: - <code>state</code>: <code>1</code> (show name) or <code>0</code> (show pubkey_prefix)</p> <p>Default: <code>1</code></p> <p>Note: When showing name, there is not always enough space to draw both incoming and outgoing snr values.</p>"},{"location":"companion_cli/#auto-off-screen","title":"Auto-off screen","text":"<p>Usage: - <code>set ui.auto_off_delay &lt;delay&gt;</code> - <code>get ui.auto_off_delay</code></p> <p>Parameters: - <code>delay</code>: in seconds (<code>0</code> means always on)</p> <p>Default: <code>15</code> (or set by <code>AUTO_OFF_MILLIS</code> build flag (in ms))</p> <p>Note: On e-ink displays, when turned off, the screen is not necessarily blanked, see <code>ui.auto_off_blank</code> and <code>ui.backlight_delay</code>.</p> <p>When screen is not blanked, it is not refreshed any more. To let the user aware of that, a sleep icon is shown.</p>"},{"location":"companion_cli/#display-backlight-timeout","title":"Display backlight timeout","text":"<p>Usage: - <code>set ui.backlight_delay &lt;delay&gt;</code> - <code>get ui.backlight_delay</code></p> <p>Parameters: - <code>delay</code>: in seconds - <code>0</code> means no timeout - <code>-2</code> means always off - <code>-1</code> means always on</p> <p>Note: When set to <code>0</code>, backlight can only be triggered using backlight btn.</p>"},{"location":"companion_cli/#when-to-turn-backlight-on","title":"When to turn backlight on","text":"<p>Usage: - <code>set ui.backlight_on_keys &lt;state&gt;</code> - <code>get ui.backlight_on_keys</code> - <code>set ui.backlight_on_msgs &lt;state&gt;</code> - <code>get ui.backlight_on_msgs</code></p> <p>Parameters: - <code>state</code>: <code>0</code> (disable) or <code>1</code> (enable)</p> <p>Default: - <code>ui.backlight_on_msgs = 0</code> - <code>ui.backlight_on_keys = 0</code> if there is a backlight button on the board, else <code>1</code></p> <p>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 <code>backlight_delay</code> is set to <code>0</code> then this setting has no effect, backlight won't be turned on.</p>"},{"location":"companion_cli/#control-if-eink-screen-should-be-blanked","title":"Control if eink screen should be blanked","text":"<p>Usage: - <code>set ui.auto_off_blank &lt;state&gt;</code> - <code>get ui.auto_off_blank</code></p> <p>Parameters: - <code>state</code>: <code>0</code> (disable) or <code>1</code> (enable)</p> <p>Default: <code>0</code> (or set by <code>UI_SCREENOFF_BLANK</code> build flag) </p> <p>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).</p> <p>When screen is blanked, the controller is also put into hibernation, which should preserve the screen a little and some battery ...</p>"},{"location":"companion_cli/#keep-message-previews-when-the-eink-screen-turns-off","title":"Keep message previews when the eink screen turns off","text":"<p>Usage: - <code>set ui.auto_off_keep_msgs &lt;state&gt;</code> - <code>get ui.auto_off_keep_msgs</code></p> <p>Parameters: - <code>state</code>: <code>0</code> (disable) or <code>1</code> (enable)</p> <p>Default: <code>1</code></p> <p>Note: Only has an effect when <code>ui.auto_off_blank</code> is enabled. If the message preview screen is showing when the screen turns off, it is left on screen instead of being blanked.</p>"},{"location":"companion_cli/#maximum-number-of-partial-refreshes","title":"Maximum number of partial refreshes","text":"<p>Usage: - <code>set ui.max_partial &lt;value&gt;</code> - <code>get ui.max_partial</code></p> <p>Parmeters: - <code>value</code>: max partial refreshes before doing a full refresh</p> <p>Default: 0 (no partial refresh or set by <code>EINK_MAX_PARTIAL_REFRESH</code> build flag)</p> <p>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 <code>value</code> partial refreshes.</p>"},{"location":"companion_protocol/","title":"Companion Protocol","text":"<ul> <li>Last Updated: 2026-03-08</li> <li>Protocol Version: Companion Firmware v1.12.0+</li> </ul> <p>NOTE: This document is still in development. Some information may be inaccurate.</p> <p>This document provides a comprehensive guide for communicating with MeshCore devices over Bluetooth Low Energy (BLE).</p> <p>It is platform-agnostic and can be used for Android, iOS, Python, JavaScript, or any other platform that supports BLE.</p>"},{"location":"companion_protocol/#official-libraries","title":"Official Libraries","text":"<p>Please see the following repos for existing MeshCore Companion Protocol libraries.</p> <ul> <li>JavaScript: https://github.com/meshcore-dev/meshcore.js</li> <li>Python: https://github.com/meshcore-dev/meshcore_py</li> </ul>"},{"location":"companion_protocol/#important-security-note","title":"Important Security Note","text":"<p>All secrets, hashes, and cryptographic values shown in this guide are example values only.</p> <ul> <li>All hex values, public keys and hashes are for demonstration purposes only</li> <li>Never use example secrets in production</li> <li>Always generate new cryptographically secure random secrets</li> <li>Please implement proper security practices in your implementation</li> <li>This guide is for protocol documentation only</li> </ul>"},{"location":"companion_protocol/#table-of-contents","title":"Table of Contents","text":"<ol> <li>BLE Connection</li> <li>Packet Structure</li> <li>Commands</li> <li>Channel Management</li> <li>Message Handling</li> <li>Response Parsing</li> <li>Example Implementation Flow</li> <li>Best Practices</li> <li>Troubleshooting</li> </ol>"},{"location":"companion_protocol/#ble-connection","title":"BLE Connection","text":""},{"location":"companion_protocol/#service-and-characteristics","title":"Service and Characteristics","text":"<p>MeshCore Companion devices expose a BLE service with the following UUIDs:</p> <ul> <li>Service UUID: <code>6E400001-B5A3-F393-E0A9-E50E24DCCA9E</code></li> <li>RX Characteristic (App \u2192 Firmware): <code>6E400002-B5A3-F393-E0A9-E50E24DCCA9E</code></li> <li>TX Characteristic (Firmware \u2192 App): <code>6E400003-B5A3-F393-E0A9-E50E24DCCA9E</code></li> </ul>"},{"location":"companion_protocol/#connection-steps","title":"Connection Steps","text":"<ol> <li> <p>Scan for Devices</p> <ul> <li>Scan for BLE devices advertising the MeshCore Service UUID</li> <li>Optionally filter by device name (typically contains \"MeshCore\" prefix)</li> <li>Note the device MAC address for reconnection</li> </ul> </li> <li> <p>Connect to GATT</p> <ul> <li>Connect to the device using the discovered MAC address</li> <li>Wait for connection to be established</li> </ul> </li> <li> <p>Discover Services and Characteristics</p> <ul> <li>Discover the service with UUID <code>6E400001-B5A3-F393-E0A9-E50E24DCCA9E</code></li> <li>Discover the RX characteristic <code>6E400002-B5A3-F393-E0A9-E50E24DCCA9E</code><ul> <li>Your app writes to this, the firmware reads from this</li> </ul> </li> <li>Discover the TX characteristic <code>6E400003-B5A3-F393-E0A9-E50E24DCCA9E</code><ul> <li>The firmware writes to this, your app reads from this</li> </ul> </li> </ul> </li> <li> <p>Enable Notifications</p> <ul> <li>Subscribe to notifications on the TX characteristic to receive data from the firmware</li> </ul> </li> <li> <p>Send Initial Commands</p> <ul> <li>Send <code>CMD_APP_START</code> to identify your app to firmware and get radio settings</li> <li>Send <code>CMD_DEVICE_QUERY</code> to fetch device info and negotiate supported protocol versions</li> <li>Send <code>CMD_SET_DEVICE_TIME</code> to set the firmware clock</li> <li>Send <code>CMD_GET_CONTACTS</code> to fetch all contacts</li> <li>Send <code>CMD_GET_CHANNEL</code> multiple times to fetch all channel slots</li> <li>Send <code>CMD_SYNC_NEXT_MESSAGE</code> to fetch the next message stored in firmware</li> <li>Setup listeners for push codes, such as <code>PUSH_CODE_MSG_WAITING</code> or <code>PUSH_CODE_ADVERT</code></li> <li>See Commands section for information on other commands</li> </ul> </li> </ol> <p>Note: MeshCore devices may disconnect after periods of inactivity. Implement auto-reconnect logic with exponential backoff.</p>"},{"location":"companion_protocol/#ble-write-type","title":"BLE Write Type","text":"<p>When writing commands to the RX characteristic, specify the write type:</p> <ul> <li>Write with Response (default): Waits for acknowledgment from device</li> <li>Write without Response: Faster but no acknowledgment</li> </ul> <p>Platform-specific:</p> <ul> <li>Android: Use <code>BluetoothGattCharacteristic.WRITE_TYPE_DEFAULT</code> or <code>WRITE_TYPE_NO_RESPONSE</code></li> <li>iOS: Use <code>CBCharacteristicWriteType.withResponse</code> or <code>.withoutResponse</code></li> <li>Python (bleak): Use <code>write_gatt_char()</code> with <code>response=True</code> or <code>False</code></li> </ul> <p>Recommendation: Use write with response for reliability.</p>"},{"location":"companion_protocol/#mtu-maximum-transmission-unit","title":"MTU (Maximum Transmission Unit)","text":"<p>The default BLE MTU is 23 bytes (20 bytes payload). For larger commands like <code>SET_CHANNEL</code> (50 bytes), you may need to:</p> <ol> <li>Request Larger MTU: Request MTU of 512 bytes if supported<ul> <li>Android: <code>gatt.requestMtu(512)</code></li> <li>iOS: <code>peripheral.maximumWriteValueLength(for:)</code></li> <li>Python (bleak): MTU is negotiated automatically</li> </ul> </li> </ol>"},{"location":"companion_protocol/#command-sequencing","title":"Command Sequencing","text":"<p>Critical: Commands must be sent in the correct sequence:</p> <ol> <li> <p>After Connection:</p> <ul> <li>Wait for BLE connection to be established</li> <li>Wait for services/characteristics to be discovered</li> <li>Wait for notifications to be enabled</li> <li>Now you can safely send commands to the firmware</li> </ul> </li> <li> <p>Command-Response Matching:</p> <ul> <li>Send one command at a time</li> <li>Wait for a response before sending another command</li> <li>Use a timeout (typically 5 seconds)</li> <li>Match response to command by type (e.g: <code>CMD_GET_CHANNEL</code> \u2192 <code>RESP_CODE_CHANNEL_INFO</code>)</li> </ul> </li> </ol>"},{"location":"companion_protocol/#command-queue-management","title":"Command Queue Management","text":"<p>For reliable operation, implement a command queue.</p> <p>Queue Structure:</p> <ul> <li>Maintain a queue of pending commands</li> <li>Track which command is currently waiting for a response</li> <li>Only send next command after receiving response or timeout</li> </ul> <p>Error Handling:</p> <ul> <li>On timeout, clear current command, process next in queue</li> <li>On error, log error, clear current command, process next</li> </ul>"},{"location":"companion_protocol/#packet-structure","title":"Packet Structure","text":"<p>The MeshCore protocol uses a binary format with the following structure:</p> <ul> <li>Commands: Sent from app to firmware via RX characteristic</li> <li>Responses: Received from firmware via TX characteristic notifications</li> <li>All multi-byte integers: Little-endian byte order (except CayenneLPP which is Big-endian)</li> <li>All strings: UTF-8 encoding</li> </ul> <p>Most packets follow this format: <pre><code>[Packet Type (1 byte)] [Data (variable length)]\n</code></pre></p> <p>The first byte indicates the packet type (see Response Parsing).</p>"},{"location":"companion_protocol/#commands","title":"Commands","text":""},{"location":"companion_protocol/#1-app-start","title":"1. App Start","text":"<p>Purpose: Initialize communication with the device. Must be sent first after connection.</p> <p>Command Format: <pre><code>Byte 0: 0x01\nBytes 1-7: Reserved (currently ignored by firmware)\nBytes 8+: Application name (UTF-8, optional)\n</code></pre></p> <p>Example (hex): <pre><code>01 00 00 00 00 00 00 00 6d 63 63 6c 69\n</code></pre></p> <p>Response: <code>PACKET_SELF_INFO</code> (0x05)</p>"},{"location":"companion_protocol/#2-device-query","title":"2. Device Query","text":"<p>Purpose: Query device information.</p> <p>Command Format: <pre><code>Byte 0: 0x16\nByte 1: 0x03\n</code></pre></p> <p>Example (hex): <pre><code>16 03\n</code></pre></p> <p>Response: <code>PACKET_DEVICE_INFO</code> (0x0D) with device information</p>"},{"location":"companion_protocol/#3-get-channel-info","title":"3. Get Channel Info","text":"<p>Purpose: Retrieve information about a specific channel.</p> <p>Command Format: <pre><code>Byte 0: 0x1F\nByte 1: Channel Index (0 .. max_channels-1)\n</code></pre></p> <p>Example (get channel 1): <pre><code>1F 01\n</code></pre></p> <p>Response: <code>PACKET_CHANNEL_INFO</code> (0x12) with channel details</p>"},{"location":"companion_protocol/#4-set-channel","title":"4. Set Channel","text":"<p>Purpose: Create or update a channel on the device.</p> <p>Command Format: <pre><code>Byte 0: 0x20\nByte 1: Channel Index (0 .. max_channels-1)\nBytes 2-33: Channel Name (32 bytes, UTF-8, null-padded)\nBytes 34-49: Secret (16 bytes)\n</code></pre></p> <p>Total Length: 50 bytes</p> <p>Channel Index: - Valid range is <code>0</code> to <code>max_channels - 1</code>. Read <code>max_channels</code> from byte 3 of the <code>PACKET_DEVICE_INFO</code> response; do not assume 8. Builds ship with <code>MAX_GROUP_CHANNELS</code> 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 <code>PACKET_ERROR</code> / <code>ERR_CODE_NOT_FOUND</code>.</p> <p>Channel Name: - UTF-8 encoded - Maximum 32 bytes - Padded with null bytes (0x00) if shorter</p> <p>Secret Field (16 bytes): - Always a real 16-byte key; the firmware derives the channel hash from <code>SHA256(secret)</code> (<code>BaseChatMesh.cpp:936-942</code>). There is no \"no secret\" form. - Do not write an all-zero secret. <code>SHA256</code> 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 (<code>BaseChatMesh.cpp:392-401</code>), 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 <code>izOH6cXN6mrJ5e26oRXNcg==</code> (base64), i.e. <code>8b3387e9c5cdea6ac9e5edbaa115cd72</code> in hex.</p> <p>Example (create channel \"YourChannelName\" at index 1 with secret): <pre><code>20 01 53 4D 53 00 00 ... (name padded to 32 bytes)\n [16 bytes of secret]\n</code></pre></p> <p>Note: The 32-byte secret variant is unsupported and returns <code>PACKET_ERROR</code>.</p> <p>Response: <code>PACKET_OK</code> (0x00) on success, <code>PACKET_ERROR</code> (0x01) on failure</p>"},{"location":"companion_protocol/#5-send-channel-message","title":"5. Send Channel Message","text":"<p>Purpose: Send a text message to a channel.</p> <p>Command Format: <pre><code>Byte 0: 0x03\nByte 1: 0x00\nByte 2: Channel Index (0 .. max_channels-1)\nBytes 3-6: Timestamp (32-bit little-endian Unix timestamp, seconds)\nBytes 7+: Message Text (UTF-8, variable length)\n</code></pre></p> <p>Timestamp: Unix timestamp in seconds (32-bit unsigned integer, little-endian)</p> <p>Example (send \"Hello\" to channel 1 at timestamp 1234567890): <pre><code>03 00 01 D2 02 96 49 48 65 6C 6C 6F\n</code></pre></p> <p>Response: <code>PACKET_MSG_SENT</code> (0x06) on success</p>"},{"location":"companion_protocol/#6-send-channel-data-datagram","title":"6. Send Channel Data Datagram","text":"<p>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.</p> <p>Command Format: <pre><code>Byte 0: 0x3E\nByte 1: Channel Index (0 .. max_channels-1)\nByte 2: Path Length (0xFF = flood, otherwise actual path length)\nBytes 3 .. 2+path_len: Path (omitted when path_len == 0xFF)\nNext 2 bytes (little-endian): Data Type (`data_type`, uint16)\nRemaining bytes: Binary payload (variable length)\n</code></pre></p> <p>Example (flood, <code>DATA_TYPE_DEV</code>, payload <code>A1 B2 C3</code>, channel 1): <pre><code>3E 01 FF FF FF A1 B2 C3\n</code></pre></p> <p>Data Type / Transport Mapping: - <code>0x0000</code> (<code>DATA_TYPE_RESERVED</code>) is invalid and rejected with <code>PACKET_ERROR</code>. - <code>0xFFFF</code> (<code>DATA_TYPE_DEV</code>) is the developer namespace for experimenting and developing apps. - Values <code>0x0001</code>\u2013<code>0xFFFE</code> are available for registered application/community namespaces. See the Registered data_type values table below.</p> <p>Limits: - Maximum payload length is 165 bytes \u2014 <code>MAX_GROUP_DATA_LENGTH = MAX_PACKET_PAYLOAD - CIPHER_BLOCK_SIZE - 3</code> (<code>src/MeshCore.h:21</code>). 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 <code>MAX_CHANNEL_DATA_LENGTH = MAX_FRAME_SIZE - 9 = 167</code> (<code>companion_radio/MyMesh.cpp:1265</code>); the radio-side check uses 165 (<code>BaseChatMesh.cpp:544</code>). - Payloads above 167 are rejected with <code>ERR_CODE_ILLEGAL_ARG</code> (6). - Payloads of 166 or 167 pass the frame check, then fail the radio-side check and return <code>ERR_CODE_TABLE_FULL</code> (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.</p> <p>Response: <code>PACKET_OK</code> (0x00) on success, or <code>PACKET_ERROR</code> (0x01) with one of: - <code>ERR_CODE_NOT_FOUND</code> (2) \u2014 unknown <code>channel_idx</code> - <code>ERR_CODE_ILLEGAL_ARG</code> (6) \u2014 invalid <code>path_len</code>, reserved <code>data_type</code> (<code>0x0000</code>), or payload larger than <code>MAX_CHANNEL_DATA_LENGTH</code> (167) - <code>ERR_CODE_TABLE_FULL</code> (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)</p> <p>Inbound datagrams are delivered to the host via <code>RESP_CODE_CHANNEL_DATA_RECV</code> (0x1B); see Receive Channel Data Datagram.</p>"},{"location":"companion_protocol/#registered-data_type-values","title":"Registered <code>data_type</code> values","text":"<p><code>data_type</code> 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 <code>data_type</code> is transported opaquely.</p> Value Constant Purpose 0x0000 <code>DATA_TYPE_RESERVED</code> 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 <code>DATA_TYPE_DEV</code> Developer/experimental namespace <p>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.</p>"},{"location":"companion_protocol/#receive-channel-data-datagram","title":"Receive Channel Data Datagram","text":"<p>Inbound group datagrams (radio-level <code>PAYLOAD_TYPE_GRP_DATA</code>, 0x06) are forwarded to the host as <code>RESP_CODE_CHANNEL_DATA_RECV</code> notifications.</p> <p>Frame Format (<code>RESP_CODE_CHANNEL_DATA_RECV</code>, 0x1B): <pre><code>Byte 0: 0x1B (packet type)\nByte 1: SNR (signed int8, scaled \u00d74 \u2014 divide by 4.0 to recover dB)\nBytes 2-3: Reserved (clients MUST ignore)\nByte 4: Channel Index (0 .. max_channels-1)\nByte 5: Path Length (actual path length when flooded, otherwise 0xFF for direct)\nBytes 6-7: Data Type (uint16 little-endian)\nByte 8: Data Length\nBytes 9 .. 8+data_len: Payload\n</code></pre></p> <p>Path bytes are not forwarded: Only <code>path_len</code> 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 <code>path_len</code>.</p> <p>Path Length semantics differ between send and receive:</p> Direction <code>path_len = 0xFF</code> <code>path_len \u2260 0xFF</code> 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 = <code>hash_count \u00d7 hash_size</code>) Receive Packet arrived via direct route Packet was flooded; this is the encoded <code>pkt-&gt;path_len</code> field as observed (no path bytes follow) <p>In other words, the meaning of <code>0xFF</code> is inverted between the two directions, and on receive the field carries metadata only \u2014 never a routable path. <code>path_len</code> is an encoded byte (see <code>Packet::isValidPathLen</code> / <code>Packet::writePath</code> in <code>src/Packet.cpp</code>), not a raw byte count.</p> <p>Note: The device may also emit <code>PACKET_MESSAGES_WAITING</code> (0x83) to notify the host that datagrams are queued; poll with <code>CMD_SYNC_NEXT_MESSAGE</code> (0x0A) to retrieve them.</p> <p>Parsing Pseudocode: <pre><code>def parse_channel_data_recv(data):\n if len(data) &lt; 9:\n return None\n snr_byte = data[1]\n snr = (snr_byte if snr_byte &lt; 128 else snr_byte - 256) / 4.0\n channel_idx = data[4]\n path_len = data[5]\n data_type = int.from_bytes(data[6:8], 'little')\n data_len = data[8]\n if 9 + data_len &gt; len(data):\n return None\n payload = data[9:9 + data_len]\n return {\n 'snr': snr,\n 'channel_idx': channel_idx,\n 'path_len': path_len,\n 'data_type': data_type,\n 'payload': bytes(payload),\n }\n</code></pre></p>"},{"location":"companion_protocol/#7-get-message","title":"7. Get Message","text":"<p>Purpose: Request the next queued message from the device.</p> <p>Command Format: <pre><code>Byte 0: 0x0A\n</code></pre></p> <p>Example (hex): <pre><code>0A\n</code></pre></p> <p>Response: - <code>PACKET_CHANNEL_MSG_RECV</code> (0x08) or <code>PACKET_CHANNEL_MSG_RECV_V3</code> (0x11) for channel messages - <code>PACKET_CONTACT_MSG_RECV</code> (0x07) or <code>PACKET_CONTACT_MSG_RECV_V3</code> (0x10) for contact messages - <code>PACKET_CHANNEL_DATA_RECV</code> (0x1B) for channel data datagrams - <code>PACKET_NO_MORE_MSGS</code> (0x0A) if no messages available</p> <p>Note: Poll this command periodically to retrieve queued messages. The device may also send <code>PACKET_MESSAGES_WAITING</code> (0x83) as a notification when messages are available.</p>"},{"location":"companion_protocol/#8-get-battery-and-storage","title":"8. Get Battery and Storage","text":"<p>Purpose: Query device battery voltage and storage usage.</p> <p>Command Format: <pre><code>Byte 0: 0x14\n</code></pre></p> <p>Example (hex): <pre><code>14\n</code></pre></p> <p>Response: <code>PACKET_BATTERY</code> (0x0C) with battery millivolts and storage information</p>"},{"location":"companion_protocol/#channel-management","title":"Channel Management","text":""},{"location":"companion_protocol/#channel-types","title":"Channel Types","text":"<ol> <li>Public Channel<ul> <li>Uses a publicly known 16-byte key: <code>8b3387e9c5cdea6ac9e5edbaa115cd72</code></li> <li>Anyone can join this channel, messages should be considered public</li> <li>Used as the default public group chat</li> </ul> </li> <li>Hashtag Channels<ul> <li>Uses a secret key derived from the channel name</li> <li>It is the first 16 bytes of <code>sha256(\"#test\")</code></li> <li>For example hashtag channel <code>#test</code> has the key: <code>9cd8fcf22a47333b591d96a2b848b73f</code></li> <li>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.</li> <li>Used as a topic based public group chat, separate from the default public channel</li> </ul> </li> <li>Private Channels<ul> <li>Uses a randomly generated 16-byte secret key</li> <li>Messages should be considered private between those that know the secret</li> <li>Users should keep the key secret, and only share with those you want to communicate with</li> <li>Used as a secure private group chat</li> </ul> </li> </ol>"},{"location":"companion_protocol/#channel-lifecycle","title":"Channel Lifecycle","text":"<ol> <li>Set Channel:<ul> <li>Fetch all channel slots, and find one with empty name and all-zero secret</li> <li>Generate or provide a 16-byte secret</li> <li>Send <code>CMD_SET_CHANNEL</code> with name and a 16-byte secret</li> </ul> </li> <li>Get Channel:<ul> <li>Send <code>CMD_GET_CHANNEL</code> with channel index</li> <li>Parse <code>RESP_CODE_CHANNEL_INFO</code> response</li> </ul> </li> <li>Delete Channel:<ul> <li>Send <code>CMD_SET_CHANNEL</code> with empty name and all-zero secret</li> <li>Or overwrite with a new channel</li> </ul> </li> </ol>"},{"location":"companion_protocol/#message-handling","title":"Message Handling","text":""},{"location":"companion_protocol/#receiving-messages","title":"Receiving Messages","text":"<p>Messages are received via the TX characteristic (notifications). The device sends:</p> <ol> <li>Channel Messages:</li> <li><code>PACKET_CHANNEL_MSG_RECV</code> (0x08) - Standard format</li> <li> <p><code>PACKET_CHANNEL_MSG_RECV_V3</code> (0x11) - Version 3 with SNR</p> </li> <li> <p>Contact Messages:</p> </li> <li><code>PACKET_CONTACT_MSG_RECV</code> (0x07) - Standard format</li> <li> <p><code>PACKET_CONTACT_MSG_RECV_V3</code> (0x10) - Version 3 with SNR</p> </li> <li> <p>Notifications:</p> </li> <li><code>PACKET_MESSAGES_WAITING</code> (0x83) - Indicates messages are queued</li> </ol>"},{"location":"companion_protocol/#contact-message-format","title":"Contact Message Format","text":"<p>Standard Format (<code>PACKET_CONTACT_MSG_RECV</code>, 0x07): <pre><code>Byte 0: 0x07 (packet type)\nBytes 1-6: Public Key Prefix (6 bytes, hex)\nByte 7: Path Length\nByte 8: Text Type\nBytes 9-12: Timestamp (32-bit little-endian)\nBytes 13-16: Signature (4 bytes, only if txt_type == 2)\nBytes 17+: Message Text (UTF-8)\n</code></pre></p> <p>V3 Format (<code>PACKET_CONTACT_MSG_RECV_V3</code>, 0x10): <pre><code>Byte 0: 0x10 (packet type)\nByte 1: SNR (signed byte, multiplied by 4)\nBytes 2-3: Reserved\nBytes 4-9: Public Key Prefix (6 bytes, hex)\nByte 10: Path Length\nByte 11: Text Type\nBytes 12-15: Timestamp (32-bit little-endian)\nBytes 16-19: Signature (4 bytes, only if txt_type == 2)\nBytes 20+: Message Text (UTF-8)\n</code></pre></p> <p>Parsing Pseudocode: <pre><code>def parse_contact_message(data):\n packet_type = data[0]\n offset = 1\n\n # Check for V3 format\n if packet_type == 0x10: # V3\n snr_byte = data[offset]\n snr = ((snr_byte if snr_byte &lt; 128 else snr_byte - 256) / 4.0)\n offset += 3 # Skip SNR + reserved\n\n pubkey_prefix = data[offset:offset+6].hex()\n offset += 6\n\n path_len = data[offset]\n txt_type = data[offset + 1]\n offset += 2\n\n timestamp = int.from_bytes(data[offset:offset+4], 'little')\n offset += 4\n\n # If txt_type == 2, skip 4-byte signature\n if txt_type == 2:\n offset += 4\n\n message = data[offset:].decode('utf-8')\n\n return {\n 'pubkey_prefix': pubkey_prefix,\n 'path_len': path_len,\n 'txt_type': txt_type,\n 'timestamp': timestamp,\n 'message': message,\n 'snr': snr if packet_type == 0x10 else None\n }\n</code></pre></p>"},{"location":"companion_protocol/#channel-message-format","title":"Channel Message Format","text":"<p>Standard Format (<code>PACKET_CHANNEL_MSG_RECV</code>, 0x08): <pre><code>Byte 0: 0x08 (packet type)\nByte 1: Channel Index (0 .. max_channels-1)\nByte 2: Path Length\nByte 3: Text Type\nBytes 4-7: Timestamp (32-bit little-endian)\nBytes 8+: Message Text (UTF-8)\n</code></pre></p> <p>V3 Format (<code>PACKET_CHANNEL_MSG_RECV_V3</code>, 0x11): <pre><code>Byte 0: 0x11 (packet type)\nByte 1: SNR (signed byte, multiplied by 4)\nBytes 2-3: Reserved\nByte 4: Channel Index (0 .. max_channels-1)\nByte 5: Path Length\nByte 6: Text Type\nBytes 7-10: Timestamp (32-bit little-endian)\nBytes 11+: Message Text (UTF-8)\n</code></pre></p> <p>Parsing Pseudocode: <pre><code>def parse_channel_message(data):\n packet_type = data[0]\n offset = 1\n\n # Check for V3 format\n if packet_type == 0x11: # V3\n snr_byte = data[offset]\n snr = ((snr_byte if snr_byte &lt; 128 else snr_byte - 256) / 4.0)\n offset += 3 # Skip SNR + reserved\n\n channel_idx = data[offset]\n path_len = data[offset + 1]\n txt_type = data[offset + 2]\n timestamp = int.from_bytes(data[offset+3:offset+7], 'little')\n message = data[offset+7:].decode('utf-8')\n\n return {\n 'channel_idx': channel_idx,\n 'timestamp': timestamp,\n 'message': message,\n 'snr': snr if packet_type == 0x11 else None\n }\n</code></pre></p>"},{"location":"companion_protocol/#sending-messages","title":"Sending Messages","text":"<p>Use the <code>SEND_CHANNEL_MESSAGE</code> command (see Commands).</p> <p>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\")</p>"},{"location":"companion_protocol/#response-parsing","title":"Response Parsing","text":""},{"location":"companion_protocol/#terminology","title":"Terminology","text":"<p>This document uses a spec-level naming convention (<code>PACKET_*</code>) for bytes the firmware sends back to the host. In the firmware source these same values are split across two <code>#define</code> families by purpose:</p> <ul> <li><code>RESP_CODE_*</code> \u2014 direct replies to a command (e.g. <code>RESP_CODE_CHANNEL_DATA_RECV</code> = <code>PACKET_CHANNEL_DATA_RECV</code> = 0x1B).</li> <li><code>PUSH_CODE_*</code> \u2014 asynchronous notifications not tied to a specific command (e.g. <code>PUSH_CODE_MSG_WAITING</code> = <code>PACKET_MESSAGES_WAITING</code> = 0x83).</li> </ul> <p>Byte values are authoritative; names are aliases. When reading firmware source, <code>RESP_CODE_X</code> / <code>PUSH_CODE_X</code> correspond to this doc's <code>PACKET_X</code> of the same numeric value.</p>"},{"location":"companion_protocol/#packet-types","title":"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)"},{"location":"companion_protocol/#parsing-responses","title":"Parsing Responses","text":"<p>PACKET_OK (0x00): <pre><code>Byte 0: 0x00\nBytes 1-4: Optional value (32-bit little-endian integer)\n</code></pre></p> <p>PACKET_ERROR (0x01): <pre><code>Byte 0: 0x01\nByte 1: Error code (optional)\n</code></pre></p> <p>PACKET_CHANNEL_INFO (0x12): <pre><code>Byte 0: 0x12\nByte 1: Channel Index\nBytes 2-33: Channel Name (32 bytes, null-terminated)\nBytes 34-49: Secret (16 bytes)\n</code></pre></p> <p>Note: The device returns the 16-byte channel secret in this response.</p> <p>PACKET_DEVICE_INFO (0x0D): <pre><code>Byte 0: 0x0D\nByte 1: Firmware Version (uint8)\nBytes 2+: Variable length based on firmware version\n\nFor firmware version &gt;= 3:\nByte 2: Max Contacts Raw (uint8, actual = value * 2)\nByte 3: Max Channels (uint8)\nBytes 4-7: BLE PIN (32-bit little-endian)\nBytes 8-19: Firmware Build (12 bytes, UTF-8, null-padded)\nBytes 20-59: Model (40 bytes, UTF-8, null-padded)\nBytes 60-79: Version (20 bytes, UTF-8, null-padded)\nByte 80: Client repeat enabled/preferred (firmware v9+)\nByte 81: Path hash mode (firmware v10+)\n</code></pre></p> <p>Parsing Pseudocode: <pre><code>def parse_device_info(data):\n if len(data) &lt; 2:\n return None\n\n fw_ver = data[1]\n info = {'fw_ver': fw_ver}\n\n if fw_ver &gt;= 3 and len(data) &gt;= 80:\n info['max_contacts'] = data[2] * 2\n info['max_channels'] = data[3]\n info['ble_pin'] = int.from_bytes(data[4:8], 'little')\n info['fw_build'] = data[8:20].decode('utf-8').rstrip('\\x00').strip()\n info['model'] = data[20:60].decode('utf-8').rstrip('\\x00').strip()\n info['ver'] = data[60:80].decode('utf-8').rstrip('\\x00').strip()\n\n return info\n</code></pre></p> <p>PACKET_BATTERY (0x0C): <pre><code>Byte 0: 0x0C\nBytes 1-2: Battery Voltage (16-bit little-endian, millivolts)\nBytes 3-6: Used Storage (32-bit little-endian, KB)\nBytes 7-10: Total Storage (32-bit little-endian, KB)\n</code></pre></p> <p>Parsing Pseudocode: <pre><code>def parse_battery(data):\n if len(data) &lt; 3:\n return None\n\n mv = int.from_bytes(data[1:3], 'little')\n info = {'battery_mv': mv}\n\n if len(data) &gt;= 11:\n info['used_kb'] = int.from_bytes(data[3:7], 'little')\n info['total_kb'] = int.from_bytes(data[7:11], 'little')\n\n return info\n</code></pre></p> <p>PACKET_SELF_INFO (0x05): <pre><code>Byte 0: 0x05\nByte 1: Advertisement Type\nByte 2: TX Power\nByte 3: Max TX Power\nBytes 4-35: Public Key (32 bytes, hex)\nBytes 36-39: Advertisement Latitude (32-bit little-endian, divided by 1e6)\nBytes 40-43: Advertisement Longitude (32-bit little-endian, divided by 1e6)\nByte 44: Multi ACKs\nByte 45: Advertisement Location Policy\nByte 46: Telemetry Mode (bitfield)\nByte 47: Manual Add Contacts (bool)\nBytes 48-51: Radio Frequency (32-bit little-endian, divided by 1000.0)\nBytes 52-55: Radio Bandwidth (32-bit little-endian, divided by 1000.0)\nByte 56: Radio Spreading Factor\nByte 57: Radio Coding Rate\nBytes 58+: Device Name (UTF-8, variable length, no null terminator required)\n</code></pre></p> <p>Parsing Pseudocode: <pre><code>def parse_self_info(data):\n if len(data) &lt; 36:\n return None\n\n offset = 1\n info = {\n 'adv_type': data[offset],\n 'tx_power': data[offset + 1],\n 'max_tx_power': data[offset + 2],\n 'public_key': data[offset + 3:offset + 35].hex()\n }\n offset += 35\n\n lat = int.from_bytes(data[offset:offset+4], 'little') / 1e6\n lon = int.from_bytes(data[offset+4:offset+8], 'little') / 1e6\n info['adv_lat'] = lat\n info['adv_lon'] = lon\n offset += 8\n\n info['multi_acks'] = data[offset]\n info['adv_loc_policy'] = data[offset + 1]\n telemetry_mode = data[offset + 2]\n info['telemetry_mode_env'] = (telemetry_mode &gt;&gt; 4) &amp; 0b11\n info['telemetry_mode_loc'] = (telemetry_mode &gt;&gt; 2) &amp; 0b11\n info['telemetry_mode_base'] = telemetry_mode &amp; 0b11\n info['manual_add_contacts'] = data[offset + 3] &gt; 0\n offset += 4\n\n freq = int.from_bytes(data[offset:offset+4], 'little') / 1000.0\n bw = int.from_bytes(data[offset+4:offset+8], 'little') / 1000.0\n info['radio_freq'] = freq\n info['radio_bw'] = bw\n info['radio_sf'] = data[offset + 8]\n info['radio_cr'] = data[offset + 9]\n offset += 10\n\n if offset &lt; len(data):\n name_bytes = data[offset:]\n info['name'] = name_bytes.decode('utf-8').rstrip('\\x00').strip()\n\n return info\n</code></pre></p> <p>PACKET_MSG_SENT (0x06): <pre><code>Byte 0: 0x06\nByte 1: Route Flag (0 = direct, 1 = flood)\nBytes 2-5: Tag / Expected ACK (4 bytes, little-endian)\nBytes 6-9: Suggested Timeout (32-bit little-endian, milliseconds)\n</code></pre></p> <p>PACKET_ACK (0x82): <pre><code>Byte 0: 0x82\nBytes 1-6: ACK Code (6 bytes, hex)\n</code></pre></p>"},{"location":"companion_protocol/#error-codes","title":"Error Codes","text":"<p><code>PACKET_ERROR</code> (0x01) carries a single-byte error code in byte 1. Values match the <code>ERR_CODE_*</code> constants defined in <code>examples/companion_radio/MyMesh.cpp</code>:</p> Code Constant (firmware) Description 1 <code>ERR_CODE_UNSUPPORTED_CMD</code> Unknown or unsupported command byte / sub-command 2 <code>ERR_CODE_NOT_FOUND</code> Target not found (channel, contact, message, etc.) 3 <code>ERR_CODE_TABLE_FULL</code> Internal queue or table is full \u2014 retry later 4 <code>ERR_CODE_BAD_STATE</code> Operation not valid in current device state (e.g. iterator already running) 5 <code>ERR_CODE_FILE_IO_ERROR</code> Filesystem or storage I/O failure 6 <code>ERR_CODE_ILLEGAL_ARG</code> Invalid argument (bad length, out-of-range value, reserved field, etc.) <p>Note: Error codes may vary by firmware version. Always check byte 1 of <code>PACKET_ERROR</code> response, and treat unknown codes as generic errors.</p>"},{"location":"companion_protocol/#frame-handling","title":"Frame Handling","text":"<p>BLE implementations enqueue and deliver one protocol frame per BLE write/notification at the firmware layer.</p> <ul> <li>Apps should treat each characteristic write/notification as exactly one companion protocol frame</li> <li>Apps should still validate frame lengths before parsing</li> <li>Future transports or firmware revisions may differ, so avoid assuming fixed payload sizes for variable-length responses</li> </ul>"},{"location":"companion_protocol/#response-handling","title":"Response Handling","text":"<ol> <li>Command-Response Pattern:</li> <li>Send command via RX characteristic</li> <li>Wait for response via TX characteristic (notification)</li> <li>Match response to command using sequence numbers or command type</li> <li>Handle timeout (typically 5 seconds)</li> <li> <p>Use command queue to prevent concurrent commands</p> </li> <li> <p>Asynchronous Messages:</p> </li> <li>Device may send messages at any time via TX characteristic</li> <li>Handle <code>PACKET_MESSAGES_WAITING</code> (0x83) by polling <code>GET_MESSAGE</code> command</li> <li>Parse incoming messages and route to appropriate handlers</li> <li> <p>Validate frame length before decoding</p> </li> <li> <p>Response Matching:</p> </li> <li> <p>Match responses to commands by expected packet type:</p> <ul> <li><code>APP_START</code> \u2192 <code>PACKET_SELF_INFO</code></li> <li><code>DEVICE_QUERY</code> \u2192 <code>PACKET_DEVICE_INFO</code></li> <li><code>GET_CHANNEL</code> \u2192 <code>PACKET_CHANNEL_INFO</code></li> <li><code>SET_CHANNEL</code> \u2192 <code>PACKET_OK</code> or <code>PACKET_ERROR</code></li> <li><code>SEND_CHANNEL_MESSAGE</code> \u2192 <code>PACKET_MSG_SENT</code></li> <li><code>GET_MESSAGE</code> \u2192 <code>PACKET_CHANNEL_MSG_RECV</code>, <code>PACKET_CONTACT_MSG_RECV</code>, <code>PACKET_CHANNEL_DATA_RECV</code>, or <code>PACKET_NO_MORE_MSGS</code></li> <li><code>SEND_CHANNEL_DATA</code> \u2192 <code>PACKET_OK</code> or <code>PACKET_ERROR</code></li> <li><code>GET_BATTERY</code> \u2192 <code>PACKET_BATTERY</code></li> </ul> </li> <li> <p>Timeout Handling:</p> </li> <li>Default timeout: 5 seconds per command</li> <li>On timeout: Log error, clear current command, proceed to next in queue</li> <li>Some commands may take longer (e.g., <code>SET_CHANNEL</code> may need 1-2 seconds)</li> <li> <p>Consider longer timeout for channel operations</p> </li> <li> <p>Error Recovery:</p> </li> <li>On <code>PACKET_ERROR</code>: Log error code, clear current command</li> <li>On connection loss: Clear command queue, attempt reconnection</li> <li>On invalid response: Log warning, clear current command, proceed</li> </ol>"},{"location":"companion_protocol/#example-implementation-flow","title":"Example Implementation Flow","text":""},{"location":"companion_protocol/#initialization","title":"Initialization","text":"<pre><code># 1. Scan for MeshCore device\ndevice = scan_for_device(\"MeshCore\")\n\n# 2. Connect to BLE GATT\ngatt = connect_to_device(device)\n\n# 3. Discover services and characteristics\nservice = discover_service(gatt, \"6E400001-B5A3-F393-E0A9-E50E24DCCA9E\")\nrx_char = discover_characteristic(service, \"6E400002-B5A3-F393-E0A9-E50E24DCCA9E\")\ntx_char = discover_characteristic(service, \"6E400003-B5A3-F393-E0A9-E50E24DCCA9E\")\n\n# 4. Enable notifications on TX characteristic\nenable_notifications(tx_char, on_notification_received)\n\n# 5. Send AppStart command\nsend_command(rx_char, build_app_start())\nwait_for_response(PACKET_SELF_INFO)\n</code></pre>"},{"location":"companion_protocol/#creating-a-private-channel","title":"Creating a Private Channel","text":"<pre><code># 1. Generate 16-byte secret\nsecret_16_bytes = generate_secret(16) # Use CSPRNG\nsecret_hex = secret_16_bytes.hex()\n\n# 2. Build SET_CHANNEL command\nchannel_name = \"YourChannelName\"\nchannel_index = 1 # Use 1-7 for private channels\ncommand = build_set_channel(channel_index, channel_name, secret_16_bytes)\n\n# 3. Send command\nsend_command(rx_char, command)\nresponse = wait_for_response(PACKET_OK)\n\n# 4. Store secret locally\nstore_channel_secret(channel_index, secret_hex)\n</code></pre>"},{"location":"companion_protocol/#sending-a-message","title":"Sending a Message","text":"<pre><code># 1. Build channel message command\nchannel_index = 1\nmessage = \"Hello, MeshCore!\"\ntimestamp = int(time.time())\ncommand = build_channel_message(channel_index, message, timestamp)\n\n# 2. Send command\nsend_command(rx_char, command)\nresponse = wait_for_response(PACKET_MSG_SENT)\n</code></pre>"},{"location":"companion_protocol/#receiving-messages_1","title":"Receiving Messages","text":"<pre><code>def on_notification_received(data):\n packet_type = data[0]\n\n if packet_type == PACKET_CHANNEL_MSG_RECV or packet_type == PACKET_CHANNEL_MSG_RECV_V3:\n message = parse_channel_message(data)\n handle_channel_message(message)\n elif packet_type == PACKET_MESSAGES_WAITING:\n # Poll for messages\n send_command(rx_char, build_get_message())\n</code></pre>"},{"location":"companion_protocol/#best-practices","title":"Best Practices","text":"<ol> <li>Connection Management:</li> <li>Implement auto-reconnect with exponential backoff</li> <li>Handle disconnections gracefully</li> <li> <p>Store last connected device address for quick reconnection</p> </li> <li> <p>Secret Management:</p> </li> <li>Always use cryptographically secure random number generators</li> <li>Store secrets securely (encrypted storage)</li> <li> <p>Never log or transmit secrets in plain text</p> </li> <li> <p>Message Handling:</p> </li> <li>Send <code>CMD_SYNC_NEXT_MESSAGE</code> when <code>PUSH_CODE_MSG_WAITING</code> is received</li> <li> <p>Implement message deduplication to avoid displaying the same message twice</p> </li> <li> <p>Channel Management:</p> <ul> <li>Fetch all channel slots even if you encounter an empty slot</li> <li>Ideally save new channels into the first empty slot</li> </ul> </li> <li> <p>Error Handling:</p> </li> <li>Implement timeouts for all commands (typically 5 seconds)</li> <li>Handle <code>RESP_CODE_ERR</code> responses appropriately</li> </ol>"},{"location":"companion_protocol/#troubleshooting","title":"Troubleshooting","text":""},{"location":"companion_protocol/#connection-issues","title":"Connection Issues","text":"<ul> <li>Device not found: Ensure device is powered on and advertising</li> <li>Connection timeout: Check Bluetooth permissions and device proximity</li> <li>GATT errors: Ensure proper service/characteristic discovery</li> </ul>"},{"location":"companion_protocol/#command-issues","title":"Command Issues","text":"<ul> <li>No response: Verify notifications are enabled, check connection state</li> <li>Error responses: Verify command format and check error code</li> <li>Timeout: Increase timeout value or try again</li> </ul>"},{"location":"companion_protocol/#message-issues","title":"Message Issues","text":"<ul> <li>Messages not received: Poll <code>GET_MESSAGE</code> command periodically</li> <li>Duplicate messages: Implement message deduplication using timestamp/content as a unique id</li> <li>Message truncation: Send long messages as separate shorter messages</li> </ul>"},{"location":"en/","title":"About this fork (meshcore-tth)","text":"<p>\u010cesk\u00e1 verze v\u00fd\u0161e.</p> <p>Warning</p> <p>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 <code>dev</code>, 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).</p> <p>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 <code>main</code> and <code>dev</code> are merged automatically twice a day; everything below is on top of that. Our code is marked <code>CUSTOM (TeTeHacko)</code> in the source. Nothing here changes the wire protocol.</p>"},{"location":"en/#repeater-antispam-all-of-it-off-switchable-none-of-it-upstream","title":"Repeater: antispam (all of it off-switchable, none of it upstream)","text":"<p>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; <code>fairness off</code> switches it off for good. The advert window, the filters and dry-run stay off until you turn them on.</p> <ul> <li>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. <code>fairness [on|off|grid|cap|refill]</code>; direct-routed traffic is never limited.</li> <li>Per-origin advert window -- each node's flood advert forwarded at most once per N hours (<code>fairness advert &lt;h&gt;|clear</code>), ported from DutchMeshCore's AdvertLimiter. Aimed at nodes that re-advertise every minute.</li> <li>Dry-run -- <code>fairness dryrun on</code> counts every verdict but forwards anyway; <code>fairness air</code> reports the airtime shed (or that would be) per reason.</li> <li>Channel filter -- on channels whose key the repeater knows (Public and <code>#hashtag</code> channels), stop forwarding messages of listed sender names (<code>filter add|del|list</code>). Names are spoofable: it contains a runaway bot, it is not security.</li> <li>Channel-hash deny-forward -- <code>filter hash add &lt;hex&gt; [secs]</code>: keyless, works on private channels too; reception is unaffected, only forwarding. With <code>secs</code> the channel is throttled (one packet per <code>secs</code>) instead of cut.</li> <li>Message age limit -- <code>filter age &lt;min&gt;|off</code> (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.</li> <li><code>filter dryrun on</code> counts every <code>filter</code> verdict but forwards anyway.</li> </ul>"},{"location":"en/#diagnostics-and-operations","title":"Diagnostics and operations","text":"<p>Every command of the fork, which builds have it and the defaults: docs/tth-commands.md.</p> <p>Repeater, room server and sensor (everything with a text console) have:</p> <ul> <li>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.</li> <li><code>set radio.silence &lt;min&gt;</code> -- deaf receiver: when the received-frame counter does not move for <code>&lt;min&gt;</code> 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 (<code>0</code>) -- pick a threshold well above the longest normal quiet spell of the site.</li> <li>Stalled TX (repeater only): packets wait in the queue and the sent counter does not move -&gt; re-arm the radio, then reboot. An empty queue never counts. On, 15 min (<code>RADIO_TXSTALL_MIN</code>); <code>set radio.txstall &lt;min&gt;|off</code> holds until the next reboot.</li> <li><code>get radio.reboots</code> -- reboots done by the watchdogs (survives power loss); <code>get boot</code> -- why the board last reset, and the hardfault record (also printed at boot).</li> <li><code>dfu [uf2|serial|ota]</code> -- a deterministic reboot into the bootloader (local console only); <code>i2c</code> -- bus scan.</li> </ul> <p>The repeater also has:</p> <ul> <li><code>blink</code> (flashes the LED, also over the mesh -- finds a node on a mast), <code>txpwr</code> (TX power until reboot, with RadioLib's verdict), TX-failure counters in the status reply.</li> <li>Observer variants only (<code>*-observer</code>): text console over BLE next to USB, <code>ble on|off</code> saved across reboots (<code>RPT_BLE_DEFAULT_OFF</code>: starts off), own BLE PIN (<code>ble pin</code>), persisted connection TX power (<code>blepwr</code>), <code>bleconn</code>, a non-blocking BLE TX pump and connection parameters that hold on a weak link.</li> <li>Also observer variants only: a passive analyzer in the console -- <code>nodes</code> (heard repeaters/rooms, multi-path join key), <code>rxlog</code> (every frame heard, type/path/SNR/RSSI), <code>pktlog</code> (raw frames for an observer feed), big paged replies.</li> <li>Own builds only, not in the releases:</li> <li>channel bot (<code>BOT_CHANNEL_PSK</code>: <code>!link</code>, <code>!path</code>, <code>!snr</code>, <code>!heard</code>, <code>!noise</code>, <code>!ping</code>, <code>!help</code>, narrowed by <code>BOT_COMMANDS</code>, per-sender cooldown, ignore list) -- answers without repeating;</li> <li><code>RADIO_DIAG</code>: <code>radiostat</code> (SX1262 receiver state, hands off) and <code>radiokick rx|clrirq|standby|agc</code> (one recovery step at a time, gentlest first -- the first that helps names the broken layer);</li> <li><code>PIN_DIAG</code>: <code>dio1</code> (the chip's IRQ status against the level on the pin -- which end of a dead DIO1 line is broken);</li> <li><code>LORA_POLL_IRQ</code>: DIO1-less operation for a board with a dead IRQ line.</li> </ul>"},{"location":"en/#core-fixes","title":"Core fixes","text":"<ul> <li>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 <code>reboot</code> reboots the node forever. Repeater, room server and sensor now write it to flash before acting on the command (<code>/s_acl_ts0|1</code>, 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 (<code>ACL_TS_MAX_AHEAD</code>) 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.</li> <li>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 (<code>LOGIN_FAIL_MAX</code>, <code>LOGIN_FAIL_SECS</code>) 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.</li> <li>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.</li> <li>TRACE no longer appends its path past the end of the payload; TRACE/PATH parsing and <code>Packet::readFrom</code> are bounds-checked.</li> <li><code>markSeen</code> is idempotent again (the send path was eating the dedup window).</li> <li><code>calcMaxPacketMillis</code> fallback no longer underflows (a node went deaf on it).</li> <li>Path-hash width comes from the node's prefs on every TX path, including <code>sendZeroHop</code>; 2-byte path hashes are the default (<code>PATH_HASH_MODE_DEFAULT</code>).</li> <li>Failed transmits are re-queued with backoff instead of dropped.</li> <li>Per-packet RSSI captured at RX; <code>ContactInfo</code> zeroed before a partial fill.</li> </ul>"},{"location":"en/#power-clock-gps","title":"Power, clock, GPS","text":"<ul> <li>GPS duty cycle (<code>gps duty</code>), 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.</li> <li>A node without GPS starts at its build epoch, not in 2024; the clock and a hardfault record survive a warm reset (<code>.noinit</code>); <code>clkreboot</code>.</li> <li>No blinking LED and slower BLE advertising on solar nodes.</li> <li>Battery level as an icon at the end of the advertised name: <code>set batt.icon on</code>, thresholds <code>set batt.icon.lo|hi &lt;mV&gt;</code> (off by default; a long name has no room for it and the command says so).</li> <li>Optional RX duty cycle (<code>set radio.rxps off|on|balanced|max</code>, finer <code>level &lt;1-10&gt;</code>; ported from EasySkyMesh PowerSaving): the SX1262 sleeps between short listening windows. Built into the public releases and off; <code>max</code> 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).</li> <li>The nRF52 boot undervoltage lock (<code>PWRMGT_VOLTAGE_BOOTLOCK</code>) 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 <code>SenseCap_Solar_repeater</code> (Li-ion, our masts): the lock is on and both thresholds are settable at runtime, also as an admin over the mesh -- <code>set pwr.bootlock &lt;mV&gt;|off</code> (default 3300; below it the node does not start and sleeps until the cell recovers) and <code>set pwr.cutoff &lt;mV&gt;|off</code> (default off; below it a running node switches off); <code>get pwr</code> (docs/power.md).</li> </ul>"},{"location":"en/#sensors-and-companions","title":"Sensors and companions","text":"<ul> <li><code>simple_sensor</code>: telemetry from an external station over UART (<code>BudkaLinkSensorManager</code>, one LPP channel per meter), <code>sensor read</code>.</li> <li>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: <code>sensor set ina.shunt &lt;mOhm&gt;</code>.</li> <li>Companion: <code>gps duty</code> persists, bounded build-date copy. Private key export, reading the BLE PIN and changing it (CLI <code>set pin</code> 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.</li> </ul>"},{"location":"en/#public-builds-czech-mesh-defaults","title":"Public builds: Czech mesh defaults","text":"<p>Releases built from this repository (<code>pub-release</code>) come preset for the Czech mesh, following the meshcore.cz wiki, so a freshly flashed node does not need the usual round of settings:</p> <ul> <li>radio 869.432 MHz / 62.5 kHz / SF7 / CR5 (all builds);</li> <li>repeater and room server: zero-hop advert off, flood advert every 25 h, 10 % duty cycle (<code>get dutycycle</code> \u2192 <code>10.0%</code>; the deprecated <code>af</code> reads 9);</li> <li>repeater: regions <code>cz</code> and <code>cs</code> next to <code>*</code> -- add your own <code>cz-&lt;kraj&gt;</code> with <code>region put cz-xxx cz</code> + <code>region save</code>;</li> <li>2-byte path hashes (this fork's default);</li> <li>repeater: the channel filter (<code>filter add &lt;name&gt;</code>) is built in for Public, <code>#meshcore</code> and <code>#test</code>, with an empty list -- it does nothing until you add a name.</li> </ul> <p>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.</p> <p>The companion's BLE PIN is the public <code>123456</code> (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.</p> <p>Observer variants (<code>*_repeater-observer-*</code>) of the nRF52 repeaters (XIAO, SenseCAP Solar, RAK4631, T1000-E, Heltec T114) add the <code>nodes</code> / <code>rxlog</code> / <code>pktlog</code> 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 (<code>RPT_BLE_DEFAULT_OFF</code>). It has no login of its own, only the BLE PIN, and the build's PIN is the public placeholder <code>123456</code>. So first set your own -- in the USB console, or as admin over the mesh (remote CLI in the app): <code>ble pin &lt;6 digits&gt;</code> (saved, survives a reboot and a reflash; it also drops every existing bond, so paired devices pair again). Only then <code>ble on</code> -- these builds refuse it while the PIN is still the placeholder. <code>ble</code> shows whether the PIN is <code>own</code> or <code>build default</code>, never the PIN itself. Releases up to <code>tth-654d53f3</code> do not have <code>ble pin</code>: keep BLE off there and use USB.</p>"},{"location":"en/#flashing-a-release","title":"Flashing a release","text":"<p>Every release is an automatic build on upstream <code>dev</code> (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.</p> <p>Files are in Releases. A release is named after the upstream version and the date, e.g. <code>v1.18.0+tth.20261112</code> (a second one that day <code>.2</code>), and its notes list the changes since the previous release. One set per board and role (<code>&lt;board&gt;_&lt;role&gt;-&lt;release&gt;</code>, e.g. <code>Xiao_nrf52_repeater-v1.18.0+tth.20261112.zip</code>): <code>.zip</code> and <code>.uf2</code> for nRF52 boards, <code>.bin</code> for ESP32 (<code>-merged.bin</code> is the full image for a blank board, the plain <code>.bin</code> an update). <code>SHA256SUMS</code> lists the checksums. Releases up to 12. 11. 2026 were named <code>tth-&lt;sha&gt;</code>.</p> <p>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):</p> <ol> <li>Connect the board over USB.</li> <li>Click Custom Firmware and choose the <code>.zip</code> for your board.</li> <li>Click Enter DFU mode and pick the board's serial port. The board restarts into its bootloader and shows up as a new port.</li> <li>Click Flash! and pick that new port. About 30 s, then the board restarts into the new firmware.</li> <li>Console in the flasher (or any serial terminal, 115200) checks the result: <code>ver</code> shows <code>v1.xx.x-tth&lt;sha&gt;</code>, the same as the \"Verze v uzlu\" (node version) line in the release notes.</li> </ol> <p>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.</p> <p>Tried on a XIAO (repeater-observer, 3. 11. 2026). ESP32 <code>.bin</code> through the same Custom Firmware button is untested here.</p> <p>Without the web flasher: on most boards a double-tap of reset opens the bootloader as a USB drive; copy the <code>.uf2</code> onto it. Or <code>adafruit-nrfutil dfu serial -pkg &lt;file&gt;.zip -p &lt;port&gt; -b 115200</code> with the board in the bootloader.</p> <p>After flashing a new node, set it up in the console: <code>set name &lt;name&gt;</code>, <code>password &lt;admin password&gt;</code> (at most 15 characters), your own region with <code>region put cz-&lt;kraj&gt; cz</code> + <code>region save</code>. A repeater forwards from its first boot (upstream default) and these builds are on the live CZ frequency: on a desk without its antenna, <code>set repeat off</code> until it is in place.</p>"},{"location":"en/#experimental-firmware-update-pushed-by-the-admin-ota","title":"Experimental: firmware update pushed by the admin (<code>*-ota</code>)","text":"<p>Every nRF52 build with a text console (repeater, observer, room server, sensor) is in the release once more as an experimental <code>*-ota</code> / <code>*-observer-ota</code> image. It takes a new firmware from its admin with the <code>fw \u2026</code> 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 <code>fw apply</code>, from a routine running in RAM. A power cut during the rewrite leaves it in the bootloader, back via USB/BLE DFU.</p> <ul> <li>Each <code>*-ota</code> image comes with a full package <code>&lt;board&gt;_&lt;role&gt;-ota-&lt;release&gt;.mcfw</code> (USB/BLE only) and a delta <code>\u2026.from-&lt;earlier release&gt;.mcfw</code> from every kept earlier release, typically a few kB.</li> <li>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 (<code>fw apply downgrade</code>). <code>fw apply</code> wants the battery at 3.8 V or more unless the node runs on USB.</li> <li>Packages and <code>SHA256SUMS</code> are signed by <code>meshcore-ota@tth-pub</code>, and an <code>*-ota</code> image accepts no other signature. Checking the downloads: <code>ssh-keygen -Y verify -f tools/ota_allowed_signers -I meshcore-ota@tth-pub -n meshcore-ota -s SHA256SUMS.sig &lt; SHA256SUMS</code>. Your own build with your own key: <code>[ota] pubkey</code> in <code>platformio.local.ini</code>.</li> <li>The first <code>*-ota</code> image is flashed the usual way (above), later ones go as deltas. Tools: <code>tools/ota_push.py</code> (USB), <code>tools/ota_mesh_push.py</code> (over the mesh through a companion; needs the <code>meshcore</code> Python library, takes the admin password from <code>[secrets] admin_pw</code> in <code>platformio.local.ini</code>; <code>--side</code> carries the transfer on a side channel, off the shared mesh), <code>tools/ota_pack.py info</code>. The transfer itself is the OTA engine of the tth.meshcore Ansible collection (module <code>meshcore_fw_ota</code>), 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.</li> <li>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 <code>set radio.silence</code> on for nodes you push to. Costs ~10 kB of RAM.</li> </ul>"},{"location":"en/#build","title":"Build","text":"<ul> <li>Version stamping in every nRF52 env (<code>v1.18.0-tth&lt;sha&gt;</code>, <code>+</code> = dirty tree), base version from the upstream tag (<code>tools/build_version.py</code>).</li> <li><code>tools/</code>: 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 (<code>tools/config.example.ini</code>).</li> <li><code>hardware/cavity-box</code>: parametric enclosure for a cavity filter on a mast.</li> </ul> <p>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.</p>"},{"location":"faq/","title":"Frequently Asked Questions","text":"<p>A list of frequently-asked questions and answers for MeshCore</p> <ul> <li>Frequently Asked Questions</li> <li>1. Introduction<ul> <li>1.1. Q: What is MeshCore?</li> <li>1.2. Q: What do you need to start using MeshCore?<ul> <li>1.2.1. Hardware</li> <li>1.2.2. Firmware</li> <li>1.2.3. Companion Radio Firmware</li> <li>1.2.4. Repeater</li> <li>1.2.5. Room Server</li> </ul> </li> </ul> </li> <li>2. Initial Setup<ul> <li>2.1. Q: How many devices do I need to start using MeshCore?</li> <li>2.2. Q: Does MeshCore cost any money?</li> <li>2.3. Q: What frequencies are supported by MeshCore?</li> <li>2.4. Q: What is an \"advert\" in MeshCore?</li> <li>2.5. Q: Is there a hop limit?</li> </ul> </li> <li>3. Server Administration<ul> <li>3.1. Q: How do you configure a repeater or a room server?</li> <li>3.2. Q: Do I need to set the location for a repeater?</li> <li>3.3. Q: What is the password to administer a repeater or a room server?</li> <li>3.4. Q: What is the password to join a room server?</li> <li>3.5. Q: Can I retrieve a repeater's private key or set a repeater's private key?</li> <li>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?</li> <li>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?</li> <li>3.8. Q: How do I make my repeater an observer on the mesh?</li> <li>3.9. Q: What is multibyte support? What do 1-byte, 2-byte, 3-byte adverts and messages mean?</li> <li>3.9.1. Q: What path hash sizes will my repeater forward?</li> <li>3.9.2. Q: What determines a packet's path hash size?</li> <li>3.9.3. Q: How do I change my companion's path hash size?</li> <li>3.9.4. Q: What does the CLI command <code>path.hash.mode</code> do on a repeater?</li> <li>3.9.5. Q: Why use 2- or 3-byte path hash for adverts?</li> <li>3.9.6. Q: When can we move away from 1-byte path hash for channel and direct messages?</li> </ul> </li> <li>4. T-Deck Related<ul> <li>4.1. Q: Is there a user guide for T-Deck, T-Pager, T-Watch, or T-Display Pro?</li> <li>4.2. Q: What are the steps to get a T-Deck into DFU (Device Firmware Update) mode?</li> <li>4.3. Q: Why is my T-Deck Plus not getting any satellite lock?</li> <li>4.4. Q: Why is my OG (non-Plus) T-Deck not getting any satellite lock?</li> <li>4.5. Q: What size of SD card does the T-Deck support?</li> <li>4.6. Q: What is the public key for the default public channel?</li> <li>4.7. Q: How do I get maps on T-Deck?</li> <li>4.8. Q: Where do the map tiles go?</li> <li>4.9. Q: How to unlock deeper map zoom and server management features on T-Deck?</li> <li>4.10. Q: How to decipher the diagnostics screen on T-Deck?</li> <li>4.11. Q: The T-Deck sound is too loud?</li> <li>4.12. Q: Can you customize the sound?</li> <li>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?</li> <li>4.14. Q: How to capture a screenshot on T-Deck?</li> </ul> </li> <li>5. General<ul> <li>5.1. Q: What are BW, SF, and CR?</li> <li>5.2. Q: Do MeshCore clients repeat?</li> <li>5.3. Q: What happens when a node learns a route via a mobile repeater, and that repeater is gone?</li> <li>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?</li> <li>5.5. Q: Do public channels always flood? Do private channels always flood?</li> <li>5.6. Q: What is the public key for the default public channel?</li> <li>5.7. Q: Is MeshCore open source?</li> <li>5.8. Q: How can I support MeshCore?</li> <li>5.9. Q: How do I build MeshCore firmware from source?</li> <li>5.10. Q: Are there other MeshCore related open source projects?</li> <li>5.11. Q: Does MeshCore support ATAK?</li> <li>5.12. Q: How do I add a node to the MeshCore Map?</li> <li>5.13. Q: Can I use a Raspberry Pi to update a MeshCore radio?</li> <li>5.14. Q: Are there projects built around MeshCore?</li> <li>5.15. Q: Are there client applications for Windows or Mac?</li> <li>5.16. Q: Are there any resources that compare MeshCore to other LoRa systems?</li> </ul> </li> <li>6. Troubleshooting<ul> <li>6.1. Q: My client says another client or a repeater or a room server was last seen many, many days ago.</li> <li>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.</li> <li>6.3. Q: How to connect to a repeater via BLE (Bluetooth)?</li> <li>6.4. Q: My companion isn't showing up over Bluetooth?</li> <li>6.5. Q: I can't connect via Bluetooth, what is the Bluetooth pairing code?</li> <li>6.6. Q: My Heltec V3 keeps disconnecting from my smartphone. It can't hold a solid Bluetooth connection.</li> <li>6.7. Q: My RAK/T1000-E/xiao_nRF52 device seems to be corrupted, how do I wipe it clean to start fresh?</li> <li>6.8. Q: WebFlasher fails on Linux with failed to open</li> </ul> </li> <li>7. Other Questions:<ul> <li>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?<ul> <li>7.1.1 Q: Can I update Seeed Studio Wio Tracker L1 Pro using OTA?</li> </ul> </li> <li>7.2. Q: How to update ESP32-based devices over the air?</li> <li>7.3. Q: Is there a way to lower the chance of a failed OTA device firmware update (DFU)?</li> <li>7.4. Q: are the MeshCore logo and font available?</li> <li>7.5. Q: What is the format of a contact or channel QR code?</li> <li>7.6. Q: How do I connect to the companion via Wi-Fi, e.g. using a Heltec V3?</li> <li>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?</li> <li>7.8. Q: How do I use Ethernet with a RAK4631?</li> </ul> </li> </ul>"},{"location":"faq/#1-introduction","title":"1. Introduction","text":""},{"location":"faq/#11-q-what-is-meshcore","title":"1.1. Q: What is MeshCore?","text":"<p>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 &amp; Disaster Recovery, Outdoor Activities, Tactical Security including law enforcement and private security and also IoT sensor networks. (source)</p> <p>MeshCore is free and open source:</p> <ul> <li>MeshCore is the routing and firmware etc., available on GitHub under MIT license</li> <li>There are clients made by the community, such as the web clients, these are free to use, and some are open source too</li> <li>The cross-platform mobile app developed by Liam Cottle for Android/iOS/PC etc. is free to download and use</li> <li>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</li> </ul> <p>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.</p> <p>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.</p> <p>Anyone is able to build anything they like on top of MeshCore without paying anything.</p>"},{"location":"faq/#12-q-what-do-you-need-to-start-using-meshcore","title":"1.2. Q: What do you need to start using MeshCore?","text":"<p>A: Everything you need for MeshCore is available at:</p> <ul> <li>Main Website: https://meshcore.io</li> <li>Firmware Flasher: https://flasher.meshcore.io</li> <li>MeshCore Firmware on GitHub: https://github.com/meshcore-dev/MeshCore</li> <li>MeshCore Companion Web App: https://app.meshcore.nz</li> <li>MeshCore Map: https://map.meshcore.io</li> <li>Liam Cottle's MeshCore Technical Presentation</li> </ul> <p>You need LoRa hardware devices to run MeshCore firmware as clients or server (repeater and room server).</p>"},{"location":"faq/#121-hardware","title":"1.2.1. Hardware","text":"<p>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.</p> <p>For an up-to-date list of supported devices, please go to https://flasher.meshcore.io</p> <p>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.</p>"},{"location":"faq/#122-firmware","title":"1.2.2. Firmware","text":"<p>MeshCore has four firmware types that are not available on other LoRa systems. MeshCore has the following:</p>"},{"location":"faq/#123-companion-radio-firmware","title":"1.2.3. Companion Radio Firmware","text":"<p>Companion radios are for connecting to the Android app or web app as a messenger client. There are two different companion radio firmware versions:</p> <ol> <li> <p>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</p> </li> <li> <p>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</p> </li> </ol>"},{"location":"faq/#124-repeater","title":"1.2.4. Repeater","text":"<p>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.</p> <p>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.</p>"},{"location":"faq/#125-room-server","title":"1.2.5. Room Server","text":"<p>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.</p> <p>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.</p> <p>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.</p> <p>When a client logs into a room server, the client will receive the previously 32 unseen messages.</p> <p>Although room server can also repeat with the command line command <code>set repeat on</code>, it is not recommended nor encouraged. A room server with repeat set to <code>on</code> lacks the full set of repeater and remote administration features that are only available in the repeater firmware.</p> <p>The recommendation is to run repeater and room server on separate devices for the best experience.</p>"},{"location":"faq/#2-initial-setup","title":"2. Initial Setup","text":""},{"location":"faq/#21-q-how-many-devices-do-i-need-to-start-using-meshcore","title":"2.1. Q: How many devices do I need to start using MeshCore?","text":"<p>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.</p> <p>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.</p> <p>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.</p> <p>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:</p> <p><code>set freq {frequency}</code></p> <p>The repeater and room server CLI reference is here: https://docs.meshcore.io/cli_commands</p> <p>If you have more supported devices, you can use your additional devices with the room server firmware.</p>"},{"location":"faq/#22-q-does-meshcore-cost-any-money","title":"2.2. Q: Does MeshCore cost any money?","text":"<p>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.</p> <p>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.</p> <p>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.</p>"},{"location":"faq/#23-q-what-frequencies-are-supported-by-meshcore","title":"2.3. Q: What frequencies are supported by MeshCore?","text":"<p>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.</p> <p>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.</p> <p>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.</p> <p>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.</p> <p>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.</p>"},{"location":"faq/#24-q-what-is-an-advert-in-meshcore","title":"2.4. Q: What is an \"advert\" in MeshCore?","text":"<p>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.</p> <p>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\".</p> <ul> <li>Zero hop means your advert is broadcast to anyone that can hear it, and that's it.</li> <li>Flooded means it's broadcast and then repeated by all the repeaters that hear it.</li> </ul> <p>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:</p> <p><code>set flood.advert.interval {hours}</code></p> <p>The separate <code>set advert.interval {minutes}</code> command controls the local zero-hop advert timer.</p>"},{"location":"faq/#25-q-is-there-a-hop-limit","title":"2.5. Q: Is there a hop limit?","text":"<p>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.</p>"},{"location":"faq/#3-server-administration","title":"3. Server Administration","text":""},{"location":"faq/#31-q-how-do-you-configure-a-repeater-or-a-room-server","title":"3.1. Q: How do you configure a repeater or a room server?","text":"<p>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.</p> <p>Repeater or room server can be administered with one of the options below:</p> <ul> <li>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.</li> </ul> <p></p> <ul> <li> <p>Connect the server device using a USB cable to a computer running Chrome on https://flasher.meshcore.io, then use the <code>console</code> feature to connect to the device</p> </li> <li> <p>Use a MeshCore smartphone client to remotely administer servers via LoRa.</p> </li> <li> <p>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:</p> </li> </ul> <p>https://buymeacoffee.com/ripplebiz/e/249834</p>"},{"location":"faq/#32-q-do-i-need-to-set-the-location-for-a-repeater","title":"3.2. Q: Do I need to set the location for a repeater?","text":"<p>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:</p> <p><code>set lat &lt;GPS Lat&gt;</code></p> <p><code>set lon &lt;GPS Lon&gt;</code></p> <p>You can get the latitude and longitude from Google Maps by right-clicking the location you are at on the map.</p>"},{"location":"faq/#33-q-what-is-the-password-to-administer-a-repeater-or-a-room-server","title":"3.3. Q: What is the password to administer a repeater or a room server?","text":"<p>A: The default admin password to a repeater and room server is <code>password</code>. Use the following command to change the admin password:</p> <p><code>password {new-password}</code></p>"},{"location":"faq/#34-q-what-is-the-password-to-join-a-room-server","title":"3.4. Q: What is the password to join a room server?","text":"<p>A: The default guest password to a room server is <code>hello</code>. Use the following command to change the guest password:</p> <p><code>set guest.password {guest-password}</code></p>"},{"location":"faq/#35-q-can-i-retrieve-a-repeaters-private-key-or-set-a-repeaters-private-key","title":"3.5. Q: Can I retrieve a repeater's private key or set a repeater's private key?","text":"<p>A: You can issue these commands to get or set a repeater's private key using a USB serial connection.</p> <p><code>get prv.key</code> to print a repeater's private key on the serial console <code>set prv.key &lt;hex&gt;</code> to set a repeater's private key on the serial console</p> <p>Reboot the repeater after <code>set prv.key &lt;hex&gt;</code> command for the new private key to take effect.</p>"},{"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","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?","text":"<p>A: You can generate a new private key and specify the first byte of its public key here: https://gessaman.com/mc-keygen</p> <p>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.</p> <p>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.</p>"},{"location":"faq/#37-q-my-repeater-may-be-suffering-from-deafness-due-to-high-power-interference-near-my-meshs-frequency-it-is-not-hearing-other-in-range-meshcore-radios-what-can-i-do","title":"3.7. Q: My repeater may be suffering from deafness due to high power interference near my mesh's frequency, it is not hearing other in-range MeshCore radios. What can I do?","text":"<p>A: This may be due to the SX1262 radio's auto gain control feature. You can use this command to periodically reset its AGC.</p> <p><code>set agc.reset.interval &lt;number&gt;</code></p> <p>The <code>&lt;number&gt;</code> unit is in seconds and is incremented by 4. <code>set agc.reset.interval 4</code> works well to cure deafness.</p> <p>This is a very low-cost operation. AGC reset is done by simply setting <code>state = STATE_IDLE;</code> in function <code>RadioLibWrapper::resetAGC()</code> in <code>RadioLibWrappers.cpp</code></p>"},{"location":"faq/#38-q-how-do-i-make-my-repeater-an-observer-on-the-mesh","title":"3.8. Q: How do I make my repeater an observer on the mesh?","text":"<p>A: The observer instruction is available here: https://analyzer.letsmesh.net/observer/onboard</p>"},{"location":"faq/#39-q-what-is-multibyte-support-what-do-1-byte-2-byte-3-byte-adverts-and-messages-mean","title":"3.9. Q: What is multibyte support? What do 1-byte, 2-byte, 3-byte adverts and messages mean?","text":"<p>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.</p> <p>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.</p> <p>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.</p>"},{"location":"faq/#391-q-what-path-hash-sizes-will-my-repeater-forward","title":"3.9.1. Q: What path hash sizes will my repeater forward?","text":"<p>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.</p>"},{"location":"faq/#392-q-what-determines-a-packets-path-hash-size","title":"3.9.2. Q: What determines a packet's path hash size?","text":"<p>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.</p>"},{"location":"faq/#393-q-how-do-i-change-my-companions-path-hash-size","title":"3.9.3. Q: How do I change my companion's path hash size?","text":"<p>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 <code>Settings (gear icon)</code>, <code>Experimental Settings</code>.</p> <p>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.</p>"},{"location":"faq/#394-q-what-does-the-cli-command-pathhashmode-do-on-a-repeater","title":"3.9.4. Q: What does the CLI command <code>path.hash.mode</code> do on a repeater?","text":"<p>This CLI command <code>path.hash.mode</code> 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.</p> <p>Usage: <code>set path.hash.mode {0|1|2}</code>:</p> <pre><code>\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 path.hash.mode \u2502 Advert path hash size \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 0 \u2502 1 byte (default) \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 1 \u2502 2 bytes \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 2 \u2502 3 bytes \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \n</code></pre> <p>It is safe to set your 1.14+ repeaters to mode 1 or 2.</p>"},{"location":"faq/#395-q-why-use-2-or-3-byte-path-hash-for-adverts","title":"3.9.5. Q: Why use 2- or 3-byte path hash for adverts?","text":"<p>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.</p>"},{"location":"faq/#396-q-when-can-we-move-away-from-1-byte-path-hash-for-channel-and-direct-messages","title":"3.9.6. Q: When can we move away from 1-byte path hash for channel and direct messages?","text":"<p>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 <code>path.hash.mode</code> 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.</p>"},{"location":"faq/#4-t-deck-related","title":"4. T-Deck Related","text":""},{"location":"faq/#41-q-is-there-a-user-guide-for-t-deck-t-pager-t-watch-or-t-display-pro","title":"4.1. Q: Is there a user guide for T-Deck, T-Pager, T-Watch, or T-Display Pro?","text":"<p>A: Yes, it is available on https://buymeacoffee.com/ripplebiz/ultra-v7-7-guide-meshcore-users</p>"},{"location":"faq/#42-q-what-are-the-steps-to-get-a-t-deck-into-dfu-device-firmware-update-mode","title":"4.2. Q: What are the steps to get a T-Deck into DFU (Device Firmware Update) mode?","text":"<p>A:</p> <ol> <li>Device off</li> <li>Connect USB cable to device</li> <li>Hold down trackball (keep holding)</li> <li>Turn on device</li> <li>Hear USB connection sound</li> <li>Release trackball</li> <li>T-Deck in DFU mode now</li> <li>At this point you can begin flashing using https://flasher.meshcore.io</li> </ol>"},{"location":"faq/#43-q-why-is-my-t-deck-plus-not-getting-any-satellite-lock","title":"4.3. Q: Why is my T-Deck Plus not getting any satellite lock?","text":"<p>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.</p> <p>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 <code>GPS Info</code> screen; you should see the <code>Sentences:</code> counter increasing if the baud rate is correct.</p> <p>Source</p>"},{"location":"faq/#44-q-why-is-my-og-non-plus-t-deck-not-getting-any-satellite-lock","title":"4.4. Q: Why is my OG (non-Plus) T-Deck not getting any satellite lock?","text":"<p>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.</p>"},{"location":"faq/#45-q-what-size-of-sd-card-does-the-t-deck-support","title":"4.5. Q: What size of SD card does the T-Deck support?","text":"<p>A: Users have had no issues using 16GB or 32GB SD cards. Format the SD card to FAT32.</p>"},{"location":"faq/#46-q-what-is-the-public-key-for-the-default-public-channel","title":"4.6. Q: What is the public key for the default public channel?","text":"<p>A: T-Deck uses the same key the smartphone apps use but in base64 <code>izOH6cXN6mrJ5e26oRXNcg==</code></p> <p>There is no <code>=</code> key on the T-Deck's hardware keyboard. You can use the on-screen software keyboard to enter <code>=</code>. Tap the text box to enable the on-screen software keyboard. The third character is the capital letter <code>O</code> (Oh), not zero <code>0</code></p> <p>The smartphone app key is in hex: <code>8b3387e9c5cdea6ac9e5edbaa115cd72</code></p> <p>Source</p>"},{"location":"faq/#47-q-how-do-i-get-maps-on-t-deck","title":"4.7. Q: How do I get maps on T-Deck?","text":"<p>A: You need map tiles. You can get pre-downloaded map tiles here (a good way to support development):</p> <ul> <li>https://buymeacoffee.com/ripplebiz/e/342543 (Europe)</li> <li>https://buymeacoffee.com/ripplebiz/e/342542 (US)</li> </ul> <p>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</p> <p>There is also a modified script that adds additional error handling and parallel downloads: https://github.com/TheBestJohn/MTD-Script</p>"},{"location":"faq/#48-q-where-do-the-map-tiles-go","title":"4.8. Q: Where do the map tiles go?","text":"<p>Once you have the tiles downloaded, copy the <code>\\tiles</code> folder to the root of your T-Deck's SD card.</p>"},{"location":"faq/#49-q-how-to-unlock-deeper-map-zoom-and-server-management-features-on-t-deck","title":"4.9. Q: How to unlock deeper map zoom and server management features on T-Deck?","text":"<p>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</p>"},{"location":"faq/#410-q-how-to-decipher-the-diagnostics-screen-on-t-deck","title":"4.10. Q: How to decipher the diagnostics screen on T-Deck?","text":"<p>A: Space is tight on T-Deck's screen, so the information is a bit cryptic. The format is : <code>{hops} l:{packet-length}({payload-len}) t:{packet-type} snr:{n} rssi:{n}</code></p> <p>See here for packet-type: https://github.com/meshcore-dev/MeshCore/blob/main/src/Packet.h#L19</p> <pre><code>#define PAYLOAD_TYPE_REQ 0x00 // request (prefixed with dest/src hashes, MAC) (enc data: timestamp, blob)\n#define PAYLOAD_TYPE_RESPONSE 0x01 // response to REQ or ANON_REQ (prefixed with dest/src hashes, MAC) (enc data: timestamp, blob)\n#define PAYLOAD_TYPE_TXT_MSG 0x02 // a plain text message (prefixed with dest/src hashes, MAC) (enc data: timestamp, text)\n#define PAYLOAD_TYPE_ACK 0x03 // a simple ack #define PAYLOAD_TYPE_ADVERT 0x04 // a node advertising its Identity\n#define PAYLOAD_TYPE_GRP_TXT 0x05 // an (unverified) group text message (prefixed with channel hash, MAC) (enc data: timestamp, \"name: msg\")\n#define PAYLOAD_TYPE_GRP_DATA 0x06 // an (unverified) group datagram (prefixed with channel hash, MAC) (enc data: data_type, data_len, blob)\n#define PAYLOAD_TYPE_ANON_REQ 0x07 // generic request (prefixed with dest_hash, ephemeral pub_key, MAC) (enc data: ...)\n#define PAYLOAD_TYPE_PATH 0x08 // returned path (prefixed with dest/src hashes, MAC) (enc data: path, extra)\n</code></pre> <p>Source</p>"},{"location":"faq/#411-q-the-t-deck-sound-is-too-loud","title":"4.11. Q: The T-Deck sound is too loud?","text":""},{"location":"faq/#412-q-can-you-customize-the-sound","title":"4.12. Q: Can you customize the sound?","text":"<p>A: You can customize the sounds on the T-Deck, by placing <code>.mp3</code> files onto the <code>root</code> dir of the SD card. The files are:</p> <ul> <li><code>startup.mp3</code></li> <li><code>error.mp3</code></li> <li><code>alert.mp3</code></li> <li><code>new-advert.mp3</code></li> <li><code>existing-advert.mp3</code></li> </ul>"},{"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","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?","text":"<p>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://...\")</p>"},{"location":"faq/#414-q-how-to-capture-a-screenshot-on-t-deck","title":"4.14. Q: How to capture a screenshot on T-Deck?","text":"<p>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.</p>"},{"location":"faq/#5-general","title":"5. General","text":""},{"location":"faq/#51-q-what-are-bw-sf-and-cr","title":"5.1. Q: What are BW, SF, and CR?","text":"<p>A:</p> <p>BW is bandwidth - width of frequency spectrum that is used for transmission</p> <p>SF is spreading factor - how much should the communication spread in time</p> <p>CR is coding rate - from: https://www.thethingsnetwork.org/docs/lorawan/fec-and-code-rate</p> <p>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.</p> <p>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.</p> <p>The Code Rate of a forward error correction expresses the proportion of bits in a data stream that actually carry useful information.</p> <p>There are 4 code rates used in LoRaWAN:</p> <p>4/5 4/6 5/7 4/8</p> <p>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.</p> <p>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.</p> <p>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)</p> <p>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</p>"},{"location":"faq/#52-q-do-meshcore-clients-repeat","title":"5.2. Q: Do MeshCore clients repeat?","text":"<p>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 <code>set repeat on</code> repeat.</p>"},{"location":"faq/#53-q-what-happens-when-a-node-learns-a-route-via-a-mobile-repeater-and-that-repeater-is-gone","title":"5.3. Q: What happens when a node learns a route via a mobile repeater, and that repeater is gone?","text":"<p>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.</p> <p>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.</p>"},{"location":"faq/#54-q-how-does-a-node-discover-a-path-to-its-destination-and-then-use-it-to-send-messages-in-the-future-instead-of-flooding-every-message-it-sends-like-meshtastic","title":"5.4. Q: How does a node discover a path to its destination and then use it to send messages in the future, instead of flooding every message it sends like Meshtastic?","text":"<p>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.</p> <p>Source</p>"},{"location":"faq/#55-q-do-public-channels-always-flood-do-private-channels-always-flood","title":"5.5. Q: Do public channels always flood? Do private channels always flood?","text":"<p>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 <code>set flood.max</code> CLI command. Administrators of repeaters get to set the rules of their repeaters.</p> <p>Source</p>"},{"location":"faq/#56-q-what-is-the-public-key-for-the-default-public-channel","title":"5.6. Q: What is the public key for the default public channel?","text":"<p>A: The smartphone app key is in hex:</p> <p><code>8b3387e9c5cdea6ac9e5edbaa115cd72</code></p> <p>T-Deck uses the same key but in base64:</p> <p><code>izOH6cXN6mrJ5e26oRXNcg==</code></p> <p>The third character is the capital letter <code>O</code>, not zero <code>0</code>.</p> <p>Source</p>"},{"location":"faq/#57-q-is-meshcore-open-source","title":"5.7. Q: Is MeshCore open source?","text":"<p>A: Most of the firmware is freely available. Everything is open source except the T-Deck firmware and Liam's native mobile apps.</p> <p>Firmware repo: https://github.com/meshcore-dev/MeshCore</p>"},{"location":"faq/#58-q-how-can-i-support-meshcore","title":"5.8. Q: How can I support MeshCore?","text":"<p>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.</p> <p>Support Liam Cottle's smartphone client development by unlocking the server administration wait gate with in-app purchase</p> <p>Support Rastislav Vysoky (recrof)'s flasher website and the map website development through PayPal or Revolut</p>"},{"location":"faq/#59-q-how-do-i-build-meshcore-firmware-from-source","title":"5.9. Q: How do I build MeshCore firmware from source?","text":"<p>A: See instructions here: https://discord.com/channels/826570251612323860/1330643963501351004/1341826372120608769</p> <p>Build instructions for MeshCore:</p> <p>For Windows, first install WSL and Python+pip via: https://plainenglish.io/blog/setting-up-python-on-windows-subsystem-for-linux-wsl-26510f1b2d80</p> <p>(Linux, Windows+WSL) In the terminal/shell: <pre><code>sudo apt update\nsudo apt install libpython3-dev\nsudo apt install python3-venv\n</code></pre> Mac: python3 should be already installed.</p> <p>Then it should be the same for all platforms: <pre><code>python3 -m venv meshcore-venv\ncd meshcore-venv &amp;&amp; source bin/activate\npip install -U platformio\ngit clone https://github.com/meshcore-dev/meshcore.git\ncd meshcore\n</code></pre> open platformio.ini and in <code>[arduino_base]</code> edit <code>LORA_FREQ</code> (it defaults to <code>869.618</code>) to the frequency for your region, save, then run: <pre><code>pio run -e RAK_4631_repeater\n</code></pre> then you'll find <code>firmware.zip</code> in <code>.pio/build/RAK_4631_repeater</code></p>"},{"location":"faq/#510-q-are-there-other-meshcore-related-open-source-projects","title":"5.10. Q: Are there other MeshCore related open source projects?","text":"<p>A: Liam Cottle's MeshCore web client and MeshCore JavaScript library are open source under MIT license.</p> <p>Web client: https://github.com/liamcottle/meshcore-web Javascript: https://github.com/liamcottle/meshcore.js</p>"},{"location":"faq/#511-q-does-meshcore-support-atak","title":"5.11. Q: Does MeshCore support ATAK?","text":"<p>A: ATAK is not currently on MeshCore's roadmap.</p> <p>MeshCore would not be best suited to ATAK because MeshCore:</p> <ul> <li>clients do not repeat and therefore you would need a network of repeaters in place</li> <li>will not have a stable path where all clients are constantly moving between repeaters</li> </ul> <p>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.</p> <p>This could change in the future if MeshCore develops a client firmware that repeats.</p> <p>Source</p>"},{"location":"faq/#512-q-how-do-i-add-a-node-to-the-meshcore-map","title":"5.12. Q: How do I add a node to the MeshCore Map?","text":"<p>A:</p> <p>To add a BLE Companion radio, connect to the BLE Companion radio from the MeshCore smartphone app. In the app, tap the <code>3 dot</code> menu icon at the top right corner, then tap <code>Internet Map</code>. Tap the <code>3 dot</code> menu icon again and choose <code>Add me to the Map</code></p> <p>To add a Repeater or Room Server to the map, go to the Contact List, tap the <code>3 dot</code> next to the Repeater or Room Server you want to add to the Internet Map, tap <code>Share</code>, then tap <code>Upload to Internet Map</code>.</p> <p>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.</p>"},{"location":"faq/#513-q-can-i-use-a-raspberry-pi-to-update-a-meshcore-radio","title":"5.13. Q: Can I use a Raspberry Pi to update a MeshCore radio?","text":"<p>A: Yes. Below are the instructions to flash firmware onto a supported LoRa device using a Raspberry Pi over USB serial.</p> <p>Instructions for nRF devices like RAK, T1000-E, T114 are immediately after the ESP instructions</p> <p>For ESP-based devices (e.g. Heltec V3) you need:</p> <ol> <li>Download the firmware file from https://flasher.meshcore.io.<ul> <li>Go to the website in a browser and find the section that has the firmware you need.</li> <li>Click the Download button, right-click on the file you need, for example:<ul> <li><code>Heltec_v3_companion_radio_ble-v1.7.1-165fb33.bin</code><ul> <li>Non-merged bin keeps the existing Bluetooth pairing database.</li> </ul> </li> <li><code>Heltec_v3_companion_radio_usb-v1.7.1-165fb33-merged.bin</code><ul> <li>Merged bin overwrites everything including the bootloader and existing Bluetooth pairing database, but keeps configurations.</li> </ul> </li> </ul> </li> <li>Right-click on the file name and copy the link. Here is an example: <code>https://flasher.meshcore.io/releases/download/companion-v1.7.1/Heltec_v3_companion_radio_ble-v1.7.1-165fb33.bin</code></li> <li>Run:<ul> <li><code>wget https://flasher.meshcore.io/releases/download/companion-v1.7.1/Heltec_v3_companion_radio_ble-v1.7.1-165fb33.bin</code> 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.</li> <li>If the above wget command only downloads a very small file (10K bytes instead of more than 100K byte), use this command instead:<ul> <li><code>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\"</code></li> </ul> </li> </ul> </li> </ul> </li> <li>Confirm the <code>ttyXXXX</code> device path on your Raspberry Pi.<ul> <li>Go to the <code>/dev</code> directory and run the <code>ls</code> command to find your device path.</li> <li>It is usually <code>/dev/ttyUSB0</code> for ESP devices.</li> </ul> </li> <li>Install esptool from the shell.<ul> <li><code>pip install esptool --break-system-packages</code></li> </ul> </li> <li>Flash the firmware.<ul> <li>For non-merged bin:<ul> <li><code>esptool.py -p /dev/ttyUSB0 --chip esp32-s3 write_flash 0x10000 &lt;non-merged_firmware&gt;.bin</code></li> </ul> </li> <li>For merged bin:<ul> <li><code>esptool.py -p /dev/ttyUSB0 --chip esp32-s3 write_flash 0x00000 &lt;merged_firmware&gt;.bin</code></li> </ul> </li> </ul> </li> </ol> <p>Instructions for nRF devices:</p> <p>For nRF devices (e.g. RAK, Heltec T114) you need the following:</p> <ol> <li>Download the firmware file from https://flasher.meshcore.io.<ul> <li>Go to the website in a browser and find the section that has the firmware you need.</li> <li>You need the ZIP version for the adafruit flash tool below.</li> <li>Click the Download button, right-click on the ZIP file, for example:<ul> <li><code>RAK_4631_companion_radio_ble-v1.7.1-165fb33.zip</code></li> </ul> </li> <li>Right-click on the file name and copy the link. Here is an example: <code>https://flasher.meshcore.io/releases/download/companion-v1.7.1/RAK_4631_companion_radio_ble-v1.7.1-165fb33.zip</code></li> <li>Run:<ul> <li><code>wget https://flasher.meshcore.io/releases/download/companion-v1.7.1/RAK_4631_companion_radio_ble-v1.7.1-165fb33.zip</code> to download the firmware file for your device type or the version you need: USB, BLE, Repeater, Room Server, ZIP file only.</li> </ul> </li> </ul> </li> <li>Confirm the <code>ttyXXXX</code> device path on your Raspberry Pi.<ul> <li>Go to the <code>/dev</code> directory and run the <code>ls</code> command to find your device path.</li> <li>It is usually <code>/dev/ttyACM0</code> for nRF devices.</li> </ul> </li> <li>Install adafruit-nrfutil.<ul> <li><code>pip install adafruit-nrfutil --break-system-packages</code></li> </ul> </li> <li>Flash the nRF device.<ul> <li><code>adafruit-nrfutil --verbose dfu serial --package RAK_4631_companion_radio_usb-v1.7.1-165fb33.zip -p /dev/ttyACM0 -b 115200 --singlebank --touch 1200</code></li> </ul> </li> </ol> <p>To manage a repeater or room server connected to a Pi over USB serial using shell commands, you need to install <code>picocom</code>. To install <code>picocom</code>, run the following command:</p> <ul> <li><code>sudo apt install picocom</code></li> </ul> <p>To start managing your USB serial-connected device using picocom, use the following command:</p> <ul> <li><code>picocom -b 115200 /dev/ttyUSB0 --imap lfcrlf</code></li> </ul> <p>From here, reference repeater and room server command line commands in the MeshCore docs here:</p> <ul> <li>https://docs.meshcore.io/cli_commands</li> </ul>"},{"location":"faq/#514-q-are-there-projects-built-around-meshcore","title":"5.14. Q: Are there projects built around MeshCore?","text":"<p>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.</p> <p>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.</p>"},{"location":"faq/#515-q-are-there-client-applications-for-windows-or-mac","title":"5.15. Q: Are there client applications for Windows or Mac?","text":"<p>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</p> <p>Both the Windows and Mac versions of the client app are fully unlocked and are free to use.</p>"},{"location":"faq/#516-q-are-there-any-resources-that-compare-meshcore-to-other-lora-systems","title":"5.16. Q: Are there any resources that compare MeshCore to other LoRa systems?","text":"<p>A: Here is a list of MeshCore comparison resources:</p> <ul> <li>The Comms Channel on YouTube: https://www.youtube.com/watch?v=guDoKGs02Us</li> <li>MeshCore Advantages by MCarper: https://github.com/mikecarper/meshfirmware/blob/main/MeshCoreAdvantages.md</li> <li>MeshCore vs Meshtastic by austinmesh.org: https://www.austinmesh.org/learn/meshcore-vs-meshtastic</li> </ul>"},{"location":"faq/#6-troubleshooting","title":"6. Troubleshooting","text":""},{"location":"faq/#61-q-my-client-says-another-client-or-a-repeater-or-a-room-server-was-last-seen-many-many-days-ago","title":"6.1. Q: My client says another client or a repeater or a room server was last seen many, many days ago.","text":""},{"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","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.","text":"<p>A:</p> <ul> <li>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).</li> <li>If you are using the Android or iOS client, the other client, repeater, or room server may have the wrong time.</li> </ul> <p>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 <code>time</code> command in the USB serial console with the server device connected.</p>"},{"location":"faq/#63-q-how-to-connect-to-a-repeater-via-ble-bluetooth","title":"6.3. Q: How to connect to a repeater via BLE (Bluetooth)?","text":"<p>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.</p>"},{"location":"faq/#64-q-my-companion-isnt-showing-up-over-bluetooth","title":"6.4. Q: My companion isn't showing up over Bluetooth?","text":"<p>A: Make sure that you flashed the Bluetooth companion firmware and not the USB-only companion firmware.</p>"},{"location":"faq/#65-q-i-cant-connect-via-bluetooth-what-is-the-bluetooth-pairing-code","title":"6.5. Q: I can't connect via Bluetooth, what is the Bluetooth pairing code?","text":"<p>A: The default Bluetooth pairing code is <code>123456</code></p>"},{"location":"faq/#66-q-my-heltec-v3-keeps-disconnecting-from-my-smartphone-it-cant-hold-a-solid-bluetooth-connection","title":"6.6. Q: My Heltec V3 keeps disconnecting from my smartphone. It can't hold a solid Bluetooth connection.","text":"<p>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.</p>"},{"location":"faq/#67-q-my-rakt1000-exiao_nrf52-device-seems-to-be-corrupted-how-do-i-wipe-it-clean-to-start-fresh","title":"6.7. Q: My RAK/T1000-E/xiao_nRF52/... device seems to be corrupted, how do I wipe it clean to start fresh?","text":"<p>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 <code>Export Settings</code> button, choose <code>Select All</code> and Confirm. This will save your Node configuration 3. Now choose <code>Factory Reset</code> 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 <code>Import Settings</code> and choose the file from 2., click on <code>Select All</code> and Confirm 9. Find <code>Reboot</code> button on of the Settings list</p> <p>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 <code>Companion Bluetooth</code> 5. Press <code>Enter DFU mode</code> button, choose your USB device 6. Press <code>Erase Flash</code> button, choose the device again and wait until it completes 7. Press <code>Flash!</code> 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.</p> <p>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</p>"},{"location":"faq/#68-q-webflasher-fails-on-linux-with-failed-to-open","title":"6.8. Q: WebFlasher fails on Linux with failed to open","text":"<p>A: If the usb port doesn't have the right ownership for this task, the process fails with the following error:</p> <p><code>NetworkError: Failed to execute 'open' on 'SerialPort': Failed to open serial port.</code></p> <p>Allow user access on your USB port:</p> <p><code>sudo setfacl -m u:$USER:rw /dev/ttyUSB0</code></p>"},{"location":"faq/#7-other-questions","title":"7. Other Questions:","text":""},{"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","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?","text":"<p>A: The steps below work on both Android and iOS as nRF has made both apps' user interface the same on both platforms:</p> <ol> <li>Download nRF's DFU app from iOS App Store or Android's Play Store, you can find the app by searching for <code>nrf dfu</code>, the app's full name is <code>nRF Device Firmware Update</code></li> <li>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)</li> <li>From the MeshCore app, log in remotely to the repeater you want to update with admin privileges</li> <li>Go to the Command Line tab, type <code>start ota</code> and hit enter.</li> <li>You should see <code>OK</code> to confirm the repeater device is now in OTA mode</li> <li>Run the DFU app, then tap <code>Settings</code> in the top-right corner</li> <li>Enable <code>Packet receipt notifications</code>, and change <code>Number of Packets</code> to 10 for RAK, 8 for T114. 8 also works for RAK.</li> <li>Select the firmware zip file you downloaded</li> <li>Select the device you want to update. If the device you want to update is not on the list, try enabling <code>OTA</code> on the device again</li> <li>If the device is not found, enable <code>Force Scanning</code> in the DFU app</li> <li>Tap <code>Upload</code> to begin OTA update</li> <li>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.</li> <li>Wait for the update to complete. It can take a few minutes.</li> <li>It is strongly recommended that you install and use the OTAFIX bootloader at https://github.com/oltaco/Adafruit_nRF52_Bootloader_OTAFIX.</li> <li>To update a companion node over OTA, it must be running companion firmware v1.15 or greater.</li> <li>Please see the MeshCore Blog for additional information on OTA firmware flashing:<ul> <li>https://blog.meshcore.io/2026/04/06/otafix-bootloader</li> <li>https://blog.meshcore.io/2026/04/02/nrf-ota-update</li> </ul> </li> </ol>"},{"location":"faq/#711-q-can-i-update-seeed-studio-wio-tracker-l1-pro-using-ota","title":"7.1.1 Q: Can I update Seeed Studio Wio Tracker L1 Pro using OTA?","text":"<p>A: You can flash this safer bootloader to the Wio Tracker L1 Pro https://github.com/oltaco/Adafruit_nRF52_Bootloader_OTAFIX</p> <p>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 <code>start ota</code> instruction and start the update using the DFU app.</p>"},{"location":"faq/#72-q-how-to-update-esp32-based-devices-over-the-air","title":"7.2. Q: How to update ESP32-based devices over the air?","text":"<p>A: For ESP32-based devices (e.g. Heltec V3):</p> <ol> <li>On https://flasher.meshcore.io, download the non-merged version of the firmware for your ESP32 device (e.g. <code>Heltec_v3_repeater-v1.6.2-4449fd3.bin</code>, no <code>\"merged\"</code> in the file name).</li> <li>From the MeshCore app, log in remotely to the repeater you want to update with admin privileges.</li> <li>Go to the Command Line tab, type <code>start ota</code> and hit enter.</li> <li>You should see <code>OK</code> to confirm the repeater device is now in OTA mode.</li> <li>The command <code>start ota</code> on an ESP32-based device starts a Wi-Fi hotspot named <code>MeshCore OTA</code>.</li> <li>From your phone or computer connect to the 'MeshCore OTA' hotspot.</li> <li>From a browser, go to http://192.168.4.1/update and upload the non-merged bin from the flasher.</li> </ol>"},{"location":"faq/#73-q-is-there-a-way-to-lower-the-chance-of-a-failed-ota-device-firmware-update-dfu","title":"7.3. Q: Is there a way to lower the chance of a failed OTA device firmware update (DFU)?","text":"<p>A: Yes, developer <code>che aporeps</code> 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.</p> <p>Refer to https://github.com/oltaco/Adafruit_nRF52_Bootloader_OTAFIX for the latest information.</p> <p>Currently, the following boards are supported:</p> <ul> <li>Heltec Automation Mesh Node T114 / HT-nRF5262</li> <li>Nologo ProMicro NRF52840 (aka SuperMini NRF52840)</li> <li>Seeed Studio SenseCAP Card Tracker T1000-E</li> <li>Seeed Studio Wio Tracker L1</li> <li>Seeed Studio XIAO nRF52840 BLE</li> <li>Seeed Studio XIAO nRF52840 BLE SENSE</li> <li>RAK 4631</li> <li>RAK WisMesh Tag (new 28/11/2025)</li> </ul>"},{"location":"faq/#74-q-are-the-meshcore-logo-and-font-available","title":"7.4. Q: Are the MeshCore logo and font available?","text":"<p>A: Yes, it is on the MeshCore GitHub repo here: https://github.com/meshcore-dev/MeshCore/tree/main/logo</p>"},{"location":"faq/#75-q-what-is-the-format-of-a-contact-or-channel-qr-code","title":"7.5. Q: What is the format of a contact or channel QR code?","text":"<p>A:</p> <p>Channel: <code>meshcore://channel/add?name=&lt;name&gt;&amp;secret=&lt;secret&gt;</code></p> <p>Contact: <code>meshcore://contact/add?name=&lt;name&gt;&amp;public_key=&lt;secret&gt;&amp;type=&lt;type&gt;</code></p> <p>Where <code>&amp;type</code> is:</p> <ul> <li><code>chat = 1</code></li> <li><code>repeater = 2</code></li> <li><code>room = 3</code></li> <li><code>sensor = 4</code></li> </ul>"},{"location":"faq/#76-q-how-do-i-connect-to-the-companion-via-wi-fi-eg-using-a-heltec-v3","title":"7.6. Q: How do I connect to the companion via Wi-Fi, e.g. using a Heltec V3?","text":"<p>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 <code>./variants/heltec_v3/platformio.ini</code> and then flash it to your device.</p>"},{"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","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?","text":"<p>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 <code>set tx</code>. You can get their current value using command line command <code>get tx</code></p> <p>\u26a0\ufe0f WARNING: Set these values at your own risk. Incorrect power settings can permanently damage your radio hardware.</p> Device / Model Region / Description In-App Setting (dBm) Target Radio Output Notes Station G2 Reference US915 Max Output 19 dBm 36.5 dBm (4.46W) US915 Max at 1dB compression point 16 dBm 35 dBm (3.16W) 1dB compression point EU868 Max at 1dB compression point 15 dBm 34.5 dBm (2.82W) 1dB compression point US915 1W Output 10 dBm 1W Refer to your local government's requirements EU868 1W Output 9 dBm 1W Refer to your local government's requirements Ikoka Stick E22-900M30S 1W Model 19 dBm 1W DO NOT EXCEED (Risk of burn out) data sheet Ikoka Stick E22-900M33S 2W Model 9 dBm 2W DO NOT EXCEED (Risk of burn out) data sheet Refer to your local government's requirements Heltec V4 Standard Output 10 dBm 22 dBm (~0.15W) High Output 22 dBm 28 dBm (~0.5W to 0.6W)"},{"location":"faq/#78-q-how-do-i-use-ethernet-with-a-rak4631","title":"7.8. Q: How do I use Ethernet with a RAK4631?","text":"<p>A: MeshCore supports Ethernet on RAK4631 boards using the RAK13800 WisBlock Ethernet module (based on the W5100S chip).</p> <p>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</p> <p>Firmware: Flash one of the Ethernet-enabled firmware variants: - <code>RAK_4631_repeater_ethernet</code> - Repeater with Ethernet CLI access - <code>RAK_4631_room_server_ethernet</code> - Room server with Ethernet CLI access - <code>RAK_4631_companion_radio_ethernet</code> - Companion radio over Ethernet (replaces BLE)</p> <p>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. <code>nc &lt;ip&gt; 23</code> 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 <code>eth.status</code> CLI command to check connection status and see the assigned IP address.</p>"},{"location":"kiss_modem_protocol/","title":"MeshCore KISS Modem Protocol","text":"<p>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.</p>"},{"location":"kiss_modem_protocol/#serial-configuration","title":"Serial Configuration","text":"<p>115200 baud, 8N1, no flow control.</p>"},{"location":"kiss_modem_protocol/#frame-format","title":"Frame Format","text":"<p>Standard KISS framing per the KA9Q/K3MC specification.</p> Byte Name Description <code>0xC0</code> FEND Frame delimiter <code>0xDB</code> FESC Escape character <code>0xDC</code> TFEND Escaped FEND (FESC + TFEND = 0xC0) <code>0xDD</code> TFESC Escaped FESC (FESC + TFESC = 0xDB) <pre><code>\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 FEND \u2502 Type Byte \u2502 Data (escaped) \u2502 FEND \u2502\n\u2502 0xC0 \u2502 1 byte \u2502 0-510 bytes \u2502 0xC0 \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n</code></pre>"},{"location":"kiss_modem_protocol/#type-byte","title":"Type Byte","text":"<p>The type byte is split into two nibbles:</p> Bits Field Description 7-4 Port Port number (0 for single-port TNC) 3-0 Command Command number <p>Maximum unescaped frame size: 512 bytes.</p>"},{"location":"kiss_modem_protocol/#standard-kiss-commands","title":"Standard KISS Commands","text":""},{"location":"kiss_modem_protocol/#host-to-tnc","title":"Host to TNC","text":"Command Value Data Description Data <code>0x00</code> Raw packet Queue packet for transmission (one pending at a time) TXDELAY <code>0x01</code> Delay (1 byte) Transmitter keyup delay in 10ms units (default: 50 = 500ms) Persistence <code>0x02</code> P (1 byte) CSMA persistence parameter 0-255 (default: 63) SlotTime <code>0x03</code> Interval (1 byte) CSMA slot interval in 10ms units (default: 10 = 100ms) TXtail <code>0x04</code> Delay (1 byte) Post-TX hold time in 10ms units (default: 0) FullDuplex <code>0x05</code> Mode (1 byte) 0 = half duplex, nonzero = full duplex (default: 0) SetHardware <code>0x06</code> Sub-command + data MeshCore extensions (see below) Return <code>0xFF</code> - Exit KISS mode (no-op)"},{"location":"kiss_modem_protocol/#tnc-to-host","title":"TNC to Host","text":"Type Value Data Description Data <code>0x00</code> Raw packet Received packet from radio <p>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.</p> <p>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).</p>"},{"location":"kiss_modem_protocol/#host-output-backpressure","title":"Host Output Backpressure","text":"<p>Outbound frames are encoded into a 2-slot queue and flushed when serial output space is available; <code>loop()</code> 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.</p>"},{"location":"kiss_modem_protocol/#csma-behavior","title":"CSMA Behavior","text":"<p>The TNC implements p-persistent CSMA for half-duplex operation:</p> <ol> <li>When a packet is queued, monitor carrier detect</li> <li>When the channel clears, generate a random value 0-255</li> <li>If the value is less than or equal to P (Persistence), wait TXDELAY then transmit</li> <li>Otherwise, wait SlotTime and repeat from step 1</li> </ol> <p>In full-duplex mode, CSMA is bypassed and packets transmit after TXDELAY.</p>"},{"location":"kiss_modem_protocol/#sethardware-extensions-0x06","title":"SetHardware Extensions (0x06)","text":"<p>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.</p>"},{"location":"kiss_modem_protocol/#frame-format_1","title":"Frame Format","text":"<pre><code>\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 FEND \u2502 0x06 \u2502 Sub-command \u2502 Data (escaped) \u2502 FEND \u2502\n\u2502 0xC0 \u2502 \u2502 1 byte \u2502 variable \u2502 0xC0 \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n</code></pre>"},{"location":"kiss_modem_protocol/#request-sub-commands-host-to-tnc","title":"Request Sub-commands (Host to TNC)","text":"Sub-command Value Data GetIdentity <code>0x01</code> - GetRandom <code>0x02</code> Length (1 byte, 1-64) VerifySignature <code>0x03</code> PubKey (32) + Signature (64) + Data SignData <code>0x04</code> Data to sign EncryptData <code>0x05</code> Key (32) + Plaintext DecryptData <code>0x06</code> Key (32) + MAC (2) + Ciphertext KeyExchange <code>0x07</code> Remote PubKey (32) Hash <code>0x08</code> Data to hash SetRadio <code>0x09</code> Freq (4) + BW (4) + SF (1) + CR (1) SetTxPower <code>0x0A</code> Power dBm (1) GetRadio <code>0x0B</code> - GetTxPower <code>0x0C</code> - GetCurrentRssi <code>0x0D</code> - IsChannelBusy <code>0x0E</code> - GetAirtime <code>0x0F</code> Packet length (1) GetNoiseFloor <code>0x10</code> - GetVersion <code>0x11</code> - GetStats <code>0x12</code> - GetBattery <code>0x13</code> - GetMCUTemp <code>0x14</code> - GetSensors <code>0x15</code> Permissions (1) GetDeviceName <code>0x16</code> - Ping <code>0x17</code> - Reboot <code>0x18</code> - SetSignalReport <code>0x19</code> Enable (1): 0x00=disable, nonzero=enable GetSignalReport <code>0x1A</code> - GetCapabilities <code>0x1B</code> - SetAgcResetInterval <code>0x1C</code> Seconds (2): 0=disable, 0-1020 GetAgcResetInterval <code>0x1D</code> - SetFemState <code>0x1E</code> Apply mask (1) + Value mask (1) GetFemState <code>0x1F</code> - SetRxBoostedGain <code>0x20</code> Enable (1): 0x00=disable, nonzero=enable GetRxBoostedGain <code>0x21</code> -"},{"location":"kiss_modem_protocol/#response-sub-commands-tnc-to-host","title":"Response Sub-commands (TNC to Host)","text":"<p>Response codes use the high-bit convention: <code>response = command | 0x80</code>. Generic and unsolicited responses use the <code>0xF0</code>+ range. Set commands that report state (SetSignalReport, SetAgcResetInterval, SetFemState, SetRxBoostedGain) reply with the matching Get response, so <code>0x9C</code>, <code>0x9E</code> and <code>0xA0</code> are never sent.</p> Sub-command Value Data Identity <code>0x81</code> PubKey (32) Random <code>0x82</code> Random bytes (1-64) Verify <code>0x83</code> Result (1): 0x00=invalid, 0x01=valid Signature <code>0x84</code> Signature (64) Encrypted <code>0x85</code> MAC (2) + Ciphertext Decrypted <code>0x86</code> Plaintext SharedSecret <code>0x87</code> Shared secret (32) Hash <code>0x88</code> SHA-256 hash (32) Radio <code>0x8B</code> Freq (4) + BW (4) + SF (1) + CR (1) TxPower <code>0x8C</code> Power dBm (1) CurrentRssi <code>0x8D</code> RSSI dBm (1, signed) ChannelBusy <code>0x8E</code> Result (1): 0x00=clear, 0x01=busy Airtime <code>0x8F</code> Milliseconds (4) NoiseFloor <code>0x90</code> dBm (2, signed) Version <code>0x91</code> Version (1) + Reserved (1) Stats <code>0x92</code> RX (4) + TX (4) + Errors (4) Battery <code>0x93</code> Millivolts (2) MCUTemp <code>0x94</code> Temperature (2, signed) Sensors <code>0x95</code> CayenneLPP payload DeviceName <code>0x96</code> Name (variable, UTF-8) Pong <code>0x97</code> - SignalReport <code>0x9A</code> Status (1): 0x00=disabled, 0x01=enabled Capabilities <code>0x9B</code> Feature bits (4) AgcResetInterval <code>0x9D</code> Effective seconds (2) FemState <code>0x9F</code> Capability mask (1) + Value mask (1) RxBoostedGain <code>0xA1</code> Status (1): 0x00=disabled, 0x01=enabled OK <code>0xF0</code> - Error <code>0xF1</code> Error code (1) TxDone <code>0xF8</code> Result (1): 0x00=failed, 0x01=success RxMeta <code>0xF9</code> SNR (1) + RSSI (1)"},{"location":"kiss_modem_protocol/#error-codes","title":"Error Codes","text":"Code Value Description InvalidLength <code>0x01</code> Request data too short InvalidParam <code>0x02</code> Invalid parameter value NoCallback <code>0x03</code> Feature not available MacFailed <code>0x04</code> MAC verification failed UnknownCmd <code>0x05</code> Unknown sub-command EncryptFailed <code>0x06</code> Encryption failed TxBusy <code>0x07</code> Radio TX busy, or host output queue full Unsupported <code>0x08</code> Command known, but not supported by this board"},{"location":"kiss_modem_protocol/#unsolicited-events","title":"Unsolicited Events","text":"<p>The TNC sends these SetHardware frames without a preceding request:</p> <p>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.</p> <p>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.</p>"},{"location":"kiss_modem_protocol/#data-formats","title":"Data Formats","text":""},{"location":"kiss_modem_protocol/#radio-parameters-setradio-radio-response","title":"Radio Parameters (SetRadio / Radio response)","text":"<p>All values little-endian.</p> Field Size Description Frequency 4 bytes Hz (e.g., 869618000) Bandwidth 4 bytes Hz (e.g., 62500) SF 1 byte Spreading factor (5-12) CR 1 byte Coding rate (5-8)"},{"location":"kiss_modem_protocol/#version-version-response","title":"Version (Version response)","text":"Field Size Description Version 1 byte Firmware version Reserved 1 byte Always 0"},{"location":"kiss_modem_protocol/#encrypted-encrypted-response","title":"Encrypted (Encrypted response)","text":"Field Size Description MAC 2 bytes HMAC-SHA256 truncated to 2 bytes Ciphertext variable AES-128 block-encrypted data with zero padding"},{"location":"kiss_modem_protocol/#airtime-airtime-response","title":"Airtime (Airtime response)","text":"<p>All values little-endian.</p> Field Size Description Airtime 4 bytes uint32_t, estimated air time in milliseconds"},{"location":"kiss_modem_protocol/#noise-floor-noisefloor-response","title":"Noise Floor (NoiseFloor response)","text":"<p>All values little-endian.</p> Field Size Description Noise floor 2 bytes int16_t, dBm (signed) <p>The modem recalibrates the noise floor every 2 seconds. AGC resets follow the configured AGC reset interval (default 32 seconds).</p>"},{"location":"kiss_modem_protocol/#capabilities-capabilities-response","title":"Capabilities (Capabilities response)","text":"<p>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 <code>UnknownCmd</code>; treat that as no capabilities.</p> Field Size Description Feature bits 4 bytes uint32_t, see below Bit Value Description 0 <code>0x01</code> AGC reset interval control (always set) 1 <code>0x02</code> External FEM RX (LNA) gain control 2 <code>0x04</code> External FEM TX (PA) gain control 3 <code>0x08</code> Radio chip boosted RX gain control <p>Remaining bits are reserved and sent as 0.</p>"},{"location":"kiss_modem_protocol/#agc-reset-interval-setagcresetinterval-agcresetinterval-response","title":"AGC Reset Interval (SetAgcResetInterval / AgcResetInterval response)","text":"<p>All values little-endian.</p> Field Size Description Seconds 2 bytes uint16_t, 0 = disabled, maximum 1020 <p>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 <code>agc.reset.interval</code> setting: requested values are rounded down to a multiple of 4, so 1-3 disable the reset. Values above 1020 return <code>InvalidParam</code>. SetAgcResetInterval replies with the AgcResetInterval response carrying the effective value, and restarts the countdown from the time of the request.</p> <p>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.</p>"},{"location":"kiss_modem_protocol/#fem-state-setfemstate-femstate-response","title":"FEM State (SetFemState / FemState response)","text":"<p>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.</p> Bit Value Description 0 <code>0x01</code> RX gain (LNA enabled) 1 <code>0x02</code> TX gain (PA high gain enabled) <p>SetFemState data:</p> 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 <p>FemState response data:</p> Field Size Description Capability mask 1 byte Bits this board can control Value mask 1 byte Current state; always 0 for uncontrollable bits <p>Example: enable RX gain without changing TX gain: apply <code>0x01</code>, value <code>0x01</code>.</p> <p>If any bit in the apply mask is not in the board's capability mask (including reserved bits), the modem replies <code>Unsupported</code> 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 <code>TxBusy</code> immediately. Capabilities come from the board's own <code>get/set radio.fem.rxgain</code> and <code>radio.fem.txgain</code> CLI commands (see cli_commands.md): a gain is controllable when the board answers <code>get</code> with <code>&gt; on</code> or <code>&gt; off</code>. 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.</p> <p>The setting is not persisted; the board's power-on default applies after reboot.</p>"},{"location":"kiss_modem_protocol/#rx-boosted-gain-setrxboostedgain-rxboostedgain-response","title":"RX Boosted Gain (SetRxBoostedGain / RxBoostedGain response)","text":"<p>Controls the radio chip's own boosted RX gain mode (SX1262, SX1268, LLCC68, LR11x0, LR2021), the equivalent of the MeshCore <code>radio.rxgain</code> setting. This is independent of the external FEM RX gain controlled by SetFemState; a board can support either, both or neither.</p> Field Size Description Status 1 byte 0x00 = power-saving, 0x01 = boosted <p>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 <code>TxBusy</code> 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 <code>Unsupported</code> to both commands. The power-on default is the build's <code>SX126X_RX_BOOSTED_GAIN</code> setting; the value is not persisted, and periodic AGC resets preserve it.</p>"},{"location":"kiss_modem_protocol/#stats-stats-response","title":"Stats (Stats response)","text":"<p>All values little-endian.</p> Field Size Description RX 4 bytes Packets received TX 4 bytes Packets transmitted Errors 4 bytes Receive errors"},{"location":"kiss_modem_protocol/#battery-battery-response","title":"Battery (Battery response)","text":"<p>All values little-endian.</p> Field Size Description Millivolts 2 bytes uint16_t, battery voltage in mV"},{"location":"kiss_modem_protocol/#mcu-temperature-mcutemp-response","title":"MCU Temperature (MCUTemp response)","text":"<p>All values little-endian.</p> Field Size Description Temperature 2 bytes int16_t, tenths of \u00b0C (e.g., 253 = 25.3\u00b0C) <p>Returns <code>NoCallback</code> error if the board does not support temperature readings.</p>"},{"location":"kiss_modem_protocol/#device-name-devicename-response","title":"Device Name (DeviceName response)","text":"Field Size Description Name variable UTF-8 string, no null terminator"},{"location":"kiss_modem_protocol/#reboot","title":"Reboot","text":"<p>Sends an <code>OK</code> response, flushes serial, then reboots the device. The host should expect the connection to drop.</p>"},{"location":"kiss_modem_protocol/#sensor-permissions-getsensors","title":"Sensor Permissions (GetSensors)","text":"Bit Value Description 0 <code>0x01</code> Base (battery) 1 <code>0x02</code> Location (GPS) 2 <code>0x04</code> Environment (temp, humidity, pressure) <p>Use <code>0x07</code> for all permissions.</p>"},{"location":"kiss_modem_protocol/#sensor-data-sensors-response","title":"Sensor Data (Sensors response)","text":"<p>Data returned in CayenneLPP format. See CayenneLPP documentation for parsing.</p>"},{"location":"kiss_modem_protocol/#cryptographic-algorithms","title":"Cryptographic Algorithms","text":"Operation Algorithm Identity / Signing / Verification Ed25519 Key Exchange X25519 (ECDH) Encryption AES-128 block encryption with zero padding + HMAC-SHA256 (MAC truncated to 2 bytes) Hashing SHA-256"},{"location":"kiss_modem_protocol/#notes","title":"Notes","text":"<ul> <li>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)</li> <li>Modem generates identity on first boot (stored in flash)</li> <li>All multi-byte values are little-endian unless stated otherwise</li> <li>SNR values in RxMeta are multiplied by 4 for 0.25 dB precision</li> <li>TxDone is sent as a SetHardware event after each transmission</li> <li>Standard KISS clients receive only type 0x00 data frames and can safely ignore all SetHardware (0x06) frames</li> <li>See packet_format.md for packet format</li> </ul>"},{"location":"meshcore/","title":"Introduction","text":"<p>Welcome to the MeshCore documentation.</p> <p>Below are a few quick start guides.</p> <ul> <li>Frequently Asked Questions</li> <li>CLI Commands</li> <li>Companion Protocol</li> <li>Packet Format</li> <li>QR Codes</li> </ul> <p>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.</p> <ul> <li>Documentation Source</li> </ul>"},{"location":"nrf52_power_management/","title":"nRF52 Power Management","text":""},{"location":"nrf52_power_management/#overview","title":"Overview","text":"<p>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.</p>"},{"location":"nrf52_power_management/#features","title":"Features","text":""},{"location":"nrf52_power_management/#boot-voltage-protection","title":"Boot Voltage Protection","text":"<ul> <li>Checks battery voltage immediately after boot and before mesh operations commence</li> <li>If voltage is below a configurable threshold (e.g., 3300mV), the device configures voltage wake (LPCOMP + VBUS) and enters protective shutdown (SYSTEMOFF)</li> <li>Prevents boot loops when battery is critically low</li> <li>Skipped when external power (USB VBUS) is detected</li> </ul>"},{"location":"nrf52_power_management/#voltage-wake-lpcomp-vbus","title":"Voltage Wake (LPCOMP + VBUS)","text":"<ul> <li>Configures the nRF52's Low Power Comparator (LPCOMP) before entering SYSTEMOFF</li> <li>Enables USB VBUS detection so external power can wake the device</li> <li>Device automatically wakes when battery voltage rises above recovery threshold or when VBUS is detected</li> </ul>"},{"location":"nrf52_power_management/#early-boot-register-capture","title":"Early Boot Register Capture","text":"<ul> <li>Captures RESETREAS (reset reason) and GPREGRET2 (shutdown reason) before SystemInit() clears them</li> <li>Allows firmware to determine why it booted (cold boot, watchdog, LPCOMP wake, etc.)</li> <li>Allows firmware to determine why it last shut down (user request, low voltage, boot protection)</li> </ul>"},{"location":"nrf52_power_management/#shutdown-reason-tracking","title":"Shutdown Reason Tracking","text":"<p>Shutdown reason codes (stored in GPREGRET2):</p> Code Name Description 0x00 NONE Normal boot / no previous shutdown 0x4C LOW_VOLTAGE Runtime low voltage threshold reached 0x55 USER User requested powerOff() 0x42 BOOT_PROTECT Boot voltage protection triggered"},{"location":"nrf52_power_management/#supported-boards","title":"Supported Boards","text":"Board Implemented LPCOMP wake VBUS wake Seeed Studio XIAO nRF52840 (<code>xiao_nrf52</code>) Yes Yes Yes RAK4631 (<code>rak4631</code>) Yes Yes Yes Heltec T114 (<code>heltec_t114</code>) 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 <p>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.</p>"},{"location":"nrf52_power_management/#technical-details","title":"Technical Details","text":""},{"location":"nrf52_power_management/#architecture","title":"Architecture","text":"<p>The power management functionality is integrated into the <code>NRF52Board</code> base class in <code>src/helpers/NRF52Board.cpp</code>. Board variants provide hardware-specific configuration via a <code>PowerMgtConfig</code> struct and override <code>initiateShutdown(uint8_t reason)</code> to perform board-specific power-down work and conditionally enable voltage wake (LPCOMP + VBUS).</p>"},{"location":"nrf52_power_management/#early-boot-capture","title":"Early Boot Capture","text":"<p>A static constructor with priority 101 in <code>NRF52Board.cpp</code> captures the RESETREAS and GPREGRET2 registers before: - SystemInit() (priority 102) - which clears RESETREAS - Static C++ constructors (default priority 65535)</p> <p>This ensures we capture the true reset reason before any initialisation code runs.</p>"},{"location":"nrf52_power_management/#board-implementation","title":"Board Implementation","text":"<p>To enable power management on a board variant:</p> <ol> <li> <p>Enable in platformio.ini: <pre><code>-D NRF52_POWER_MANAGEMENT\n</code></pre></p> </li> <li> <p>Define configuration in variant.h: <pre><code>#define PWRMGT_VOLTAGE_BOOTLOCK 3300 // Won't boot below this voltage (mV)\n#define PWRMGT_LPCOMP_AIN 7 // AIN channel for voltage sensing\n#define PWRMGT_LPCOMP_REFSEL 2 // REFSEL (0-6=1/8..7/8, 7=ARef, 8-15=1/16..15/16)\n</code></pre></p> </li> <li> <p>Implement in board .cpp file: <pre><code>#ifdef NRF52_POWER_MANAGEMENT\nconst PowerMgtConfig power_config = {\n .lpcomp_ain_channel = PWRMGT_LPCOMP_AIN,\n .lpcomp_refsel = PWRMGT_LPCOMP_REFSEL,\n .voltage_bootlock = PWRMGT_VOLTAGE_BOOTLOCK\n};\n\nvoid MyBoard::initiateShutdown(uint8_t reason) {\n // Board-specific shutdown preparation (e.g., disable peripherals)\n bool enable_lpcomp = (reason == SHUTDOWN_REASON_LOW_VOLTAGE ||\n reason == SHUTDOWN_REASON_BOOT_PROTECT);\n\n if (enable_lpcomp) {\n configureVoltageWake(power_config.lpcomp_ain_channel, power_config.lpcomp_refsel);\n }\n\n enterSystemOff(reason);\n}\n#endif\n\nvoid MyBoard::begin() {\n NRF52Board::begin(); // or NRF52BoardDCDC::begin()\n // ... board setup ...\n\n#ifdef NRF52_POWER_MANAGEMENT\n checkBootVoltage(&amp;power_config);\n#endif\n}\n</code></pre></p> </li> </ol> <p>For user-initiated shutdowns, <code>powerOff()</code> remains board-specific. Power management only arms LPCOMP for automated shutdown reasons (boot protection/low voltage).</p> <ol> <li>Declare override in board .h file: <pre><code>#ifdef NRF52_POWER_MANAGEMENT\n void initiateShutdown(uint8_t reason) override;\n#endif\n</code></pre></li> </ol>"},{"location":"nrf52_power_management/#voltage-wake-configuration","title":"Voltage Wake Configuration","text":"<p>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</p> <p>VBUS wake is enabled via the POWER peripheral USBDETECTED event whenever <code>configureVoltageWake()</code> is used. This requires USB VBUS to be routed to the nRF52 (typical on nRF52840 boards with native USB).</p> <p>LPCOMP Reference Selection (PWRMGT_LPCOMP_REFSEL):</p> 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 <p>Important: For boards with a voltage divider on the battery sense pin, LPCOMP measures the divided voltage. Use: <code>VBAT_threshold \u2248 (VDD * fraction) * divider_scale</code>, where <code>divider_scale = (Rtop + Rbottom) / Rbottom</code> (e.g., 2.0 for 1M/1M, 2.5 for 1.5M/1M, 3.0 for XIAO).</p>"},{"location":"nrf52_power_management/#softdevice-compatibility","title":"SoftDevice Compatibility","text":"<p>The power management code checks whether SoftDevice is enabled and uses the appropriate API: - When SD enabled: <code>sd_power_*</code> functions - When SD disabled: Direct register access (NRF_POWER-&gt;*)</p> <p>This ensures compatibility regardless of BLE stack state.</p>"},{"location":"nrf52_power_management/#cli-commands","title":"CLI Commands","text":"<p>Power management status can be queried via the CLI:</p> Command Description <code>get pwrmgt.support</code> Returns \"supported\" or \"unsupported\" <code>get pwrmgt.source</code> Returns current power source - \"battery\" or \"external\" (5V/USB power) <code>get pwrmgt.bootreason</code> Returns reset and shutdown reason strings <code>get pwrmgt.bootmv</code> Returns boot voltage in millivolts <p>On boards without power management enabled, <code>get pwrmgt.source</code> and <code>get pwrmgt.bootmv</code> return: <pre><code>ERROR: Power management not supported\n</code></pre></p> <p><code>get pwrmgt.support</code> returns <code>unsupported</code>. <code>get pwrmgt.bootreason</code> is not compiled out at all and answers on every board: <code>getResetReason()</code> and <code>getShutdownReason()</code> are virtuals on the base board class, so a board that does not override them reports <code>Not available</code> rather than an error. ESP32 boards override the reset half with <code>esp_reset_reason()</code>, so they return a real reset reason and <code>Not available</code> for the shutdown reason.</p>"},{"location":"nrf52_power_management/#debug-output","title":"Debug Output","text":"<p>When <code>MESH_DEBUG=1</code> is enabled, the power management module outputs: <pre><code>DEBUG: PWRMGT: Reset = Wake from LPCOMP (0x20000); Shutdown = Low Voltage (0x4C)\nDEBUG: PWRMGT: Boot voltage = 3450 mV (threshold = 3300 mV)\nDEBUG: PWRMGT: LPCOMP wake configured (AIN7, ref=3/8 VDD)\n</code></pre></p>"},{"location":"nrf52_power_management/#phase-2-planned","title":"Phase 2 (Planned)","text":"<ul> <li>Runtime voltage monitoring</li> <li>Voltage state machine (Normal -&gt; Warning -&gt; Critical -&gt; Shutdown)</li> <li>Configurable thresholds</li> <li>Load shedding callbacks for power reduction</li> <li>Deep sleep integration</li> <li>Scheduled wake-up</li> <li>Extended sleep with periodic monitoring</li> </ul>"},{"location":"nrf52_power_management/#references","title":"References","text":"<ul> <li>nRF52840 Product Specification - POWER</li> <li>nRF52840 Product Specification - LPCOMP</li> <li>SoftDevice S140 API - Power Management</li> </ul>"},{"location":"number_allocations/","title":"Number Allocations","text":"<p>This document lists unique numbers/identifiers used in various MeshCore protocol payloads.</p>"},{"location":"number_allocations/#group-data-types","title":"Group Data Types","text":"<p>The <code>PAYLOAD_TYPE_GRP_DATA</code> payloads have a 16-bit data-type field, which identifies which application the packet is for.</p> <p>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.</p> <p>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.</p> <p>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.</p> 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- <p>(add rows, inside the range 0100 - FEFF for custom apps)</p>"},{"location":"ota/","title":"Admin-pushed firmware update (experimental <code>-ota</code> images)","text":"<p>Warning</p> <p>Part of an experimental fork, not meant for regular users: its releases are a rolling release on MeshCore <code>dev</code> (see the README).</p> <p>The <code>*-ota</code> and <code>*-observer-ota</code> 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 <code>fw apply</code> rewrites itself from a routine running in RAM.</p> <p>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.</p> <p>Rolling release on <code>dev</code>, for experienced users. These <code>-ota</code> images track MeshCore <code>dev</code>, 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.</p>"},{"location":"ota/#what-a-release-carries","title":"What a release carries","text":"<p>For every <code>&lt;board&gt;_&lt;role&gt;-ota</code> / <code>-observer-ota</code> image:</p> file what <code>&lt;image&gt;-&lt;release&gt;.zip</code> / <code>.uf2</code> the image, flashed the usual way (first time) <code>&lt;image&gt;-&lt;release&gt;.mcfw</code> full package: USB/BLE console only <code>&lt;image&gt;-&lt;release&gt;.from-&lt;earlier&gt;.mcfw</code> delta from an earlier release's same image <code>manifest.json</code> image sha256, target, build epoch, packages, deltas by base <code>SHA256SUMS</code>, <code>SHA256SUMS.sig</code> checksums, signed by <code>meshcore-ota@tth-pub</code> <p>Check a download:</p> <pre><code>ssh-keygen -Y verify -f tools/ota_allowed_signers -I meshcore-ota@tth-pub \\\n -n meshcore-ota -s SHA256SUMS.sig &lt; SHA256SUMS\nsha256sum -c --ignore-missing SHA256SUMS\n</code></pre> <p><code>tools/ota_pack.py fetch &lt;image&gt; --base &lt;sha8&gt;</code> does both and picks the delta for the node's image (<code>--full</code> for the full package, <code>--release &lt;tag&gt;</code> for another than the latest).</p>"},{"location":"ota/#on-the-node","title":"On the node","text":"<pre><code>fw status state, battery, the running image's size and sha256 prefix\nfw ver target and build epoch a package for this image needs\nfw begin &lt;bytes&gt; [sid] start a transfer\nfw w &lt;offset&gt; &lt;base64&gt; one 96 B chunk (text)\nfw missing what is still missing\nfw verify queue the full check, poll fw status\nfw apply battery gate, then rewrite and reboot\nfw apply downgrade local console only: an older (or the same) image\nfw abort\n</code></pre> <p>What the node checks before it touches its own image:</p> <ol> <li>The manifest, as soon as it is in: an Ed25519 signature by the key the image was built with (<code>[ota] pubkey</code>), the target (board + variant: an <code>-observer-ota</code> node takes no <code>-ota</code> package), the size, for a delta the base (the sha256 of the image it runs), and the build epoch.</li> <li>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 <code>fw apply downgrade</code>.</li> <li><code>fw verify</code>: 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.</li> <li><code>fw apply</code>: 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.</li> </ol>"},{"location":"ota/#when-an-update-goes-wrong","title":"When an update goes wrong","text":"<p>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:</p> <pre><code>set radio.silence &lt;min&gt; re-arm the receiver, then reboot, if it hears nothing\n for &lt;min&gt; (persisted, off by default); catches an OTA\n that boots with a dead radio\nset radio.txstall &lt;min&gt; the same when the TX queue stalls (repeater only, on\n at 15 min by default, a change holds until reboot)\nget radio.reboots watchdog reboots so far (survives power loss)\nget boot why the board last reset, plus the hardfault record\n</code></pre> <p>Details: <code>docs/cli_commands.md</code>, \"Radio silence watchdog\" and \"TX stall watchdog\".</p> <p>A node that will not boot at all has to be reflashed over USB/BLE DFU. After an <code>fw apply</code> over BLE the bond can drop (a supervision timeout while the node reboots) -- re-pair from the same host; it is not a brick.</p>"},{"location":"ota/#tools","title":"Tools","text":"<pre><code># a delta for the node's image, from the latest release\ntools/ota_pack.py fetch Xiao_nrf52_repeater-ota --base &lt;sha8 from fw status&gt;\n\n# over the mesh, through a companion (USB port or tcp://host:port), as admin\ntools/ota_mesh_push.py /dev/serial/by-id/&lt;companion&gt; &lt;node pubkey prefix&gt; pkg.mcfw --apply\n\n# over the node's own USB console\ntools/ota_push.py /dev/serial/by-id/&lt;node&gt; pkg.mcfw --apply\n</code></pre>"},{"location":"ota/#from-a-phone","title":"From a phone","text":"<p>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 <code>SHA256SUMS</code>); the side channel below is a switch there.</p>"},{"location":"ota/#off-the-shared-channel-side","title":"Off the shared channel: <code>--side</code>","text":"<pre><code>tools/ota_mesh_push.py &lt;companion&gt; &lt;node&gt; pkg.mcfw --apply \\\n --side 869.525,62.5,7,5 --duty 10 --gap 1\n</code></pre> <p>Login, <code>fw status</code> and <code>get radio</code> still go over the mesh; then the node gets <code>tempradio &lt;side&gt;,3</code>, the companion retunes to the same preset, logs in again zero-hop, and the chunks go there. The window grows to <code>--window</code> (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 <code>fw apply</code> (the reboot), or when the tool sends it back with <code>tempradio &lt;its preset&gt;,1</code>. Nothing new in the firmware: any node with <code>tempradio</code> takes it.</p> <ul> <li>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 <code>set_radio</code> with OK and stays put; the tool checks that and stops, and the node returns within 3 minutes.</li> <li>The companion's preset is put back at the end -- unless the tool is killed hard; then <code>set_radio</code> it back yourself.</li> <li>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.</li> </ul> <p>The transfer in both tools is the OTA engine of the tth.meshcore Ansible collection (<code>plugins/module_utils/meshcore_ota_engine.py</code>) -- its <code>meshcore_fw_ota</code> module runs the same code, so a fix lands everywhere at once. The tools need only its files, not Ansible: an installed collection (<code>ansible-galaxy collection install git+https://git.rfa.cz/tth-pub/meshcore-ansible.git</code>), a checkout named by <code>MESHCORE_ANSIBLE</code>, or one next to this repository (<code>tools/ota_collection.py</code> prints which one it uses).</p> <p><code>ota_mesh_push.py</code> needs the <code>meshcore</code> Python library. It logs in as admin (password from <code>[secrets] admin_pw</code> of <code>platformio.local.ini</code>, or asked for), sends binary chunks with a pause between them, asks which are missing and resends only those, and keeps an airtime budget (<code>--duty</code>, default 1 % per hour: the 865-868 MHz band). A refused package costs the two manifest chunks, not the whole transfer. Check <code>get radio</code> on both ends first: this transmits.</p>"},{"location":"ota/#your-own-builds","title":"Your own builds","text":"<p>A build with <code>-D FW_OTA=1</code> trusts <code>[ota] pubkey</code> of <code>platformio.ini</code> -- the release key. To sign your own packages, set your key in the gitignored <code>platformio.local.ini</code>:</p> <pre><code>[ota]\npubkey = &lt;tools/ota_pack.py pubkey --key your.key&gt;\n</code></pre> <p>and pack with <code>tools/ota_pack.py pack|diff &lt;env&gt; --key your.key</code>. 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.</p> <p>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 <code>-ota</code>) have none of it.</p>"},{"location":"packet_format/","title":"Packet Format","text":"<p>This document describes the MeshCore packet format.</p> <ul> <li><code>0xYY</code> indicates <code>YY</code> in hex notation.</li> <li><code>0bYY</code> indicates <code>YY</code> in binary notation.</li> <li>Bit 0 indicates the bit furthest to the right: <code>0000000X</code></li> <li>Bit 7 indicates the bit furthest to the left: <code>X0000000</code></li> </ul>"},{"location":"packet_format/#version-1-packet-format","title":"Version 1 Packet Format","text":"<p>This is the protocol level packet structure used in MeshCore firmware v1.12.0</p> <pre><code>[header][transport_codes(optional)][path_length][path][payload]\n</code></pre> <ul> <li>header - 1 byte<ul> <li>8-bit Format: <code>0bVVPPPPRR</code> - <code>V=Version</code> - <code>P=PayloadType</code> - <code>R=RouteType</code></li> <li>Bits 0-1 - 2-bits - Route Type<ul> <li><code>0x00</code>/<code>0b00</code> - <code>ROUTE_TYPE_TRANSPORT_FLOOD</code> - Flood Routing + Transport Codes</li> <li><code>0x01</code>/<code>0b01</code> - <code>ROUTE_TYPE_FLOOD</code> - Flood Routing</li> <li><code>0x02</code>/<code>0b10</code> - <code>ROUTE_TYPE_DIRECT</code> - Direct Routing</li> <li><code>0x03</code>/<code>0b11</code> - <code>ROUTE_TYPE_TRANSPORT_DIRECT</code> - Direct Routing + Transport Codes</li> </ul> </li> <li>Bits 2-5 - 4-bits - Payload Type<ul> <li><code>0x00</code>/<code>0b0000</code> - <code>PAYLOAD_TYPE_REQ</code> - Request (destination/source hashes + MAC)</li> <li><code>0x01</code>/<code>0b0001</code> - <code>PAYLOAD_TYPE_RESPONSE</code> - Response to <code>REQ</code> or <code>ANON_REQ</code></li> <li><code>0x02</code>/<code>0b0010</code> - <code>PAYLOAD_TYPE_TXT_MSG</code> - Plain text message</li> <li><code>0x03</code>/<code>0b0011</code> - <code>PAYLOAD_TYPE_ACK</code> - Acknowledgment</li> <li><code>0x04</code>/<code>0b0100</code> - <code>PAYLOAD_TYPE_ADVERT</code> - Node advertisement</li> <li><code>0x05</code>/<code>0b0101</code> - <code>PAYLOAD_TYPE_GRP_TXT</code> - Group text message (unverified)</li> <li><code>0x06</code>/<code>0b0110</code> - <code>PAYLOAD_TYPE_GRP_DATA</code> - Group datagram (unverified)</li> <li><code>0x07</code>/<code>0b0111</code> - <code>PAYLOAD_TYPE_ANON_REQ</code> - Anonymous request</li> <li><code>0x08</code>/<code>0b1000</code> - <code>PAYLOAD_TYPE_PATH</code> - Returned path</li> <li><code>0x09</code>/<code>0b1001</code> - <code>PAYLOAD_TYPE_TRACE</code> - Trace a path, collecting SNR for each hop</li> <li><code>0x0A</code>/<code>0b1010</code> - <code>PAYLOAD_TYPE_MULTIPART</code> - Packet is part of a sequence of packets</li> <li><code>0x0B</code>/<code>0b1011</code> - <code>PAYLOAD_TYPE_CONTROL</code> - Control packet data (unencrypted)</li> <li><code>0x0C</code>/<code>0b1100</code> - reserved</li> <li><code>0x0D</code>/<code>0b1101</code> - reserved</li> <li><code>0x0E</code>/<code>0b1110</code> - reserved</li> <li><code>0x0F</code>/<code>0b1111</code> - <code>PAYLOAD_TYPE_RAW_CUSTOM</code> - Custom packet (raw bytes, custom encryption)</li> </ul> </li> <li>Bits 6-7 - 2-bits - Payload Version<ul> <li><code>0x00</code>/<code>0b00</code> - v1 - 1-byte src/dest hashes, 2-byte MAC</li> <li><code>0x01</code>/<code>0b01</code> - v2 - Future version (e.g., 2-byte hashes, 4-byte MAC)</li> <li><code>0x02</code>/<code>0b10</code> - v3 - Future version</li> <li><code>0x03</code>/<code>0b11</code> - v4 - Future version</li> </ul> </li> </ul> </li> <li><code>transport_codes</code> - 4 bytes (optional)<ul> <li>Only present for <code>ROUTE_TYPE_TRANSPORT_FLOOD</code> and <code>ROUTE_TYPE_TRANSPORT_DIRECT</code></li> <li><code>transport_code_1</code> - 2 bytes - <code>uint16_t</code> - calculated from region scope</li> <li><code>transport_code_2</code> - 2 bytes - <code>uint16_t</code> - reserved</li> </ul> </li> <li><code>path_length</code> - 1 byte - Encoded path metadata<ul> <li>Bits 0-5 store path hash count / hop count (<code>0-63</code>)</li> <li>Bits 6-7 store path hash size minus 1<ul> <li><code>0b00</code>: 1-byte path hashes</li> <li><code>0b01</code>: 2-byte path hashes</li> <li><code>0b10</code>: 3-byte path hashes</li> <li><code>0b11</code>: reserved / unsupported</li> </ul> </li> </ul> </li> <li><code>path</code> - <code>hop_count * hash_size</code> bytes - Path to use for Direct Routing or flood path tracking<ul> <li>Up to a maximum of 64 bytes, defined by <code>MAX_PATH_SIZE</code></li> <li>Effective byte length is calculated from the encoded hop count and hash size, not taken directly from <code>path_length</code></li> <li>v1.12.0 firmware and older only handled legacy 1-byte path hashes and dropped packets whose path bytes exceeded 64 bytes</li> </ul> </li> <li><code>payload</code> - variable length - Payload Data<ul> <li>Up to a maximum 184 bytes, defined by <code>MAX_PACKET_PAYLOAD</code></li> <li>Generally this is the remainder of the raw packet data</li> <li>The firmware parses this data based on the provided Payload Type</li> <li>v1.12.0 firmware and older drops packets with <code>payload</code> sizes larger than 184</li> </ul> </li> </ul>"},{"location":"packet_format/#packet-format_1","title":"Packet Format","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 (<code>MAX_PATH_SIZE</code>) Stores <code>hop_count * hash_size</code> bytes of path data if applicable payload up to 184 (<code>MAX_PACKET_PAYLOAD</code>) Data for the provided Payload Type <p>NOTE: see the Payloads documentation for more information about the content of specific payload types.</p>"},{"location":"packet_format/#header-format","title":"Header Format","text":"<p>Bit 0 means the lowest bit (1s place)</p> Bits Mask Field Description 0-1 <code>0x03</code> Route Type Flood, Direct, etc 2-5 <code>0x3C</code> Payload Type Request, Response, ACK, etc 6-7 <code>0xC0</code> Payload Version Versioning of the payload format"},{"location":"packet_format/#route-types","title":"Route Types","text":"Value Name Description <code>0x00</code> <code>ROUTE_TYPE_TRANSPORT_FLOOD</code> Flood Routing + Transport Codes <code>0x01</code> <code>ROUTE_TYPE_FLOOD</code> Flood Routing <code>0x02</code> <code>ROUTE_TYPE_DIRECT</code> Direct Routing <code>0x03</code> <code>ROUTE_TYPE_TRANSPORT_DIRECT</code> Direct Routing + Transport Codes"},{"location":"packet_format/#path-length-encoding","title":"Path Length Encoding","text":"<p><code>path_length</code> is not a raw byte count. It packs both hash size and hop count:</p> Bits Field Meaning 0-5 Hop Count Number of path hashes (<code>0-63</code>) 6-7 Hash Size Code Stored as <code>hash_size - 1</code> <p>Hash size codes:</p> Bits 6-7 Hash Size Notes <code>0b00</code> 1 byte Legacy / default mode <code>0b01</code> 2 bytes Supported in current firmware <code>0b10</code> 3 bytes Supported in current firmware <code>0b11</code> 4 bytes Reserved / invalid <p>Examples:</p> <ul> <li><code>0x00</code>: zero-hop packet, no path bytes</li> <li><code>0x05</code>: 5 hops using 1-byte hashes, so path is 5 bytes</li> <li><code>0x45</code>: 5 hops using 2-byte hashes, so path is 10 bytes</li> <li><code>0x8A</code>: 10 hops using 3-byte hashes, so path is 30 bytes</li> </ul>"},{"location":"packet_format/#payload-types","title":"Payload Types","text":"Value Name Description <code>0x00</code> <code>PAYLOAD_TYPE_REQ</code> Request (destination/source hashes + MAC) <code>0x01</code> <code>PAYLOAD_TYPE_RESPONSE</code> Response to <code>REQ</code> or <code>ANON_REQ</code> <code>0x02</code> <code>PAYLOAD_TYPE_TXT_MSG</code> Plain text message <code>0x03</code> <code>PAYLOAD_TYPE_ACK</code> Acknowledgment <code>0x04</code> <code>PAYLOAD_TYPE_ADVERT</code> Node advertisement <code>0x05</code> <code>PAYLOAD_TYPE_GRP_TXT</code> Group text message (unverified) <code>0x06</code> <code>PAYLOAD_TYPE_GRP_DATA</code> Group datagram (unverified) <code>0x07</code> <code>PAYLOAD_TYPE_ANON_REQ</code> Anonymous request <code>0x08</code> <code>PAYLOAD_TYPE_PATH</code> Returned path <code>0x09</code> <code>PAYLOAD_TYPE_TRACE</code> Trace a path, collecting SNR for each hop <code>0x0A</code> <code>PAYLOAD_TYPE_MULTIPART</code> Packet is part of a sequence of packets <code>0x0B</code> <code>PAYLOAD_TYPE_CONTROL</code> Control packet data (unencrypted) <code>0x0C</code> reserved reserved <code>0x0D</code> reserved reserved <code>0x0E</code> reserved reserved <code>0x0F</code> <code>PAYLOAD_TYPE_RAW_CUSTOM</code> Custom packet (raw bytes, custom encryption)"},{"location":"packet_format/#payload-versions","title":"Payload Versions","text":"Value Version Description <code>0x00</code> 1 1-byte src/dest hashes, 2-byte MAC <code>0x01</code> 2 Future version (e.g., 2-byte hashes, 4-byte MAC) <code>0x02</code> 3 Future version <code>0x03</code> 4 Future version"},{"location":"payloads/","title":"Payload Format","text":"<p>Inside each MeshCore Packet is a payload, identified by the payload type in the packet header. The types of payloads are:</p> <ul> <li>Node advertisement.</li> <li>Acknowledgment.</li> <li>Returned path.</li> <li>Request (destination/source hashes + MAC).</li> <li>Response to REQ or ANON_REQ.</li> <li>Plain text message.</li> <li>Anonymous request.</li> <li>Group text message (unverified).</li> <li>Group datagram (unverified).</li> <li>Multi-part packet</li> <li>Control data packet</li> <li>Custom packet (raw bytes, custom encryption).</li> </ul> <p>This document defines the structure of each of these payload types.</p> <p>NOTE: all 16 and 32-bit integer fields are Little Endian.</p>"},{"location":"payloads/#important-concepts","title":"Important concepts:","text":"<ul> <li>Node hash: the first byte of the node's public key</li> </ul>"},{"location":"payloads/#node-advertisement","title":"Node advertisement","text":"<p>This kind of payload notifies receivers that a node exists, and gives information about the node</p> 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 <p>Appdata</p> 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 <p>Appdata Flags</p> Value Name Description <code>0x01</code> is chat node advert is for a chat node <code>0x02</code> is repeater advert is for a repeater <code>0x03</code> is room server advert is for a room server <code>0x04</code> is sensor advert is for a sensor server <code>0x10</code> has location appdata contains lat/long information <code>0x20</code> has feature 1 Reserved for future use. <code>0x40</code> has feature 2 Reserved for future use. <code>0x80</code> has name appdata contains a node name"},{"location":"payloads/#acknowledgement","title":"Acknowledgement","text":"<p>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.</p> Field Size (bytes) Description checksum 4 CRC checksum of message timestamp, text, and sender pubkey"},{"location":"payloads/#returned-path-request-response-and-plain-text-message","title":"Returned path, request, response, and plain text message","text":"<p>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.</p> Field Size (bytes) Description destination hash 1 first byte of destination node public key source hash 1 first byte of source node public key cipher MAC 2 MAC for encrypted data in next field ciphertext rest of payload encrypted message, see subsections below for details"},{"location":"payloads/#returned-path","title":"Returned path","text":"<p>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.</p> Field Size (bytes) Description path length 1 length of next field path see above a list of node hashes (one byte each) extra type 1 extra, bundled payload type, eg., acknowledgement or response. Same values as in Packet Format extra rest of data extra, bundled payload content, follows same format as main content defined by this document"},{"location":"payloads/#request","title":"Request","text":"Field Size (bytes) Description timestamp 4 sender time (unix timestamp) req type 1 request sub type request data rest of payload application-defined request payload body <p>For the common chat/server helpers in <code>BaseChatMesh</code>, the current request type values are:</p> Value Name Description <code>0x01</code> get stats get stats of repeater or room server <code>0x02</code> keepalive (deprecated) <code>0x03</code> get telemetry request node telemetry <code>0x04</code> get min/max/avg get sensor node stats on time series data <code>0x05</code> get acl node ACL query <code>0x06</code> get neighbors node neighbors query <code>0x08</code> subscribe subscribe to telemetry push <code>0x09</code> ubsubscribe unsubscribe from telemetry push"},{"location":"payloads/#get-stats","title":"Get stats","text":"<p>Gets information about the node, possibly including the following:</p> <ul> <li>Battery level (millivolts)</li> <li>Current transmit queue length</li> <li>Current free queue length</li> <li>Last RSSI value</li> <li>Number of received packets</li> <li>Number of sent packets</li> <li>Total airtime (seconds)</li> <li>Total uptime (seconds)</li> <li>Number of packets sent as flood</li> <li>Number of packets sent directly</li> <li>Number of packets received as flood</li> <li>Number of packets received directly</li> <li>Error flags</li> <li>Last SNR value</li> <li>Number of direct route duplicates</li> <li>Number of flood route duplicates</li> <li>Number posted (?)</li> <li>Number of post pushes (?)</li> </ul>"},{"location":"payloads/#get-telemetry","title":"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)"},{"location":"payloads/#get-minmaxave-sensor-nodes","title":"Get Min/Max/Ave (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"},{"location":"payloads/#subscribe-to-telemetry-push-sensor-nodes","title":"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"},{"location":"payloads/#unsubscribe-from-telemetry-push-sensor-nodes","title":"Unsubscribe from Telemetry push - (Sensor nodes)","text":"Field Size (bytes) Description timestamp 4 sender time (unix timestamp) req type 1 0x09 (request sub type)"},{"location":"payloads/#get-access-list","title":"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"},{"location":"payloads/#get-neighbors","title":"Get Neighbors","text":"<p>Not defined in <code>BaseChatMesh</code>.</p>"},{"location":"payloads/#get-owner-info","title":"Get Owner Info","text":"<p>Not defined in <code>BaseChatMesh</code>.</p>"},{"location":"payloads/#response","title":"Response","text":"Field Size (bytes) Description content rest of payload application-defined response body <p>Response contents are opaque application data. There is no single generic response envelope beyond the encrypted payload wrapper shown above.</p>"},{"location":"payloads/#plain-text-message","title":"Plain text message","text":"Field Size (bytes) Description timestamp 4 send time (unix timestamp) txt_type + attempt 1 upper six bits are txt_type (see below), lower two bits are attempt number (0..3) message rest of payload the message content, see next table <p>txt_type</p> Value Description Message content <code>0x00</code> plain text message the plain text of the message <code>0x01</code> CLI data CLI command OR reply text <code>0x02</code> signed plain text message first four bytes is sender pubkey prefix, followed by plain text message <code>0x03</code> CLI command (since v1.18+) CLI command text (explicit)"},{"location":"payloads/#anonymous-request","title":"Anonymous request","text":"Field Size (bytes) Description destination hash 1 first byte of destination node public key public key 32 sender's Ed25519 public key cipher MAC 2 MAC for encrypted data in next field ciphertext rest of payload encrypted message, see below for details"},{"location":"payloads/#room-server-login","title":"Room server login","text":"Field Size (bytes) Description timestamp 4 sender time (unix timestamp) sync timestamp 4 sender's \"sync messages SINCE x\" timestamp password rest of message password for room"},{"location":"payloads/#repeatersensor-login","title":"Repeater/Sensor login","text":"Field Size (bytes) Description timestamp 4 sender time (unix timestamp) password rest of message password for repeater/sensor"},{"location":"payloads/#repeater-regions-request","title":"Repeater - Regions request","text":"Field Size (bytes) Description timestamp 4 sender time (unix timestamp) req type 1 0x01 (request sub type) reply path len 1 path len for reply reply path (variable) reply path"},{"location":"payloads/#repeater-owner-info-request","title":"Repeater - Owner info request","text":"Field Size (bytes) Description timestamp 4 sender time (unix timestamp) req type 1 0x02 (request sub type) reply path len 1 path len for reply reply path (variable) reply path"},{"location":"payloads/#repeater-clock-and-status-request","title":"Repeater - Clock and status request","text":"Field Size (bytes) Description timestamp 4 sender time (unix timestamp) req type 1 0x03 (request sub type) reply path len 1 path len for reply reply path (variable) reply path"},{"location":"payloads/#group-text-message","title":"Group text message","text":"Field Size (bytes) Description channel hash 1 first byte of SHA256 of channel's shared key cipher MAC 2 MAC for encrypted data in next field ciphertext rest of payload encrypted message, see below for details <p>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 <code>0x00</code> because it is a \"plain text message\". The message will be of the form <code>&lt;sender name&gt;: &lt;message body&gt;</code> (eg., <code>user123: I'm on my way</code>).</p> <p>The sender name is unverified message text. Group messages contain no sender signature, so any channel-key holder can choose any sender name.</p>"},{"location":"payloads/#group-datagram","title":"Group datagram","text":"Field Size (bytes) Description channel hash 1 first byte of SHA256 of channel's shared key cipher MAC 2 MAC for encrypted data in next field ciphertext rest of payload encrypted data, see below for details <p>The data contained in the ciphertext uses the format below:</p> Field Size (bytes) Description data type 2 Identifier for type of data. (See number_allocations.md) data len 1 byte length of data data rest of payload (depends on data type)"},{"location":"payloads/#control-data","title":"Control data","text":"Field Size (bytes) Description flags 1 upper 4 bits is sub_type data rest of payload typically unencrypted data"},{"location":"payloads/#discover_req-sub_type","title":"DISCOVER_REQ (sub_type)","text":"Field Size (bytes) Description flags 1 0x8 (upper 4 bits), prefix_only (lowest bit) type_filter 1 bit for each ADV_TYPE_* tag 4 randomly generate by sender since 4 (optional) epoch timestamp (0 by default)"},{"location":"payloads/#discover_resp-sub_type","title":"DISCOVER_RESP (sub_type)","text":"Field Size (bytes) Description flags 1 0x9 (upper 4 bits), node_type (lower 4) snr 1 signed, SNR*4 tag 4 reflected back from DISCOVER_REQ pubkey 8 or 32 node's ID (or prefix)"},{"location":"payloads/#custom-packet","title":"Custom packet","text":"<p>Custom packets have no defined format.</p>"},{"location":"power/","title":"Power saving on a solar repeater \u2014 what it costs, measured","text":"<p>Everything here was measured on the deployment hardware (SenseCAP Solar Node P1-Pro, nRF52840 + SX1262 + L76K) on 2026-08-05/06 with <code>tools/power_ab.py</code>, 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.</p>"},{"location":"power/#the-order-that-matters","title":"The order that matters","text":"lever measured verdict GPS running continuously 46.0 mA (spread 43.7-47.5) <code>gps duty</code> recovers 42-45 of it BLE advertising + Bluefruit's blinking LED see below defaults changed, LED off, 1 s interval <code>powersaving on</code> (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 (<code>set radio.rxps</code>, from EasySkyMesh) ~2.3 mA at <code>max</code> (XIAO, 12. 11. 2026) no on a live node: -16 % received and a TX stall on mast-three, see below <code>radio.rxgain off</code> ~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 <p>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.</p>"},{"location":"power/#gps-is-the-whole-game","title":"GPS is the whole game","text":"<p>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.</p> <p>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 <code>docs/cli_commands.md</code> under <code>time</code>). 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.</p> <p><code>gps duty</code> (<code>gps_enabled == 2</code>, so no prefs-layout change) powers the receiver only around a sync, once a day (until 11/2026 every 30 minutes, the cadence <code>gps on</code> 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):</p> <ul> <li>with sky (<code>mast-three</code>): <code>duty, asleep, fix, 7 sats</code> \u2014 got a fix, set the clock, cut power to the receiver;</li> <li>without (indoors, <code>bench-rpt</code>): <code>awake</code> for exactly 300 s (<code>GPS_DUTY_MAX_AWAKE_SECS</code>), then <code>asleep</code> with an hourly retry, so a blocked sky cannot turn duty mode back into \"always on\".</li> </ul> <p>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: <code>GPS_DUTY_SYNC_INTERVAL_SECS</code> (86400), <code>GPS_DUTY_MAX_AWAKE_SECS</code> (300), <code>GPS_DUTY_RETRY_SECS</code> (21600).</p> <p>Upstream later (v1.18 dev, 11/2026) added its own <code>gps period &lt;s&gt;</code>. 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. <code>gps duty</code> sets the period to 0, and <code>gps on</code> / <code>gps off</code> leave duty mode.</p> <p>One visible side effect: <code>querySensors()</code> 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 <code>set advert.loc prefs</code> (formerly <code>gps advert prefs</code>) \u2014 and <code>node_lat/lon</code> keep the last fix. Confirmed in the field: <code>mast-three</code>'s scrape now carries <code>voltage/temperature/humidity</code> and no <code>gps</code> field.</p>"},{"location":"power/#ble-two-defaults-that-were-quietly-expensive","title":"BLE: two defaults that were quietly expensive","text":"<ul> <li>The blinking LED. Bluefruit drives <code>LED_BLUE</code> while advertising and holds it on while connected. On SenseCap Solar that pin is 12 \u2014 the same pin as <code>P_LORA_TX_LED</code>, so a sealed mast node spent solar charge blinking an LED nobody can see, and the LoRa TX indicator lied as a bonus. <code>RPT_BLE_CONN_LED</code> now defaults to 0.</li> <li>The advertising rate. Upstream leaves the slow interval at 244 units = 152.5 ms, i.e. three channels ~6.5 times a second, forever. <code>RPT_BLE_ADV_SLOW</code> now defaults to 1600 = 1 s; the first <code>RPT_BLE_ADV_FAST_SECS</code> (30) after boot or disconnect stay fast so discovery is still immediate when someone is looking.</li> </ul> <p>Bench boards keep both upstream behaviours (<code>-D RPT_BLE_CONN_LED=1</code>, <code>-D RPT_BLE_ADV_SLOW=244</code> in <code>xiao_analyzer</code>): on a desk the blinking LED is the \"this thing is alive\" indicator.</p> <p><code>ble off</code> 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.</p>"},{"location":"power/#rx-duty-cycle-rxps","title":"RX duty cycle (rxps)","text":"<p>Ported from EasySkyMesh PowerSaving v18 behind <code>-D WITH_RX_POWERSAVING</code> (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: <code>docs/cli_commands.md</code>, <code>radio.rxps</code>.</p> <p>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:</p> 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 <p><code>max</code> (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.</p> <p>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 <code>v1.18.0+tth.20261112</code> (<code>ver</code> v1.18.0-tthd4afea1):</p> phase development build public release together rxps off 0/120 1/120 1/240 <code>on</code> (level 3) 1/120 2/120 3/240 <code>max</code> (level 8) 0/120 0/120 0/240 <p>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.</p> <p>On the live mesh it failed (mast-three, 14. 11. 2026, <code>max</code>). 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 <code>recv_errors</code>, and within two hours of switching it on it stopped transmitting altogether: <code>sent</code> frozen, queue full (32), no <code>tx_start_fail</code>/<code>tx_timeout</code>, RX still counting -- so no adverts and no replies to an admin login, for 6+ hours. <code>radiostat</code> showed <code>irq=0x0014</code> (preamble + header valid, no RX done). <code>set radio.rxps off</code> 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.</p>"},{"location":"power/#mcu-sleep","title":"MCU sleep","text":"<p><code>powersaving on</code> 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.</p> <p>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.</p> <p>Blocking the loop task instead of waiting for an event (so that FreeRTOS can sleep tickless) changes nothing either: <code>delay(10)</code> against <code>sd_app_evt_wait()</code>, 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.</p> <p>One fork-specific fix goes with it: the sleep is also held off while the BLE console still has queued output (<code>bleTxPending()</code>), because on the observer node a half-drained <code>rxlog</code>/<code>pktlog</code> 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.</p>"},{"location":"power/#cpu-time-per-received-packet-pwr_duty_instrument","title":"CPU time per received packet (<code>PWR_DUTY_INSTRUMENT</code>)","text":"<p>A bench build with <code>-D PWR_DUTY_INSTRUMENT</code> (nRF52 only, nothing changes without the flag) prints one line to the USB console every ~10 s:</p> <pre><code>PWRDUTY awake_ms=\u2026 asleep_ms=\u2026 wakes=\u2026 duty_permille=\u2026 pkt_us=\u2026 pkt_n=\u2026\n</code></pre> <ul> <li><code>awake_ms</code>, <code>asleep_ms</code> and <code>duty_permille</code> are the time between a return from <code>NRF52Board::sleep()</code> and the next entry into it, against the WFE span inside it. This needs <code>powersaving on</code>: without it <code>sleep()</code> is never called.</li> <li><code>wakes</code> counts the passes through <code>sleep()</code>. BLE and USB events wake the core too, so the duty is not packet cost alone.</li> <li><code>pkt_us</code> and <code>pkt_n</code> are the CPU time spent in <code>Dispatcher::processRecvPacket()</code> (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.</li> </ul> <p>All counters are cumulative since boot, so take the difference between two lines.</p> <p>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.</p>"},{"location":"power/#a-mast-that-runs-flat-bootlock-and-cutoff","title":"A mast that runs flat: bootlock and cutoff","text":"<p>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.</p> <p><code>SenseCap_Solar_repeater</code> builds with <code>NRF52_POWER_MANAGEMENT</code> (upstream code, wired in <code>variants/sensecap_solar</code>) and <code>PWRMGT_RUNTIME</code> (ours), which gives two thresholds, both saved on the node and settable from the console or as an admin over the mesh:</p> default <code>set pwr.bootlock &lt;mV&gt;\\|off</code> 3300 mV (<code>variant.h</code>) at boot, below it the node goes to SYSTEMOFF and the LPCOMP wakes it when the battery recovers <code>set pwr.cutoff &lt;mV&gt;\\|off</code> off while running, three readings in a row (one a minute) below it switch the node off into the same SYSTEMOFF <code>get pwr</code> both, the battery now and at boot, USB, the reason of the last switch-off <p>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 <code>/pwr_guard</code>, not in the prefs; without the file the build defaults apply (<code>PWRMGT_BOOTLOCK_DEFAULT</code>, <code>PWRMGT_CUTOFF_DEFAULT</code>).</p> <p>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 <code>variant.h</code>, 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 (<code>gps duty</code> resyncs it, <code>time</code> sets it).</p> <p>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, <code>off</code> for either -- and has to be reconciled with #2088 if that lands.</p> <p>Not yet verified on hardware: the logic has host tests (<code>test/test_low_voltage_guard</code>), 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 (<code>get boot</code> then shows <code>RESETREAS=0x00020000</code>, bit 17, wake from LPCOMP); with a cutoff set, lowering the supply below it must switch the node off within ~3 minutes and <code>get pwr</code> after the wake must say <code>last off: Low Voltage</code>.</p>"},{"location":"power/#nrf52-sleep-peripheral-fixes","title":"nRF52 sleep &amp; peripheral fixes","text":"<p>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.</p> <p>The one that matters: <code>CRYPTOCELL_IRQn</code> sleep insomnia (+2.6 mA). <code>USE_CC310_HW_CRYPTO=1</code> runs CC310 in polling mode with <code>CRYPTOCELL_IRQn</code> disabled in NVIC. A completed operation leaves the IRQ pending, and a pending IRQ ends <code>sd_app_evt_wait()</code>/<code>__WFE()</code> immediately. <code>NRF52Board::sleep()</code> now clears it before sleeping, as the Adafruit core's <code>wiring.c</code> does. Without the clear, a node comes out of every boot stuck at 14.1 mA instead of 11.5:</p> 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 <p>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.</p> <p>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 <code>bench duty</code> reads <code>vbus 0 usbd 0</code> 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).</p> 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 <p>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 <code>cc_pend</code> reads 1.</p> <p>At this voltage DC/DC is worth 0.6 mA. <code>bench dcdc off</code> at runtime gives +0.63 / +0.60 mA, and <code>A_like</code> (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 <code>DCDCEN</code> reads 1 after every boot with or without it. So the regulator mode matters, and SoftDevice simply does not turn it off.</p> knob (3.3 V) round 1 round 2 <code>bench dcdc off</code> +0.63 mA +0.60 mA <code>bench cc off</code> (runtime) +0.00 mA \u22120.01 mA <code>bench nfcal 2000</code> \u22120.04 mA (one pair) <code>set radio.rxps max</code> \u22122.30 mA \u22122.30 mA <code>set radio.rxps balanced</code> \u22121.98 mA \u22121.82 mA <code>set radio.rxgain off</code> \u22120.45 mA \u22120.51 mA <code>powersaving off</code> +2.37 mA (one pair) <p>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.</p> <p>Measured to make no difference, kept anyway (each below 0.1 mA): - DC/DC re-enabled after SoftDevice start (<code>onBootComplete()</code>): +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 <code>NRF_POWER</code> back to LDO did not hold on this board. <code>DCDCEN</code> 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 (<code>NOISE_FLOOR_CALIB_INTERVAL</code>): +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.</p> <p>Not measured (compile-time or other hardware): - Avoid <code>NRF_SPIM3</code> (Nordic Errata 195): <code>[nrf52_base]</code> sets <code>-D SPI_32MHZ_INTERFACE=1</code>, which moves the SX1262 <code>SPI</code> bus from <code>NRF_SPIM3</code> to <code>NRF_SPIM2</code>. <code>SPIClass::endTransaction()</code> disables <code>SPIM3</code> 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: <code>NmeaGpsDriver::stopHardware()</code> resets TX/RX via <code>nrf_gpio_cfg_default()</code> after <code>Uart::end()</code>, so the unpowered receiver is not back-powered. - Unused I2C bus switched off: <code>EnvironmentSensorManager::begin()</code> calls <code>Wire.end()</code> when the bus scan finds no device, and enables it again for the <code>i2c</code> CLI command. - SenseCAP Solar battery divider (<code>VBAT_ENABLE</code>): held <code>HIGH</code> (off) at boot and set back to <code>HIGH</code> right after <code>getBattMilliVolts()</code>, instead of staying <code>LOW</code>. <code>initiateShutdown()</code> still drives it <code>LOW</code> 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.</p> <p>Runtime knobs from the same night, for comparison (paired deltas):</p> knob round 1 round 2 reception (x1 witness) <code>set radio.rxps max</code> \u22122.47 mA \u22122.33 mA 20/21 <code>set radio.rxps balanced</code> \u22121.98 mA \u22121.88 mA 20/21 <code>set radio.rxgain off</code> \u22120.49 mA \u22120.45 mA 10/12 <code>powersaving off</code> +2.66 mA (one pair) 5/6 baseline 83/90 <p>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. <code>powersaving</code> is worth 2.7 mA here without USB, much more than the ~1 mA measured with USB attached (USB keeps HFCLK running).</p> <p>Tools: <code>tools/power_ab.py --ina &lt;url&gt;</code> (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.</p>"},{"location":"power/#measuring-this-yourself-two-traps","title":"Measuring this yourself \u2014 two traps","text":"<ol> <li>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 <code>i2c</code> command reports nothing at all on the only bus the variant has \u2014 on three separate P1-Pro units (<code>bench-rpt</code>, <code>mast-rpt-two</code>, <code>tth-mast-repeater-one</code>), against a sensor table that expects <code>38 76 70 44 5C 42 40 41 5A 29 77</code>. So it is the board, not one dead part, and the cross-check for a power measurement has to be a second board.</li> <li>With <code>gps duty</code> 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 <code>gps off</code> in every cell of such a run and restore <code>gps duty</code> afterwards.</li> </ol> <p>See <code>tools/power_ab.py --help</code> for the alternating-cell design that makes these deltas trustworthy in the first place.</p>"},{"location":"qr_codes/","title":"QR Codes","text":"<p>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.</p>"},{"location":"qr_codes/#add-channel","title":"Add Channel","text":"<p>Example URL:</p> <pre><code>meshcore://channel/add?name=Public&amp;secret=8b3387e9c5cdea6ac9e5edbaa115cd72\n</code></pre> <p>Parameters:</p> <ul> <li><code>name</code>: Channel name (URL-encoded)</li> <li><code>secret</code>: 16-byte secret represented as 32 hex characters</li> <li><code>region_scope</code>: Region Scope (optional, URL-encoded if provided)<ul> <li>Supported by MeshCore App v1.47.0+</li> </ul> </li> </ul>"},{"location":"qr_codes/#add-contact","title":"Add Contact","text":"<p>Example URL:</p> <pre><code>meshcore://contact/add?name=Example+Contact&amp;public_key=9cd8fcf22a47333b591d96a2b848b73f457b1bb1a3ea2453a885f9e5787765b1&amp;type=1\n</code></pre> <p>Parameters:</p> <ul> <li><code>name</code>: Contact name (URL-encoded if needed)</li> <li><code>public_key</code>: 32-byte public key represented as 64 hex characters</li> <li><code>type</code>: numeric contact type<ul> <li><code>1</code>: Companion</li> <li><code>2</code>: Repeater</li> <li><code>3</code>: Room Server</li> <li><code>4</code>: Sensor</li> </ul> </li> </ul>"},{"location":"radio_presets/","title":"Radio Presets","text":"<p>The radio presets are currently stored on the MeshCore App API server.</p> <p>This allows us to update the presets without releasing new application updates.</p> <p>The presets can be fetched from https://api.meshcore.nz/api/v1/config</p> <p>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.</p> <p>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.</p> <p>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.</p> <p>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.</p> <p>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.</p>"},{"location":"radio_presets/#json-response","title":"JSON Response","text":"<p>See the example JSON response below, which shows the expected format provided by the API server.</p> <p>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.</p> <p>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.</p> <p>Note: Some presets contain an optional <code>network_settings</code> section which defines the <code>path_hash_size</code> to use for this mesh network.</p> <pre><code>{\n \"config\": {\n \"suggested_radio_settings\": {\n \"info_message\": \"These presets are suggested by the community.\",\n \"entries\": [\n {\n \"title\": \"Australia (Narrow)\",\n \"description\": \"916.575MHz / SF7 / BW62.5 / CR7\",\n \"frequency\": \"916.575\",\n \"spreading_factor\": \"7\",\n \"bandwidth\": \"62.5\",\n \"coding_rate\": \"7\"\n },\n {\n \"title\": \"New Zealand (Narrow)\",\n \"description\": \"917.375MHz / SF7 / BW62.5 / CR5 / 2B\",\n \"frequency\": \"917.375\",\n \"spreading_factor\": \"7\",\n \"bandwidth\": \"62.5\",\n \"coding_rate\": \"5\",\n \"network_settings\": {\n \"path_hash_size\": 2\n }\n },\n {\n \"title\": \"Portugal 868\",\n \"description\": \"869.618MHz / SF7 / BW62.5 / CR6\",\n \"frequency\": \"869.618\",\n \"spreading_factor\": \"7\",\n \"bandwidth\": \"62.5\",\n \"coding_rate\": \"6\"\n }\n ]\n }\n }\n}\n</code></pre>"},{"location":"stats_binary_frames/","title":"Stats Binary Frame Structures","text":"<p>Binary frame structures for companion radio stats commands. All multi-byte integers use little-endian byte order.</p>"},{"location":"stats_binary_frames/#command-codes","title":"Command Codes","text":"Command Code Description <code>CMD_GET_STATS</code> 56 Get statistics (2-byte command: code + sub-type)"},{"location":"stats_binary_frames/#stats-sub-types","title":"Stats Sub-Types","text":"<p>The <code>CMD_GET_STATS</code> command uses a 2-byte frame structure: - Byte 0: <code>CMD_GET_STATS</code> (56) - Byte 1: Stats sub-type: - <code>STATS_TYPE_CORE</code> (0) - Get core device statistics - <code>STATS_TYPE_RADIO</code> (1) - Get radio statistics - <code>STATS_TYPE_PACKETS</code> (2) - Get packet statistics</p>"},{"location":"stats_binary_frames/#response-codes","title":"Response Codes","text":"Response Code Description <code>RESP_CODE_STATS</code> 24 Statistics response (2-byte response: code + sub-type)"},{"location":"stats_binary_frames/#stats-response-sub-types","title":"Stats Response Sub-Types","text":"<p>The <code>RESP_CODE_STATS</code> response uses a 2-byte header structure: - Byte 0: <code>RESP_CODE_STATS</code> (24) - Byte 1: Stats sub-type (matches command sub-type): - <code>STATS_TYPE_CORE</code> (0) - Core device statistics response - <code>STATS_TYPE_RADIO</code> (1) - Radio statistics response - <code>STATS_TYPE_PACKETS</code> (2) - Packet statistics response</p>"},{"location":"stats_binary_frames/#resp_code_stats-stats_type_core-24-0","title":"RESP_CODE_STATS + STATS_TYPE_CORE (24, 0)","text":"<p>Total Frame Size: 11 bytes</p> Offset Size Type Field Name Description Range/Notes 0 1 uint8_t response_code Always <code>0x18</code> (24) - 1 1 uint8_t stats_type Always <code>0x00</code> (STATS_TYPE_CORE) - 2 2 uint16_t battery_mv Battery voltage in millivolts 0 - 65,535 4 4 uint32_t uptime_secs Device uptime in seconds 0 - 4,294,967,295 8 2 uint16_t errors Error flags bitmask - 10 1 uint8_t queue_len Outbound packet queue length 0 - 255"},{"location":"stats_binary_frames/#example-structure-cc","title":"Example Structure (C/C++)","text":"<pre><code>struct StatsCore {\n uint8_t response_code; // 0x18\n uint8_t stats_type; // 0x00 (STATS_TYPE_CORE)\n uint16_t battery_mv;\n uint32_t uptime_secs;\n uint16_t errors;\n uint8_t queue_len;\n} __attribute__((packed));\n</code></pre>"},{"location":"stats_binary_frames/#resp_code_stats-stats_type_radio-24-1","title":"RESP_CODE_STATS + STATS_TYPE_RADIO (24, 1)","text":"<p>Total Frame Size: 14 bytes</p> Offset Size Type Field Name Description Range/Notes 0 1 uint8_t response_code Always <code>0x18</code> (24) - 1 1 uint8_t stats_type Always <code>0x01</code> (STATS_TYPE_RADIO) - 2 2 int16_t noise_floor Radio noise floor in dBm -140 to +10 4 1 int8_t last_rssi Last received signal strength in dBm -128 to +127 5 1 int8_t last_snr SNR scaled by 4 Divide by 4.0 for dB 6 4 uint32_t tx_air_secs Cumulative transmit airtime in seconds 0 - 4,294,967,295 10 4 uint32_t rx_air_secs Cumulative receive airtime in seconds 0 - 4,294,967,295"},{"location":"stats_binary_frames/#example-structure-cc_1","title":"Example Structure (C/C++)","text":"<pre><code>struct StatsRadio {\n uint8_t response_code; // 0x18\n uint8_t stats_type; // 0x01 (STATS_TYPE_RADIO)\n int16_t noise_floor;\n int8_t last_rssi;\n int8_t last_snr; // Divide by 4.0 to get actual SNR in dB\n uint32_t tx_air_secs;\n uint32_t rx_air_secs;\n} __attribute__((packed));\n</code></pre>"},{"location":"stats_binary_frames/#resp_code_stats-stats_type_packets-24-2","title":"RESP_CODE_STATS + STATS_TYPE_PACKETS (24, 2)","text":"<p>Total Frame Size: 26 bytes (legacy) or 30 bytes (includes <code>recv_errors</code>)</p> Offset Size Type Field Name Description Range/Notes 0 1 uint8_t response_code Always <code>0x18</code> (24) - 1 1 uint8_t stats_type Always <code>0x02</code> (STATS_TYPE_PACKETS) - 2 4 uint32_t recv Total packets received 0 - 4,294,967,295 6 4 uint32_t sent Total packets sent 0 - 4,294,967,295 10 4 uint32_t flood_tx Packets sent via flood routing 0 - 4,294,967,295 14 4 uint32_t direct_tx Packets sent via direct routing 0 - 4,294,967,295 18 4 uint32_t flood_rx Packets received via flood routing 0 - 4,294,967,295 22 4 uint32_t direct_rx Packets received via direct routing 0 - 4,294,967,295 26 4 uint32_t recv_errors Receive/CRC errors (RadioLib); present only in 30-byte frame 0 - 4,294,967,295"},{"location":"stats_binary_frames/#notes","title":"Notes","text":"<ul> <li>Counters are cumulative from boot and may wrap.</li> <li><code>recv = flood_rx + direct_rx</code></li> <li><code>sent = flood_tx + direct_tx</code></li> <li>Clients should accept frame length \u2265 26; if length \u2265 30, parse <code>recv_errors</code> at offset 26.</li> </ul>"},{"location":"stats_binary_frames/#example-structure-cc_2","title":"Example Structure (C/C++)","text":"<pre><code>struct StatsPackets {\n uint8_t response_code; // 0x18\n uint8_t stats_type; // 0x02 (STATS_TYPE_PACKETS)\n uint32_t recv;\n uint32_t sent;\n uint32_t flood_tx;\n uint32_t direct_tx;\n uint32_t flood_rx;\n uint32_t direct_rx;\n uint32_t recv_errors; // present when frame size is 30\n} __attribute__((packed));\n</code></pre>"},{"location":"stats_binary_frames/#command-usage-example-python","title":"Command Usage Example (Python)","text":"<pre><code># Send CMD_GET_STATS command\ndef send_get_stats_core(serial_interface):\n \"\"\"Send command to get core stats\"\"\"\n cmd = bytes([56, 0]) # CMD_GET_STATS (56) + STATS_TYPE_CORE (0)\n serial_interface.write(cmd)\n\ndef send_get_stats_radio(serial_interface):\n \"\"\"Send command to get radio stats\"\"\"\n cmd = bytes([56, 1]) # CMD_GET_STATS (56) + STATS_TYPE_RADIO (1)\n serial_interface.write(cmd)\n\ndef send_get_stats_packets(serial_interface):\n \"\"\"Send command to get packet stats\"\"\"\n cmd = bytes([56, 2]) # CMD_GET_STATS (56) + STATS_TYPE_PACKETS (2)\n serial_interface.write(cmd)\n</code></pre>"},{"location":"stats_binary_frames/#response-parsing-example-python","title":"Response Parsing Example (Python)","text":"<pre><code>import struct\n\ndef parse_stats_core(frame):\n \"\"\"Parse RESP_CODE_STATS + STATS_TYPE_CORE frame (11 bytes)\"\"\"\n response_code, stats_type, battery_mv, uptime_secs, errors, queue_len = \\\n struct.unpack('&lt;B B H I H B', frame)\n assert response_code == 24 and stats_type == 0, \"Invalid response type\"\n return {\n 'battery_mv': battery_mv,\n 'uptime_secs': uptime_secs,\n 'errors': errors,\n 'queue_len': queue_len\n }\n\ndef parse_stats_radio(frame):\n \"\"\"Parse RESP_CODE_STATS + STATS_TYPE_RADIO frame (14 bytes)\"\"\"\n response_code, stats_type, noise_floor, last_rssi, last_snr, tx_air_secs, rx_air_secs = \\\n struct.unpack('&lt;B B h b b I I', frame)\n assert response_code == 24 and stats_type == 1, \"Invalid response type\"\n return {\n 'noise_floor': noise_floor,\n 'last_rssi': last_rssi,\n 'last_snr': last_snr / 4.0, # Unscale SNR\n 'tx_air_secs': tx_air_secs,\n 'rx_air_secs': rx_air_secs\n }\n\ndef parse_stats_packets(frame):\n \"\"\"Parse RESP_CODE_STATS + STATS_TYPE_PACKETS frame (26 or 30 bytes)\"\"\"\n assert len(frame) &gt;= 26, \"STATS_TYPE_PACKETS frame too short\"\n response_code, stats_type, recv, sent, flood_tx, direct_tx, flood_rx, direct_rx = \\\n struct.unpack('&lt;B B I I I I I I', frame[:26])\n assert response_code == 24 and stats_type == 2, \"Invalid response type\"\n result = {\n 'recv': recv,\n 'sent': sent,\n 'flood_tx': flood_tx,\n 'direct_tx': direct_tx,\n 'flood_rx': flood_rx,\n 'direct_rx': direct_rx\n }\n if len(frame) &gt;= 30:\n (recv_errors,) = struct.unpack('&lt;I', frame[26:30])\n result['recv_errors'] = recv_errors\n return result\n</code></pre>"},{"location":"stats_binary_frames/#command-usage-example-javascripttypescript","title":"Command Usage Example (JavaScript/TypeScript)","text":"<pre><code>// Send CMD_GET_STATS command\nconst CMD_GET_STATS = 56;\nconst STATS_TYPE_CORE = 0;\nconst STATS_TYPE_RADIO = 1;\nconst STATS_TYPE_PACKETS = 2;\n\nfunction sendGetStatsCore(serialInterface: SerialPort): void {\n const cmd = new Uint8Array([CMD_GET_STATS, STATS_TYPE_CORE]);\n serialInterface.write(cmd);\n}\n\nfunction sendGetStatsRadio(serialInterface: SerialPort): void {\n const cmd = new Uint8Array([CMD_GET_STATS, STATS_TYPE_RADIO]);\n serialInterface.write(cmd);\n}\n\nfunction sendGetStatsPackets(serialInterface: SerialPort): void {\n const cmd = new Uint8Array([CMD_GET_STATS, STATS_TYPE_PACKETS]);\n serialInterface.write(cmd);\n}\n</code></pre>"},{"location":"stats_binary_frames/#response-parsing-example-javascripttypescript","title":"Response Parsing Example (JavaScript/TypeScript)","text":"<pre><code>interface StatsCore {\n battery_mv: number;\n uptime_secs: number;\n errors: number;\n queue_len: number;\n}\n\ninterface StatsRadio {\n noise_floor: number;\n last_rssi: number;\n last_snr: number;\n tx_air_secs: number;\n rx_air_secs: number;\n}\n\ninterface StatsPackets {\n recv: number;\n sent: number;\n flood_tx: number;\n direct_tx: number;\n flood_rx: number;\n direct_rx: number;\n recv_errors?: number; // present when frame is 30 bytes\n}\n\nfunction parseStatsCore(buffer: ArrayBuffer): StatsCore {\n const view = new DataView(buffer);\n const response_code = view.getUint8(0);\n const stats_type = view.getUint8(1);\n if (response_code !== 24 || stats_type !== 0) {\n throw new Error('Invalid response type');\n }\n return {\n battery_mv: view.getUint16(2, true),\n uptime_secs: view.getUint32(4, true),\n errors: view.getUint16(8, true),\n queue_len: view.getUint8(10)\n };\n}\n\nfunction parseStatsRadio(buffer: ArrayBuffer): StatsRadio {\n const view = new DataView(buffer);\n const response_code = view.getUint8(0);\n const stats_type = view.getUint8(1);\n if (response_code !== 24 || stats_type !== 1) {\n throw new Error('Invalid response type');\n }\n return {\n noise_floor: view.getInt16(2, true),\n last_rssi: view.getInt8(4),\n last_snr: view.getInt8(5) / 4.0, // Unscale SNR\n tx_air_secs: view.getUint32(6, true),\n rx_air_secs: view.getUint32(10, true)\n };\n}\n\nfunction parseStatsPackets(buffer: ArrayBuffer): StatsPackets {\n const view = new DataView(buffer);\n if (buffer.byteLength &lt; 26) {\n throw new Error('STATS_TYPE_PACKETS frame too short');\n }\n const response_code = view.getUint8(0);\n const stats_type = view.getUint8(1);\n if (response_code !== 24 || stats_type !== 2) {\n throw new Error('Invalid response type');\n }\n const result: StatsPackets = {\n recv: view.getUint32(2, true),\n sent: view.getUint32(6, true),\n flood_tx: view.getUint32(10, true),\n direct_tx: view.getUint32(14, true),\n flood_rx: view.getUint32(18, true),\n direct_rx: view.getUint32(22, true)\n };\n if (buffer.byteLength &gt;= 30) {\n result.recv_errors = view.getUint32(26, true);\n }\n return result;\n}\n</code></pre>"},{"location":"stats_binary_frames/#field-size-considerations","title":"Field Size Considerations","text":"<ul> <li>Packet counters (uint32_t): May wrap after extended high-traffic operation.</li> <li>Time fields (uint32_t): Max ~136 years.</li> <li>SNR (int8_t, scaled by 4): Range -32 to +31.75 dB, 0.25 dB precision.</li> </ul>"},{"location":"terminal_chat_cli/","title":"Terminal Chat CLI","text":"<p>Below are the commands you can enter into the Terminal Chat clients:</p> <p><pre><code>set freq {frequency}\n</code></pre> Set the LoRa frequency. Example: set freq 915.8</p> <p><pre><code>set tx {tx-power-dbm}\n</code></pre> Sets LoRa transmit power in dBm.</p> <p><pre><code>set name {name}\n</code></pre> Sets your advertisement name.</p> <p><pre><code>set lat {latitude}\n</code></pre> Sets your advertisement map latitude. (decimal degrees)</p> <p><pre><code>set lon {longitude}\n</code></pre> Sets your advertisement map longitude. (decimal degrees)</p> <p><pre><code>set af {air-time-factor}\n</code></pre> Sets the transmit air-time-factor.</p> <p>Note: <code>set dutycycle</code> is not available in Terminal Chat. Every other firmware \u2014 Repeater, Room Server, Sensor and Companion Radio \u2014 routes its <code>set</code>/<code>get</code> 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 <code>set</code> handler covering only the six options listed above.</p> <p><pre><code>time {epoch-secs}\n</code></pre> Set the device clock using UNIX epoch seconds. Example: time 1738242833</p> <p><pre><code>advert\n</code></pre> Sends an advertisement packet</p> <p><pre><code>clock\n</code></pre> Displays current time per device's clock.</p> <p><pre><code>ver\n</code></pre> Shows the device version and firmware build date.</p> <p><pre><code>card\n</code></pre> Displays your 'business card', for others to manually import</p> <p><pre><code>import {card}\n</code></pre> Imports the given card to your contacts.</p> <p><pre><code>list {n}\n</code></pre> List all contacts by most recent. (optional {n}, is the last n by advertisement date)</p> <p><pre><code>to\n</code></pre> Shows the name of current recipient contact. (for subsequent 'send' commands)</p> <p><pre><code>to {name-prefix}\n</code></pre> Sets the recipient to the first matching contact (in 'list') by the name prefix. (ie. you don't have to type whole name)</p> <p><pre><code>send {text}\n</code></pre> Sends the text message (as DM) to current recipient.</p> <p><pre><code>reset path\n</code></pre> Resets the path to current recipient, for new path discovery.</p> <p><pre><code>public {text}\n</code></pre> Sends the text message to the built-in 'public' group channel</p> <p><pre><code>help\n</code></pre> Lists the available commands.</p>"},{"location":"tth-commands/","title":"Console commands of this fork (meshcore-tth)","text":"<p>Warning</p> <p>Part of an experimental fork, not meant for regular users: its releases are a rolling release on MeshCore <code>dev</code> (see the README).</p> <p>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, <code>rxps</code>, <code>batt.icon</code>, <code>gps duty</code>, <code>dfu</code>, <code>get boot</code>), this page gives the short form and points to it.</p> <p>Where a command exists depends on the role and on build flags:</p> mark builds all repeater, room server and sensor -- every build with a text console repeater <code>simple_repeater</code> builds observer the <code>*-observer</code> variants of the nRF52 repeaters in the releases (<code>MAX_HEARD_NODES</code>, <code>RXLOG_SIZE</code>, <code>PKTFEED_SIZE</code>, <code>BLE_PIN_CODE</code>) own build only with the named flag -- not in the releases <p>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).</p>"},{"location":"tth-commands/#antispam-repeater","title":"Antispam (repeater)","text":"<p>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.</p>"},{"location":"tth-commands/#fairnesslimiter-fairness","title":"FairnessLimiter -- <code>fairness</code>","text":"<p>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 (<code>FAIRNESS_ENABLED_DEFAULT</code>).</p> command <code>fairness</code> state, denials per category, caps and refill intervals <code>fairness on\\|off</code> the buckets on/off <code>fairness cap &lt;group&gt; &lt;sender&gt; &lt;advert&gt;</code> burst caps 0..255, <code>0</code> = build default (100 / 150 / 30) <code>fairness refill &lt;group_s&gt; &lt;sender_s&gt; &lt;advert_s&gt;</code> one token per interval, seconds, <code>0</code> = default (30 / 10 / 600) <code>fairness grid</code> the busiest denied buckets per category -- what is being shed <code>fairness air</code> estimated airtime shed per reason <code>fairness advert [&lt;hours&gt;\\|clear]</code> per-origin advert window: one flood advert per origin per <code>&lt;hours&gt;</code> (0..720, <code>0</code> = off, default off); <code>clear</code> forgets the origins seen <code>fairness dryrun [on\\|off]</code> count every verdict but forward anyway (default off) <p>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).</p>"},{"location":"tth-commands/#channel-filter-filter","title":"Channel filter -- <code>filter</code>","text":"<p>On channels whose key the node knows (<code>FILTER_CHANNEL_PSKS</code>; the releases know Public, <code>#meshcore</code> and <code>#test</code>) 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.</p> command <code>filter</code> / <code>filter list</code> channels known, drops, the deny list <code>filter add &lt;name&gt;</code> / <code>filter del &lt;name&gt;</code> exact, case-insensitive; spaces allowed, commas not <code>filter clear</code> empty the list"},{"location":"tth-commands/#channel-hash-deny-forward-filter-hash-every-repeater","title":"Channel-hash deny-forward -- <code>filter hash</code> (every repeater)","text":"<p>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.</p> command <code>filter hash</code> drops, passes by a throttle, the list (<code>43</code> blocked, <code>43/60</code> throttled) <code>filter hash add &lt;hex&gt; [secs]</code> block the byte, or let one packet through per <code>secs</code> (1..65535); re-adding changes the interval <code>filter hash del &lt;hex&gt;</code> / <code>filter hash clear</code> <p>A throttle's window lives in RAM: the first match after a boot passes.</p>"},{"location":"tth-commands/#message-age-filter-age-repeater-with-channel-keys","title":"Message age -- <code>filter age</code> (repeater with channel keys)","text":"<p><code>filter age &lt;min&gt;|off</code> (1..10080, default off): do not forward a group text on a decrypted channel whose sender timestamp is older than <code>&lt;min&gt;</code> 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.</p>"},{"location":"tth-commands/#filter-dryrun-onoff","title":"<code>filter dryrun [on|off]</code>","text":"<p>Count every <code>filter</code> verdict (sender, hash, age) but forward anyway -- try a rule on a live node before it bites. Default off.</p>"},{"location":"tth-commands/#radio-watchdogs-and-board-upkeep-all","title":"Radio watchdogs and board upkeep (all)","text":"<p>Details: cli_commands.md, \"Radio silence watchdog\", \"TX stall watchdog\", \"Reboot into the bootloader\" and \"Why the board last reset\".</p> command <code>set radio.silence &lt;min&gt;\\|off</code> / <code>get radio.silence</code> deaf receiver: re-arm RX, then reboot after <code>&lt;min&gt;</code> 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 <code>set radio.txstall &lt;min&gt;\\|off</code> / <code>get radio.txstall</code> repeater only: packets queued and nothing sent for <code>&lt;min&gt;</code> -&gt; re-arm, then reboot. An empty queue never counts. On, 15 min (<code>RADIO_TXSTALL_MIN</code>); a change holds until reboot <code>get radio.reboots</code> reboots done by the watchdogs, survives power loss <code>get boot</code> reset reason and the hardfault record (also printed at boot) <code>dfu [uf2\\|serial\\|ota]</code> local only: reboot into the bootloader -- UF2 drive (default), CDC port for <code>adafruit-nrfutil</code>, or BLE DFU <code>fw ...</code> <code>-ota</code> images only: admin-pushed firmware update, see ota.md"},{"location":"tth-commands/#number-arguments-of-set-all-and-the-companions-serial-cli","title":"Number arguments of <code>set</code> (all, and the companion's serial CLI)","text":"<p>Upstream parses the value of a <code>set</code> with <code>atoi()</code>/<code>atof()</code>: text became 0, <code>300</code> became 44 in a one-byte setting, and the result was saved with <code>OK</code>. This fork refuses a value that is not a number or lies outside the range and keeps the old one (<code>Error, must be ...</code>). It applies to <code>set tx</code> (-9 up to the board's <code>MAX_LORA_TX_POWER</code>, else 30, and saved only if the radio takes it: SX1262 -9..22), <code>set radio</code> and <code>tempradio</code> (each field; the timeout 1-10080 min), <code>set freq</code>, <code>set lat</code>/<code>set lon</code>, <code>set flood.max</code>, <code>set flood.max.unscoped</code>, <code>set flood.max.advert</code> (0-64), <code>set int.thresh</code> (0-255), <code>set multi.acks</code> (0-1), <code>set path.hash.mode</code> (0-2), <code>set agc.reset.interval</code> (0-1020), <code>set rxdelay</code>, <code>set txdelay</code>, <code>set direct.txdelay</code>, <code>set adc.multiplier</code>, and on the companion <code>set pin</code>, <code>set adc.multiplier</code>, <code>set tz.offset</code>. No exponent (<code>1e3</code>), no <code>nan</code>/<code>inf</code>.</p>"},{"location":"tth-commands/#diagnostics","title":"Diagnostics","text":"command where <code>blink [n]</code> / <code>blink on\\|off</code> repeater flash a spare LED (not the BLE or TX one) <code>n</code> times (default 6, max 999), or until <code>blink off</code> (gives up after 10 min); finds a board on a bench or a node on a mast <code>txpwr [dBm]</code> repeater LoRa output power until reboot, with RadioLib's status; takes -9..30 <code>i2c</code> all scan the I2C bus <code>get chip</code> nRF52 (repeater, room server, sensor) the silicon (<code>nRF52840 AAD0</code>; variant <code>xxF0</code> and later = rev3) and <code>UICR.APPROTECT</code>: <code>open</code> means SWD can read the whole flash, keys included <code>dio1</code> own build: <code>PIN_DIAG</code> 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 <code>radiostat</code> own build: <code>RADIO_DIAG</code> receiver state, interrupt and RX counters, without touching the radio <code>radiokick rx\\|clrirq\\|standby\\|agc</code> own build: <code>RADIO_DIAG</code> one recovery step, gentlest first: re-arm RX, clear latched IRQs, standby + RX, AGC reset; the first that brings <code>recv</code> back names the broken layer <p>A board with a dead DIO1 line still runs with <code>LORA_POLL_IRQ</code> (own build): the IRQ status is polled over SPI.</p>"},{"location":"tth-commands/#ble-console-observer","title":"BLE console (observer)","text":"<p>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 <code>123456</code>. These commands also work as admin over the mesh.</p> command <code>ble</code> on/off, PIN <code>own</code> or <code>build default</code> -- never the PIN itself <code>ble pin &lt;6 digits&gt;</code> set your own PIN (saved, survives a reflash; drops every bond, so paired devices pair again) <code>ble on\\|off</code> persisted; off after flashing (<code>RPT_BLE_DEFAULT_OFF</code>), and <code>ble on</code> is refused while the PIN is the placeholder <code>blepwr [dBm\\|default]</code> TX power of the connection (-40, -20, -16, -12, -8, -4, 0, 2..8), applied to live connections and saved; <code>default</code> returns to the build value (0 dBm) <code>bleconn</code> what the central actually agreed to: interval (and what was requested), latency, supervision timeout <p>A connected central stops the node advertising: if the BLE console cannot be found, look for who is connected (<code>ble</code> shows it).</p>"},{"location":"tth-commands/#passive-analyzer-observer","title":"Passive analyzer (observer)","text":"command <code>nodes [offset]</code> heard repeaters and room servers with a key to join several paths, paged <code>rxlog [cursor]</code> every frame heard: type, path, SNR, RSSI; <code>cursor</code> from the previous page (<code>0</code> = all) <code>pktlog [cursor]</code> raw frames heard, for an observer feed (meshcore-repeater-observer) <p>A page is as big as the caller's reply buffer: ~1000 B on the local console, one packet over the mesh.</p>"},{"location":"tth-commands/#channel-bot-own-build-bot_channel_psk","title":"Channel bot (own build: <code>BOT_CHANNEL_PSK</code>)","text":"<p>A repeater that answers on one channel without forwarding anything: <code>!link</code>, <code>!path</code>, <code>!snr</code>, <code>!heard</code>, <code>!noise</code>, <code>!ping</code>, <code>!help</code> (narrowed by <code>BOT_COMMANDS</code>), with a per-sender cooldown and an ignore list. <code>bot</code> on the console shows its state.</p>"},{"location":"tth-commands/#power-and-clock","title":"Power and clock","text":"command where <code>set radio.rxps off\\|on\\|balanced\\|max</code>, <code>level &lt;1-10&gt; [preamble 16\\|32]</code> / <code>get radio.rxps</code> all, SX1262 only (<code>WITH_RX_POWERSAVING</code>, in the releases) RX duty cycle: the radio sleeps between short listening windows. Off by default. <code>max</code> 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 <code>set batt.icon on\\|off</code>, <code>set batt.icon.lo\\|hi &lt;mV&gt;</code> 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) <code>gps duty ...</code> GPS boards the receiver runs only around a clock sync; see cli_commands.md <code>get pwr</code>, <code>set pwr.bootlock &lt;mV&gt;\\|off</code>, <code>set pwr.cutoff &lt;mV&gt;\\|off</code> SenseCAP Solar repeater (<code>PWRMGT_RUNTIME</code>) battery thresholds: don't start below the bootlock, switch a running node off below the cutoff (cutoff &lt; bootlock, none above the battery right now); saved on the node, see power.md <code>clkreboot</code> all reset the clock to the build epoch and reboot -- the only way to move a clock backwards (<code>time</code> and <code>clock sync</code> refuse to)"},{"location":"tth-commands/#sensors","title":"Sensors","text":"command <code>sensor read</code> the live telemetry decoded into one line (<code>sensor list</code> shows only settings) <code>sensor set ina.shunt &lt;mOhm&gt;</code> shunt resistance of an INA219/226/260/3221, saved across reboots"},{"location":"tth-commands/#build-flags","title":"Build flags","text":"<p>The ones that change what a node does; set in <code>platformio.ini</code> / <code>platformio.local.ini</code> (<code>-D NAME=value</code>, the last <code>-D</code> wins).</p> flag default <code>FAIRNESS_ENABLED_DEFAULT</code> <code>1</code> FairnessLimiter on for a node without prefs <code>RADIO_SILENCE_MIN_DEFAULT</code> <code>0</code> deaf-receiver watchdog for a node without prefs <code>RADIO_TXSTALL_MIN</code> <code>15</code> TX stall watchdog at boot (repeater), <code>0</code> = off <code>FILTER_CHANNEL_PSKS</code> releases: Public, <code>#meshcore</code>, <code>#test</code> channel keys the filter can decrypt <code>MAX_HEARD_NODES</code>, <code>RXLOG_SIZE</code>, <code>PKTFEED_SIZE</code> <code>0</code> (observer variants: 128 / 512 / 64) the analyzer rings <code>BLE_PIN_CODE</code>, <code>RPT_BLE_DEFAULT_OFF</code> observer variants BLE console, starting off <code>BOT_CHANNEL_PSK</code>, <code>BOT_COMMANDS</code> unset channel bot <code>RADIO_DIAG</code>, <code>PIN_DIAG</code>, <code>LORA_POLL_IRQ</code> unset radio diagnostics, DIO1-less operation <code>FW_OTA</code> <code>-ota</code> images admin-pushed firmware update <code>PATH_HASH_MODE_DEFAULT</code> <code>1</code> (2 B per hop) path hash width for a node without prefs <code>ACL_TS_MAX_AHEAD</code> <code>86400</code> (s) a client timestamp further ahead of the node's clock is not stored as the replay floor <code>LOCKED_NODE</code> unset a node that keeps its secrets from whoever holds it: <code>get prv.key</code>, <code>get guest.password</code> and <code>get bridge.secret</code> answer <code>Error: locked build</code> 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 <code>set pin</code>. Only half of it: whoever can rewrite the flash (SWD with <code>APPROTECT</code> 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 <code>LOGIN_FAIL_MAX</code>, <code>LOGIN_FAIL_SECS</code> <code>4</code>, <code>180</code> (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) <code>NRF52_POWER_MANAGEMENT</code>, <code>PWRMGT_RUNTIME</code> upstream: off; on in <code>SenseCap_Solar_repeater</code> (the masts) boot protection, and with <code>PWRMGT_RUNTIME</code> the runtime <code>pwr.bootlock</code> / <code>pwr.cutoff</code> above <code>PWRMGT_BOOTLOCK_DEFAULT</code>, <code>PWRMGT_CUTOFF_DEFAULT</code> <code>PWRMGT_VOLTAGE_BOOTLOCK</code> (SenseCAP 3300), <code>0</code> (mV) thresholds for a node without <code>/pwr_guard</code> <code>PWR_DUTY_INSTRUMENT</code> unset bench only, nRF52: every ~10 s a <code>PWRDUTY</code> 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 <p>Prefs saved on the node override the build defaults: a reflash keeps what a node already has; only a new node or one after <code>erase</code> takes them.</p>"}]}