Notes on getting astrometa dvb-t2 to work

For discussion of topics specific to MythTV on linux
Post Reply
luc5588
Junior
Posts: 31
Joined: Sat Dec 19, 2015 11:13 am

Notes on getting astrometa dvb-t2 to work

Post by luc5588 » Fri Jul 15, 2016 4:51 pm

I have an astrometadvbt2 usb device that works fine in tvheadend on ubuntu 16.04. On the same hardware in mythtv 0.28.20160413 I had some problems setting it up. I thought I would share my experience and work arounds for anyone considering purchase in case it is helpful.

The card registers two frontends, frontend0 (RTL2832, DVB-T), and frontend1 (MN88473, DVB-T2), but only one demux device (demux0).

If I scan with frontend0 then mythtv detects only DVB-T channels. I read that some device drivers had a hack to automatically retry tuning as DVB-T2 requests.

If I scan with frontend1 then mythtv fails since it tries to open demux1 which does not exist. The scan eventually completes but with no channels.

So we need to rename frontend1 to frontend0. I couldn't find a modprobe to do it so resorted to this (run via sudo -s):

Code: Select all

cd /dev/dvb/adapter0 && mv frontend0 frontend99 && mv frontend1 frontend0
I don't know if there is a _correct_ way to achieve this. If not, I'll probably add it to /etc/rc.local.

(An alternative way _might_ be to symlink demux0 to demux1, but that didn't work for me).

Delete the capture card, re-add it and then you can then scan via frontend0 and it works and gets both DVT-T2 and DVB-T channels, but I only got one of the HD multiplexes. Explicitly scanning the correct frequency (remember to select mod=DVB-T2) did not detect the channels either using the frequency from tvheadend gui in its configuration / dvb inputs / services / mux and comparing the mux column against mysql frequency column to find the missing frequency:

Code: Select all

mysql> select mplexid,frequency from dtv_multiplex where sourceid=4 order by frequency;                                                                                                                
Where sourceid is taken from the videosource table via

Code: Select all

select name,sourceid from videosource
Re-scanning all existing transports would often get signal timeout and still didn't detect the missing mux.

So I went back to capture card and updated signal timeout from 1000ms to 5000ms. Then went back to scan single frequency and also set bandwidth to 8Mhz. I made both changes at the same time so can't say if one was the correct fix.

This time the scan worked and detected the missing channels and it now works fine in mythtv. It seems that the full epg for all channels is carried on the HD multiplex since it quickly populated the programme guide.

Since it is a new purchase, I can't vouch for durability of the card, reliability, warmth, etc. It's a relatively cheap card but is single tuner, whereas most dvb-t cards are dual tuner. I couldn't test the DVB-C capability. Some things that didn't work for me might work properly if I had rebooted and deleted all cards between attempts.


For scanning DVB-T2 channels outside mythtv (for testing purposes) I needed to use dvbv5-scan instead of w_scan, with dvbv5-scan being considerably faster since it uses transmitter lookup tables rather than a full frequency scan. The w_scan would only detect DVB-T channels.

In tvheadend the card shows up as three separate tuners (DVB-C, DVB-T, DVB-T2). I enabled only the DVB-T2 and it scanned all the channels without any frontend modifications necessary.

On FreeBSD, the webcamd only creates frontend0 so it couldn't tune dvb-t2 at all. The webcamd debug showed it recognizes the MN88473 but it's not attached and only sends rtl28xx commands.


Output from Linux dmesg:

Code: Select all

mn88473 7-0018: Panasonic MN88473 successfully attached

DVB: registering adapter 0 frontend 0 (Realtek RTL2832 (DVB-T))...

DVB: registering adapter 0 frontend 1 (Panasonic MN88473)...
Hope the above is of use to anyone struggling. YMMV.

MikeB2013
Senior
Posts: 237
Joined: Mon Jul 25, 2016 4:16 pm
Great Britain

Re: Notes on getting astrometa dvb-t2 to work

Post by MikeB2013 » Wed Jul 27, 2016 6:52 am

Great find.

Just tried the frontend swop on a clean mythbuntu 16.04 system with latest 0.28/Fixes.

All I had to do was change the Signal timeout to 7000 and Tuning timeout to 10000 and ran a full scan, all 8 muxes (UK SandyHeath transmitter) , 3 of which carry HD were found . No need to adjust bandwidth.

The default timeouts of 1000 and 3000 on mythtv 0.28 are too low for DVB-T/T2 in any case (I was getting tuning timeouts and "failed" recordings with the defaults on my TBS 6280 pci-e tuner).

One suggestion is to disable IR on the Astrometa USB device, and force consistent adapter numbering. I just created a file astrometa.conf in /etc/modprobe.d/ with :

Code: Select all

# Configuration file for Astrometa DVB-T2 USB receiver
# Note with mythtv set backend signal  7000 and tuning 10000
# Note firmware dvb-demod-mn88473-01.fw in /lib/firmware

# disable astrometa ir
options dvb-usb-rtl28xxu disable_rc=1

# force consistent adapter numbering
options dvb-usb-rtl28xuu adapter_nr=0
Mike

kesjs
Newcomer
Posts: 1
Joined: Fri Jan 05, 2018 10:02 am
Iceland

Re: Notes on getting astrometa dvb-t2 to work

Post by kesjs » Fri Jan 05, 2018 10:46 am

Hi folks,

Could you help me out?

I can get Uk DVB-T channels playing but I am unable to scan DVB-T2 channels.

I know the DVB-T2 channels are there becasue they play on my TV.

I am running Lubuntu with kernel 4.13.0-21-generic.

I have downloaded the firmware file `dvb-demod-mn88473-01.fw` from the OpenElec gitusercontent link
and copied this to `/lib/firmware`

Code: Select all

$ wget "download-link"/firmware/dvb-demod-mn88473-01.fw
sudo cp dvb-demod-mn88473-01.fw /lib/firmware
Now I have all the firmware (I think I need) I have - just now - plugged the stick in.
I have a good ariel and a very strong signal with direct line of sight to the transmitter.

The key outputs

Code: Select all

$ lsusb | grep HanfTek
Bus 001 Device 007: ID 15f4:0131 HanfTek
The below `dmesg` shows
- Astrometa DVB-T2' in warm state
- usb 1-1.2: DVB: registering adapter 0 frontend 0 (Realtek RTL2832 (DVB-T))...
- usb 1-1.2: DVB: registering adapter 0 frontend 1 (Panasonic MN88473)...

Code: Select all

$ dmesg
[ 2106.156367] usb 1-1.2: new high-speed USB device number 7 using ehci-pci
[ 2106.276046] usb 1-1.2: New USB device found, idVendor=15f4, idProduct=0131
[ 2106.276051] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 2106.276053] usb 1-1.2: Product: dvbt2
[ 2106.276055] usb 1-1.2: Manufacturer: astrometadvbt2
[ 2106.284074] usb 1-1.2: dvb_usb_v2: found a 'Astrometa DVB-T2' in warm state
[ 2106.365982] usb 1-1.2: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer
[ 2106.365998] dvbdev: DVB: registering new adapter (Astrometa DVB-T2)
[ 2106.368589] i2c i2c-9: Added multiplexed i2c bus 10
[ 2106.368594] rtl2832 9-0010: Realtek RTL2832 successfully attached
[ 2106.374977] mn88473 9-0018: Panasonic MN88473 successfully identified
[ 2106.374991] usb 1-1.2: DVB: registering adapter 0 frontend 0 (Realtek RTL2832 (DVB-T))...
[ 2106.375095] usb 1-1.2: DVB: registering adapter 0 frontend 1 (Panasonic MN88473)...
[ 2106.375182] r820t 10-003a: creating new instance
[ 2106.382777] r820t 10-003a: Rafael Micro r820t successfully identified
[ 2106.382783] r820t 10-003a: attaching existing instance
[ 2106.388094] r820t 10-003a: Rafael Micro r820t successfully identified
[ 2106.389859] rtl2832_sdr rtl2832_sdr.1.auto: Registered as swradio0
[ 2106.389862] rtl2832_sdr rtl2832_sdr.1.auto: Realtek RTL2832 SDR attached
[ 2106.389864] rtl2832_sdr rtl2832_sdr.1.auto: SDR API is still slightly experimental and functionality changes may follow
[ 2106.397453] Registered IR keymap rc-empty
[ 2106.397545] rc rc0: Astrometa DVB-T2 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/rc/rc0
[ 2106.397640] input: Astrometa DVB-T2 as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/rc/rc0/input20
[ 2106.398001] rc rc0: lirc_dev: driver ir-lirc-codec (dvb_usb_rtl28xxu) registered at minor = 0
[ 2106.398011] usb 1-1.2: dvb_usb_v2: schedule remote query interval to 200 msecs
[ 2106.411967] usb 1-1.2: dvb_usb_v2: 'Astrometa DVB-T2' successfully initialized and connected
I have dvb-scan, w_scan and dvbv5-scan installed.

I see from the contents of the legacy dvb-scan file `/usr/share/dvb/dvb-legacy/dvb-t/uk-Durris`
two line entries for `T2` but I do not know how to use these.
Can you help?

Code: Select all

$ cat  /usr/share/dvb/dvb-legacy/dvb-t/uk-Durris
T 530000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
T 506000000 8MHz 2/3 NONE QAM64 8k 1/32 NONE
T2 562000000 8MHz 2/3 NONE QAM256 32k 1/128 NONE 0
T 490000000 8MHz 3/4 NONE QAM64 8k 1/32 NONE
T 514000000 8MHz 3/4 NONE QAM64 8k 1/32 NONE
T 538000000 8MHz 3/4 NONE QAM64 8k 1/32 NONE
T2 482000000 8MHz 2/3 NONE QAM256 32k 1/128 NONE 0
I have so far been unable to work out how to use dvbv5-scan though I have had quite a few different attempts at command line combinations.
I have tried

Code: Select all

$ dvbv5-scan ~/Desktop/Scan_folder/
which fails.

Some time before I found this thread I had tried swapping adapter0 adapters, frontend0 and frontend1, as this thread also suggests, before scanning with no success.

I have tried countless scans with w_scan, using the latest Jan 2017 software version.
w_scan sees DVB-T2 capability while scanning, but only outputs DVB-T channels to the scan file (not DVB-T2).

Code: Select all

$ w_scan -ft -c GB -L >> ~\Desktop\channels.xspf
...
857833: (time: 06:44.706) 
Scanning DVB-T2...
474000: (time: 06:46.914) 
474167: (time: 06:49.258) 
473833: (time: 06:51.526) 
482000: (time: 06:53.802)         signal ok:	QAM_AUTO f = 482000 kHz I999B8C999D999T999G999Y999P0 (0:0:0)
        QAM_AUTO f = 482000 kHz I999B8C999D999T999G999Y999P0 (0:0:0) : updating transport_stream_id: -> (0:0:16572)
        QAM_AUTO f = 482000 kHz I999B8C999D999T999G999Y999P0 (0:0:16572) : updating network_id -> (0:12362:16572)
482167: skipped (already known transponder)
481833: skipped (already known transponder)
...
562000: (time: 07:38.098)         signal ok:	QAM_AUTO f = 562000 kHz I999B8C999D999T999G999Y999P0 (0:0:0)
        QAM_AUTO f = 562000 kHz I999B8C999D999T999G999Y999P0 (0:0:0) : updating transport_stream_id: -> (0:0:40960)
        QAM_AUTO f = 562000 kHz I999B8C999D999T999G999Y999P0 (0:0:40960) : updating network_id -> (0:12362:40960)
562167: skipped (already known transponder)
...
577833: (time: 07:56.683) 
586000: (time: 07:58.955)         signal ok:	QAM_AUTO f = 586000 kHz I999B8C999D999T999G999Y999P0 (0:0:0)
        QAM_AUTO f = 586000 kHz I999B8C999D999T999G999Y999P0 (0:0:0) : updating transport_stream_id: -> (0:0:45056)
        QAM_AUTO f = 586000 kHz I999B8C999D999T999G999Y999P0 (0:0:45056) : updating network_id -> (0:12362:45056)
586167: skipped (already known transponder)
585833: skipped (already known transponder)
594000: (time: 08:06.055) 
...
I have tried very many different tests.

Now I am seeking some help as I am probarly missing a small step or something obvious that I can no longer see.

Any chance you could post your receipies or ideas, including any
- .fw. download links
- modprobes
- mod removes
- and particularly how on earth you managed to get a sucessful DVB-T2 scan
please.

Is somewhere I can grab an upto date DVB-T2 channel list for transmitter uk-Durris; if not when I create it I will put it up somewhere.

ps I am sure there are lots of people who have given up on this device, with linux, as there is no clear recipie for use anywhere.

MikeB2013
Senior
Posts: 237
Joined: Mon Jul 25, 2016 4:16 pm
Great Britain

Re: Notes on getting astrometa dvb-t2 to work

Post by MikeB2013 » Sat Jan 13, 2018 1:55 pm

Just tried on a clean install of Xubuntu 16.04 LTS fully updated including latest kernel (Linux x-build 4.13.0-26-generic #29~16.04.2-Ubuntu SMP Tue Jan 9 22:00:44 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux), with mythtv 30pre (current release 29 is similar in area of channel scanning etc.)

No HD multiplexes are found in mythtv-setup, only SD multiplexes on my local transmitter (SandyHeath).

I finally got it to work with HD, but I had to install latest V4L-DVB Device Drivers, so there seems to be a regression in some kernels (as it was working see my earlier post in this thread) .

Installing the latest V4L-DVB Device Drivers is described at
https://www.linuxtv.org/wiki/index.php/ ... ce_Drivers
I used the Basic approach. Note you will need to do this every time the kernel is updated.

For the firmware, I got mine (latest) from http://palosaari.fi/linux/v4l-dvb/firmware/MN88473/01/

To automate the swop of frontends I did the following:
create file with the commands (i called mine swop_astrometa_frontend.sh) , put it somewhere, make it executable and put the following in /etc/rc.local immediately before the exit line at end of the file.

sudo /fullpath to file/swop_astrometa_frontend.sh

file swop_astrometa_frontend.sh contents:

Code: Select all

#!/bin/bash
#swops frontend for Astrometa DVB-T/T2 usb dongle ID 15f4:0131 HanfTek 
# this is  necessary due to device having single demux
cd /dev/dvb/adapter0 && mv frontend0 frontend99 && mv frontend1 frontend0
After this reboot the machine, after it reboots, check by doing

Code: Select all

mike@x-build:~$ ls /dev/dvb/adapter0
demux0  dvr0  frontend0  frontend99  net0
Now try using mythtv-setup make sure mythbackend is not running by doing

Code: Select all

sudo systemctl stop mythtv-backend.service
In Capture card make sure timeouts are changed from the defaults, they are too low.

Note there is an outstanding problem in that mythtv-setup does not always stop mythbackend (mythtv trac ticket has been raised)

Mike

luc5588
Junior
Posts: 31
Joined: Sat Dec 19, 2015 11:13 am

Re: Notes on getting astrometa dvb-t2 to work

Post by luc5588 » Sat Feb 03, 2018 3:20 pm

@kesjs
For you, I think the correct syntax for the dvbv5-scan is:

Code: Select all

dvbv5-scan -f 1 /usr/share/dvb/dvb-legacy/dvb-t/uk-Durris
(Since your package manage seems to put the scan files there).

So reboot to start from clean and try that. The "-f 1" means "use /dev/adapter0/frontend1". If you leave it off then it will use frontend0.

Assuming that works then follow the advice from MikeB above to swap frontend0 and frontend1, reboot and try scan again (remembering you no longer need "-f 1" since the frontend is now frontend0. If that works then give it a try in mythtv and it should work. If it doesn't work then follow MikeB's advice for v4l.

For FreeBSD 11 users, the astrometa dvb-t2 tuner now works and swapping the frontend0 and frontend1 is accomplished by adding "-m linux_func.dvb_swap_fe=1" to the "webcamd" options.

Post Reply