Autor Thema: How to Set default permissions to the tuner device?  (Gelesen 15910 mal)

clabbe

  • Newbie
  • *
  • Beiträge: 13
    • Profil anzeigen
How to Set default permissions to the tuner device?
« 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?

Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8512
    • Profil anzeigen
Re:How to Set default permissions to the tuner device?
« Antwort #1 am: November 23, 2010, 01:28:13 Vormittag »
Actually, by default everyone should have access to the videotuner, do you have some tvheadend logfiles?
Failure is a good thing! I'll fix it

clabbe

  • Newbie
  • *
  • Beiträge: 13
    • Profil anzeigen
Re:How to Set default permissions to the tuner device?
« Antwort #2 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.
:(

Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8512
    • Profil anzeigen
Re:How to Set default permissions to the tuner device?
« Antwort #3 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
Failure is a good thing! I'll fix it

clabbe

  • Newbie
  • *
  • Beiträge: 13
    • Profil anzeigen
Re:How to Set default permissions to the tuner device?
« Antwort #4 am: Dezember 12, 2010, 06:08:54 Nachmittag »
Thx I will try it out!

clabbe

  • Newbie
  • *
  • Beiträge: 13
    • Profil anzeigen
Re:How to Set default permissions to the tuner device?
« Antwort #5 am: Dezember 12, 2010, 06:30:26 Nachmittag »
Didnt work :((

Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8512
    • Profil anzeigen
Re:How to Set default permissions to the tuner device?
« Antwort #6 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

Failure is a good thing! I'll fix it

clabbe

  • Newbie
  • *
  • Beiträge: 13
    • Profil anzeigen
Re:How to Set default permissions to the tuner device?
« Antwort #7 am: Dezember 14, 2010, 11:07:42 Nachmittag »
still no luck :(
tried installing the version u said, no change.
wierd.
« Letzte Änderung: Dezember 14, 2010, 11:46:46 Nachmittag von clabbe »

Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8512
    • Profil anzeigen
Re:How to Set default permissions to the tuner device?
« Antwort #8 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!
Failure is a good thing! I'll fix it

clabbe

  • Newbie
  • *
  • Beiträge: 13
    • Profil anzeigen
Re:How to Set default permissions to the tuner device?
« Antwort #9 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?

Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8512
    • Profil anzeigen
Re:How to Set default permissions to the tuner device?
« Antwort #10 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.
Failure is a good thing! I'll fix it

clabbe

  • Newbie
  • *
  • Beiträge: 13
    • Profil anzeigen
Re:How to Set default permissions to the tuner device?
« Antwort #11 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

Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8512
    • Profil anzeigen
Re:How to Set default permissions to the tuner device?
« Antwort #12 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.
Failure is a good thing! I'll fix it

clabbe

  • Newbie
  • *
  • Beiträge: 13
    • Profil anzeigen
Re:How to Set default permissions to the tuner device?
« Antwort #13 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?

Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8512
    • Profil anzeigen
Re:How to Set default permissions to the tuner device?
« Antwort #14 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.
Failure is a good thing! I'll fix it