How to bind TBS6984 in udev?

Posted:
Thu Mar 15, 2012 12:23 pm
by winger
I have two cards, after reboot adpter's in OS change numbers. How I can bind my card by MAC in udev?
Re: How to bind TBS6984 in udev?

Posted:
Thu Mar 15, 2012 7:32 pm
by SergioDanielG
Hi, refer to this article that explain how to "add dvb udev rules":
http://www.mythtv.org/wiki/Device_Filen ... Rules_fileIt's not specific to bin by mac address, but an excelent example to do it.
Best regarsd.
Re: How to bind TBS6984 in udev?

Posted:
Thu Mar 15, 2012 8:50 pm
by winger
I do it, and it working fine for skystar2 with one tuner. But for tbs6984 not!
root@user-desktop:/etc/udev/rules.d# cat 10-local.rules
SUBSYSTEM=="dvb", KERNELS=="0000:06:02.0", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter100/%%s $${K#*.}'", SYMLINK+="%c"
SUBSYSTEM=="dvb", KERNELS=="0000:06:01.0", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter101/%%s $${K#*.}'", SYMLINK+="%c"
SUBSYSTEM=="dvb", KERNELS=="0000:06:00.0", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter102/%%s $${K#*.}'", SYMLINK+="%c"
SUBSYSTEM=="dvb", KERNELS=="0000:03:00.0", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter103/%%s $${K#*.}'", SYMLINK+="%c"
SUBSYSTEM=="dvb", KERNELS=="0000:02:00.0", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter107/%%s $${K#*.}'", SYMLINK+="%c"
#SUBSYSTEM=="dvb", KERNELS=="0000:03:00.0", ENV{afatech}!="two", ENV{afatech}="two", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter104/%%s $${K#*.}'", SYMLINK+="%c"
#SUBSYSTEM=="dvb", KERNELS=="0000:03:00.0", ENV{afatech}=="two", ENV{afatech}="one", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter103/%%s $${K#*.}'", SYMLINK+="%c"
root@user-desktop:/etc/udev/rules.d# ls /dev/dvb
adapter0 adapter10 adapter101 adapter103 adapter2 adapter4 adapter6 adapter8
adapter1 adapter100 adapter102 adapter107 adapter3 adapter5 adapter7 adapter9
adapter 100,101,102 - skystar2 - working fine, BUT adapter 103, 107 not work! AND if I do like in comminted examples! Please help me to bind by MAC!!
Re: How to bind TBS6984 in udev?

Posted:
Thu Mar 15, 2012 9:48 pm
by SergioDanielG
If you want to use mac address, filter using SYSFS{address}=="xx:xx:xx:xx:xx:xx" where "xx:xx:xx:xx:xx:xx" is the mac adrress.
But I don't know if it work... I can test with a dual tuner two hours approximately, if you can wait...
Best regards
Re: How to bind TBS6984 in udev?

Posted:
Fri Mar 16, 2012 1:23 am
by winger
Yes! I will wait! Thank's!!!!!!
Re: How to bind TBS6984 in udev?

Posted:
Fri Mar 16, 2012 2:52 am
by SergioDanielG
winger Wrote:Yes! I will wait! Thank's!!!!!!
I'm sorry winger, no lock from here... I need to read a litte more about udev rules because there are a lot of options. I'll try later. No more time today...
Best regards
Re: How to bind TBS6984 in udev?

Posted:
Sat Mar 17, 2012 10:08 pm
by SergioDanielG
Do you know what driver use tbs6984?
For example, if it use cx23885:
sudo modinfo cx23885 -F parm
ci_dbg:Enable CI debugging (int)
ci_irq_enable:Enable IRQ from CAM (int)
ir_888_debug:enable debug messages [CX23888 IR controller] (int)
mpegbufs:number of mpeg buffers, range 2-32 (int)
mpeglines:number of lines in an MPEG buffer, range 2-32 (int)
mpeglinesize:number of bytes in each line of an MPEG buffer, range 512-1024 (int)
v4l_debug:enable V4L debug messages (int)
alt_tuner:Enable alternate tuner configuration (int)
adapter_nr:DVB adapter numbers (array of short)
i2c_debug:enable debug messages [i2c] (int)
i2c_scan:scan i2c bus at insmod time (int)
debug:enable debug messages (int)
card:card type (array of int)
vbibufs:number of vbi buffers, range 2-32 (int)
vbi_debug:enable debug messages [vbi] (int)
video_nr:video device numbers (array of int)
vbi_nr:vbi device numbers (array of int)
radio_nr:radio device numbers (array of int)
video_debug:enable debug messages [video] (int)
irq_debug:enable debug messages [IRQ handler] (int)
vid_limit:capture memory limit in megabytes (int)
netup_card_rev:NetUP Dual DVB-T/C CI card revision (int)
enable_885_ir:Enable integrated IR controller for supported
CX2388[57] boards that are wired for it:
HVR-1250 (reported safe)
TeVii S470 (reported unsafe)
This can cause an interrupt storm with some cards.
Default: 0 [Disabled] (int)
If it there adapter_nr param, you can use it to add modules options. In Debian /etc/modprove.d/dvb.conf
- Code: Select All Code
# TBS6925 PCI-e DVB-s2 and TBS6982 PCI-e DVB-s2
#options stv090x adapter_nr=0,1,2
# TBS6920 PCI-e DVB-s2
options cx23885 adapter_nr=3
There TBS6925 options are deseable because the module haven't got adapter_nr param
Best regards
Re: How to bind TBS6984 in udev?

Posted:
Mon Jun 11, 2012 3:52 pm
by ebogdan
Hi, have you found any way to make udev read MAC address of the adapter port? I can't get it to report it, no mater what I do...
This could solve the bind to udev problem.
BTW, could this problem be solved by an updated linux driver? Or do the udev guys also need to work on it...?
Re: How to bind TBS6984 in udev?

Posted:
Sun Jul 22, 2012 6:25 pm
by billyboy312
Hi,
If anyone has not had any luck getting two cards to maintain stable adapter numbers then you could maybe try the method I used in my post for a quad DVB-T2 card and a single DVB-S2 card. This has proved to be stable over the last few weeks.
This does not use udev but instead delays the loading of the driver for the DVB-S2 card ensuring that the quad DVB-T2 card always grabs the first four adapter numbers.
http://www.tbsdtv.com/forum/viewtopic.php?f=62&t=7747Hopefully you can alter this accordingly for some positive results.
I have been using Linux Mint with Mythtv and it is now working very well.
Regards