Commit Graph
193 Commits
Author SHA1 Message Date
efitenandClaude Opus 5.5 bc0c6a407c docs: add SECURITY.md
GitHub's security policy page was empty. Private vulnerability reporting
was already enabled on the repo, so the policy points there instead of an
email address. It states that only the latest release is patched and that
the MQTT credentials in config.json are public by design (publish-only,
ACL-bound), with deployment, CoreScope and firmware issues routed to their
own owners.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 23:21:16 +01:00
efiten 11729e90a0 Merge pull request #26 from efiten/docs/wadamesh-tdeck
docs(user-guide): Wadamesh on a T-Deck, three clients at once
2026-11-09 22:35:16 +01:00
efitenandClaude Opus 5.5 cfb5e52ff7 docs(user-guide): Wadamesh on a T-Deck, three clients at once
A user reports CoreDrive RX over Bluetooth, Kiekr over Wi-Fi and on-device chat running together on a LilyGo T-Deck with Wadamesh. Still marked as reported, not tested here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 22:34:00 +01:00
efiten fa8f3017f6 Merge pull request #25 from efiten/docs/chat-display
docs(user-guide): chatting while mapping (screen companions, Wadamesh)
2026-11-09 22:32:06 +01:00
efitenandClaude Opus 5.5 e5d268d2cc docs(user-guide): the one-connection limit is about stock companion firmware
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 22:30:59 +01:00
efitenandClaude Opus 5.5 9c715fa78d docs(user-guide): Wadamesh reported to work alongside CoreDrive RX
A user reported mapping with CoreDrive RX while chatting on a Wadamesh device. wadamesh.com describes it as MeshCore firmware with on-device chat that is also a companion radio for the MeshCore app over Bluetooth. Marked as reported, not tested here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 22:30:48 +01:00
efitenandClaude Opus 5.5 a520d8fcf8 docs(user-guide): companions with a screen still show DMs
A user pointed out that a T-Deck can still be used for messages. Stock
companion firmware shows an incoming direct message on its display while
an app is connected (companion_radio/MyMesh.cpp:466-474), but only plays
the notification when none is (:471). It has no on-device compose UI, so
replying needs the MeshCore app or a separate standalone firmware, which
was not tested with CoreDrive RX.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 22:20:19 +01:00
efiten 6d1a90e802 Merge pull request #24 from efiten/feat/message-waiting
v1.23.0: optional notice when a direct message waits on the companion
v1.23.0
2026-11-09 22:14:54 +01:00
efitenandClaude Opus 5.5 f44f4a6b86 release: v1.23.0 notes, direct messages only
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 22:13:43 +01:00
efitenandClaude Opus 5.5 f5c231f58e feat(msgwait): count direct messages only, filter every companion channel
The first version filtered only #coredrive. Reading every channel slot of
the companion (CMD_GET_CHANNEL, once per connection, only with the notice
on) lets the app recognise any channel message the way the firmware does:
channel hash, then MAC (Mesh.cpp:225-236), for GRP_TXT and GRP_DATA. What
still triggers a count is a direct message or a room-server post.

The slots cannot change during the connection: the MeshCore app cannot
reach the companion while CoreDrive RX holds the BLE link. A slot the
uplink ping writes is added to the list as well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 22:13:43 +01:00
efitenandClaude Opus 5.5 1bf73aa8c5 release: v1.23.0, message-waiting notice
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 22:07:35 +01:00
efitenandClaude Opus 5.5 79c49e6ab1 feat: optional notice when a message waits on the companion
While CoreDrive RX holds the BLE link the MeshCore app cannot, so a user
asked whether they would miss messages. The companion already pushes a
one-byte PUSH_CODE_MSG_WAITING (0x83) per queued message; the app now
counts those on Home, behind a Settings toggle that is off by default,
with an optional two-tone sound. Nothing is fetched: CMD_SYNC_NEXT_MESSAGE
would remove the message from the companion's queue.

The push carries no type, so #coredrive traffic of other clients would be
counted too. src/msgwait.js matches each push against the 0x88 that came
just before it (logged before processing, Dispatcher.cpp:199): the first
copy of another client's ping-channel GRP_TXT expects one push, which is
swallowed; re-broadcasts expect none (wasSeen, Mesh.cpp:233); echoes of
our own ping expect none (markSeen on send, Mesh.cpp:651). A promise
chain keeps the async decrypt of the 0x88 ahead of the 0x83.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 22:07:35 +01:00
efiten 5ea8db9928 Merge pull request #23 from efiten/docs/user-guide-more
docs(user-guide): account, results, firmware, keep the app in front
2026-11-09 21:43:44 +01:00
efitenandClaude Opus 5.5 717e1ebabe docs(user-guide): account, results, firmware, keep the app in front
- CoreScope account: login, device token, linking by signature, held
  queue for unlinked companions, with a demo screenshot
- Seeing your results: Nodes > Reach > coverage in CoreScope
- Firmware table: FIRMWARE_VER_CODE gates in src/ mapped to the first
  companion release tag that carries them (meshcore-firmware git history)
- Keep the app in front: a backgrounded page stalls GPS and receptions get
  the last reported position (currentFix has no age check)
- The 2-byte path-hash switch on connect, which changes a radio setting

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 21:42:44 +01:00
efiten 171529679f Merge pull request #22 from efiten/docs/user-guide-screenshots
docs(user-guide): screenshots of Home, Map and Settings
2026-11-09 21:29:07 +01:00
efitenandClaude Opus 5.5 b2de9a70f0 docs(user-guide): screenshots of Home, Map and Settings
Made from the local dev server with demo data injected into the DOM and a
demo route drawn through src/localmap.js; no real drive, node or companion.
Also documents the RF log counter, the declared-scopes card and the map
colours, which the screenshots show and the text did not mention.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 21:28:39 +01:00
efiten fbea1f84d3 Merge remote-tracking branch 'origin/master' 2026-11-09 21:20:03 +01:00
efiten 9a268186b0 Merge pull request #21 from efiten/docs/user-guide
docs: user guide for people driving with the app
2026-11-09 21:19:56 +01:00
efitenandClaude Opus 5.5 ada73093a0 docs: user guide for people driving with the app
The README is written for sysops hosting the app. Users asked whether it is a
mapper, whether they can still chat, and whether there is a wiki. The guide
answers those: what is recorded, what the app transmits (discover, region
asks, uplink ping), the one-BLE-connection limit, the screens, the
stationary pause, and a short troubleshooting table. README links to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 21:16:58 +01:00
efiten d8da4f6144 Merge remote-tracking branch 'origin/master' 2026-10-23 09:27:21 +02:00
efiten ff438ba744 Merge pull request #20 from efiten/fix/verify-adverts-config
v1.22.1: verifyAdverts, backlog of another companion, README ACL
v1.22.1
2026-10-23 09:20:30 +02:00
efitenandClaude Opus 5.5 d6eee50137 release: v1.22.1, verifyAdverts and the backlog of another companion
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NEgJ9U9V5WmHyRjL96MaDz
2026-10-23 09:20:07 +02:00
efitenandClaude Opus 5.5 cfce8fc7eb docs(readme): ACL allows meshcore/client/${clientid}/#
The README listed /packets, /rf and /regions only. The app also
publishes /names (nodeNames) and /uplink (uplinkPing). The section now
recommends the /# rule and lists all five subtopics.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NEgJ9U9V5WmHyRjL96MaDz
2026-10-23 09:19:50 +02:00
efitenandClaude Opus 5.5 a7a72d7eb7 fix(drain): keep another companion's backlog until it is connected
drainOnce published a row stamped with an earlier companion under that
companion's pubkey while the MQTT clientId was the companion connected
now. The documented ACL binds the topic to ${clientid}, so the broker
denies that publish, and with EMQX's default deny_action=ignore it still
sends a PUBACK. The row was removed from the queue and never stored.

Such rows now stay in the queue (counted as `waiting`) and go out once
their own companion is connected. The hold is asked for the connected
companion only. The debug log says once how many rows are waiting.

Tests: 430 pass (sandboxed run of the full suite). Not tested against a
live broker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NEgJ9U9V5WmHyRjL96MaDz
2026-10-23 09:19:50 +02:00
efitenandClaude Opus 5.5 2c1905f077 fix(config): keep verifyAdverts through normalizeConfig
normalizeConfig (src/config.js) copied every feature flag except
verifyAdverts. processFrame reads the flag from the normalized config
(src/app.js:1333), so verifyAdverts:true in config.json never reached
heardKeyAfterVerify and 0-hop adverts with an invalid signature were
still accepted under their claimed pubkey.

The existing test only called featureEnabled on hand-built objects.
The new test goes through normalizeConfig: true when set, false when
absent or false.

Tests: node --test, 429/429 pass (run in the WSL sandbox with the
installed node_modules of 4a91f20; the worktree has no node_modules).
Not done: version bump and docs/releases entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NEgJ9U9V5WmHyRjL96MaDz
2026-10-23 00:26:21 +02:00
efiten 4a91f2074a Merge pull request #19 from efiten/feat/auto-scope
feat: automatic uplink ping scope (v1.22.0)
v1.22.0
2026-10-16 21:36:00 +02:00
efitenandClaude Opus 5.5 52c95526a5 feat: choose the uplink ping scope from the repeaters around the companion (v1.22.0)
A fixed uplinkScope ("be") reaches almost nobody just over the border: of
the Limburg border repeaters in CoreScope's node_declared_regions, many in NL
declare only *, nl or nl-li. uplinkScope is now a preference list
("de,nl,be"). Per ping, src/autoscope.js counts how many of the repeaters
heard directly in the last 5 minutes forward each candidate (the companion's
default scope first, then the list) and takes the most forwarded. With none
forwarded but *, the ping goes out un-scoped (fw v12+); with nothing known,
in the companion's default scope (CMD_GET_DEFAULT_FLOOD_SCOPE, fw v10+).

Declared regions come from CoreScope GET /api/nodes/declared-regions
(uplinkRegionsUrl, default corescopeUrl + that path, every 30 min) merged
with this session's own region answers. The MQTT payload is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 21:28:16 +02:00
efiten e206ccdb10 Merge pull request #18 from efiten/feat/uplink-ping
v1.21.0: uplink ping (does the mesh hear the companion)
v1.21.0
2026-10-16 16:14:54 +02:00
efitenandClaude Opus 5.5 9b1ff057ed feat: "Uplink ping now" button to test a spot
Sends one uplink ping immediately from Settings → Diagnostics, shown once
the ping channel is set up. It skips the interval, distance, parked and
skip-cell rules (the skip cells live on the phone, so a spot already
pinged could not be retested for 7 days); the hourly cap and a GPS fix are
still required.

Field test on rx.on8ar.eu/beta, 2026-10-16: ping cdrx 78277c0e was echoed by
1403 and c0cd directly and via 1403→e470 and 1403→…→0606. The echo hash
b76c6a2777f9b0e9 matches the transmission CoreScope received from 15
observers (TRANSPORT_FLOOD, scope be, first hop 1403). Release notes updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 16:14:23 +02:00
efitenandClaude Opus 5.5 9a60ca0db4 release: v1.21.0, uplink ping
Release notes in docs/releases/v1.21.0.md. Service-worker cache bumped to
coredrive-rx-v56.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 15:52:03 +02:00
efitenandClaude Opus 5.5 70a59c6197 feat: uplink ping, test whether the mesh hears the companion
CoreDrive only measured what the companion hears. With uplinkPing on (off by
default), it sends a short message on a dedicated hashtag channel
(#coredrive) carrying only a random tag, listens 10 s for a repeater
re-broadcasting it, and publishes the result on the new topic
meshcore/client/{pk}/uplink (UPLINK_PING): tag, packet hash of the echo,
every echo with its first and last hop, and the GPS fix. The position never
goes over the mesh.

- src/grptxt.js: hashtag channel key, channel hash, GRP_TXT MAC check and
  AES-128-ECB decrypt, and the packet hash, per the firmware
  (Mesh.cpp:540-557, Utils.cpp:127-145, Packet.cpp:41-50). Checked against a
  real #wardriving packet from CoreScope live: same text and same hash
  (12c82f82df4cc29c). AES-ECB comes from @noble/ciphers 2.0.1, as WebCrypto
  has no ECB.
- src/uplinkping.js: channel message, get/set channel and flood-scope frames
  (companion_radio/MyMesh.cpp), slot choice that never overwrites another
  channel, echo matching on the tag.
- src/uplinksched.js: a ping only with a fix of 100 m or better, after
  uplinkIntervalSec (60) and uplinkMinMoveM (250), under uplinkMaxPerHour (50),
  and not in a ~180 m cell pinged in the last uplinkSkipDays (7).
- uplinkScope (e.g. "be") sends the ping as a region-scoped flood via
  CMD_SET_FLOOD_SCOPE (fw v8+) and resets the override right after.
- app.js holds the radio (acquireRadio) for the whole exchange, as OK/ERR
  replies carry no correlator; it skips while parked, signing or asking.
- DEVICE_INFO now yields the channel slot count; log header gets a ping row.

Tests: 417 pass (+20): crypto against the real packet, frames, slot choice,
echo matching, scheduler, config defaults, payload shape, header row. Not
tested on air: no ping has been sent from a real companion yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 15:52:02 +02:00
efiten a8f150ebf2 Merge pull request #17 from efiten/feat/node-names
v1.20.0: repeater names from the repeater itself
v1.20.0
2026-10-16 10:57:27 +02:00
efitenandClaude Opus 5.5 8b5a89923f release: v1.20.0, repeater names from the repeater itself
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 09:26:20 +02:00
efitenandClaude Opus 5.5 5da69305b8 feat: ask a repeater without a CoreScope name for its own name
Field case 2026-10-16: c0cdee59e0db981b answered every discover sweep,
but CoreScope has never seen its advert, so it stayed a bare prefix and
got no regions ask either.

- nodeNames flag (on when config.json exists and omits it, off without
  a config, like regionDiscovery). With it on, discover requests drop
  DISCOVER_PREFIX_ONLY, so replies carry the full 32-byte pubkey
  (+24 bytes each, simple_repeater/MyMesh.cpp:824).
- A repeater heard in range is looked up once per session. Only when
  CoreScope answers without a name is it asked ANON_REQ_TYPE_OWNER
  (MyMesh.cpp:165). The reply is "name\nowner_info"; owner_info is
  dropped.
- Name and regions asks share one queue and one per-encounter budget
  (src/asknext.js): the companion keeps one pending anon request
  (companion_radio/MyMesh.cpp:1570) and the repeater limiter is shared
  across request types. The name is asked first.
- The name replaces the prefix in the recent list and regions card, and
  is published on meshcore/client/{pk}/names as NODE_NAME with the
  companion's fix. New topic; /packets is unchanged.
- Debug header: a names row and nodeNames in the config row.

Not done: CoreScope does not ingest /names yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 09:25:48 +02:00
efitenandClaude Opus 5.5 11ca093dd9 feat(names): resolve an ambiguous path hash to its one forwarder
A 2-byte path hash that CoreScope calls ambiguous stayed a bare prefix,
even when the only other match cannot forward. Field case 2026-10-16:
e470 matched BE-HSS-HVZZWL-DIS (repeater) and Aegis (companion), so the
repeater got no name and no regions ask.

Companions and sensors do not forward by default
(companion_radio/MyMesh.cpp:486), so for keys of 4 bytes or fewer the
candidates are fetched from the new optional searchUrl
(/api/nodes/search) and narrowed to repeater/room. Exactly one left:
that is the node. A full search page (10 rows) decides nothing, because
it may have cut off a second forwarder.

Not covered: a companion with client-repeat turned on is ignored here.
Resolve and pubkey lookups now share one session cache.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 09:25:34 +02:00
efiten af6004f527 Merge pull request #16 from efiten/feat/corescope-login
feat: CoreScope login and companion linking (v1.19.0)
v1.19.0
2026-10-09 15:51:58 +02:00
efitenandClaude Opus 5.5 5a4319736e fix(account): a linked companion no longer goes to My nodes
CoreScope stopped adding linked companions to My nodes (a companion is
not a node to monitor), and its link answer has no myNodes field any
more. The card and the log no longer mention My nodes, and an answer
from an earlier server build that still carries the field is ignored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 15:39:53 +02:00
efitenandClaude Opus 5.5 1c723513ff docs(release): v1.19.0 test count
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 11:41:36 +02:00
efitenandClaude Opus 5.5 ea69769d5f fix(account): show the login only when CoreScope announces companion linking
A CoreScope with accounts but without companion linking (v3.14) sends
userManagement.enabled and answers POST /api/auth/device-token with its
SPA page, so the card appeared and every login failed with 'HTTP 200'.
Discovery now also needs userManagement.companionLinking; without it
the card stays hidden and uploading is as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 11:41:28 +02:00
efitenandClaude Opus 5.5 270b63dc0b release: v1.19.0, CoreScope login and companion linking
Minor: the MQTT payload contract is unchanged. SW cache v54. Optional
corescopeUrl. Release notes in docs/releases/v1.19.0.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 11:12:27 +02:00
efitenandClaude Opus 5.5 b1d43baf2d fix(account): retry a missing discovery and a waiting link with backoff
A CoreScope that was briefly unreachable at start, a slow mobile
request or a 429 left the link waiting, and only an 'online' event or a
reconnect asked again; navigator.onLine rarely changes, so a held queue
could stay held for the whole session. Both are now asked again after
30 s, 60 s, 2, 5 and then every 10 minutes, and stop on an answer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 11:11:47 +02:00
efitenandClaude Opus 5.5 0883f43b22 fix(account): a link attempt belongs to one companion; a BLE drop mid-sign is transient
An attempt for the previous companion could run into the next
connection and have the new companion sign its challenge (a 400 that
marked it failed), while the new companion got no attempt of its own.
Attempts are now per companion: one for another companion waits and
then runs, and signing checks that the target is still connected.

A BLE drop during signing followed by the transport's fast reconnect
let the 4 s step timeout read as 'firmware cannot sign' or a definite
failure, which blocked the link for the connection. A sign error after
the link changed, or with it down, is now transient and retried.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 11:10:45 +02:00
efitenandClaude Opus 5.5 0c942e483e fix(drain): publish every queued row under the companion that captured it
With the hold, a queue can keep one companion's rows for a long time.
Connecting another, linked companion then published that backlog under
the new pubkey: someone else's receptions counted as its coverage, and
data from an unlinked companion got past requireLinkedCompanion. Rows
now carry the capturing companion (rx, rx_name; not part of any MQTT
payload), drain publishes each under its own pubkey, and the hold is
decided per row. Rows queued before this version behave as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 11:09:40 +02:00
efitenandClaude Opus 5.5 62621c591c feat: CoreScope account card, auto-link on connect, hold while unlinked
Settings gets a 'CoreScope account' card, shown only when CoreScope has
user management on (or this companion's uploads are held). A connected
companion is linked automatically; the sign exchange holds the radio so
region discovery, the discover sweep and the RF sampler cannot answer
for it. Drain holds only when CoreScope requires linked companions.
The service worker no longer caches CoreScope's account/config answers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 11:03:04 +02:00
efitenandClaude Opus 5.5 298a67681f test: MQTT payload is identical with and without login; hold end to end
Drives the real Publisher payload builders through drainOnce with a
logged-out and a logged-in account and compares the bytes, and pins the
hold rules: flag off never waits, flag on holds an unlinked companion
without touching the queue, linking releases it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 11:00:25 +02:00
efitenandClaude Opus 5.5 40c294dba4 feat(drain): hold the queue while CoreScope requires a linked companion
One optional precondition next to publisher.connected(): when held, the
pass publishes nothing and does not touch the queue. Push pending now
names the hold instead of blaming the broker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 11:00:02 +02:00
efitenandClaude Opus 5.5 46f27bc618 feat: account card view model (pure)
Linked / linking / waiting / firmware cannot sign / failed + Retry, the
● on the connected companion, and the 'N waiting' line while held. The
card also shows while held after a failed discovery, so a held queue is
never unexplained.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 10:59:41 +02:00
efitenandClaude Opus 5.5 9f9ed11e63 feat(account): hold a freshly linked companion until the ingestor can see it
With requireLinkedCompanion, CoreScope's ingestor re-reads its linked
list on a miss at most once per 5 s and drops what arrives in between,
after the broker acked it. A fresh link now keeps the queue held for
6 s and then signals a change, so the first upload is not lost.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 10:59:29 +02:00
efitenandClaude Opus 5.5 9c22d19453 feat(account): auto-link a connected companion to the account
Cached → done; refreshed list → done; else challenge, sign
'corescope-link:<host>:<challenge>' on the companion, post, cache.
410 retried once, 400 and unsupported firmware not retried until the
next connect or Retry, network, 429 and BLE drops wait for the next
attempt. myNodes full/failed is a note, not a failure. One attempt at
a time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 10:58:04 +02:00
efitenandClaude Opus 5.5 039a6747e6 feat(account): device-token login, logout, companions cache, 401
The password is sent once and never stored; the token is stored with its
origin and never logged. Logout revokes without waiting. Any 401 clears
the token. 429 says how long to wait when Retry-After is readable. No
request carries cookies: CoreScope judges a request with its session
cookie on that cookie alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 10:57:36 +02:00