Sundtek Support Forum

English => Sundtek MediaTV Pro (Europe) => Thema gestartet von: clabbe am November 21, 2010, 11:11:05 Vormittag

Titel: How to Set default permissions to the tuner device?
Beitrag von: clabbe am November 21, 2010, 11:11:05 Vormittag
My tvheadend backend cannot access the tuner because of that the tuner only has root:root permissions. Is there any good way to have it set to video group by default?
Titel: Re:How to Set default permissions to the tuner device?
Beitrag von: Sundtek am November 23, 2010, 01:28:13 Vormittag
Actually, by default everyone should have access to the videotuner, do you have some tvheadend logfiles?
Titel: Re:How to Set default permissions to the tuner device?
Beitrag von: clabbe am November 27, 2010, 10:23:03 Vormittag
Nov 27 09:10:17 clabbe-htpc tvheadend[1519]: subscription: No transponder available for subscription
Says the tvheadend log when I try to access it through xbmc.

If I then run "sudo /etc/init.d/tvheadend restart" I get access to the transponder.
:(
Titel: Re:How to Set default permissions to the tuner device?
Beitrag von: Sundtek am November 27, 2010, 12:13:33 Nachmittag
This probably means that tvheadend is started before the driver is started

you might create a configuration file:
/etc/sundtek.conf

add a line:
device_attach=/etc/init.d/tvheadend restart

this will automatically restart tvheadend once the device is fully initialized
Titel: Re:How to Set default permissions to the tuner device?
Beitrag von: clabbe am Dezember 12, 2010, 06:08:54 Nachmittag
Thx I will try it out!
Titel: Re:How to Set default permissions to the tuner device?
Beitrag von: clabbe am Dezember 12, 2010, 06:30:26 Nachmittag
Didnt work :((
Titel: Re:How to Set default permissions to the tuner device?
Beitrag von: Sundtek am Dezember 13, 2010, 12:49:15 Vormittag
Of course you should use the latest drivers for all that:

http://www.sundtek.de/media/sundtek_installer_development.sh

Titel: Re:How to Set default permissions to the tuner device?
Beitrag von: clabbe am Dezember 14, 2010, 11:07:42 Nachmittag
still no luck :(
tried installing the version u said, no change.
wierd.
Titel: Re:How to Set default permissions to the tuner device?
Beitrag von: Sundtek am Dezember 15, 2010, 01:15:04 Vormittag
if possible please set up remote access and send the account data to kontakt at sundtek de

What does
Zitat
/opt/bin/mediaclient --lc

show up? (--lc means list clients) it must show up tvheadend, if not tvheadend is not using the driver. Another possibility is that the re-start script is at the wrong position or you have a typo in /etc/sundtek.conf

Until now we haven't seen any other tvheadend system not working with this configuration!
Titel: Re:How to Set default permissions to the tuner device?
Beitrag von: clabbe am Dezember 15, 2010, 09:48:09 Nachmittag
but that the devices under /dev/dvb has only root:root permission doesnt have anything with this to do?
At least it should be under the video group:( right?
Titel: Re:How to Set default permissions to the tuner device?
Beitrag von: Sundtek am Dezember 16, 2010, 12:12:16 Vormittag
No, permissions do not matter there. you can also see that everyone has access to those files.

please check the mediaclient --lc Option.
Titel: Re:How to Set default permissions to the tuner device?
Beitrag von: clabbe am Dezember 18, 2010, 11:10:57 Vormittag
no tvheadend there :(

**** List of Media Clients ****
/dev/dvb/adapter0/frontend0:
  No client connected
/dev/dvb/adapter0/dvr0:
  No client connected
/dev/dvb/adapter0/demux0:
  No client connected
/dev/video0:
  No client connected
/dev/vbi0:
  No client connected
/dev/radio0:
  No client connected
/dev/rds0:
  No client connected
/dev/mediainput0:
  No client connected
/dev/dsp0:
  No client connected
Titel: Re:How to Set default permissions to the tuner device?
Beitrag von: Sundtek am Dezember 18, 2010, 11:21:40 Vormittag
so.. you have to check /etc/sundtek.conf again and what I have written previously.

the driver automatically calls the command which you configured in /etc/sundtek.conf

/etc/sundtek.conf:
device_attach=/etc/init.d/tvheadend restart

if you usually use a different command for restarting tvheadend just adjust this.
Titel: Re:How to Set default permissions to the tuner device?
Beitrag von: clabbe am Dezember 19, 2010, 02:44:58 Nachmittag
Dec 19 13:32:13 clabbe-htpc tvheadend[2207]: dvb: Unable to open /dev/dvb/adapter0/frontend0 -- No such device or address

I saw now... still it is starting to early... wierd.
Ive checked the command and it is no problem with that.

Should I have uninstalled the previous driver before installing the new dev drivers?
Titel: Re:How to Set default permissions to the tuner device?
Beitrag von: Sundtek am Dezember 19, 2010, 05:08:20 Nachmittag
you might try:

/usr/bin/tvheadend_restart.sh
Zitat
#!/bin/bash
sleep 5
/etc/init.d/tvheadend restart

chmod 777 /usr/bin/tvheadend_restart.sh

/etc/sundtek.conf
Zitat
device_attach=/usr/bin/tvheadend_restart.sh

also check /var/log/mediasrv.log

maybe something accesses the analog TV tuner and prevents tvheadend to access the DVB tuner when restarting it.
udev triggers some analog TV detection with some linux systems, this will block DVB access until it is done (all that happens within a few seconds only), but as mentioned /var/log/mediasrv.log will show up what's going on.