Commit Graph

5814 Commits

Author SHA1 Message Date
niccellular
1ea87dbbad Rename from Tak centric to "Lockdown" mode
3 files renamed (via git mv, history preserved):
  - TakLockHandler.kt → LockdownHandler.kt
  - TakPassphraseStore.kt → LockdownPassphraseStore.kt
  - TakUnlockDialog.kt → LockdownUnlockDialog.kt

  16 files updated with consistent renames across the entire codebase. No stray TAK-named symbols remain in any .kt or .aidl source file.

  What stayed the same (wire protocol / firmware-defined):
  - The firmware notification strings: "TAK_LOCKED", "TAK_NEEDS_PROVISION", "TAK_UNLOCKED", "TAK_UNLOCK_FAILED" — still matched as string literals in LockdownHandler.kt
  - Config.DeviceConfig.Role.TAK / TAK_TRACKER proto enum values
  - The SharedPrefs key changed from "tak_passphrase_store" → "lockdown_passphrase_store" (existing stored passphrases won't migrate automatically — users will need to re-enter on first launch of the updated app)
2026-03-03 17:17:24 -05:00
niccellular
e7ba8e8497 feature: Add TAK passphrase lock/unlock support
Implement the client-side TAK passphrase authentication flow for
  devices running TAK-locked firmware.

  Key components:
  - TakPassphraseStore: per-device passphrase persistence using
    EncryptedSharedPreferences (Android Keystore AES-256-GCM), with
    boot and hour TTL fields stored alongside the passphrase
  - TakLockHandler: orchestrates the full lock/unlock lifecycle —
    auto-unlock on reconnect using stored credentials, passphrase
    submission, token info parsing, and backoff/failure handling
  - MeshCommandSender: sendTakPassphrase() and sendTakLockNow() build
    plain local packets that bypass PKC signing and session_passkey;
    hour TTL is encoded as an absolute Unix epoch as required by firmware
  - ServiceRepository: TakLockState sealed class (None, Locked,
    NeedsProvision, Unlocked, LockNowAcknowledged, UnlockFailed,
    UnlockBackoff), TakTokenInfo (boots remaining + expiry epoch), and
    sessionAuthorized flag
  - TakUnlockDialog: Compose dialog for passphrase entry, shown on
    Locked and NeedsProvision states; onDismissRequest is a no-op to
    prevent race conditions with firmware response timing; cancel
    disconnects the user and navigates to the Connections tab
  - Lock Now (Security settings): immediately disconnects the client
    after informing firmware, purges cached config, navigates away
    without showing a passphrase dialog
  - ConnectionsScreen: suppress "region unset" prompt while the device
    is TAK-locked, since pre-auth config is zeroed/redacted and would
    lead the user to a blank LoRa settings screen
  - AIDL: sendTakUnlock() and sendTakLockNow() wired through
    MeshService → MeshActionHandler → TakLockHandler
  - Security settings: "Lock Now (TAK)" button and token info display
    showing boots remaining and expiry date
2026-02-27 08:31:05 -05:00
James Rich
986c60ce88 docs: Update READMEs and library versions
This commit updates the README files for the `core:api`, `core:model`, and `core:proto` modules to improve documentation and reflect current usage.

Key changes include:
- Bumping the library version to `v2.7.13` in usage examples.
- Adding a detailed README for the `core:proto` module.
- Updating the `core:api` README to use `MeshtasticIntent` constants instead of hardcoded strings.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-07 15:54:51 -06:00
James Rich
39fbdce830 test: Ignore flaky NordicBleInterfaceDrainTest
The `drainPacketQueueAndDispatch` test is being ignored because it is flaky and causes intermittent CI failures. This appears to be due to timing issues within the Nordic BLE mock library.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-07 15:48:28 -06:00
James Rich
34b0755192 refactor: Centralize Meshtastic intent constants
This commit centralizes all Android Intent constants into a new `MeshtasticIntent` object within the `core/api` module.

This refactoring makes the constants accessible to external applications and removes the duplicated definitions from the main application. The app and the service example have been updated to use these new centralized constants.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-07 15:45:11 -06:00
James Rich
75143ba07c feat(service): Preserve Connecting state on reconnect
Keeps the connection state as 'Connecting' if it was not 'Disconnected' when `handleConnected` is called.

This prevents the UI from briefly showing a disconnected state during a reconnection attempt, such as when the device is rebooting.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-07 15:40:08 -06:00
James Rich
0bcc801bc4 feat: Always notify on connection changes
This commit modifies the `onConnectionChanged` function to ensure that all connection state changes are reported, including transitions to the same state. Previously, redundant notifications were suppressed unless the state was `Connected`. This change allows for consistent handling of all connection events.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-07 15:27:20 -06:00
James Rich
8c46a0c946 feat: Add disconnect broadcast and improve app port handling
This commit introduces several enhancements to the service broadcasts and data handling:

-   **Disconnect Broadcast**: Adds and triggers a new `ACTION_MESH_DISCONNECTED` broadcast when the mesh connection state changes to `Disconnected`. This provides a more specific intent for apps to listen for disconnection events.

-   **Expanded App Port Handling**:
    -   Adds explicit broadcast actions for various app port numbers (e.g., `ATAK_PLUGIN`, `PRIVATE_APP`, `DETECTION_SENSOR_APP`).
    -   Ensures that packets for `ATAK`, `PRIVATE_APP`, and `DETECTION_SENSOR_APP` are now correctly broadcast to external applications.
    -   Implements a default behavior to broadcast any unrecognized port numbers, allowing for future extensibility and support for third-party apps.

-   **Backward Compatibility**: When broadcasting received data, a secondary broadcast with the numeric port number is also sent to maintain compatibility with older applications that may rely on it.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-07 15:10:00 -06:00
github-actions[bot]
a493cf1420 chore(release): prepare v2.7.13-internal.5 [skip ci]
- Bump base version to 2.7.13
- Sync translations and assets
2026-02-07 19:50:01 +00:00
James Rich
e94e4da904 feat(database): Enable Write-Ahead Logging for Room DB (#4499)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-07 19:20:26 +00:00
James Rich
8c9743ca77 feat: Add stable class definitions for Meshtastic models (#4500)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-07 19:19:18 +00:00
James Rich
7c37b308a0 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4494) 2026-02-07 18:52:55 +00:00
James Rich
fad26f1273 feat: Improve connection state broadcast and timing (#4498)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-07 18:52:35 +00:00
Pavel Vasiliev
4303bfaac4 Enhancement - optional transparent homoglyph encoding of a few characters in certain languages for more compact and efficient text messages (#4491) 2026-02-07 18:49:35 +00:00
James Rich
6ec2ed76ca feat: Queue special app PortNums when disconnected (#4495)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-07 17:13:41 +00:00
James Rich
55f09fc6bb chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4493) 2026-02-07 14:56:32 +00:00
github-actions[bot]
57c443bf69 chore(release): prepare v2.7.13-internal.4 [skip ci]
- Bump base version to 2.7.13
- Sync translations and assets
2026-02-07 01:19:58 +00:00
James Rich
ba03aacdc9 feat(ble): Handle invalid BLE attributes (#4485)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-07 00:59:24 +00:00
James Rich
bf4020a939 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4490) 2026-02-07 00:33:06 +00:00
James Rich
9c1b4847df chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4488) 2026-02-06 23:05:36 +00:00
renovate[bot]
64cd6b94d5 chore(deps): update core/proto/src/main/proto digest to e80cb2e (#4487)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-06 23:05:21 +00:00
James Rich
cab39408df refactor(node): Improve public key conflict handling (#4486)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-06 19:55:20 +00:00
github-actions[bot]
78820863da chore(release): prepare v2.7.13-internal.3 [skip ci]
- Bump base version to 2.7.13
- Sync translations and assets
2026-02-06 18:41:28 +00:00
James Rich
ee861a9911 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4484) 2026-02-06 12:30:33 -06:00
James Rich
1e255a5120 feat: Check if NFC is enabled and prompt user to enable it (#4482) 2026-02-06 18:08:35 +00:00
James Rich
edd658f063 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4483) 2026-02-06 18:00:46 +00:00
James Rich
d4ab504882 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4480) 2026-02-06 16:44:44 +00:00
renovate[bot]
935cff8d26 chore(deps): update fastlane to v2.232.0 (#4479)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-06 16:04:11 +00:00
renovate[bot]
2ff8ffa4f8 chore(deps): update core/proto/src/main/proto digest to cba89ee (#4478)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-06 15:44:52 +00:00
James Rich
fce8e7cd08 feat(db): Add sender-based message filtering (#4477)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-06 15:13:59 +00:00
renovate[bot]
d48a0ea2b3 chore(deps): update androidx (general) (#4472)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-06 13:46:56 +00:00
James Rich
10df4d47f1 feat(ui): Redesign NodeItem for improved clarity and density (#4475)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-06 05:01:42 +00:00
James Rich
96551761c8 feat(sharing): Refactor QR/NFC scanning with ML Kit and CameraX (#4471)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-06 04:16:16 +00:00
renovate[bot]
3971c0a9f4 chore(deps): update actions/setup-java action to v5 (#4469)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-06 02:54:56 +00:00
renovate[bot]
7073c5d8c0 chore(deps): update gradle/actions action to v5 (#4470)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-06 02:54:45 +00:00
renovate[bot]
c88235e333 chore(deps): update actions/checkout action to v6 (#4468)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-05 22:54:14 +00:00
renovate[bot]
7f7fba84c2 chore(deps): update com.google.firebase:firebase-bom to v34.9.0 (#4467)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-05 22:54:10 +00:00
James Rich
d9c6ba52b4 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4464) 2026-02-05 22:36:38 +00:00
James Rich
18aae852fd build(ksp): ksp and publishing tuning (#4462)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-05 22:36:38 +00:00
James Rich
9e6de124ee chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4461) 2026-02-05 16:39:14 +00:00
github-actions[bot]
c0c1875cb1 chore(release): prepare v2.7.13-internal.2 [skip ci]
- Bump base version to 2.7.13
- Sync translations and assets
2026-02-05 14:59:11 +00:00
James Rich
94280a873f chore(ci): Simplify jitpack.yml build steps (#4460)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-05 08:56:09 -06:00
James Rich
37e9d6425c chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4459) 2026-02-05 13:32:33 +00:00
github-actions[bot]
3d274540b8 chore(release): prepare v2.7.13-internal.1 [skip ci]
- Bump base version to 2.7.13
- Sync translations and assets
2026-02-05 13:25:45 +00:00
James Rich
f1520eb383 feat(example): Add packet log and UI improvements (#4455)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-05 07:24:15 -06:00
James Rich
c44d2f3268 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4458) 2026-02-05 12:24:23 +00:00
renovate[bot]
4695f6c68f chore(deps): update kotlin ecosystem to v2.3.10 (#4457)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-05 12:20:34 +00:00
James Rich
451b2343b7 feat(deps): Remove temporary kotlinx-metadata-jvm dependency (#4453)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-04 23:27:16 +00:00
James Rich
67120465da refactor(build): Use version catalog for Compose Multiplatform (#4452) 2026-02-04 16:31:26 -06:00
James Rich
4643435f5f chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4445) 2026-02-04 16:30:30 -06:00