What's new

Linux TV

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

ASAT

Senior Member
I'm trying to record live TV from cable TV with the RT-AC56U Asuswrt-Merlin and Hauppauge WinTV-HVR-1950. Apparently, there is some support for this unit ==> http://linuxtv.org/wiki/index.php/ATSC_USB_Devices

Has anyone tried this to know what kernel modules or USB firmware is needed?

When I plug in the Hauppauge WinTV-HVR-1950 to the USB 2.0 port of the RT-AC56U, my syslog shows:

/tmp/syslog.log
Code:
Jun 14 09:03:36 kernel: usb 2-2: new high speed USB device using ehci_hcd and address 4
Jun 14 09:03:36 kernel: option 2-2:1.0: GSM modem (1-port) converter detected
Jun 14 09:03:36 kernel: usb 2-2: GSM modem (1-port) converter now attached to ttyUSB0
 
I verified that my cable TV tuner works with Linux Mint before I plugged it into the router.

/var/log/syslog
Code:
Jun 14 14:18:04 rebecca-vm kernel: [ 4722.580571] usb 1-1: new high-speed USB device number 5 using ehci_hcd
Jun 14 14:18:05 rebecca-vm mtp-probe: checking bus 1, device 5: "/sys/devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1"
Jun 14 14:18:05 rebecca-vm kernel: [ 4723.377320] pvrusb2: Hardware description: WinTV HVR-1950 Model 751xx
Jun 14 14:18:05 rebecca-vm mtp-probe: bus: 1, device: 5 was not an MTP device
Jun 14 14:18:06 rebecca-vm kernel: [ 4724.591621] pvrusb2: Device microcontroller firmware (re)loaded; it should now reset and reconnect.
Jun 14 14:18:07 rebecca-vm kernel: [ 4725.077496] usb 1-1: USB disconnect, device number 5
Jun 14 14:18:07 rebecca-vm kernel: [ 4725.077610] pvrusb2: Device being rendered inoperable
Jun 14 14:18:09 rebecca-vm kernel: [ 4727.598215] usb 1-1: new high-speed USB device number 6 using ehci_hcd
Jun 14 14:18:10 rebecca-vm mtp-probe: checking bus 1, device 6: "/sys/devices/pci0000:00/0000:00:11.0/0000:02:03.0/usb1/1-1"
Jun 14 14:18:10 rebecca-vm kernel: [ 4728.423478] pvrusb2: Hardware description: WinTV HVR-1950 Model 751xx
Jun 14 14:18:10 rebecca-vm mtp-probe: bus: 1, device: 6 was not an MTP device
Jun 14 14:18:10 rebecca-vm kernel: [ 4728.501601] pvrusb2: Binding ir_rx_z8f0811_haup to i2c address 0x71.
Jun 14 14:18:10 rebecca-vm kernel: [ 4728.501765] pvrusb2: Binding ir_tx_z8f0811_haup to i2c address 0x70.
Jun 14 14:18:10 rebecca-vm kernel: [ 4728.565163] cx25840 0-0044: cx25843-24 found @ 0x88 (pvrusb2_a)
Jun 14 14:18:10 rebecca-vm kernel: [ 4728.798565] pvrusb2: Attached sub-driver cx25840
Jun 14 14:18:10 rebecca-vm kernel: [ 4728.806651] i2c-core: driver [tuner] using legacy suspend method
Jun 14 14:18:10 rebecca-vm kernel: [ 4728.806655] i2c-core: driver [tuner] using legacy resume method
Jun 14 14:18:10 rebecca-vm kernel: [ 4728.861033] tuner 0-0042: Tuner -1 found with type(s) Radio TV.
Jun 14 14:18:10 rebecca-vm kernel: [ 4728.861046] pvrusb2: Attached sub-driver tuner
Jun 14 14:18:14 rebecca-vm kernel: [ 4732.535634] cx25840 0-0044: loaded v4l-cx25840.fw firmware (16382 bytes)
Jun 14 14:18:14 rebecca-vm kernel: [ 4732.861946] tveeprom 0-00a2: Hauppauge model 75111, rev E1F5, serial# xxxxxxx
Jun 14 14:18:14 rebecca-vm kernel: [ 4732.861950] tveeprom 0-00a2: MAC address is xx:xx:xx:xx:xx:xx
Jun 14 14:18:14 rebecca-vm kernel: [ 4732.861975] tveeprom 0-00a2: tuner model is NXP 18271C2 (idx 155, type 54)
Jun 14 14:18:14 rebecca-vm kernel: [ 4732.861978] tveeprom 0-00a2: TV standards NTSC(M) ATSC/DVB Digital (eeprom 0x88)
Jun 14 14:18:14 rebecca-vm kernel: [ 4732.861980] tveeprom 0-00a2: audio processor is CX25843 (idx 37)
Jun 14 14:18:14 rebecca-vm kernel: [ 4732.861982] tveeprom 0-00a2: decoder processor is CX25843 (idx 30)
Jun 14 14:18:14 rebecca-vm kernel: [ 4732.861984] tveeprom 0-00a2: has radio, has IR receiver, has IR transmitter
Jun 14 14:18:14 rebecca-vm kernel: [ 4732.861990] pvrusb2: Supported video standard(s) reported available in hardware: PAL-M/N/Nc;NTSC-M/Mj/Mk;ATSC-8VSB/16VSB
Jun 14 14:18:14 rebecca-vm kernel: [ 4732.862014] pvrusb2: Mapping standards mask=0x300b700 (PAL-M/N/Nc;NTSC-M/Mj/Mk;ATSC-8VSB/16VSB)
Jun 14 14:18:15 rebecca-vm kernel: [ 4732.862017] pvrusb2: Setting up 6 unique standard(s)
Jun 14 14:18:15 rebecca-vm kernel: [ 4732.862020] pvrusb2: Set up standard idx=0 name=PAL-M
Jun 14 14:18:15 rebecca-vm kernel: [ 4732.862022] pvrusb2: Set up standard idx=1 name=PAL-N
Jun 14 14:18:15 rebecca-vm kernel: [ 4732.862024] pvrusb2: Set up standard idx=2 name=PAL-Nc
Jun 14 14:18:15 rebecca-vm kernel: [ 4732.862026] pvrusb2: Set up standard idx=3 name=NTSC-M
Jun 14 14:18:15 rebecca-vm kernel: [ 4732.862028] pvrusb2: Set up standard idx=4 name=NTSC-Mj
Jun 14 14:18:15 rebecca-vm kernel: [ 4732.862030] pvrusb2: Set up standard idx=5 name=NTSC-Mk
Jun 14 14:18:15 rebecca-vm kernel: [ 4732.862032] pvrusb2: Initial video standard (determined by device type): NTSC-M
Jun 14 14:18:15 rebecca-vm kernel: [ 4732.862066] pvrusb2: Device initialization completed successfully.
Jun 14 14:18:15 rebecca-vm kernel: [ 4732.867520] pvrusb2: registered device video0 [mpeg]
Jun 14 14:18:15 rebecca-vm kernel: [ 4732.867561] DVB: registering new adapter (pvrusb2-dvb)
Jun 14 14:18:17 rebecca-vm kernel: [ 4735.666452] cx25840 0-0044: loaded v4l-cx25840.fw firmware (16382 bytes)
Jun 14 14:18:17 rebecca-vm kernel: [ 4736.018505] tda829x 0-0042: setting tuner address to 60
Jun 14 14:18:18 rebecca-vm kernel: [ 4736.261712] tda18271 0-0060: creating new instance
Jun 14 14:18:18 rebecca-vm kernel: [ 4736.312976] TDA18271HD/C2 detected @ 0-0060
Jun 14 14:18:19 rebecca-vm kernel: [ 4737.663537] tda18271: performing RF tracking filter calibration
Jun 14 14:18:37 rebecca-vm kernel: [ 4755.894752] tda18271: RF tracking filter calibration complete
Jun 14 14:18:37 rebecca-vm kernel: [ 4755.964647] tda829x 0-0042: type set to tda8295+18271
Jun 14 14:18:45 rebecca-vm kernel: [ 4763.374783] cx25840 0-0044: 0x0000 is not a valid video input!
Jun 14 14:18:45 rebecca-vm kernel: [ 4763.904329] DVB: registering adapter 0 frontend 0 (Samsung S5H1411 QAM/8VSB Frontend)...
Jun 14 14:18:45 rebecca-vm kernel: [ 4763.909008] tda829x 0-0042: type set to tda8295
Jun 14 14:18:45 rebecca-vm kernel: [ 4763.989099] tda18271 0-0060: attaching existing instance

So I recompiled the Asuswrt-Merlin 378.54_2 firmware with I2C and Video4Linux features enabled in the kernel, for RT-AC56U.

~/asuswrt-merlin/release/src-rt-6.x.4708/linux/linux-2.6.36/config_base.6a
Code:
CONFIG_I2C=y
CONFIG_MEDIA_SUPPORT=y
CONFIG_VIDEO_DEV=y

Then I obtained the device firmwares for my cable TV tuner and copy them to /lib/firmware on the router. These can be extracted from the Windows device drivers using a script. Or, some Linux distributions already have included them. My Linux Mint already has them.
Code:
v4l-cx231xx-avcore-01.fw
v4l-cx23418-apu.fw
v4l-cx23418-cpu.fw
v4l-cx23418-dig.fw
v4l-cx2341x-dec.fw
v4l-cx2341x-enc.fw
v4l-cx23885-avcore-01.fw
v4l-cx23885-enc.fw
v4l-cx25840.fw
v4l-pvrusb2-24xxx-01.fw
v4l-pvrusb2-29xxx-01.fw
v4l-pvrusb2-73xxx-01.fw

Now the kernel recognizes my unit plugged into the USB 2.0 port, but it cannot load the firmware from /lib/firmware on the router.

/tmp/syslog.log
Code:
Jun 15 14:16:34 kernel: usb 2-2: new high speed USB device using ehci_hcd and address 3
Jun 15 14:16:34 kernel: pvrusb2: Hardware description: WinTV HVR-1950 Model 751xx
Jun 15 14:16:35 kernel: pvrusb2: request_firmware fatal error with code=-22
Jun 15 14:16:35 kernel: pvrusb2: Failure uploading firmware1
Jun 15 14:16:35 kernel: pvrusb2: Device initialization was not successful.
Jun 15 14:16:35 kernel: pvrusb2: ***WARNING*** pvrusb2 device hardware appears to be jammed and I can't clear it.
Jun 15 14:16:35 kernel: pvrusb2: You might need to power cycle the pvrusb2 device in order to recover.

So now I will recompile the kernel with debugging turned on, for the pvrusb2 kernel module. We will see...
Code:
CONFIG_VIDEO_PVRUSB2_DEBUGIFC=y
 
Last edited:
My Hauppauge WinTV-HVR-1950 is now recognized by the RT-AC56U router. Had to enable I2C, Video4Linux and Extra Firmware option in the firmware kernel build. I also disabled some USB serial modules that may or may not have been causing issues.

I've attached my entire "config_base.6a" file to show all the changes needed for the Asuswrt-Merlin firmware to recognize my specific TV device: Hauppauge WinTV-HVR-1950. Here's a summary of these changes:

~/asuswrt-merlin/release/src-rt-6.x.4708/linux/linux-2.6.36/config_base.6a
Code:
CONFIG_I2C=y
CONFIG_MEDIA_SUPPORT=y
CONFIG_VIDEO_DEV=y
CONFIG_VIDEO_PVRUSB2_DEBUGIFC=y
CONFIG_FW_LOADER=y
CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_EXTRA_FIRMWARE="v4l-pvrusb2-73xxx-01.fw v4l-cx25840.fw v4l-cx2341x-enc.fw"
CONFIG_EXTRA_FIRMWARE_DIR="~/firmware/"
CONFIG_USB_SERIAL=n
CONFIG_USB_SERIAL_GENERIC=n
CONFIG_USB_SERIAL_SIERRAWIRELESS=n
CONFIG_USB_SERIAL_WWAN=n
CONFIG_USB_SERIAL_OPTION=n

I had to include the Hauppauge WinTV-HVR-1950 device firmware inside the router firmware build. So it doesn't need to be copied to /lib/firmware now. I couldn't get it to work any other way.

And needed to copy three new kernel modules to the router /jffs/bin/. Everything else is compiled into the router firmware. The extra kernel modules in the build are located here:

~/asuswrt-merlin/release/src/router/arm-uclibc/extras/
Code:
tveeprom.ko
tuner.ko
pvrusb2.ko

Here's the load order of the three new kernel modules. There's more modules than this, but they're compiled into the kernel. Initially, I wanted everything to be externally portable kernel modules outside the firmware. When that failed, I compiled everything into the firmware to make it work. Except for these ones:
Code:
insmod /jffs/bin/tveeprom
insmod /jffs/bin/tuner
insmod /jffs/bin/pvrusb2

This website has helpful to learn how to extract firmware from Windows drivers. The process of hot-swapping a device from Windows to Linux without power cycling, then sucking out the loaded firmware actually works.
http://www.isely.net/pvrusb2/setup.html#Firmware

Now, on to figure out the Tvheadend piece...
 

Attachments

  • src-rt-6.x.470__linux-2.6.36__config_base.6a.txt
    54.5 KB · Views: 946
Last edited:
Did you ever get this setup figured out?

I'm still trying to get a tvheadend running properly on an AC68U but I can't seem to get to the webUI.

I've got Entware-NG on asuswrt-merlin 380.65 but while TH starts, I cannot get to the webUI? Just a blank white loading page in the browser until I kill TH and then the browser immediately reponds with "Unable to Connect".

More detail here:
https://tvheadend.org/boards/5/topics/24972
 
Last edited:
Thanks for the suggestion.

I had considered the RB Pi 3 but I figured that instead of adding another always on device it would be nice to just use the router. My NAS is an original Infrant - Ready NAS so its a bit long in the tooth for TH. Also, I'd rather brick a router if it came to that as I have a spare in the closet.

What is frustrating is that I know TH is trying to do something because when I try for the webUI, the browser behaviour changes between TH running and and not running. I am just not skilled enough to figure our why.

Any other suggestions on why the webUI is blocked?
 
Similar threads

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Staff online

Top