Commit Graph

4185 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
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
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
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
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
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
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
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
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
c44d2f3268 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4458) 2026-02-05 12:24:23 +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
James Rich
498a797740 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4443) 2026-02-04 14:51:48 +00:00
James Rich
e055d22346 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4438) 2026-02-04 02:41:48 +00:00
James Rich
7ded77d1a9 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4430) 2026-02-04 00:52:32 +00:00
James Rich
25657e8f8f feat(wire): migrate from protobuf -> wire (#4401)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-04 00:01:12 +00:00
James Rich
a3e19d6ad7 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4426) 2026-02-03 18:35:06 +00:00
James Rich
35c0f9afcf chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4424) 2026-02-03 13:17:37 +00:00
James Rich
9e41291484 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4423) 2026-02-03 03:14:40 +00:00
James Rich
e5543daca0 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4419) 2026-02-02 18:16:39 -06:00
James Rich
fac72af9f4 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4399) 2026-02-02 15:25:47 +00:00
James Rich
221e774471 chore: fix regressions in the release (#4398)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-01 23:18:06 +00:00
James Rich
3659f468e4 chore(ci): Optimize and stabilize Gradle builds and CI workflows (#4390)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-02-01 18:03:17 +00:00
James Rich
152099c7e9 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4385) 2026-02-01 14:12:03 +00:00
James Rich
c39dcb4461 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4384) 2026-01-30 18:41:50 -06:00
James Rich
8941643f69 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4376) 2026-01-30 22:29:49 +00:00
James Rich
b95c773ec7 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4375) 2026-01-30 10:19:08 -06:00
James Rich
f9cc7080f8 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4363) 2026-01-29 22:36:33 +00:00
James Rich
15760da074 Refactor: Create core:api module and set up publishing (#4362) 2026-01-29 13:45:00 -06:00
James Rich
4e7de3b73c chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4361) 2026-01-29 13:44:06 -06:00
James Rich
6665737c9b chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4360) 2026-01-29 11:10:06 -06:00
James Rich
0345a87f5f chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4356) 2026-01-29 08:56:10 -06:00
James Rich
e46cb27f5c chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4353) 2026-01-29 13:25:30 +00:00
James Rich
8e00038e7c chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4343) 2026-01-29 02:18:17 +00:00
James Rich
70a1b3c479 Refactor: Replace custom charts with Vico library (#4348)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-01-29 00:52:59 +00:00
James Rich
091ca9b400 fix(neighborinfo): disable neighbor info dialog temporarily (#4345)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-01-28 03:21:04 +00:00
James Rich
4ae69447df chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4332) 2026-01-27 19:03:00 +00:00
James Rich
dff3e60b8c fix(node): list and detail usability fixes (#4336)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-01-27 18:33:46 +00:00
James Rich
78c2a115a7 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4329) 2026-01-27 00:26:38 +00:00
James Rich
814de6bb78 chore: Scheduled updates (Firmware, Hardware, Translations, Graphs) (#4327) 2026-01-26 21:20:06 +00:00
James Rich
2b6c3185b0 fix(mesh): Set hopStart to match hopLimit in sent packets (#4324)
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
2026-01-26 17:50:04 +00:00