T 2 is a DAB+ radio receiver for Band III. An RTL-SDR dongle gives it the signal. The window is a small, frameless panel with a frequency dial, a station list and four controls.
T 2 decodes DAB+ only. It does not decode classic DAB, which uses MPEG-1 Layer II audio. T 2 shows classic DAB stations, but it does not play them.
| Term | Meaning |
|---|---|
| Band III | The radio band from 174 MHz to 240 MHz. DAB uses it. |
| channel | One named frequency in Band III, for example 7A. |
| ensemble | The group of stations that one channel carries. |
| station | One audio service in an ensemble. |
| dongle | The RTL-SDR USB device that receives the signal. |
| I/Q file | A file of recorded radio samples. |
| SNR | Signal-to-noise ratio, in dB. |
| click | Push and release the left button of the mouse. |
- An RTL-SDR dongle. T 2 was tested with an RTL-SDR Blog V4.
- An antenna for Band III.
- A computer with Windows 11.
Download the file for your system from the releases page of the repository.
| System | File | Notes |
|---|---|---|
| Windows | t2-<version>-windows-x86_64-setup.exe |
Installs T 2 and adds it to the Start menu. |
| Windows | t2-<version>-windows-x86_64-portable.zip |
No installation. Extract the ZIP file. Then start t2.exe. |
| Linux | t2-<version>-linux-x86_64.AppImage |
No installation. Make the file executable. Then start it. |
| Linux | t2-<version>-linux-x86_64.deb |
For Debian and Ubuntu. Install it with apt install ./<file>. |
| macOS | t2-<version>-macos-universal.dmg |
One file for Apple Silicon and for Intel. |
The files have the name t2, but the program is called T 2. Only the file
name is different, because a space in a file name is difficult in a terminal.
These files are not signed. Thus your system shows a warning the first time you start the program.
- On Windows, Microsoft Defender SmartScreen shows a message. Click More info. Then click Run anyway.
- On macOS, Gatekeeper refuses the first start. Open the Applications folder. Hold the CTRL key and click T 2. Then click Open.
T 2 reads the dongle through the WinUSB driver. Windows must use this driver for the dongle, and not the TV tuner driver.
CAUTION: Zadig replaces the driver of the device that you select. Select the correct device. If you select the wrong device, that device will not operate.
- Connect the dongle to a USB port.
- Connect the antenna to the dongle.
- Download Zadig from
https://zadig.akeo.ie. - Start Zadig.
- Select Options > List All Devices.
- Select the dongle in the list. Its name contains
RTLorBulk-In. - Select the WinUSB driver.
- Click Replace Driver.
- Wait for the message that tells you the installation is complete.
Start T 2 from the Start menu. The window opens. It shows no stations, because T 2 knows no stations yet.
| Part | Position | Function |
|---|---|---|
| Header | Top | Shows the mark T 2, the channel and the frequency. |
| Dial | Below the header | Shows Band III. A tall orange line shows the tuned channel. |
| Hero row | Middle | Shows the station that plays now, its text and its signal quality. |
| Artwork window | Below the hero row | Shows the image that the station sends. |
| Station list | Below the artwork | Shows all stations that T 2 found. |
| Bottom bar | Bottom | Holds the settings button, the volume line and the play button. |
The header is also the title bar. Hold the left button of the mouse on the header to move the window.
T 2 remembers the position and the height of the window. It puts the window back when you start it again. If the monitor is no longer connected, T 2 uses the default position.
T 2 does not find stations without a command. Do a scan first.
- Click the settings button at the bottom left of the window.
- Click Scan Band III.
- Wait. The button shows the channel that T 2 examines now, and the number of ensembles that it found.
- Click the cross at the top right of the sheet to close the sheet.
The station list now shows the stations. The dial shows a tall white line at each channel that has an ensemble.
The scan examines all 38 channels of Band III. It can take some minutes, because T 2 must tune the dongle again for each channel.
The scan adds stations. It does not delete stations. Thus a short scan cannot remove the stations that a long listen found.
Click the name of a station in the list.
If the station is on a different channel, T 2 tunes to that channel first. The orange lines on the dial move to the new channel. This takes some seconds, because T 2 must open the dongle again for each new channel.
The station moves to the hero row. The hero row is taller than the rows in the list. This difference tells you which station plays.
You can also click a tall white line on the dial. T 2 then tunes to that channel.
Click the button at the bottom right of the window. It stops the audio, or it starts the audio again. The station stays tuned.
Click the circle to the left of a station name.
- An empty circle shows that the station is not a favourite.
- A filled grey circle shows that the station is a favourite.
Favourites come first in the list. Inside each group, the stations are in alphabetical order.
The hero row shows a word, a dot and a number. The number is the SNR in dB.
The number changes one time each 10 seconds. Thus you can read it. The word changes at the same time.
Two conditions change the readout immediately:
- You select a station on a different channel.
- The receiver finds the signal, or loses it.
| Word | SNR |
|---|---|
| STRONG | More than 14 dB |
| GOOD | 11 dB to 14 dB |
| WEAK | Less than 11 dB |
If the word is WEAK, move the antenna. A better antenna position gives a higher number.
The volume is the horizontal line in the middle of the bottom bar. The white part of the line shows the current volume. The grey part shows what is left.
You can change the volume in three ways:
- Hold the left button of the mouse on the line. Move the pointer left or right.
- Put the pointer on the line. Turn the wheel of the mouse.
- Push the TAB key until the line has the focus. Then push the arrow keys.
Some stations send images. T 2 hides these images, because they change the height of the window.
- Click the settings button.
- Under Station artwork, click On or Off.
Change these settings only if the signal is weak.
- Click the settings button.
- Under Gain, click Auto to let the dongle control the gain.
- Or click dB and type a value. Approximately 28 dB is a good first value.
- Under ppm, type the frequency error of the crystal of your dongle.
T 2 can read an I/Q file instead of the dongle. The file must contain unsigned
8-bit samples (cu8) at 2.048 MS/s. The fixtures\ensemble.cu8 file in the
source is an example.
- Click the settings button.
- Under Source, click File.
- Type the full path of the file.
- Click a different field. T 2 opens the file.
To use the dongle again, click Antenna.
The width of the window is constant. You can change only the height.
- Move the pointer to the bottom edge of the window. The pointer changes.
- Hold the left button of the mouse.
- Move the pointer up or down.
The station list becomes taller or shorter. The other parts keep their size.
The window has no buttons until you move the pointer to the header.
- Move the pointer to the header.
- The frequency label disappears, and two buttons appear at the right.
- Click the first button to minimise the window.
- Click the second button to close T 2.
You can also use the TAB key to move to these buttons.
T 2 writes its settings, its window position and its station list to this file:
%APPDATA%\T 2\settings.toml
Delete this file to remove all stations and all favourites.
| Message | Cause | What to do |
|---|---|---|
No signal on <channel> |
No ensemble on this channel. | Do a scan. Or move the antenna. |
DAB (MP2) — not supported |
The station uses classic DAB. | Select a different station. |
<name> carries data, not audio |
The service is not a radio station. | Select a different station. |
Reconnecting… |
T 2 lost the dongle and looks for it again. | Wait. T 2 continues without your help. See below. |
Receiver disconnected |
A file source stopped. | Examine the file. Select a different source. |
Cannot open receiver: <text> |
T 2 cannot open the dongle. | Make sure that no other program uses the dongle. Examine the driver. |
No source selected |
T 2 has no dongle and no file. | Open the settings sheet. Select a source. |
A USB receiver goes away for many reasons. The computer went to sleep. A hub removed the power. Somebody moved the cable. T 2 does not stop when this occurs.
T 2 looks for the dongle again after 0.5 seconds. If it does not find the dongle, T 2 waits two times as long before each new attempt, to a maximum of 5 seconds. It continues for as long as necessary.
When T 2 finds the dongle, it tunes to the same channel and plays the same station. You do not have to do anything. You do not have to start T 2 again.
The t2 program does the same work without a window. It is not part of the
installer. Build it with cargo build --release -p t2-cli.
| Command | Function |
|---|---|
t2 channels |
Print the Band III channel table. |
t2 list |
Print the stations in one ensemble. |
t2 scan |
Examine all channels of Band III. |
t2 decode |
Write one station to a WAV file. |
Examples:
t2 list --rtl --channel 7A
t2 list --in fixtures/ensemble.cu8 --json
t2 scan --gain 28
t2 decode --rtl --channel 7A --sid 0x4F40 --out station.wav
| Option | Function |
|---|---|
--rtl |
Read from the dongle. |
--in <file> |
Read from an I/Q file. |
--channel <name> |
The Band III channel. Necessary with --rtl. |
--gain <dB> |
The gain of the tuner. Omit it for automatic gain. |
--ppm <number> |
The frequency correction of the crystal. |
--timeout <seconds> |
Stop after this time. The default value is 20. |
--json |
Print the result as JSON. |
--with-cu |
Add the capacity-unit spans to the list output. |
--sid <id> |
The station, as hexadecimal or decimal. |
--out <file> |
The WAV file to write. |
To see more messages, set the T2_LOG variable:
set T2_LOG=info
Install these programs before you build. The versions in the table are the versions that this document was tested with.
| Program | Version | Why |
|---|---|---|
| Visual Studio Build Tools | 2022, with Desktop development with C++ | Gives the MSVC linker and the C compiler. The AAC audio library is C code. |
| Rust | stable, 1.96.1 | Builds all four crates. Install it with rustup. |
| Node.js | 20 or later, tested with 24.16.0 | Builds the user interface. |
| Tauri CLI | 2.11.2 | Makes the application and the installers. |
| WebView2 runtime | Current | Shows the user interface. Windows 11 already has it. |
Install the Tauri CLI with this command:
cargo install tauri-cli --version "^2" --locked
The rust-toolchain.toml file selects the stable toolchain. It also selects
the rustfmt and clippy components. rustup installs them automatically.
NOTE: The bundler downloads NSIS and WiX at the first build. The computer must have an internet connection for that build.
git clone <repository-url> t2
cd t2\ui
npm ci
All four tests must be clean. Do not commit code that fails one of them.
Type these commands in the top directory:
cargo fmt --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test --workspace
Then type these commands in the ui directory:
npm run typecheck
npm test
NOTE: Windows PowerShell 5.1 does not know the && operator. Type each
command on its own line.
cd app
cargo tauri dev
This command starts the Vite server and the application. It builds the application again when you change a file.
cd app
cargo tauri build
The command does this work:
- It builds the user interface into
ui/dist. - It builds the application in release mode.
- It makes the two Windows installers.
The first build takes some time, because the release profile uses link-time optimisation. Later builds are faster.
The configuration file names five bundle targets. Three of them are for Linux and macOS. On Windows the bundler makes only the MSI and the NSIS installers, and ignores the other three.
| File | Path | Size |
|---|---|---|
| Application | target\release\t2-app.exe |
12.7 MB |
| MSI installer | target\release\bundle\msi\T 2_0.1.0_x64_en-US.msi |
5.2 MB |
| NSIS installer | target\release\bundle\nsis\T 2_0.1.0_x64-setup.exe |
3.5 MB |
The name of the application file is t2-app.exe, because that is the name of
the Rust crate. The two installers use the product name. They put the
application in the Start menu as T 2.
Use the MSI installer for a company that installs software with Group Policy. Use the NSIS installer for one computer.
Both installers use the identifier de.t2.radio. Both add the licence file and
the NOTICE file.
Change the version field in app/tauri.conf.json. The names of the
installers contain this number.
- The stack must be larger than the default. The OFDM front-end keeps large
arrays on the stack, and the MSVC default of 1 MB is too small. Each binary
crate has a
build.rsfile that sets/stack:8388608. Link arguments apply to the final binary only. Thust2-cli,appandt2-dabeach need their own file. If you add a new binary crate, copy this file. - The workspace patches the
rs-rtlcrate. The patch is one function. It identifies an RTL-SDR Blog V4 correctly on Windows. Without the patch, the dongle receives noise at each frequency. Readthird-party/rs-rtl/README.md. - The code under
crates/t2-dab/src/vendor/is not ours. It is Xavier Olive'sdabradio, at release 0.4.2. Mark each local change with// T2:. ReadCLAUDE.mdbefore you change one of these files. SPEC.mdis the specification. If this document andSPEC.mddisagree,SPEC.mdis correct.
.github/workflows/release.yml makes all the files in section 1.2. It starts in
two conditions:
- You push a tag with the format
v<version>, for examplev0.1.0. The workflow then makes a GitHub release and adds the files to it. - You start it manually from the Actions page. The workflow then makes the files, but it does not make a release. Use this to test a change to the workflow.
The version in the tag must agree with the version field in
app/tauri.conf.json. If the two do not agree, the workflow stops with an
error.
| Runner | Makes |
|---|---|
windows-latest |
The NSIS installer and the portable ZIP file. x64 only. |
ubuntu-22.04 |
The AppImage file and the DEB package. |
macos-latest |
The DMG file, for Apple Silicon and Intel together. |
The Linux runner is Ubuntu 22.04 and not a later version. A program uses the system C library of the computer that made it. Thus a program made on Ubuntu 24.04 does not start on an older system.
.github/workflows/ci.yml does not make these files. It tests the source on
each push and each pull request, and that must stay quick.
T 2 is MIT licensed. It contains code with other licences:
dabradioanddesperadoby Xavier Olive, both MIT.- The Fraunhofer FDK AAC Codec Library, which is not MIT. Its licence is in the installed application.
- The Inter and IBM Plex Mono fonts, under the SIL Open Font License.
The NOTICE file holds the full text.
This document follows the rules of ASD-STE100 Simplified Technical English. Sentences are short. Each instruction is one sentence. The word click is used as a technical verb for the mouse.
The name of the product is T 2: two characters, one space, one digit.