LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 01-22-2012, 10:48 AM   #1
vdemuth
Member
 
Registered: Oct 2003
Location: West Midlands, UK
Distribution: Slackware 14 (Server),OpenSuse 13.2 (Laptop & Desktop),, OpenSuse 13.2 on the wifes lappy
Posts: 781

Rep: Reputation: 98
Custom udev rule not creating device node. DVB related


I have a Kworld 355u dvd-t usb device which has worked previously in Slackware from about version 12.1. In fact I had a previous thread about it back in 2008 where I was able to get it working. But even following my own previous way has not worked.
Having decided to resurrect the hardware, I find that I am not able to get it working in 13.37.
This is what I have so far:

Code:
lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 064e:a103 Suyin Corp. Acer/HP Integrated Webcam [CN0314]
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 019: ID eb1a:e357 eMPIA Technology, Inc.
Code:
usb 1-2: new high speed USB device using ehci_hcd and address 19
[26321.861512] usb 1-2: New USB device found, idVendor=eb1a, idProduct=e357
[26321.861521] usb 1-2: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[26321.861528] usb 1-2: Product: USB 2870 Device
[26321.863035] em28xx: New device USB 2870 Device @ 480 Mbps (eb1a:e357, interface 0, class 0)
[26321.863981] em28xx #0: chip ID is em2870
[26321.940930] em28xx #0: i2c eeprom 00: 1a eb 67 95 1a eb 57 e3 c0 12 62 40 6a 22 00 00
[26321.940950] em28xx #0: i2c eeprom 10: 00 00 04 57 6a 0d 00 00 60 00 00 00 02 00 00 00
[26321.940968] em28xx #0: i2c eeprom 20: 54 00 00 00 f0 10 01 00 00 00 00 00 5b 00 00 00
[26321.940984] em28xx #0: i2c eeprom 30: 00 00 20 40 20 80 02 20 01 01 00 00 00 00 00 00
[26321.941000] em28xx #0: i2c eeprom 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[26321.941046] em28xx #0: i2c eeprom 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[26321.941084] em28xx #0: i2c eeprom 60: 00 00 00 00 00 00 00 00 00 00 22 03 55 00 53 00
[26321.941134] em28xx #0: i2c eeprom 70: 42 00 20 00 32 00 38 00 37 00 30 00 20 00 44 00
[26321.941182] em28xx #0: i2c eeprom 80: 65 00 76 00 69 00 63 00 65 00 00 00 00 00 00 00
[26321.941230] em28xx #0: i2c eeprom 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[26321.941278] em28xx #0: i2c eeprom a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[26321.941327] em28xx #0: i2c eeprom b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[26321.941375] em28xx #0: i2c eeprom c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[26321.941423] em28xx #0: i2c eeprom d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[26321.941471] em28xx #0: i2c eeprom e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[26321.941520] em28xx #0: i2c eeprom f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[26321.941571] em28xx #0: EEPROM ID= 0x9567eb1a, EEPROM hash = 0x32317d02
[26321.941577] em28xx #0: EEPROM info:
[26321.941582] em28xx #0:       No audio on board.
[26321.941587] em28xx #0:       500mA max power
[26321.941593] em28xx #0:       Table at 0x04, strings=0x226a, 0x0000, 0x0000
[26321.943060] em28xx #0: Identified as Kworld 355 U DVB-T (card=42)
[26321.943067] em28xx #0: 
[26321.943069] 
[26321.943072] em28xx #0: The support for this board weren't valid yet.
[26321.943077] em28xx #0: Please send a report of having this working
[26321.943081] em28xx #0: not to V4L mailing list (and/or to other addresses)
[26321.943083] 
[26321.950793] tuner 1-0062: chip found @ 0xc4 (em28xx #0)
[26321.950807] tuner 1-0062: tuner type not set
[26321.950815] em28xx #0: v4l2 driver version 0.1.2
[26321.950820] tuner 1-0062: tuner type not set
[26321.956193] em28xx #0: V4L2 video device registered as video1
My custom rule at /etc/udev/rules.d named 30-kworld.rules:

Code:
BUS=="usb",KERNEL=="video[0-9]*,"SUBSYSTEM="video4linux",ATTRS{idVendor}=="eb1a",ATTRS{idProduct}=="e357",GROUP="plugdev",MODE="0666", RUN+="/etc/udev/scripts/dvb.sh %k", NAME=="%c"
the dvb.sh script at /etc/udev/scripts

Code:
#!/bin/sh
/bin/echo $1 | /bin/sed -e 's,dvb\([0-9]\)\.\([^0-9]*\)\([0-9]\),dvb/adapter\1/\2\3,'
I have been trying to follow the how to on writing udev rules at http://www.reactivated.net/writing_udev_rules.html but it seems to be very out of date.

You will see from the info here that udev is creating a device node at /dev/video1. I think this means that the device is not being recognised by udev as being a dvb device. (maybe a bug in udev perhaps), but is instead being configured as some sort of v4l device which it isn't.

Not sure where to go from here, so some advice would be most welcome.
BTW, this is on both a laptop running 64 bit and a notebook running 32 bit.

Thanks.
 
Old 01-22-2012, 12:59 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,344

Rep: Reputation: Disabled
There seems to be an odd number of double quotes in your udev rule:
BUS=="usb",KERNEL=="video[0-9]*,"SUBSYSTEM="video4linux", ...
 
Old 01-23-2012, 10:40 AM   #3
vdemuth
Member
 
Registered: Oct 2003
Location: West Midlands, UK
Distribution: Slackware 14 (Server),OpenSuse 13.2 (Laptop & Desktop),, OpenSuse 13.2 on the wifes lappy
Posts: 781

Original Poster
Rep: Reputation: 98
corrected the odd No. of quotes. Still not working
 
Old 01-23-2012, 03:12 PM   #4
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,344

Rep: Reputation: Disabled
The rule ends with NAME=="%c". Perhaps that was supposed to be an assignment (NAME="%c") rather than a test?
 
Old 01-24-2012, 12:33 PM   #5
vdemuth
Member
 
Registered: Oct 2003
Location: West Midlands, UK
Distribution: Slackware 14 (Server),OpenSuse 13.2 (Laptop & Desktop),, OpenSuse 13.2 on the wifes lappy
Posts: 781

Original Poster
Rep: Reputation: 98
The rule was taken from the udev.txt file taken from the kernel docs so I am assuming that it is correctly terminated with the NAME assignment
 
Old 01-24-2012, 12:53 PM   #6
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,344

Rep: Reputation: Disabled
Since it isn't working, I'd wouldn't be assuming too much.

This is how the udev rule should look with the quotes issue resolved:
Code:
BUS=="usb",KERNEL=="video[0-9]*",SUBSYSTEM="video4linux",ATTRS{idVendor}=="eb1a",ATTRS{idProduct}=="e357",GROUP="plugdev",MODE="0666", RUN+="/etc/udev/scripts/dvb.sh %k", NAME=="%c"
Do you know if the dvb.sh script gets called or not when you plug in the receiver? You could add another echo statement or something similar to the top of the script (like "echo dvb.sh is running | logger").

Edit: I'm pretty sure the NAME statement is supposed to be NAME="%c", as that means "give the device node in /dev the name returned by the previous program" (the script), while NAME=="%c" would mean "this line is only valid if the kernel name matches whatever the script returned", and that doesn't really make sense in this context.

Last edited by Ser Olmy; 01-24-2012 at 12:58 PM.
 
  


Reply



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
udev rule executes command, wont add device node DigiLogik Linux - General 0 05-21-2009 05:19 PM
UDEV - Camera custom rule syntax Toods Slackware 1 11-20-2007 06:03 AM
Ahhh, XSane, UDEV and Device Node Permissions? binarybob0001 Linux - Software 2 04-10-2007 12:16 AM
Wrong group with custom udev rule enragedchip Linux - Hardware 1 12-11-2005 02:46 PM
udev does not create scsi device node maenho Linux - Software 0 11-27-2004 05:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:22 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration