diff --git a/README.md b/README.md index fce44d7..70deb9e 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,8 @@ Put a `config.json` in the served directory (next to `index.html`). Start from t "mqttUsername": "coredrive-rx", "mqttPassword": "", "resolveUrl": "https://corescope.yourdomain/api/nodes/resolve", - "fullRfLog": false + "fullRfLog": false, + "rfSampler": false } ``` > `mqttPassword` is a **publish-only, ACL-constrained** account — it is shipped to browsers, so treat @@ -111,6 +112,13 @@ Put a `config.json` in the served directory (next to `index.html`). Start from t > ingestor also has `clientRxObservations.enabled: true`**: with it off, the ingestor decodes and > discards every one of these packets, writing no row and logging no warning, while `fullRfLog` > multiplies your normal upload volume. Confirm the ingestor-side flag with your CoreScope sysop +> before turning this on. `rfSampler` is optional (default `false`); when `true`, the app polls the +> companion's own radio counters (noise floor, RX/TX airtime, CRC errors) over local Bluetooth and +> publishes them on `meshcore/client//rf`. **Enable it only after your broker's ACL permits +> that `/rf` subtopic for this client** — this app negotiates MQTT 3.1.1, whose PUBACK carries no +> reason code, so a publish denied by the ACL is still acknowledged: the app logs `published N +> record(s)` and looks healthy while the server receives zero rows. Confirm the topic is allowed +> (and that the CoreScope ingestor has `clientRfSamples.enabled: true`) with your CoreScope sysop > before turning this on. Changing any value later is just a `config.json` edit + page refresh — no rebuild. diff --git a/src/frames.js b/src/frames.js index 5d163c0..84a8e4d 100644 --- a/src/frames.js +++ b/src/frames.js @@ -3,7 +3,6 @@ // MAX_FRAME_SIZE=176; no length prefix / no reassembly needed). export const PUSH_CODE_LOG_RX_DATA = 0x88; // [0x88][snr×4 int8][rssi int8][raw packet...] -export const RESP_CODE_STATS = 24; // [24][sub_type][...] — see rfstats.js function int8(b) { return b < 128 ? b : b - 256; } diff --git a/src/publisher.js b/src/publisher.js index e12e7b7..a7f8808 100644 --- a/src/publisher.js +++ b/src/publisher.js @@ -1,6 +1,7 @@ // Publishes buffered receptions to MQTT (over WebSocket/TLS) in the // meshcoretomqtt-compatible format CoreScope's ingestor consumes, on the -// client topic meshcore/client/{PUBLIC_KEY}/packets. +// client topics meshcore/client/{PUBLIC_KEY}/packets (receptions) and +// meshcore/client/{PUBLIC_KEY}/rf (RF environment samples). import mqtt from 'mqtt'; export class Publisher {