Skip to content

Commit ca6bea0

Browse files
committed
Merge remote-tracking branch 'upstream/master' into codex/t-deck-max-hw-model
# Conflicts: # meshtastic/mesh.proto
2 parents 36e3283 + 4b8d665 commit ca6bea0

19 files changed

Lines changed: 487 additions & 107 deletions

.github/workflows/create_tag.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ jobs:
6060
- name: Setup Buf
6161
uses: bufbuild/buf-action@v1.2.0
6262
with:
63+
version: 1.71.0 # renovate: datasource=github-releases depName=bufbuild/buf
6364
github_token: ${{ github.token }}
6465
token: ${{ secrets.BUF_TOKEN }}
6566
setup_only: true

.github/workflows/pull_request.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
- name: Buf PR Checks
1717
uses: bufbuild/buf-action@v1.2.0
1818
with:
19+
version: 1.71.0 # renovate: datasource=github-releases depName=bufbuild/buf
1920
github_token: ${{ github.token }}
2021
token: ${{ secrets.BUF_TOKEN }}
2122
format: true

.github/workflows/schema-registry.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
- name: Push to schema registry
2020
uses: bufbuild/buf-action@v1.2.0
2121
with:
22+
version: 1.71.0 # renovate: datasource=github-releases depName=bufbuild/buf
2223
github_token: ${{ github.token }}
2324
token: ${{ secrets.BUF_TOKEN }}
2425
push: true

.github/workflows/snapshot-kmp.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,6 @@ jobs:
2121
with:
2222
fetch-depth: 0
2323

24-
- name: Compute snapshot version
25-
id: version
26-
run: |
27-
TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
28-
RELEASE_VERSION="${TAG#v}"
29-
IFS='.' read -r major minor patch <<< "$RELEASE_VERSION"
30-
SNAPSHOT_VERSION="${major}.${minor}.$((patch + 1))-SNAPSHOT"
31-
echo "snapshot=$SNAPSHOT_VERSION" >> "$GITHUB_OUTPUT"
32-
3324
- name: Setup Java
3425
uses: actions/setup-java@v4
3526
with:
@@ -42,8 +33,19 @@ jobs:
4233
- name: Setup Gradle
4334
uses: gradle/actions/setup-gradle@v4
4435

36+
- name: Set version name
37+
run: |
38+
# Name the snapshot after the latest tag (v-stripped) plus the short SHA.
39+
# The `-<sha>` is a build qualifier, so Maven sorts this ABOVE the tag's
40+
# release (no Renovate downgrade) yet below the next release — no patch
41+
# bump needed. (The local fallback in build.gradle.kts uses a *bare*
42+
# `-SNAPSHOT`, which sorts below its base, so it patch-bumps instead.)
43+
BASE=$(git describe --tags --abbrev=0)
44+
SHORT_SHA=${GITHUB_SHA::7}
45+
echo "VERSION_NAME=${BASE#v}-${SHORT_SHA}-SNAPSHOT" >> "$GITHUB_ENV"
46+
4547
- name: Build KMP package
46-
run: packages/kmp/gradlew --no-daemon -p packages/kmp build -PVERSION_NAME=${{ steps.version.outputs.snapshot }}
48+
run: packages/kmp/gradlew --no-daemon -p packages/kmp build -PVERSION_NAME=${{ env.VERSION_NAME }}
4749

4850
- name: Publish snapshot to Maven Central
4951
env:
@@ -56,4 +58,4 @@ jobs:
5658
echo "Missing Maven Central secrets — skipping snapshot publish." >&2
5759
exit 0
5860
fi
59-
packages/kmp/gradlew --no-daemon -p packages/kmp publishAllPublicationsToMavenCentralRepository -PVERSION_NAME=${{ steps.version.outputs.snapshot }}
61+
packages/kmp/gradlew --no-daemon -p packages/kmp publishAllPublicationsToMavenCentralRepository -PVERSION_NAME=${{ env.VERSION_NAME }}

meshtastic/admin.options

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
*HamParameters.call_sign max_size:8
2020
*HamParameters.short_name max_size:5
21+
*HamParameters.long_name max_size:15
2122
*NodeRemoteHardwarePinsResponse.node_remote_hardware_pins max_count:16
2223

2324
*LockdownAuth.passphrase max_size:32

meshtastic/admin.proto

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,69 @@ message LockdownAuth {
581581
* the locked state. Always honoured regardless of current lock state.
582582
*/
583583
bool lock_now = 4;
584+
585+
/*
586+
* Optional per-boot uptime cap on the unlocked session, in seconds.
587+
* 0 = unlimited (token-only enforcement, suitable for unattended
588+
* tower / infrastructure nodes).
589+
*
590+
* When non-zero, the firmware arms an uptime timer at unlock. On
591+
* each expiry, while there is still boot-count budget, the firmware
592+
* decrements the on-flash boot count in place, revokes per-
593+
* connection admin auth (clients must re-authenticate to see
594+
* content), re-engages the screen lock, and re-arms the timer
595+
* without rebooting. Mesh routing keeps running across session
596+
* boundaries; only when the boot-count budget reaches zero does
597+
* the device hard-lock and reboot.
598+
*
599+
* Total exposure ceiling = ((resolved boot count) + 1) * max_session_seconds.
600+
* The +1 accounts for the initial passphrase-unlocked session
601+
* itself, since boots_remaining is the number of subsequent
602+
* session rolls (each consuming one boot from the rollback ledger).
603+
* The resolved boot count is the value the firmware writes into the
604+
* token at unlock time: the client-supplied boots_remaining when
605+
* non-zero, otherwise the firmware default (TOKEN_DEFAULT_BOOTS).
606+
* Note that boots_remaining == 0 in this message means "use firmware
607+
* default", NOT "zero boots" — a client computing the ceiling for
608+
* display should mirror that resolution rather than multiplying the
609+
* raw request value.
610+
*
611+
* The cap is persisted in the token, so it survives token-based
612+
* auto-unlock across reboots. Explicit operator Lock Now still
613+
* deletes the token and forces passphrase re-entry.
614+
*
615+
* Uses millis() (CPU uptime), not wall-clock time, so the cap is
616+
* immune to GPS spoofing, RTC backup-battery removal, and Faraday
617+
* cage isolation — none of those move the uptime counter. The only
618+
* way to reset the session clock is a reboot, which costs a boot
619+
* from the on-flash, HMAC-bound counter.
620+
*/
621+
uint32 max_session_seconds = 5;
622+
623+
/*
624+
* Disable lockdown mode. Requires a valid passphrase in the same
625+
* message (the device must prove the operator owns it before
626+
* reverting at-rest encryption). On success the firmware decrypts
627+
* every stored config / channel / nodedb file back to plaintext,
628+
* removes the wrapped DEK, unlock token, monotonic-counter, and
629+
* backoff files, and reboots out of lockdown.
630+
*
631+
* This is the inverse of the provision/unlock path: it is how the
632+
* client app's "lockdown mode" toggle returns a device to normal
633+
* operation.
634+
*
635+
* NOT reversed by this operation: APPROTECT. Once the debug port
636+
* lockout has been burned (on silicon where it is effective) it is
637+
* permanent — disabling lockdown decrypts your data and removes the
638+
* access gates, but the SWD/JTAG port stays locked for the life of
639+
* the device (recoverable only via a full chip erase over a debug
640+
* probe, which destroys all data). Clients should make this
641+
* irreversibility clear at the moment lockdown is first enabled.
642+
*
643+
* When true the passphrase field is still required; boots_remaining,
644+
* valid_until_epoch, max_session_seconds, and lock_now are ignored.
645+
*/
646+
bool disable = 6;
584647
}
585648

586649
/*
@@ -628,6 +691,12 @@ message HamParameters {
628691
* Optional short name of user
629692
*/
630693
string short_name = 4;
694+
695+
/*
696+
* Optional long name of user
697+
* Appended to callsign
698+
*/
699+
string long_name = 5;
631700
}
632701

633702
/*

meshtastic/clientonly.options

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*DeviceProfile.long_name max_size:40
1+
*DeviceProfile.long_name max_size:25
22
*DeviceProfile.short_name max_size:5
33
*DeviceProfile.ringtone max_size:231
44
*DeviceProfile.canned_messages max_size:201

meshtastic/config.proto

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -965,6 +965,31 @@ message Config {
965965
* ITU Region 3 Amateur Radio 2m band (144-148 MHz)
966966
*/
967967
ITU3_2M = 33;
968+
969+
/*
970+
* ITU Region 1 Amateur Radio 70cm band (430-440 MHz)
971+
*/
972+
ITU1_70CM = 34;
973+
974+
/*
975+
* ITU Region 2 Amateur Radio 70cm band (420-450 MHz)
976+
* Note: Some countries do not allocate 420-430 MHz or 440-450 MHz.
977+
* Check local law!
978+
*/
979+
ITU2_70CM = 35;
980+
981+
/*
982+
* ITU Region 3 Amateur Radio 70cm band (430-450 MHz)
983+
* Note: Some countries do not allocate 440-450 MHz. Check local law!
984+
*/
985+
ITU3_70CM = 36;
986+
987+
/*
988+
* ITU Region 2 Amateur Radio 1.25m '125cm' band (220-225 MHz)
989+
* Note: Some countries do not allocate 220-222 MHz (Ex: USA/Canada).
990+
* Check local law!
991+
*/
992+
ITU2_125CM = 37;
968993
}
969994

970995
/*
@@ -1055,6 +1080,26 @@ message Config {
10551080
* Comparable link budget and data rate to LONG_FAST.
10561081
*/
10571082
NARROW_SLOW = 13;
1083+
1084+
/*
1085+
* Tiny Fast
1086+
* Preset optimized for compliance with Amateur Radio restrictions with 20kHz bandwidth.
1087+
* Many regions limit data transmission bandwidth in lower amateur bands (2 Meter).
1088+
* Note: TCXO with tight tolerances (±5 ppm or better) is *absolutely required* at these narrow bandwidths.
1089+
* Only compatible with SX127x and SX126x chipsets.
1090+
* Comparable link budget and data rate to LONG_FAST.
1091+
*/
1092+
TINY_FAST = 14;
1093+
1094+
/*
1095+
* Tiny Slow
1096+
* Preset optimized for compliance with Amateur Radio restrictions with 20kHz bandwidth.
1097+
* Many regions limit data transmission bandwidth in lower amateur bands (2 Meter).
1098+
* Note: TCXO with tight tolerances (±5 ppm or better) is *absolutely required* at these narrow bandwidths.
1099+
* Only compatible with SX127x and SX126x chipsets.
1100+
* Comparable link budget and data rate to LONG_MODERATE.
1101+
*/
1102+
TINY_SLOW = 15;
10581103
}
10591104

10601105
enum FEM_LNA_Mode {

meshtastic/deviceonly.options

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,22 @@
1212
*NodeInfoLite.hops_away int_size:8
1313
*NodeInfoLite.next_hop int_size:8
1414

15+
# Flattened user fields. long_name was 40 on UserLite; trimmed to 25 here so the
16+
# slim header gives back ~15 B/node of RAM. Names that exceeded 24 chars on the
17+
# wire (max 40) get truncated on store, with sanitizeUtf8 cleaning up partial
18+
# multi-byte sequences at the boundary.
19+
*NodeInfoLite.long_name max_size:25
20+
*NodeInfoLite.short_name max_size:5
21+
*NodeInfoLite.public_key max_size:32
22+
# hw_model + role used to be 32-bit enums inside UserLite. We pin them to one
23+
# byte each on the slim header to claw back the alignment overhead.
24+
*NodeInfoLite.hw_model int_size:8
25+
*NodeInfoLite.role int_size:8
26+
27+
# UserLite survives only as the v24 nodedb migration decode type; it must keep
28+
# the legacy on-disk width (40) or saves holding longer names fail to decode
29+
# and the whole DB is discarded. The migration copy truncates into the slim
30+
# header fields above.
1531
*UserLite.long_name max_size:40
1632
*UserLite.short_name max_size:5
1733
*UserLite.public_key max_size:32 # public key

0 commit comments

Comments
 (0)