MagicPro ProHDTV Dual USB

From LinuxTVWiki
Jump to: navigation, search

(this page is work in progress)


Magicpro proHDTV Dual is a hybrid usb TV adapter supporting analog and DMB-TH digital TV broadcast reception for Hong Kong. The demodulator chip for DMB-TH is LGS8GL5.

Driver Status

The Linux driver for this device was achieved by reverse engineering to mimic the packets sent from the PC to the device as can be seen in the usb sniffer log in Windows. The v4l-dvb driver pack can be downloaded at the following link: (updated 25 May 2010) (updated 18 Oct 2010 for Ubuntu 10.10 or Linux kernel 2.6.35 in general) (updated 29 Nov 2012, legacy driver for kernels 2.6.x) (updated 31 Dec 2012, for kernels 3.x)

Note that it doesn't support the analog reception functionality of the adapter.

The driver for kernel 2.6 also includes support for ASUS u3100 DMB-TH adapter, whereas the one for kernel 3.x also supports Gadmei UTV808 (using LME2510C + LGS8Gl5 + MXL5003S) and PCTV DMB-TH (using LME2510C + LGS8913 + MXL5003S) in addition to ASUS. Please regard these drivers as experimental and they have not yet been included in the mainstream v4l-dvb source tree.

Driver installation

1. Before proceeding, you need to have the software packages installed for building kernel modules. In Ubuntu, these packages may be installed by:

sudo apt-get install linux-kernel-devel fakeroot kernel-wedge build-essential makedumpfile

2. Untar the downloaded file under a <v4l-dvb source directory>;

3. Under <v4l-dvb source directory>,
make distclean
make install
-- done! --

Following kernel modules are relevant to this device: lgs8gxx, dib7000p, dvb_usb,_cxusb, dib7000p, dibx000_common, dvb_usb, dib0070, dvb-core, tuner_mpdual.

4. Below is sample 'dmesg' output when the adapter is inserted into a usb port:

[10.135102] dvb-usb: found a 'Conexant Magicpro HDTV Dual DMB-TH Stick' in warm state.
[10.651330] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
[10.651474] DVB: registering new adapter (Conexant Magicpro HDTV Dual DMB-TH Stick)
[10.907720] DVB: registering adapter 0 frontend 0 (Legend Silicon LGS8913/LGS8GXX DMB-TH)...
[11.696562] MP_HDTV_DUAL tuner: Attached at address 0x61
[11.697958] dvb-usb: Conexant Magicpro HDTV Dual DMB-TH Stick successfully initialized and connected.
[11.698000] usbcore: registered new interface driver dvb_usb_cxusb
If above doesn't show up, try loading the module with 'modprobe dvb-usb-cxusb'.

Supported Software

  • dvbscan, tzap, dvbsnoop, dvbstream, dvbtraffic have been tested to work.
  • dvbtune works but the adapter is turned off after dvbtune exits. If the software that subsequently runs, e.g. dvbsnoop, does not turn on the adapter, then it would fail.
  • Using vlc for tuning, e.g. "vlc dvb:// :dvb-frequency=482000000 --programs=2", results in chopping video, so is regarded not working.
  • kaffeine as on Ubuntu 9.10 is able to successfully scan for all 11 TV channels (provided signal strength is OK).
  • gXine should be working.



Using an initial_scan.conf file with following content (actually it is district and even building dependend):

T 482000000 8MHz AUTO AUTO QAM64 8k 1/32 NONE
T 586000000 8MHz AUTO AUTO QAM64 8k 1/32 NONE
T 602000000 8MHz AUTO AUTO QAM64 8k 1/32 NONE

A scan can be performed by 'scan initial_scan.conf' and a sample output is as follows:

scanning initial_scan.conf
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
initial transponder 482000000 0 9 9 3 1 0 0
initial transponder 586000000 0 9 9 3 1 0 0
initial transponder 602000000 0 9 9 3 1 0 0
>>> tune to:
0x0000 0x0001: pmt_pid 0x032a TVB -- Jade (running)
0x0000 0x0002: pmt_pid 0x0348 TVB -- Pearl (running)
0x0000 0x000b: pmt_pid 0x006e (null) -- Home (running)
0x0000 0x0010: pmt_pid 0x00a0 (null) -- World (running)
>>> tune to:
0x0000 0x0052: pmt_pid 0x0334 TVB -- J2 (running)
0x0000 0x0053: pmt_pid 0x033e TVB -- iNews (running)
0x0000 0x0055: pmt_pid 0x0352 TVB -- High Definition Jade (running)
Network Name 'SFN_TVB' >>> tune to:
0x0000 0x000c: pmt_pid 0x0078 aTV -- HD aTV (running)
0x0000 0x000d: pmt_pid 0x0082 (null) -- TVS (running)
0x0000 0x000e: pmt_pid 0x008c (null) -- CTI - Asia (running)
0x0000 0x000f: pmt_pid 0x0096 (null) -- CCTV 4 (running)
Network Name 'aTV-SFN'
dumping lists (11 services)

live TV watching and recording example

  • On one terminal, run

tzap -c /etc/dvb/channels.conf "home"

It should produce output similar to:

 $ tzap -c /etc/dvb/channels.conf "home"
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
reading channels from file '/etc/dvb/channels.conf'
tuning to 482000000 Hz
video pid 0x006f, audio pid 0x0000
status 1f | signal 0000 | snr 0000 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal 0000 | snr b800 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal 0000 | snr b600 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal 0000 | snr b700 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
. . . keep on repeating . . .

Keep it running and do not terminate it.

  • On another terminal, run one of followings for TV watching:
dvbsnoop -s ts -tsraw -b | mplayer -vo x11 -
dvbsnoop -s ts -tsraw -b | xine -
dvbsnoop -s ts -tsraw -b | vlc fd://0
  • Or on another terminal, run following for recording:
 dvbsnoop -s ts -tsraw -b | vlc fd://0 --programs=11 -I dummy --sout file/ts:test.ts

where test.ts is the output file for recording.

Streaming and Recording scripts for HK Digital TV

Other than using the media centre like applications such as MythTV, gXine, Kaffeine, etc to watch TV, inspect EPG and perform recordings, an option is to use the set of perl scripts for streaming and recording which can be downloaded from: (updated 5 Dec 2009) (updated 28 Jan 2010) (updated 1 June 2010) (updated 12 June 2010) (updated 28 Dec 2012)

Please refer to the INSTALL file for installation procedure. Basically there's a '' script which checks whether the required software packages are in place, and then perform the required installation. Please regard the set of scripts as experimental.

The scope of usage is as shown on the following diagram:

Digital tv scripts.png

Main functions and features of the scripts are as follows:

  • One or more DMB-TH adapters are connected to the 'streaming and recording PC'. More than one adapters allows watching/recording of TV programs from more than one carrier frequencies.
  • If there's more than one DMB-TH adapters, allocation of adapter when there's a TV watching or recording request is done automatically by the scripts and is transparent to the users.
  • There're background scripts running on the streaming and recording PC, and are started on machine startup. There's one perl-tk script on each client PC for watching live TV via streaming. Watching of live TV is by a GUI interface started by clicking an icon on the desktop.
  • Playing of live TV is by an external media player software, kicked off by the script. For Linux, the media player software include vlc, xine, mplayer etc. Which media player software to use is configurable, and it can be configured such that different TV channels are played by different media player software. This is useful as no single media player is suited to all TV channels.
  • As the focus is on functionality and ease of use, don't expect the GUI to have a look and feel comparable to the media centre like software.
  • EPG information is stored in a mysql database. EPG records older than 10 days are automatically deleted from time to time.
  • Scheduling of recordings is by 2 web interfaces - one for EPG based scheduling (allowing recording to start earlier and end later than that set in EPG), and the other for manual scheduling.
  • While the streaming and recording PC is running Linux, a client PC can be a Linux or Windows PC.
  • Multiple TV channels can be played and recorded simultaneously. For example the client PCs can be watching different TV channels, while the streaming and recording PC is recording more than one TV channels, all happening at the same time. Of course this is subject to the limitation that the number of different carriers frequencies for the TV channels being watched/recorded cannot exceed the number of DMB-TH adapters connected to the streaming and recording PC. Hence if there're 3 adapters connected, all 11 TV channels can be watched and recorded at the same time, provided that the streaming and recording PC is capable enough. In a test, 2 adapters are connected and 7 TV channels are recorded, plus 1 TV channel being streamed at the same time, and the CPU usage is 20 ~ 25% for a streaming and recording PC with an AMD X2 4800+ CPU and 2GB main memory.

Sample screenshots:

1. Simple dialog box for watching TV

Screenshot TV watching.png

Just click the button of the desirable TV channel, and it will be played.

2. EPG browser and recording scheduling

Screenshot EPG.png

Note that EPG is automatically updated once every 4 hours. To browse EPG for a TV channel, just click the respective button on the left. The 'date' navigation buttons allow browsing of EPG up to a week's time from now, and also old EPGs of up to 10 days back. Scheduling of recording is by selecting an EPG item, modifying the information near the bottom of the screen, e.g. the desirable filename, and then clicking of the 'GO' button.

3. Manual Recording Schedule Management

Screenshot manual scheduling.png

This is for manual maintenance of recording schedules. Recording schedules thus set manually and also those set by the EPG browsing screen are shown here, and can be further modified as desirable. Note that there're 2 rows on Friday with overlapping schedule. This is possible even if there's only 1 DMB-TH adapter, since the 2 channels to be recorded are of the same carrier frequency.

Related Topics

  • Below is a very good blog from Samiux, dated 1 Dec 2009, on setting up a fully working HDTV environment with very detailed instructions from ground up on Ubuntu for MyGica D689 USB DMB-TH dongle (the principle behind is applicable for other Linux distributions and DMB-TH adapters):

By K.S. Ng @