919 lines
30 KiB
HTML
919 lines
30 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||
<meta name="generator" content="mkdocs-1.6.1, mkdocs-terminal-4.8.0">
|
||
|
||
<meta name="description" content="MeshCore fork meshcore-tth -- repeater antispam, diagnostics, OTA, Czech mesh defaults">
|
||
|
||
|
||
<link rel="canonical" href="https://tth-pub.pages.rfa.cz/meshcore-tth/ble-lora-coexistence/"><link rel="icon" type="image/png" sizes="192x192" href="../img/android-chrome-192x192.png" />
|
||
<link rel="icon" type="image/png" sizes="512x512" href="../img/android-chrome-512x512.png" />
|
||
<link rel="apple-touch-icon" sizes="180x180" href="../img/apple-touch-icon.png" />
|
||
<link rel="shortcut icon" type="image/png" sizes="48x48" href="../img/favicon.ico" />
|
||
<link rel="icon" type="image/png" sizes="16x16" href="../img/favicon-16x16.png" />
|
||
<link rel="icon" type="image/png" sizes="32x32" href="../img/favicon-32x32.png" />
|
||
|
||
|
||
|
||
|
||
<title>Koexistence BLE/LoRa - MeshCore TTH</title>
|
||
|
||
|
||
<link href="../css/fontawesome/css/fontawesome.min.css" rel="stylesheet">
|
||
<link href="../css/fontawesome/css/solid.min.css" rel="stylesheet">
|
||
<link href="../css/normalize.css" rel="stylesheet">
|
||
<link href="../css/terminal.css" rel="stylesheet">
|
||
<link href="../css/theme.css" rel="stylesheet">
|
||
<link href="../css/theme.tile_grid.css" rel="stylesheet">
|
||
<link href="../css/theme.footer.css" rel="stylesheet">
|
||
<!-- dark color palette -->
|
||
<link href="../css/palettes/dark.css" rel="stylesheet">
|
||
|
||
<!-- page layout -->
|
||
<style>
|
||
/* initially set page layout to a one column grid */
|
||
.terminal-mkdocs-main-grid {
|
||
display: grid;
|
||
grid-column-gap: 1.4em;
|
||
grid-template-columns: auto;
|
||
grid-template-rows: auto;
|
||
}
|
||
|
||
/*
|
||
* when side navigation is not hidden, use a two column grid.
|
||
* if the screen is too narrow, fall back to the initial one column grid layout.
|
||
* in this case the main content will be placed under the navigation panel.
|
||
*/
|
||
@media only screen and (min-width: 70em) {
|
||
.terminal-mkdocs-main-grid {
|
||
grid-template-columns: 4fr 9fr;
|
||
}
|
||
}</style>
|
||
|
||
<!-- cursor_animation override -->
|
||
<style>
|
||
#mkdocs-terminal-site-name.terminal-prompt::after {
|
||
display: none;
|
||
}
|
||
</style>
|
||
|
||
|
||
<link href="../_stylesheets/tth.css" rel="stylesheet">
|
||
|
||
|
||
|
||
|
||
<!-- search css support -->
|
||
<link href="../css/search/bootstrap-modal.css" rel="stylesheet">
|
||
<!-- search scripts -->
|
||
<script>
|
||
var base_url = "..",
|
||
shortcuts = "{}";
|
||
</script>
|
||
<script src="../js/jquery/jquery-1.10.1.min.js" defer></script>
|
||
<script src="../js/bootstrap/bootstrap.min.js" defer></script>
|
||
<script src="../js/mkdocs/base.js" defer></script>
|
||
|
||
|
||
|
||
|
||
<script src="../search/main.js"></script>
|
||
|
||
|
||
|
||
</head>
|
||
|
||
<body class="terminal"><div class="container">
|
||
<div class="terminal-nav">
|
||
<header class="terminal-logo">
|
||
<div id="mkdocs-terminal-site-name" class="logo terminal-prompt"><a href="https://tth-pub.pages.rfa.cz/meshcore-tth/" class="no-style">MeshCore TTH</a></div>
|
||
</header>
|
||
|
||
<nav class="terminal-menu">
|
||
|
||
<ul vocab="https://schema.org/" typeof="BreadcrumbList">
|
||
|
||
|
||
<li property="itemListElement" typeof="ListItem">
|
||
<a href=".." class="menu-item " property="item" typeof="WebPage">
|
||
<span property="name">O forku</span>
|
||
</a>
|
||
<meta property="position" content="0">
|
||
</li>
|
||
|
||
|
||
<li property="itemListElement" typeof="ListItem">
|
||
<a href="../en/" class="menu-item " property="item" typeof="WebPage">
|
||
<span property="name">English</span>
|
||
</a>
|
||
<meta property="position" content="1">
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li property="itemListElement" typeof="ListItem">
|
||
<a href="#" class="menu-item" data-toggle="modal" data-target="#mkdocs_search_modal" property="item" typeof="SearchAction">
|
||
<i aria-hidden="true" class="fa fa-search"></i> <span property="name">Search</span>
|
||
</a>
|
||
<meta property="position" content="2">
|
||
</li>
|
||
|
||
</ul>
|
||
|
||
</nav>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="container">
|
||
<div class="terminal-mkdocs-main-grid"><aside id="terminal-mkdocs-side-panel"><nav>
|
||
<ul class="terminal-mkdocs-side-nav-items">
|
||
|
||
<li class="terminal-mkdocs-side-nav-li">
|
||
|
||
|
||
|
||
|
||
|
||
<a class="terminal-mkdocs-side-nav-item" href="..">O forku</a>
|
||
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="terminal-mkdocs-side-nav-li">
|
||
|
||
|
||
|
||
|
||
|
||
<a class="terminal-mkdocs-side-nav-item" href="../en/">English</a>
|
||
|
||
|
||
|
||
|
||
</li>
|
||
|
||
<li class="terminal-mkdocs-side-nav-li">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<span class="
|
||
|
||
|
||
|
||
terminal-mkdocs-side-nav-item--active terminal-mkdocs-side-nav-section-no-index">Fork meshcore-tth</span>
|
||
|
||
|
||
|
||
|
||
<ul class="terminal-mkdocs-side-nav-li-ul">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
||
|
||
|
||
|
||
<a class="terminal-mkdocs-side-nav-item" href="../tth-commands/">Příkazy konzole · console commands</a>
|
||
|
||
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
||
|
||
|
||
|
||
<a class="terminal-mkdocs-side-nav-item" href="../ota/">Aktualizace od admina · OTA</a>
|
||
|
||
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
||
|
||
|
||
|
||
<a class="terminal-mkdocs-side-nav-item" href="../power/">Napájení · power</a>
|
||
|
||
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
||
|
||
|
||
|
||
<a class="terminal-mkdocs-side-nav-item" href="../budka-sensor/">Budka jako senzor · Budka sensor</a>
|
||
|
||
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
||
|
||
|
||
<span class="terminal-mkdocs-side-nav-item--active">Koexistence BLE/LoRa</span>
|
||
|
||
</li>
|
||
|
||
|
||
</ul>
|
||
|
||
|
||
</li>
|
||
|
||
<li class="terminal-mkdocs-side-nav-li">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<span class="
|
||
|
||
|
||
|
||
terminal-mkdocs-side-nav-item terminal-mkdocs-side-nav-section-no-index">MeshCore (upstream)</span>
|
||
|
||
|
||
|
||
|
||
|
||
<ul class="terminal-mkdocs-side-nav-li-ul">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
||
|
||
|
||
|
||
<a class="terminal-mkdocs-side-nav-item" href="../meshcore/">Introduction</a>
|
||
|
||
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
||
|
||
|
||
|
||
<a class="terminal-mkdocs-side-nav-item" href="../faq/">FAQ</a>
|
||
|
||
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
||
|
||
|
||
|
||
<a class="terminal-mkdocs-side-nav-item" href="../cli_commands/">CLI commands</a>
|
||
|
||
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
||
|
||
|
||
|
||
<a class="terminal-mkdocs-side-nav-item" href="../companion_cli/">Companion CLI</a>
|
||
|
||
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
||
|
||
|
||
|
||
<a class="terminal-mkdocs-side-nav-item" href="../companion_protocol/">Companion protocol</a>
|
||
|
||
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
||
|
||
|
||
|
||
<a class="terminal-mkdocs-side-nav-item" href="../terminal_chat_cli/">Terminal chat CLI</a>
|
||
|
||
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
||
|
||
|
||
|
||
<a class="terminal-mkdocs-side-nav-item" href="../kiss_modem_protocol/">KISS modem protocol</a>
|
||
|
||
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
||
|
||
|
||
|
||
<a class="terminal-mkdocs-side-nav-item" href="../packet_format/">Packet format</a>
|
||
|
||
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
||
|
||
|
||
|
||
<a class="terminal-mkdocs-side-nav-item" href="../payloads/">Payloads</a>
|
||
|
||
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
||
|
||
|
||
|
||
<a class="terminal-mkdocs-side-nav-item" href="../stats_binary_frames/">Stats binary frames</a>
|
||
|
||
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
||
|
||
|
||
|
||
<a class="terminal-mkdocs-side-nav-item" href="../number_allocations/">Number allocations</a>
|
||
|
||
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
||
|
||
|
||
|
||
<a class="terminal-mkdocs-side-nav-item" href="../qr_codes/">QR codes</a>
|
||
|
||
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
||
|
||
|
||
|
||
<a class="terminal-mkdocs-side-nav-item" href="../radio_presets/">Radio presets</a>
|
||
|
||
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="terminal-mkdocs-side-nav-li-ul-li">
|
||
|
||
|
||
|
||
<a class="terminal-mkdocs-side-nav-item" href="../nrf52_power_management/">nRF52 power management</a>
|
||
|
||
|
||
</li>
|
||
|
||
|
||
</ul>
|
||
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
</nav><hr>
|
||
<nav>
|
||
<ul>
|
||
<li><a href="#blelora-coexistence-bench-reproduction-attempt">BLE/LoRa coexistence — bench reproduction attempt</a></li>
|
||
<li><a href="#the-claim-under-test">The claim under test</a></li><li><a href="#rig">Rig</a></li><li><a href="#what-was-measured">What was measured</a></li><li><a href="#on-mast-hardware-with-the-file-log-on">On mast hardware, with the file log on</a></li><li><a href="#still-open">Still open</a></li><li><a href="#airtime-is-a-hard-limit-and-the-firmware-will-not-enforce-it">Airtime is a hard limit, and the firmware will not enforce it</a></li><li><a href="#traps-worth-remembering">Traps worth remembering</a></li><li><a href="#the-two-commands-this-bench-added">The two commands this bench added</a></li>
|
||
</ul>
|
||
</nav>
|
||
</aside>
|
||
<main id="terminal-mkdocs-main-content">
|
||
<section id="mkdocs-terminal-content">
|
||
<h1 id="blelora-coexistence-bench-reproduction-attempt">BLE/LoRa coexistence — bench reproduction attempt</h1>
|
||
<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
|
||
<strong>negative</strong>, and a negative result is only worth anything if the method and its
|
||
limits are recorded with it.</p>
|
||
<h2 id="the-claim-under-test">The claim under test</h2>
|
||
<p>Commit <code>f6e9aeca</code> widened the BLE connection interval from 15–30 ms to 60–80 ms
|
||
after an A/B on the mast showed ~40 % of DIRECT-route forwards silently lost
|
||
with an <strong>idle</strong> BLE connection at 15–30 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
|
||
<strong>detect</strong> the effect at all — a measurement that reads zero in both the
|
||
treatment and the control has shown nothing.</p>
|
||
<h2 id="rig">Rig</h2>
|
||
<p>Isolated test mesh on <strong>866.5 MHz</strong> (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>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>node</th>
|
||
<th>board</th>
|
||
<th>role</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td><code>bench-board</code></td>
|
||
<td>XIAO nRF52840 + Wio-SX1262</td>
|
||
<td>forwarder under test</td>
|
||
</tr>
|
||
<tr>
|
||
<td><code>bench-board</code></td>
|
||
<td>same</td>
|
||
<td>paired control / radiating witness</td>
|
||
</tr>
|
||
<tr>
|
||
<td><code>bench-board</code>, <code>bench-board</code></td>
|
||
<td>same</td>
|
||
<td>probe sources</td>
|
||
</tr>
|
||
<tr>
|
||
<td><code>bench-rpt</code></td>
|
||
<td>SenseCap Solar Node</td>
|
||
<td>forwarder, mast-identical hardware</td>
|
||
</tr>
|
||
<tr>
|
||
<td><code>tth-s2-rpt</code></td>
|
||
<td>same</td>
|
||
<td>paired control</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<p>Paired controls differ <strong>only</strong> in <code>ADVERT_NAME</code>, verified by diffing strings in
|
||
the ELF. Any other difference invalidates them.</p>
|
||
<h3 id="oracle">Oracle</h3>
|
||
<p>The measured quantity is the node's own <code>direct_rx − 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 — 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.
|
||
<strong><code>out_path_len</code> is not a hop count</strong> — it is a packed byte, top two bits =
|
||
hash size − 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>
|
||
<h2 id="what-was-measured">What was measured</h2>
|
||
<p>All cells at a <strong>verified</strong> 22.50 ms connection interval — <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>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th style="text-align: right;"><code>blepwr</code></th>
|
||
<th style="text-align: right;">≈RSSI at central</th>
|
||
<th style="text-align: right;">link up</th>
|
||
<th style="text-align: right;">direct_rx</th>
|
||
<th style="text-align: right;">direct_tx</th>
|
||
<th style="text-align: right;">lost</th>
|
||
<th style="text-align: right;">tx_timeout</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td style="text-align: right;">BLE off</td>
|
||
<td style="text-align: right;">—</td>
|
||
<td style="text-align: right;">—</td>
|
||
<td style="text-align: right;">8</td>
|
||
<td style="text-align: right;">8</td>
|
||
<td style="text-align: right;">0</td>
|
||
<td style="text-align: right;">0</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="text-align: right;">0 dBm</td>
|
||
<td style="text-align: right;">−67</td>
|
||
<td style="text-align: right;">100 %</td>
|
||
<td style="text-align: right;">8</td>
|
||
<td style="text-align: right;">8</td>
|
||
<td style="text-align: right;">0</td>
|
||
<td style="text-align: right;">0</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="text-align: right;">−8</td>
|
||
<td style="text-align: right;">−75</td>
|
||
<td style="text-align: right;">100 %</td>
|
||
<td style="text-align: right;">8</td>
|
||
<td style="text-align: right;">8</td>
|
||
<td style="text-align: right;">0</td>
|
||
<td style="text-align: right;">0</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="text-align: right;">−12</td>
|
||
<td style="text-align: right;">−79</td>
|
||
<td style="text-align: right;">100 %</td>
|
||
<td style="text-align: right;">8</td>
|
||
<td style="text-align: right;">8</td>
|
||
<td style="text-align: right;">0</td>
|
||
<td style="text-align: right;">0</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="text-align: right;">−16</td>
|
||
<td style="text-align: right;">−83</td>
|
||
<td style="text-align: right;">87 %</td>
|
||
<td style="text-align: right;">8</td>
|
||
<td style="text-align: right;">8</td>
|
||
<td style="text-align: right;">0</td>
|
||
<td style="text-align: right;">0</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="text-align: right;">−20</td>
|
||
<td style="text-align: right;">−87</td>
|
||
<td style="text-align: right;">27 %</td>
|
||
<td style="text-align: right;">8</td>
|
||
<td style="text-align: right;">8</td>
|
||
<td style="text-align: right;">0</td>
|
||
<td style="text-align: right;">0</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<p>The −20 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 — close to the
|
||
reconnect churn the mast reports as HCI 0x3E.</p>
|
||
<p><strong>Ruled out as the missing factor: BLE link margin.</strong> The whole −75..−90 window
|
||
the mast sits in is covered, at the known-bad interval, with zero loss.</p>
|
||
<h3 id="why-idle-weak-link-does-nothing">Why idle + weak link does nothing</h3>
|
||
<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 <strong>our</strong> 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 — an
|
||
extra slave TX. If we miss the central's PDU we never transmit in that event at
|
||
all, and the SoftDevice uses <em>less</em> radio.</p>
|
||
<h2 id="on-mast-hardware-with-the-file-log-on">On mast hardware, with the file log on</h2>
|
||
<p>Two SenseCap Solar nodes (<code>bench-rpt</code> forwarder, <code>tth-s2-rpt</code> paired control) —
|
||
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>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>file log</th>
|
||
<th>BLE</th>
|
||
<th style="text-align: right;">direct_rx</th>
|
||
<th style="text-align: right;">direct_tx</th>
|
||
<th style="text-align: right;">lost</th>
|
||
<th style="text-align: right;">tx_timeout</th>
|
||
<th style="text-align: right;">witness</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>off</td>
|
||
<td>off</td>
|
||
<td style="text-align: right;">8</td>
|
||
<td style="text-align: right;">8</td>
|
||
<td style="text-align: right;">0</td>
|
||
<td style="text-align: right;">0</td>
|
||
<td style="text-align: right;">+39</td>
|
||
</tr>
|
||
<tr>
|
||
<td>off</td>
|
||
<td>idle, 88 % of window</td>
|
||
<td style="text-align: right;">8</td>
|
||
<td style="text-align: right;">8</td>
|
||
<td style="text-align: right;">0</td>
|
||
<td style="text-align: right;">0</td>
|
||
<td style="text-align: right;">+37</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>on</strong></td>
|
||
<td>off</td>
|
||
<td style="text-align: right;">8</td>
|
||
<td style="text-align: right;">8</td>
|
||
<td style="text-align: right;">0</td>
|
||
<td style="text-align: right;">0</td>
|
||
<td style="text-align: right;">+39</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>on</strong></td>
|
||
<td>idle, 90 % of window</td>
|
||
<td style="text-align: right;">8</td>
|
||
<td style="text-align: right;">8</td>
|
||
<td style="text-align: right;">0</td>
|
||
<td style="text-align: right;">0</td>
|
||
<td style="text-align: right;">+40</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<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 — the mechanism behind the known deaf windows.</p>
|
||
<p><strong>Ten cells, 80 forced forwards, zero lost, <code>tx_timeout</code> and <code>tx_start_fail</code> at
|
||
zero throughout.</strong> 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⁸ ≈ 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 — alone or together.</p>
|
||
<h2 id="still-open">Still open</h2>
|
||
<p><strong>Loaded LoRa channel</strong> 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–869.65) is where production lives.</p>
|
||
<p>Practical consequence: <strong>f6e9aeca can be neither confirmed nor refuted on the
|
||
bench.</strong> Deciding whether the 60–80 ms interval is still needed requires
|
||
measuring on <code>mast-three</code> itself — 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>
|
||
<h2 id="airtime-is-a-hard-limit-and-the-firmware-will-not-enforce-it">Airtime is a hard limit, and the firmware will not enforce it</h2>
|
||
<p>866.5 MHz sits in 865–868 (CZ VO-R/10): 25 mW ERP, <strong>1 % duty cycle = 36 s of
|
||
transmission per hour</strong>. The firmware does not police this — <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 <strong>defers</strong> 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>
|
||
<h2 id="traps-worth-remembering">Traps worth remembering</h2>
|
||
<ul>
|
||
<li><strong>USB and BLE consoles share one <code>command[160]</code>.</strong> Two concurrent consoles
|
||
interleave into one line and crash the node. The harness keeps a strict
|
||
sequence: counters over USB → close USB → BLE client → probes → stop BLE →
|
||
counters over USB.</li>
|
||
<li><strong><code>Bluefruit.setTxPower()</code> is advertising-only</strong> (see the commit message for
|
||
<code>blepwr</code>); the connection runs at the SoftDevice default 0 dBm.</li>
|
||
<li><strong>Weakening the link can lock you out of BLE.</strong> Below about −16 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><strong>~~Runtime <code>set tx</code> does not change radiated LoRa power~~ — retracted.</strong> The
|
||
original reading (+2 dBm → RSSI −44.1, −9 dBm → −44.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>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th style="text-align: right;"><code>txpwr</code></th>
|
||
<th style="text-align: right;">witness <code>last_rssi</code></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td style="text-align: right;">+22</td>
|
||
<td style="text-align: right;">0 dBm <em>(saturated)</em></td>
|
||
</tr>
|
||
<tr>
|
||
<td style="text-align: right;">+14</td>
|
||
<td style="text-align: right;">−1 dBm <em>(saturated)</em></td>
|
||
</tr>
|
||
<tr>
|
||
<td style="text-align: right;">+6</td>
|
||
<td style="text-align: right;">−7 dBm</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="text-align: right;">0</td>
|
||
<td style="text-align: right;">−18 dBm</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="text-align: right;">−9</td>
|
||
<td style="text-align: right;">−28 dBm</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<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 — the boards were ~10 cm apart — 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>
|
||
<h2 id="the-two-commands-this-bench-added">The two commands this bench added</h2>
|
||
<p>Both live in <code>examples/simple_repeater/main.cpp</code> and are repeater-only.</p>
|
||
<h3 id="bleconn-what-the-link-is-actually-doing"><code>bleconn</code> — what the link is actually doing</h3>
|
||
<div class="highlight"><pre><span></span><code>bleconn
|
||
-> BLE conn: interval 75.00 ms (req 60-80), latency 0, sup timeout 4000 ms [live]
|
||
</code></pre></div>
|
||
<p>Reports the <strong>negotiated</strong> 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–80 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>
|
||
<h3 id="blepwr-dbm-connection-tx-power-saved"><code>blepwr [dBm]</code> — connection TX power, saved</h3>
|
||
<div class="highlight"><pre><span></span><code>blepwr # report: BLE conn tx: 0 dBm, adv tx: 8 dBm
|
||
blepwr 8 # set, apply to live connections and save
|
||
blepwr default # forget the saved value, back to RPT_BLE_CONN_TX_POWER
|
||
</code></pre></div>
|
||
<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
|
||
−40, −20, −16, −12, −8, −4, 0 and 2..8 dBm; anything else is rejected and is
|
||
<em>not</em> 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 <strong>independent of</strong>
|
||
<code>Bluefruit.setTxPower()</code> — 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 — at −40 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>
|
||
</section>
|
||
|
||
</main>
|
||
</div>
|
||
<hr><footer>
|
||
<div class="terminal-mkdocs-footer-grid">
|
||
<div id="terminal-mkdocs-footer-copyright-info">
|
||
Site built with <a href="http://www.mkdocs.org">MkDocs</a> and <a href="https://github.com/ntno/mkdocs-terminal">Terminal for MkDocs</a>.
|
||
</div>
|
||
</div>
|
||
</footer>
|
||
</div>
|
||
|
||
|
||
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="alertdialog" aria-modal="true" aria-labelledby="searchModalLabel">
|
||
<div class="modal-dialog modal-lg" role="search">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<h5 class="modal-title" id="searchModalLabel">Search</h5>
|
||
<button type="button" class="close btn btn-default btn-ghost" data-dismiss="modal" aria-label="Close">x</button>
|
||
</div>
|
||
<div class="modal-body">
|
||
<p id="searchInputLabel">Type to start searching</p>
|
||
<form>
|
||
<div class="form-group">
|
||
<input type="search" class="form-control" aria-labelledby="searchInputLabel" placeholder="" id="mkdocs-search-query" title="Please enter search terms here">
|
||
</div>
|
||
</form>
|
||
<div id="mkdocs-search-results" data-no-results-text="No document matches found"></div>
|
||
</div>
|
||
<div class="modal-footer">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
</body>
|
||
|
||
</html> |