151 Commits

Author SHA1 Message Date
Midnight Blue
8a8ee37bde Merge pull request #15 from proxiboi69/main
Fix timeslot leak: add missing return after speaker-change handling i…
2026-02-21 13:11:43 +01:00
Elliott Cooper
ca97b70648 Feature: Adaptive JitterBuffer for Brew Originated Calls (#16)
* brew: replay adaptive jitter buffer and bump v0.4.3
2026-02-21 12:16:44 +01:00
proxiboi69
9b9affdac6 Fix timeslot leak: add missing return after speaker-change handling in rx_network_call_start 2026-02-21 09:19:11 +02:00
Midnight Blue
2853908a6b Merge pull request #8 from ManoDaSilva/main
Update Readme to point to the documentation repository.
2026-02-20 21:56:24 +01:00
Midnight Blue
c5773fda8f Merge pull request #12 from russel053/main
improved hangtime handling; trailing sound is resolved
2026-02-20 21:54:38 +01:00
神楽坂宇軒
dddec27c0e trailing sound is completely resolved 2026-02-21 04:34:46 +08:00
Wouter Bokslag
78397cde8d Updated example config 2026-02-20 11:16:46 +01:00
Wouter Bokslag
593849c66f Small fix to allow building outside of git-cloned environments 2026-02-20 10:22:57 +01:00
Wouter Bokslag
f006096c0a Added gates surrounding SAP message creation for Brew
Now only sends SAP messages to Brew entity if Brew entity is
enabled in the config. This prevents spam of undeliverable messages.
Also changed Brew username to int type, since it is always an ID
2026-02-20 09:47:23 +01:00
Wouter Bokslag
72aff09b5d Slightly reduce logging spam 2026-02-19 21:21:59 +01:00
Wouter Bokslag
71caafae96 Standardized code formatting conventions and linting
Added a rustfmt.toml to define code formatting conventions for the project.
Applied said format to entire codebase.
2026-02-19 17:19:44 +01:00
Wouter Bokslag
42bd3fe5eb Refactors in Brew config
- Brew config fields updated:
- Enabled field now removed.
- Internally, map config file to intermediary struct, then to StackConfig to be coherent with other config fields.
- Remove brew user agent field, now derive that from version number + git commit hash: BlueStation/0.x.x/aabbccdd
- Some small tweaks and improvements
2026-02-19 12:30:01 +01:00
Wouter Bokslag
068093a701 bugfix in downlink fragmenter, improved bitbuffer sanity checking 2026-02-17 23:30:58 +01:00
proxiboi69
9a27f5d9be Centralize group call management in CMCE
- Move all group call lifecycle (circuit allocation, D-SETUP/D-CONNECT, hangtime) from Brew to CMCE
- Add NetworkCallStart/Ready/End messages for communication between Brew and CMCE
- Unify ActiveCall tracking for both local and network-initiated calls
- Add LocalCallTxStopped for immediate PTT release notification to Brew
- Fix D-SETUP spam: change late entry interval from 3 timeslots to 20 multiframes (5s)
- Fix FACCH stealing: add chan_alloc with target timeslot for proper delivery
- Handle duplicate U-TX CEASED messages to prevent hangtime timer reset
2026-02-17 18:58:40 +01:00
mihajlo
3df4cd8123 Working group calls with Brew audio forwarding
- Local group calls now functional with audio passing to Brew/TetraPack
- Add centralized timeslot allocator to prevent Brew/CMCE collision
- Fix Brew audio: support multiple ACELP formats (36/35/274 bytes)
- Per-timeslot UL tracking in LMAC for concurrent calls
- Voice loopback and Brew forwarding in UMAC rx_tmd_prim
- Notify Brew of speaker changes during hangtime (U-TX-DEMAND)
- CMCE circuit allocation uses centralized timeslot manager
2026-02-17 18:58:32 +01:00
proxiboi69
95f2cd61f6 Brew integration and local group calls
- Brew RX/TX: talkgroup subscription, DL voice routing, UL forwarding to TetraPack
- Local group calls: ETSI call setup, floor control, hangtime, late entry
- UL voice: TCH/S decode with continuous Viterbi, ACELP reorder, DL loopback
- Fix MAC fragmenter crash on header exceeding remaining slot capacity
- Fix MLE handle routing for individual call setup responses
- Fix Direction::Both in UMAC circuit manager
- Align circuit expiry with T5m call timeout

- Add DEAFFILIATE → DEREGISTER teardown on Brew worker disconnect
- Implement Drop for BrewEntity to trigger graceful shutdown
- Add Ctrl+C signal handler (ctrlc crate) so main loop exits cleanly
- Extract graceful_teardown() in worker, handle channel disconnect fallback
- Add build_subscriber_deaffiliate/deregister to protocol builders

- Pass target TS via chan_alloc in D-TX CEASED / D-TX GRANTED
- UMAC stealing path uses specified TS instead of always picking first active circuit
- Fixes missing PTT release signaling on TS3+ with multiple concurrent group calls
2026-02-17 18:51:32 +01:00
Manoel
d6cf664656 Update Readme to point to the documentation repository. 2026-02-15 13:14:43 +01:00
Wouter Bokslag
11cc45fcef First draft of networked TETRA entity including working tests 2026-02-06 14:47:00 +01:00
Wouter Bokslag
1b377fcee7 Work-in-progress stuff regarding channel allocations and voice calls 2026-02-06 14:01:21 +01:00
Wouter Bokslag
6987447cca Dev work regarding downlink fragmentation 2026-01-17 17:07:28 +01:00
Wouter Bokslag
c9c20a9abe Massive restructuring and refactor
Although functional changes are limited, I've massively refactored and restructured the codebase into several separate crates.
- tetra-core features functionality and data that are used throughout the stack
- tetra-saps contains definitions for all SAP message types
- tetra-config contains everything that has to do with toml-based config file parsing and conversion to the internally-used datastructures
- tetra-pdus features entity-related PDU definitions, including field struct types and enums
- tetra-entities features implementations for TETRA entities, split between BS and MS use cases. It also holds subcomponents like schedulers and decoding tools.

A separate bins folder is made, which may hold any current and future binary targets we want to compile. Right now we have:
- tetra-bluestation-bs, which compiles the core base station binary
- pdu-tool, which is a crude, buggy, ad hoc tool to parse certain pdu types for stack debugging purposes
2026-01-17 16:58:09 +01:00
Wouter Bokslag
ad4402352b Major improvements regarding MAC fragmentation
- Upper mac now maintains which MS started uplink fragmentation
- Upper mac adds fragments to SSI-bound defrag buffer
- Scheduler now allows easy access to which SSI an uplink slot was granted
- Scheduler has improved schedule printing features for debugging
- More work towards functional downlink fragmentation
2026-01-14 22:52:26 +01:00
Wouter Bokslag
f7a529bbec Development snapshot
Merging back extensive development work. No functional changes
for now.
2026-01-11 18:23:37 +01:00
Wouter Bokslag
ab1581750a Merge branch 'testing' 2026-01-11 16:19:20 +01:00
Wouter Bokslag
16bcf61fd8 Disabled energy savings feature as it does not work yet 2026-01-11 15:55:17 +01:00
Wouter Bokslag
492cd2c07f Merge branch 'main' of github.com:MidnightBlueLabs/tetra-bluestation into testing 2026-01-11 14:33:58 +01:00
Wouter Bokslag
4c14dd800f Merge branch 'testing' of github.com:MidnightBlueLabs/tetra-bluestation into testing 2026-01-11 14:30:24 +01:00
Wouter Bokslag
24fbb88bff Cleanup of previous moto fixes. Optimizations in scheduler 2026-01-11 14:07:32 +01:00
Wouter Bokslag
a24666ec86 Indicate PPM error is a float value in example config 2026-01-10 22:17:17 +01:00
Wouter Bokslag
1eada07fd8 Intermediate commit, working on MAC fragmentation 2026-01-10 22:15:01 +01:00
proxiboi69
478284f2cc Resolve Motorola periodic disconnect issue
Set radio_dl_timeout to maximum (15) to prevent T307 timer expiration
Use BSCH (SDB burst) only on frame 18, SCH/HD (NDB burst) on frames 1-17
Update hyperframe number dynamically in SYSINFO broadcasts
Use hyperframe_number consistently instead of cck_id in SYSINFO1
2026-01-10 20:51:52 +01:00
Wouter Bokslag
b2e471c151 Added support for energy_saving_information during location update
Added supporting structs
Improved support for U-STATUS message
Implemented rudimentary support for emitting MM PDU FUNCTION NOT SUPPORTED upon unhandled received MM message types
Improved type2 field parsing/writing
Additional stack tests
2026-01-08 15:59:14 +01:00
Frédéric Druppel
8c2a9e2781 Update bug report templates 2026-01-07 20:21:45 +01:00
Wouter Bokslag
c02e165345 Significant improvements, rewrites and restructuring
- Better support for uplink SCH/F
- More typed message parsing improvements and standardization
- MAC Scheduler bugfix, restructuring
- Improved stdout formatting
- Added debugging features; logging text and UL/DL RF samples to file
- Implemented various extra PDU types
- Added unit tests and test vectors for various PDU types
- Added near-full-stack tests for UMAC and above.
2026-01-07 16:35:37 +01:00
Wouter Bokslag
120e429f2d Parsing improvements + various other small changes
Improved generics for higher-layer (MLE and above) message parsing
now allowing effective parsing of type3 and type4 fields straight
to struct types, and vice versa. Also, extended/improved several
SAP primitive struct definitions, and varous other smaller changes.
2026-01-03 10:41:45 +01:00
Wouter Bokslag
17257b52c7 Change unimplemented crash to warning 2025-12-30 22:29:01 +01:00
Wouter Bokslag
c6ea6251bc experimental fix 2025-12-30 21:37:58 +01:00
Wouter Bokslag
07ad483806 Added support for custom duplex spacings
You can now use the optional custom_duplex_spacing field to override the duplex spacing (distance between ul and dl) instead of using the values as specified by ETSI. This is useful if your radio uses a modified duplex spacing table.
2025-12-30 20:32:33 +01:00
Wouter Bokslag
f3fff334cd Fix for LimeSDR 2025-12-30 20:13:33 +01:00
Wouter Bokslag
fb2edb2f94 Support for 6.25kHz frequency offsets 2025-12-30 13:04:54 +01:00
wbokslag
80f58bdd02 Merge pull request #1 from proxiboi69/main
Add Type 0 (roaming) location update support for BTS reconnection
2025-12-29 15:57:38 +01:00
proxiboi69
77e671dd3a Add Type 0 (roaming) location update support for BTS reconnection 2025-12-29 15:07:27 +02:00
Wouter Bokslag
872b58803d Updated example config file version 2025-12-28 17:09:36 +01:00
Wouter Bokslag
81c1f30bab Extensive work on Phy/SoapySDR layer and stack configuration options 2025-12-28 15:23:44 +01:00
Wouter Bokslag
4fce10899a Now use vanilla SoapySDR-rust 2025-12-17 14:41:55 +01:00
Wouter Bokslag
0649b3bdfb resolved lifetime warnings 2025-11-26 17:31:53 +01:00
Wouter Bokslag
2af3eb019a Integrated PhyIoFile support into PhyBs, currently only supporting injecting prerecorded downlink traffic and/or logging downlink traffic to an output file 2025-11-26 17:24:59 +01:00
Wouter Bokslag
1b35a993a9 Added PhyIoFile class to support future logging phy-level data as well as injecting phy data into either SoapySDR output stream or towards the higher protocol layers 2025-11-26 17:13:57 +01:00
Wouter Bokslag
48f8a6b980 Initial commit 2025-11-10 14:56:58 +01:00
Tatu Peltola
fa93cb54ec Contributions on Phy and Lmac components 2025-11-10 14:31:15 +01:00