Narrow DVB-T2 bandwidths (t1–t5) — demod support, and ATSC 3.0 tuning flexibility

Want to write your own code to work with a HDHomeRun or work with the HDHomeRun DVR? We are happy to help with concepts, APIs, best practices.
drmpeg
Posts: 30
Joined: Mon Jan 23, 2023 6:34 pm
x 15

Re: Narrow DVB-T2 bandwidths (t1–t5) — demod support, and ATSC 3.0 tuning flexibility

Post by drmpeg »

Justin,

I just watched the BATC 26 presentation. Very nice!

Some notes on LDM. First, the atsc3rate program is really only accurate for the single PLP case (as used in the vv031.grc example). The easiest way to calculate bitrates for the more esoteric modes is to use the l1detail feature of the HDHomeRun. However, this feature is only available on the developer version.

Here's the example for LDM:

Code: Select all

re@w6rz:~/xfer$ hdhomerun_config 10ABCB1C-0 get /tuner0/l1detail
ACGAAAAAAEgAGfAQgazT////////AAAAABFAaCBAAAABUsHgQVKgjYYWgaAAAAKlg8CUIMwDIgIbCjCoeA==
It returns a base64 string. Then you feed that string into the dump program.

https://github.com/drmpeg/dtv-utils/blo ... r/l1dump.c
https://github.com/drmpeg/dtv-utils/blo ... r/l1dump.h

And it prints all of the L1 parameters and calculates the bitrate. Here's the vv320.grc example.

Code: Select all

ubuntu@p550:~/xfer$ ./l1dump vv320.txt
L1B_version = 0
L1B_mimo_scattered_pilot_encoding = Walsh-Hadamard pilots or no MIMO subframes
L1B_lls_flag = No LLS in current frame
L1B_time_info_flag = Time information is not included in the current frame
L1B_return_channel_flag = 0
L1B_papr_reduction = No PAPR reduction used
L1B_frame_length_mode = symbol-aligned
L1B_time_offset = 3072
L1B_additional samples = 0
L1B_num_subframes = 1
L1B_preamble_num_symbols = 1
L1B_L1_Detail_content_tag = 0
L1B_L1_Detail_size_bytes = 36
L1B_L1_Detail_fec_type = Mode 1
L1B_L1_additional_parity_mode = K=0 (No additional parity used)
L1B_L1_Detail_total_cells = 3320
L1B_first_sub_mimo = No MIMO
L1B_first_sub_miso = No MISO
L1B_first_sub_fft_size = 16K
L1B_first_sub_reduced_carriers = 5.832 MHz
L1B_first_sub_guard_interval = GI4_768
L1B_first_sub_num_ofdm_symbols = 108
L1B_first_sub_scattered_pilot_pattern = SP8_2
L1B_first_sub_scattered_pilot_boost = 1.841
L1B_first_sub_sbs_first = present
L1B_first_sub_sbs_last = present
L1B_crc = 0x00000000
L1D_version = 1
L1D_num_rf = No Channel Bonding
******** subframe = 0 ********
L1D_frequency_interleaver = All Symbols
L1D_sbs_null_cells = 2061
L1D_num_plp = 2
********** plp = 0 **********
L1D_plp0_id = 0
L1D_plp0_lls_flag = 1
L1D_plp0_layer = Core
L1D_plp0_start = 0
L1D_plp0_size = 1387550
L1D_plp0_scrambler_type = PRBS
L1D_plp0_fec_type = BCH + 64K LDPC
L1D_plp0_mod = QPSK
L1D_plp0_cod = 7/15
L1D_plp0_TI_mode = Convolutional time interleaving
L1D_plp0_CTI_fec_block_start = 688694
L1D_plp0_type = non-dispersed
L1D_plp0_TI_extended_interleaving = disabled
L1D_plp0_CTI_depth = 1024
L1D_plp0_CTI_start_row = 90
frame time = 272.481481 ms
Available PLP cells = 1387550
TS bitrate = 4720096.688
PLP bitrate = 4722611.391
********** plp = 1 **********
L1D_plp1_id = 1
L1D_plp1_lls_flag = 1
L1D_plp1_layer = Enhanced
L1D_plp1_start = 0
L1D_plp1_size = 1387550
L1D_plp1_scrambler_type = PRBS
L1D_plp1_fec_type = BCH + 64K LDPC
L1D_plp1_mod = 64QAM
L1D_plp1_cod = 10/15
L1D_plp1_TI_mode = Convolutional time interleaving
L1D_plp1_CTI_fec_block_start = 104454
L1D_plp1_ldm_injection_level = 4.0 dB
frame time = 272.481481 ms
Available PLP cells = 1387550
TS bitrate = 20271017.262
PLP bitrate = 20278561.370
L1D_bsid = 0x8086
L1D_crc = 0x0a30a878
Second, with LDM you have to enable both PLPs to decode anything. The command is (replace the serial number and channel number with your own):

hdhomerun_config 10ABCB1C-0 set /tuner0/channel atsc3:65:0+1

drmpeg
Posts: 30
Joined: Mon Jan 23, 2023 6:34 pm
x 15

Re: Narrow DVB-T2 bandwidths (t1–t5) — demod support, and ATSC 3.0 tuning flexibility

Post by drmpeg »

I forgot to mention that there's no free lunch with LDM. Shannon still rules. The SNR of each layer is degraded by the power split. For the vv320.grc example:

Code: Select all

re@beavis:~/xfer$ ./ldmsnr 0.3 12.88 4
core snr = 4.170673
enhancement snr = 18.335405
So the QPSK SNR is degraded by about 4 dB and the 64QAM SNR is degraded by about 6 dB.

The AWGN SNR figures are from A327 table 4.3.

https://www.atsc.org/wp-content/uploads ... yer-RP.pdf

Here's the code for the program.

Code: Select all

#include <stdio.h>
#include <stdlib.h>
#include <math.h>


int main(int argc, char **argv)
{
    double    snr;
    double    snr_core;
    double    snr_enh;
    double    injection_level;

    if (argc != 4) {
        fprintf(stderr, "usage: ldmsnr <snr core> <snr enhanced> <injection level>\n");
        exit(-1);
    }

    snr_core = atof(argv[1]);
    snr_enh = atof(argv[2]);
    injection_level = atof(argv[3]);

    snr = snr_core + (10 * log10(1 + pow(10, -injection_level / 10.0))) - (10 * log10(1 - pow(10, (snr_core - injection_level) / 10.0)));
    printf("core snr = %f\n", snr);
    snr = snr_enh + (10 * log10(1 + pow(10, injection_level / 10.0)));
    printf("enhancement snr = %f\n", snr);
    return 0;
}
The equations are from A327 section 4.2.8.1. The vv320.grc constellation looks like this.

Image

G8YTZ
Posts: 11
Joined: Thu Sep 24, 2026 1:13 pm

Re: Narrow DVB-T2 bandwidths (t1–t5) — demod support, and ATSC 3.0 tuning flexibility

Post by G8YTZ »

I'm delighted to announce that Lynx-Tx, my 4K DATV transmitter, is now live on GitHub!

What it does
  • DVB-S2 and ATSC 3.0 at release, at resolutions up to 4K UHD (DVB-T2 to follow)
  • 4K UHD HDMI input and a built-in 4K media player as standard, with a vision mixer between them
  • Hardware HEVC encoding, all controlled from one web page
  • SNMP monitoring, with ready-made Home Assistant entries for those who want alarms on their phone
Hardware
A Radxa ROCK 5T (about £200) and a PlutoSky R2 or LibreSDR on Evariste F5OEO's Tezuka firmware (about £170), plus ideally a GNSS 10 MHz reference.

Getting started
Start with the README, then the Installation Guide, which takes you from a blank SD card to your first transmission (one command does the install, about 15 minutes). The parts list is in its Appendix C, and the Monitoring Guide covers SNMP and Home Assistant.

https://github.com/G8YTZ/Lynx-DATV-Tx

Many thanks to Ron Economos W6RZ for the DVB-S2 and ATSC 3.0 modulators, and to Evariste F5OEO for Tezuka.

Feedback and bug reports welcome!

73,
Justin G8YTZ

https://forum.batc.org.uk/viewtopic.php ... 630#p40619

G8YTZ
Posts: 11
Joined: Thu Sep 24, 2026 1:13 pm

Re: Narrow DVB-T2 bandwidths (t1–t5) — demod support, and ATSC 3.0 tuning flexibility

Post by G8YTZ »

Ron,

many thanks for the information, and what a constellation!.

I'm really glad that you enjoyed the presentation, despite my man flu!. I'll try harder next time. :-)

Seriously Your GNU flows work really well. I hope the Lynx Tx and Rx are useful to people. I've done a lot of work on the Tx side, including SNMP monitoring and protection in case the Rock I/Q stream fails. My plan is that it will become a complete DATV repeater controller and transmitter with all sources as SRT.

I've sold a few HDHRs already, but we really need that older model that supports 1MHz back in production. In the UK we have an allocation at 146-147 MHz intended for "Emerging Technologies' which basically means Television. For us 3.4GHz would be ideal for ATSC v3 - we have 3400-3010 but a down-converter is required. Failing that in the UK we also have 1300-1325 MHz in addition to the usual 23cm allocation. The Icom IC-9700 with Radio Analog card brings 23cm down to 320 MHz (929 MHz LO) which is what I use.

73

Justin Cockett - G8YTZ

Post Reply