LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 05-21-2006, 06:20 AM   #1
hussar
Member
 
Registered: Oct 2003
Location: Heidelberg, Germany
Distribution: Slackware 11.0; Kubuntu 6.06; OpenBSD 4.0; OS X 10.4.10
Posts: 345

Rep: Reputation: 30
TerraTec Cinergy T2 USB and udev


Hello,

I am looking for some help getting a TerraTec Cinergy T2 (T^2) USB DVB-T adapter working. The adapter is supported by linuxtv, and I have the appropriate kernel modules built. I think the problem I am having is in the devices that are being set up, or not being set up, when I plug the adapter in.

When I plug the adapter in after a reboot, that is, before any of the appropriate modules have been loaded, the system makes these devices in /dev/dvb/adapter0:

bash-3.1$ ls -l /dev/dvb/adapter0/
total 0
crw-rw---- 1 root video 212, 4 May 20 16:18 demux0
crw-rw---- 1 root video 212, 5 May 20 16:18 dvr0
crw-rw---- 1 root video 212, 3 May 20 16:18 frontend0
crw-rw---- 1 root video 212, 7 May 20 16:18 net0

If I remove the adapter, the frontend0 devices is deleted, but the others remain. When I plug the adapter back in, frontend0 is created again.

lsmod the shows these cinergyT2 specific modules as being loaded:

cinergyT2 13444 0
dvb_core 77992 1 cinergyT2
usbcore 119684 4 cinergyT2,uhci_hcd,ehci_hcd

My user account is included in the video group in /etc/groups, so I am ruling out a permissions problem.

Still, even though these devices are present, I can't get Kaffeine or Xine to recognize that I have a DVB-T receiver attached. In Kaffeine, the DVB tab didn't appear at all until I used the configuration settings to add it, but I am still not offered a menu or dialog to do any further configuration beyond a broadcast address, a broadcast port, an info port and a directory for timeshift files. It also complains that it, "Can't bind the info socket!!" (It is trying to bind to port 1235.) I should be able to access an option to scan for channels, but there are no other configuration options available.

Xine was complaining about a missing channel.conf, but using a number of tools available on the web, including linuxtv's scan utility, I have been able to develop a channels.conf for xine. Unfortunately, it still complains that, "There is no input plugin available to handle 'dvb:/ZDF'. Maybe MRL syntax is wrong or file/source stream does not exist." I am figuring that the "file/source stream does not exist" part of that is a good hint that the devices are not properly bound.

I used the dvb.sh script given in /usr/src/linux/Documentation/dvb/udev.txt (I am using kernel 2.6.16.14) to write /etc/udev/scripts/dvb.sh, and the script is executable for all users. It looks like this:

#!/bin/sh
/bin/echo $1 | /bin/sed -e 's,dvb\([0-9]\)\.\([^0-9]*\)\([0-9]\),dvb/adapter\1/\2\3,'
#end of script

My slack-current system has these lines in /etc/udev/rules.d/udev.rules:

# dvb devices
KERNEL="dvb*", PROGRAM="/etc/udev/scripts/dvb.sh %k", NAME="%c", GROUP="video", MODE="0660"

That line builds on the rule given in the kernel documentation and adds the video group binding and the mode.

When I plug the apapter in, usbmonitor shows this:

UEVENT[1148209418] add@/devices/pci0000:00/0000:00:10.3/usb1/1-6
UEVENT[1148209418] add@/devices/pci0000:00/0000:00:10.3/usb1/1-6/1-6:1.0
UEVENT[1148209418] add@/class/dvb/dvb0.frontend0
UEVENT[1148209418] add@/class/input/input4
UEVENT[1148209418] add@/class/usb_device/usbdev1.5

That kind of surprises me, because I would expect to see some UDEV lines showing events udev sends out after rule processing.

Anyway, I am stumped. If anyone has some ideas on this, I would be grateful for the advice.
 
Old 05-21-2006, 09:41 AM   #2
hussar
Member
 
Registered: Oct 2003
Location: Heidelberg, Germany
Distribution: Slackware 11.0; Kubuntu 6.06; OpenBSD 4.0; OS X 10.4.10
Posts: 345

Original Poster
Rep: Reputation: 30
Okay, I've gotten it working. Sort of. I can only watch in xine, and I have to click the DVB button twice to start watching. On the first click, I get "Can't find plugin" error. Works on the second click though. I also have to change the channels manually using the playlist dialog. That's an lirc remote control configuration problem which I will tackle separately. Kaffeine doesn't work - it still won't show me the DVB configuration menu option.

I am also not certain if the configuration will last through a reboot. I ran this script, which I found in the forums at slax.linux-live.org:

#!/bin/sh
# Create device nodes for the Linux DVB API with DVB_API_VERSION 2.
# The devices created are suitable for most current PC DVB cards,
# i.e. cards having one frontend, one demux and optionally one
# MPEG decoder.
# The script creates devices for four cards by default.

if [ -e /dev/.devfsd ]; then
echo "It seems you are using devfs. Good!"
exit 0
fi

# get rid of old DVB API devices; do it twice for good measure...
rm -rf /dev/ost
rm -rf /dev/ost
rm -rf /dev/dvb
rm -rf /dev/dvb

mkdir /dev/dvb
chmod 755 /dev/dvb

for i in `seq 0 3`; do
echo "Creating DVB devices in /dev/dvb/adapter$i"
mkdir /dev/dvb/adapter$i
chmod 755 /dev/dvb/adapter$i
mknod -m 0660 /dev/dvb/adapter$i/video0 c 212 `expr 64 \* $i + 0`
mknod -m 0660 /dev/dvb/adapter$i/audio0 c 212 `expr 64 \* $i + 1`
mknod -m 0660 /dev/dvb/adapter$i/frontend0 c 212 `expr 64 \* $i + 3`
mknod -m 0660 /dev/dvb/adapter$i/demux0 c 212 `expr 64 \* $i + 4`
mknod -m 0660 /dev/dvb/adapter$i/dvr0 c 212 `expr 64 \* $i + 5`
mknod -m 0660 /dev/dvb/adapter$i/ca0 c 212 `expr 64 \* $i + 6`
mknod -m 0660 /dev/dvb/adapter$i/net0 c 212 `expr 64 \* $i + 7`
mknod -m 0660 /dev/dvb/adapter$i/osd0 c 212 `expr 64 \* $i + 8`
chown root.video /dev/dvb/adapter$i/*
done

Then I unplugged the adapter and plugged it back in again. My udev dvb.sh script took care of making a new /dev/dvb/adapter0/frontend0. I was able to start xine and with the two clicks on the DVB button, I was watching TV. Great stuff.

Now I have to figure out how to do it "right." I wonder if I could cut the devfs-specific stuff out of this script, as well as the deletion of /dev/ost, since I don't have that anyway. I could put the line from Documentation/dvb/udev.txt at the end of the script to make sure the frontend gets made. I'll give that a shot and see how it goes. I would still be grateful for any advice though.
 
Old 08-14-2006, 01:22 PM   #3
deced
LQ Newbie
 
Registered: Aug 2006
Posts: 2

Rep: Reputation: 0
EDIT: Sorry, posted in completely the wrong subsection, I think.

Last edited by deced; 08-14-2006 at 01:36 PM.
 
Old 08-14-2006, 03:57 PM   #4
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Ruhr Area, Germany
Distribution: Slackware64 14.0
Posts: 1,514

Rep: Reputation: 90
I recently set up an USB DVB-T device and had problems with the udev part. Although it looked like an exact copy I had to copy/paste the udev lines twice to get it working. It looked as if there was any kind of typo or wrong white space in it. It worked with udev <= 0.71 (haven't tried any other udev package). After that kaffeine started to show its DVB part.
I read about the new udev rules regarding "=" and "==" expressions; maybe you would have to change the KERNEL=... to KERNEL==... or something like that.

The udev lines I used (try a copy and paste even if it looks identical, see above):

/etc/udev/rules.d/udev.rules part about dvb:
Code:
# dvb devices
KERNEL="dvb*", PROGRAM="/etc/udev/scripts/dvb.sh %k", NAME="%c", GROUP="video", MODE="0660"
/etc/udev/scripts/dvb.sh
Code:
#!/bin/sh
/bin/echo $1 | /bin/sed -e 's,dvb\([0-9]\)\.\([^0-9]*\)\([0-9]\),dvb/adapter\1/\2\3,'
#end of script
EDIT: fixed typo
 
Old 09-06-2006, 08:01 PM   #5
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, SLAX, OpenSuSE
Posts: 1,593

Rep: Reputation: 142Reputation: 142
http://www.linuxquestions.org/questi...=channels.conf

You may find the above thread useful. Important: There are two incompatible formats for channels.conf. With a channels.conf in the wrong format you'll have lots of fun, but not caused by the tv programme, you won't see, then...

In fact, I don't understand how and why this problem arose, and why the programs don't come packaged with proper channels pre-set. Is this, beacause the software is free, and someone has a business plan for selling channels.conf files?

gargamel
 
  


Reply

Tags
dvbt, udev, usb


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Support for Cinergy hybrid T USB XS? Q-Fireball Linux - Hardware 2 09-18-2006 10:06 AM
Terratec Cinergy 600 tv -> how can I make infrared work? chaosd Linux - Hardware 0 11-24-2005 06:33 AM
DVB-T Cinergy 1200 Terratec & SUSE 9.2 kapa Linux - Hardware 1 03-16-2005 01:05 PM
Terratec Cinergy 1200 DVB-T and SUSE kapa Linux - Hardware 0 03-03-2005 04:52 PM
saa7134 cinergy 600 TV radio - terratec legolin Linux - Hardware 2 12-09-2004 07:42 AM


All times are GMT -5. The time now is 02:20 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration