Refresh documentation and update Dutch translation
Documentation: - Correct web transport support: USB via Web Serial in Chrome only; no BLE or TCP in the browser. - Fix region scope semantics, routing modes (Auto/Flood/Manual), the 156-byte DM limit, repeater CLI framing, the guessed-location algorithm, radio stats contents and settings labels. - Add regions, image messages, radio statistics and troubleshooting guides. - Restore coding conventions, localization workflow, storage scoping and transport entry points to CLAUDE.md/AGENTS.md; align build/CI commands. - Replace the obsolete docs/BLE_PROTOCOL.md with a pointer to the maintained protocol reference. Dutch (nl): - Translate the 79 missing strings and correct existing mistranslations, typos and grammar (e.g. "Uitzoomen", "Handmatig", "Slowaaks", frequency range 150-2500 MHz). - Use consistent terminology and informal "je" throughout; keep mesh terms such as repeater, node, flood, hop and advert in English. Fixes #538
This commit is contained in:
1 parent
5eca459e1c
commit
aa00a863c3
28 files changed
+1774
-3233
No files matched your search
@@ -48,17 +48,9 @@ enum MeshCoreConnectionState {
|
||||
|
||||
## BLE Connection Lifecycle
|
||||
|
||||
1. **Scan** with known name prefixes (defined in `MeshCoreUuids.deviceNamePrefixes`):
|
||||
- `MeshCore-`
|
||||
- `Whisper-`
|
||||
- `WisCore-`
|
||||
- `Seeed`
|
||||
- `Lilygo`
|
||||
- `HT-`
|
||||
- `LowMesh_MC_`
|
||||
- `NRF52`
|
||||
1. **Scan** for devices advertising the NUS service UUID; names are not discovery filters
|
||||
2. **Connect** with 15-second timeout (6 seconds on Linux)
|
||||
3. **Request MTU** 185 bytes (non-web only)
|
||||
3. **Request MTU** 185 bytes (skipped on web and Linux)
|
||||
4. **Discover services** and locate NUS
|
||||
5. **Enable TX notifications** (up to 3 attempts on native)
|
||||
6. **Subscribe** to TX characteristic for incoming frames
|
||||
@@ -120,13 +112,14 @@ On unexpected disconnection, auto-reconnect with exponential backoff:
|
||||
| 40 | CMD_GET_CUSTOM_VAR | Get custom variables |
|
||||
| 41 | CMD_SET_CUSTOM_VAR | Set a custom variable |
|
||||
| 50 | CMD_SEND_BINARY_REQ | Send binary request |
|
||||
| 54 | CMD_SET_FLOOD_SCOPE | Set flood routing scope (v8+) |
|
||||
| 54 | CMD_SET_FLOOD_SCOPE_KEY | Set flood routing scope (v8+; `cmdSetFloodScope` in the app) |
|
||||
| 55 | CMD_SEND_CONTROL_DATA | Send control data (e.g. zero-hop discovery, v8+) |
|
||||
| 56 | CMD_GET_STATS | Request companion radio stats |
|
||||
| 57 | CMD_SEND_ANON_REQ | Send anonymous request |
|
||||
| 58 | CMD_SET_AUTO_ADD_CONFIG | Set auto-add configuration |
|
||||
| 59 | CMD_GET_AUTO_ADD_CONFIG | Get auto-add configuration |
|
||||
| 61 | CMD_SET_PATH_HASH_MODE | Set path hash width (bytes per hop) |
|
||||
| 62 | CMD_SEND_CHANNEL_DATA | Send GRP_DATA image chunks (firmware code 11+) |
|
||||
|
||||
## Response / Push Codes (Device → App)
|
||||
|
||||
@@ -152,6 +145,7 @@ On unexpected disconnection, auto-reconnect with exponential backoff:
|
||||
| 21 | RESP_CODE_CUSTOM_VARS | Custom variables |
|
||||
| 24 | RESP_CODE_STATS | Companion radio stats |
|
||||
| 25 | RESP_CODE_AUTO_ADD_CONFIG | Auto-add flags |
|
||||
| 27 | RESP_CODE_CHANNEL_DATA_RECV | Received GRP_DATA image chunk |
|
||||
| 0x80 | PUSH_CODE_ADVERT | Known contact re-seen |
|
||||
| 0x81 | PUSH_CODE_PATH_UPDATED | Better path found; carries the 32-byte public key of the updated contact |
|
||||
| 0x82 | PUSH_CODE_SEND_CONFIRMED | Delivery ACK from remote; carries ACK hash (4 bytes) + trip time (4 bytes) |
|
||||
@@ -189,17 +183,17 @@ On unexpected disconnection, auto-reconnect with exponential backoff:
|
||||
Sender key, text, timestamp, outgoing flag, status (pending/sent/delivered/failed), message ID (UUID), retry count, ACK hash, trip time, path data, reactions.
|
||||
|
||||
### Channel Message
|
||||
Sender name, text, timestamp, status (pending/sent/failed), repeater hops, path variants, channel index, reactions, reply threading fields.
|
||||
Sender name, text, timestamp, status (pending/sent/failed), repeater hops, path variants, channel index, reactions, reply threading fields, and nullable `region`. Outgoing messages snapshot the send region; incoming region names are resolved from raw transport-flood metadata when possible. See [regions](regions.md).
|
||||
|
||||
### Channel
|
||||
Index (0–7), name, 16-byte PSK, unread count. PSK derivation methods for hashtag (SHA-256) and community (HMAC-SHA256) channels.
|
||||
Index (0 through the firmware-reported channel limit minus one), name, 16-byte PSK, unread count. PSK derivation methods for hashtag (SHA-256) and community (HMAC-SHA256) channels.
|
||||
|
||||
### Community
|
||||
UUID, name, 32-byte secret, hashtag channel list. Shared via QR code.
|
||||
|
||||
## Persistence
|
||||
|
||||
All data is stored via `SharedPreferences` (JSON-serialized). No SQLite or other database.
|
||||
Message/contact metadata and preferences use `SharedPreferences` (JSON-serialized); there is no SQLite database. Model bundles, received image bitstreams/reconstructions, and map caches use files. Region metadata is persisted with channel messages; older records without it load with a null region.
|
||||
|
||||
| Data | Storage Key Pattern | Scope |
|
||||
|---|---|---|
|
||||
@@ -211,9 +205,12 @@ All data is stored via `SharedPreferences` (JSON-serialized). No SQLite or other
|
||||
| Contact Groups | `contact_groups<pubKey10>` | Per device identity |
|
||||
| Communities | `communities_v1<pubKey10>` | Per device identity |
|
||||
| Unread Counts | `contact_unread_count<pubKey10>` | Per device identity |
|
||||
| Discovered Contacts | `discovered_contacts` | Global |
|
||||
| Discovered Contacts | `discovered_contacts<pubKey10>` | Per device identity (legacy global `discovered_contacts` is migrated on first load) |
|
||||
| App Settings | `app_settings` | Global |
|
||||
| Path History | `path_history_<contactKey>` | Per contact |
|
||||
| Region Names | `regions` | Global |
|
||||
| Channel Region | `channel_region_<pubKey10><index>` | Per device + channel |
|
||||
| Default Region | `default_region_<pubKey10>` | Per device identity |
|
||||
|
||||
## Auto-Add Configuration Bitmask
|
||||
|
||||
@@ -260,3 +257,21 @@ Uses Flutter `Provider` with `ChangeNotifier`. The central state holder is `Mesh
|
||||
5. Storage stores are persisted (async)
|
||||
6. `notifyListeners()` triggers UI rebuilds
|
||||
7. Screens read current state via getters
|
||||
|
||||
## CLI and application payloads
|
||||
|
||||
Remote repeater CLI commands use the text-message command with `txtTypeCliData`, addressed to the repeater's public-key prefix:
|
||||
|
||||
```text
|
||||
[CMD_SEND_TXT_MSG=2][txt_type=1][attempt][timestamp uint32 LE][public-key prefix x6][UTF-8 command][0]
|
||||
```
|
||||
|
||||
See `buildSendCliCommandFrame()` (takes the repeater public key) in [meshcore_protocol.dart](../lib/connector/meshcore_protocol.dart). The companion's local CLI command (`CMD_RUN_CLI_COMMAND`, 66) is not used by the app. Companion reboot uses `buildRebootFrame()`; remote repeater reboot is a CLI command.
|
||||
|
||||
Reactions use `r:<four-hex message hash>:<two-hex emoji index>`. Channel replies use `@[senderName] text`; location pins use `m:<lat>,<lon>|<label>|...`. These are application conventions and require compatible clients for special rendering.
|
||||
|
||||
## Regions and image data
|
||||
|
||||
Transport-routed raw packets include four transport-code bytes before packed path metadata. For transport floods, the app matches the first two code bytes against locally known region candidates using HMAC-SHA256 over `[payloadType][payload]`. Region scope keys are the first 16 bytes of SHA256 of `#<region>`. The name itself is not carried as plain text. Unknown or ambiguous matches remain null; see [regions](regions.md).
|
||||
|
||||
Image chunks use `CMD_SEND_CHANNEL_DATA` (62), `RESP_CODE_CHANNEL_DATA_RECV` (27), and application data type `0xAE1C`. The framing, capacities, metadata byte, and XOR recovery algorithm are defined in [image_chunk_transport.dart](../lib/services/image_chunk_transport.dart), which is the source of truth. See [image messages](image-messages.md) for user requirements and limitations.
|
||||
Reference in new issue
Block a user