Template:Making-it-work:dvb-usb-dib0700

From LinuxTVWiki
Jump to navigation Jump to search

Making it work

Firmware

August 21, 2008 - New firmware file fixing the last cause for i2c errors and disconnects and providing a new, more modular i2c request formatting.

You will need the dvb-usb-dib0700-1.20.fw firmware file in /lib/firmware or the relevant place for your distribution.

You may need to change the name of the file to dvb-usb-dib0700-1.10.fw or create a link until the driver code reflects that change.

For archival purposes: dvb-usb-dib0700-1.10.fw firmware file

August 29,2008 - Issues with Firmware 1.20. Some issues have been found with the latest version of the firmware. Users may wish to continue to use 1.10 unless they have patched their v4l-dvb code with dib0700_new_i2c_api.patch.

November 15,2008 - Issues with Firmware 1.20.

  • The above mentioned dib0700_new_12c_api.patch is not available discretely but is now rolled into the mercurial drivers
  • dvb-usb-dib0700-1.20.fw firmware file is now stable for reception, but remote control functionality is broken; any key press is repeated until the next key is pressed. The only way to get remote control functionality presently is to roll back to 1.10 firmware and suffer the occasional disconnect.
  • The mercurial drivers have been changed so they now load 1.20 firmware. To revert to 1.10 firmware you need to rename your firmware file to dvb-usb-dib0700-1.20.fw or provide a link of that name.
  • To avoid spurious remote control signals with 1.20 firmware, you need to edit /etc/modprobe.d/options or from Ubuntu onwards /etc/modprobe.d/options.confand add:
options dvb_usb disable-rc-polling=1

November 28,2008 - i2c errors. Changes were made to the remote control drivers on November 16,2008 to correct the repeat key problem. The card is generally stable for dual tuner reception and remote control function with Firmware 1.20.

November 10,2009 - mt2060 I2C write failed. Possible regression of a driver bug raised against Ubuntu running 2.6.27-14 and 2.6.31-2.17 causing mt2060 I2C errors in MythTV useage with firmware 1.20. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/397696 Recommend check the kernel extensions listed here for Low Noise Activation and rc_polling are loaded with correct config file name for your distribution, EIT listings information is turned off until a suitable delay (500ms-1000ms)is added to a single card (not both) and the card has correctly been added to the database as two tuners (no additional NULL entries) in the mythtv recordcard table.

Drivers

It requires the dib0700 driver. Just use Mercurial by following the How to install DVB device drivers instructions.

Note: These patches still haven't made it into the tree, and have not received a lot of feedback after the latest official merges. Use at your own risk if you feel that you need them.
Silence unknown keycodes
When an unknown key code is received (from another remote, like the receiver's or the TV's), it is not eaten and the module keeps yelling about it. This patch stops the yelling.
Jonas Anden, Thu Aug 2 00:28:17 CEST 2007
This patch is not cleanly applicable, but it is an easy one-liner to do by hand.
This patch is regarded as not really being the proper fix; it just limits the effect of bad behaviour.
This patch is not to be used with the following patch.
This patch should be deprecated once the following patch has seen more testing.
Key repeat for dib0700 IR receiver
Solves remote toggle bit stuff and implements repeated key feature (with repeat delay to avoid unwanted double hits) for rc-5 and nec protocols. It also contains some keymap for the remotes used for testing (a philipps compatible rc5 remote and a teac nec remote). They are far from being complete since I've used them just for testing.
Filippo Argiolas, Tue Feb 19 16:17:55 CET 2008
This patch is not to be used with the previous patch.
This patch is prefered over the previous patch.
Please report on the list.


Note for WinTV Nova-T-500 users: the current drivers are close to stable at the moment (2008-01-25). Occasional USB disconnects may still be experienced. The disconnects were caused by disabling the pull-down resistors or unintentional writes from the dib0700 bridge to the usb bus when accidentally hitting the end of a SOF packet. Why and when this happens can only be debugged by the dibcom firmware guys [1] . Other possible reasons for bad behavior could be bad reception (check your aerial, cabling, splitters and low-cost amplifiers) and EIT scanning. Search the linux-dvb mailing list for more information and current problems being experienced.

On-board amplifier for Nova-T-500

You may want/need to turn on the on-board amplifier:

In /etc/modprobe.d/options add:

options dvb-usb-dib0700 force_lna_activation=1

Disabling the remote control sensor

You may want to disable the remote control sensor if you are using another one and want to avoid error messages in the logs:

In /etc/modprobe.d/options add:

options dvb_usb disable_rc_polling=1

All relevant kernel modules options

In /etc/modprobe.d/options add:

options [module name] [option name]=[setting]

Get the parameters list using

modinfo [name of kernel module]

The debug values are bit fields, with each bit representing a different category. Add values to turn on multiple debugging categories. 15.


dib3000mc

debug: turn on debugging (default: 0) (int)

buggy_sfn_workaround: Enable work-around for buggy SFNs (default: 0) (int)

mt2060

debug:Turn on/off debugging (default:off). (int)

dvb_usb_dib0700

force_lna_activation: force the activation of Low-Noise-Amplifyer(s) (LNA), if applicable for the device (default: 0=automatic/off). (int)

dvb_usb_dib0700_ir_proto: set ir protocol (0=NEC, 1=RC5 (default), 2=RC6). (int)

debug:set debugging level (1=info,2=fw,4=fwdata,8=data (or-able)). (debugging is not enabled) (int)

dvb_usb

debug: set debugging level (1=info,xfer=2,pll=4,ts=8,err=16,rc=32,fw=64,mem=128,uxfer=256 (or-able)). (int)

disable_rc_polling: disable remote control polling (default: 0). (int)

force_pid_filter_usage: force all dvb-usb-devices to use a PID filter, if any (default: 0). (int)


dvb_core

dvb_net_debug: enable debug messages (int)

frontend_debug: Turn on/off frontend core debugging (default:off). (int)

dvb_shutdown_timeout: wait <shutdown_timeout> seconds after close() before suspending hardware (int)

dvb_force_auto_inversion: 0: normal (default), 1: INVERSION_AUTO forced always (int)

dvb_override_tune_delay: 0: normal (default), >0 => delay in milliseconds to wait for lock after a tune attempt (int)

dvb_powerdown_on_sleep: 0: do not power down, 1: turn LNB voltage off on sleep (default) (int)

cam_debug: enable verbose debug messages (int)

debug: Turn on/off debugging (default:off). (int)

dvbdev_debug: Turn on/off device debugging (default:off). (int)


dibx000_common

debug: turn on debugging (default: 0) (int)

Sample kernel output - winTV Nova-T-500

[   30.965645] dib0700: loaded with support for 5 different device-types
[   30.965925] dvb-usb: found a 'Hauppauge Nova-T 500 Dual DVB-T' in cold state, will try to load a firmware
[   31.008899] dvb-usb: downloading firmware from file 'dvb-usb-dib0700-03-pre1.fw'
[   31.206081] dib0700: firmware started successfully.
[   31.711176] dvb-usb: found a 'Hauppauge Nova-T 500 Dual DVB-T' in warm state.
[   31.711222] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
[   31.711325] DVB: registering new adapter (Hauppauge Nova-T 500 Dual DVB-T)
[   31.831535] DVB: registering frontend 0 (DiBcom 3000MC/P)...
[   31.854890] MT2060: successfully identified (IF1 = 1220)
[   32.388673] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
[   32.388853] DVB: registering new adapter (Hauppauge Nova-T 500 Dual DVB-T)
[   32.394293] DVB: registering frontend 1 (DiBcom 3000MC/P)...
[   32.398790] MT2060: successfully identified (IF1 = 1220)
[   32.959607] input: IR-receiver inside an USB DVB receiver as /class/input/input4
[   32.959633] dvb-usb: schedule remote query interval to 150 msecs.
[   32.959637] dvb-usb: Hauppauge Nova-T 500 Dual DVB-T successfully initialized and connected.
[   32.959657] usbcore: registered new interface driver dvb_usb_dib0700

Sample kernel output - WinTV Nova-T stick

This is for the 70001 version, using the driver in Linux 2.6.22.1.

usb 1-10: new high speed USB device using ehci_hcd and address 8
usb 1-10: configuration #1 chosen from 1 choice
dvb-usb: found a 'Hauppauge Nova-T Stick' in cold state, will try to load a firmware
dvb-usb: downloading firmware from file 'dvb-usb-dib0700-01.fw'
dib0700: firmware started successfully.
dvb-usb: found a 'Hauppauge Nova-T Stick' in warm state.
dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
DVB: registering new adapter (Hauppauge Nova-T Stick).
DVB: registering frontend 2 (DiBcom 7000MA/MB/PA/PB/MC)...
MT2060: successfully identified (IF1 = 1220)
dvb-usb: Hauppauge Nova-T Stick successfully initialized and connected.

This is for the model 294 G, using the driver in Linux 2.6.23.9 with a HG of v4l-dvb from 29th of December 2007.

usb 3-5: new high speed USB device using ehci_hcd and address 80
usb 3-5: configuration #1 chosen from 1 choice
dib0700: loaded with support for 5 different device-types
dvb-usb: found a 'DiBcom STK7070P reference design' in cold state, will try to load a firmware
dvb-usb: downloading firmware from file 'dvb-usb-dib0700-1.10.fw'
dib0700: firmware started successfully.
dvb-usb: found a 'DiBcom STK7070P reference design' in warm state.
dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
DVB: registering new adapter (DiBcom STK7070P reference design)
DVB: registering frontend 0 (DiBcom 7000PC)...
DiB0070: successfully identified
dvb-usb: DiBcom STK7070P reference design successfully initialized and connected.
usbcore: registered new interface driver dvb_usb_dib0700


Remote control

Grey top, black bottom, 45 buttons, snowboard shape.

Find the IR receiver's device by looking in the 'dmesg' output for a line similar to:

input: IR-receiver inside an USB DVB receiver as /class/input/input4

Additionally, the IR receiver will be listed if you execute the command:

cat /proc/bus/input/devices

For example:

I: Bus=0003 Vendor=2040 Product=9950 Version=0100
N: Name="IR-receiver inside an USB DVB receiver"
P: Phys=usb-0000:07:01.2-1/ir0
S: Sysfs=/class/input/input4
U: Uniq=
H: Handlers=kbd event4 
B: EV=3
B: KEY=14afc336 284284d00000000 0 480058000 219040000801 9e96c000000000 90020000000ffd

In this example, the remote control gives output into /dev/input/event4.

The event number depends on your particular system and can vary.

Eventually this event number can even vary at every reboot.

You could create a new udev rule in /etc/udev/rules.d/65-persistent-hauppauge.rules.

KERNEL=="input*", ATTRS{name}=="IR-receiver inside an USB DVB receiver", SYMLINK+="input/dvb-ir"

This would make the Hauppauge receiver always always be linked to /dev/input/dvb-ir.

But Linux systems runing recent udev will automatically create non-varying names, a nicer and automatic way of providing a stable input event name:

$ ls -la /dev/input/by-path/
total 0
drwxr-xr-x 2 root root 140 2008-02-07 20:31 .
drwxr-xr-x 4 root root 280 2008-02-07 20:31 ..
lrwxrwxrwx 1 root root   9 2008-02-07 20:31 pci-0000:00:1a.1-usb-0:2:1.0-event-kbd -> ../event1
lrwxrwxrwx 1 root root   9 2008-02-07 20:31 pci-0000:00:1a.1-usb-0:2:1.1-event-mouse -> ../event2
lrwxrwxrwx 1 root root   9 2008-02-07 20:31 pci-0000:00:1a.1-usb-0:2:1.1-mouse -> ../mouse1
lrwxrwxrwx 1 root root   9 2008-02-07 20:31 pci-4-1--event-ir -> ../event4
lrwxrwxrwx 1 root root   9 2008-02-07 20:31 platform-pcspkr-event-spkr -> ../event3

LIRC will use it without needing a special kernel module. use the dev/input driver and specify the input event device in /etc/lirc/hardware.conf:

# /etc/lirc/hardware.conf
#
# Arguments which will be used when launching lircd
LIRCD_ARGS=""

#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD=false

#Try to load appropriate kernel modules
LOAD_MODULES=true

# Run "lircd --driver=help" for a list of supported drivers.
DRIVER="dev/input"
# If DEVICE is set to /dev/lirc and devfs is in use /dev/lirc/0 will be
# automatically used instead
DEVICE="/dev/input/by-path/pci-4-1--event-ir"
MODULES=""

# Default configuration files for your hardware if any
LIRCD_CONF="/etc/lirc/lircd.conf"
LIRCMD_CONF=""

Here is a proper lircd.conf:

#
# brand:                       Hauppauge
# model no. of remote control: 45 buttons Snowboard Shape Silver over Black
#

begin remote

 name  hauppauge-45-snowboard
 bits           16
 eps            30
 aeps          100

 one             0     0
 zero            0     0
 pre_data_bits   16
 pre_data       0x1
 gap          199999
 toggle_bit      0


     begin codes
         Go                       0x0162
         Power                    0x0074
         TV                       0x0179
         Videos                   0x0189
         Music                    0x0188
         Pictures                 0x00E2
         Guide                    0x016D
         Radio                    0x0181
         ArrowUp                  0x0067
         ArrowLeft                0x0069
         OK                       0x0160
         ArrowRight               0x006A
         ArrowDown                0x006C
         BackExit                 0x009E
         Menu                     0x008B
         VolumeUp                 0x0073
         VolumeDown               0x0072
         PrevCh                   0x016B
         Mute                     0x0071
         ChannelUp                0x0192
         ChannelDown              0x0193
         Record                   0x00A7
         Rewind                   0x00A8
         SkipBack                 0x0195
         Play                     0x00CF
         Pause                    0x0077
         Stop                     0x0080
         Fwdwind                  0x00D0
         SkipFwd                  0x0197
         1                        0x0002
         2                        0x0003
         3                        0x0004
         4                        0x0005
         5                        0x0006
         6                        0x0007
         7                        0x0008
         8                        0x0009
         9                        0x000A
         *                        0x0037
         0                        0x000B
         #                        0x0029
         Red                      0x018E
         Green                    0x018F
         Yellow                   0x0190
         Blue                     0x0191
     end codes

end remote