View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 17 posts ] 
Go to page 1, 2  Next

Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: IRBlaster problem
PostPosted: Tue May 08, 2007 6:12 am 
Offline
Joined: Sat Nov 04, 2006 9:56 pm
Posts: 23
Location: Ontario, Canada
I've been using Knoppmyth for a few months now. Most of it is working great, but I still have one minor annoyance which I think is causing a major problem. When I boot or reboot the computer, I have to go to the console, run 'killall mythbackend' and rerun 'mythbackend' for the IRBlaster to work at all.
This to me has to be at least part of the cause of some random crash errors I've been getting, since I'm not allowing the database to close properly (not knowing a better way to do it). The system keeps getting more and more unstable, until I have to reformat and start fresh (about every three weeks). Can someone help me get this working properly at boot?
I'm using a Hauppauge PVR-150 (non MCE), which has it's own on-card IRblaster. I know it's not a hardware issue, as I have two independant computers doing the exact same thing (no interaction between them at all).

Any assistance is greatly appreciated.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 10, 2007 5:39 pm 
Offline
Joined: Sat Nov 04, 2006 9:56 pm
Posts: 23
Location: Ontario, Canada
Ok, I've discovered the source of the problem, but not the fix, and I'm getting really frustrated.
The change_channel script doesn't work unless I'm logged in as root, so it's a permission error. I think it has to do with perl, as I got a message saying something about perl-suid.

I've changed too many permissions and tried too many things to remember how anything was. I'm not adversed to redoing the whole box to set everything back to the way it was, but I still need help with this please. I feel like I'm so close to the solution, but I just don't know enough to make it work.

Please, I've been working on this problem off and on since December, I would really like to get it done soon.
Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 10, 2007 8:59 pm 
Offline
Joined: Sat Nov 04, 2006 9:56 pm
Posts: 23
Location: Ontario, Canada
I've redone the system since I seemed to have screwed it completely up. This is what I get trying to execute the script using the mythtv account. Note that using root works perfectly.

mythtv@mypvr:/etc$ ./change_channel POWER
Can't do setuid (cannot exec sperl)


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 10, 2007 10:09 pm 
Offline
Joined: Sat Dec 24, 2005 11:33 am
Posts: 400
Location: Kitsap Peninsula, Wa., United States
I thought there was a step in the setup to make it executable.

Mine has these permissions when I run
Code:
ls -al
# ls -al /usr/local/bin/change_channel
-rwxr-xr-x  1 root root 1396 Dec 26 09:43 /usr/local/bin/change_channel


You should see that x in the there.

That should be able to be fixed with a chmod
Code:
#chmod +x change_channel


Of course I abbreviated, you need to include your path or be in that directory.

Hope this helps!

_________________
KnoppMyth R5.5
MBE: AMD64 3400+, K8N Neo4 Plat., 1Gig, Asus Extreme N6200, 320G pata, 2x320Gsata, 750Gsata, PVR-150 Retail w/Blaster
SBE: AMD XP2000, GA 7ZMMH, 1 Gig, XFX 256M 6200, 20 Gig, PVR-150 Retail w/Blaster
SBE: AMD Dur1800, 512M, PVR500


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 11, 2007 7:34 am 
Offline
Joined: Sat Nov 04, 2006 9:56 pm
Posts: 23
Location: Ontario, Canada
I've already done that, had to do it to get it working for root.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 16, 2007 12:35 pm 
Offline
Joined: Sat Nov 04, 2006 9:56 pm
Posts: 23
Location: Ontario, Canada
Can anyone help me?


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 16, 2007 2:18 pm 
Offline
Joined: Thu Feb 12, 2004 2:54 pm
Posts: 392
Location: Beaumont, CA
Have you tried to do (as root) chmod a+x /path/to/change_channel.sh

That will give everyone permission to execute that script.

_________________
ASUS A7N266 Micro-ATX Motherboard
Athlon 2200 processor
512K Kingston PC2100 Memory
MicroAtx Case
2 PVR250's w/remote
eVGA e-GeForce mx4000 (64 Ram with Tv/Out (Svideo))
Lite-on DVD cd-rw combo
120 GB Western Digital


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 16, 2007 6:43 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
For some types of scripts you need to make them readable as well as executable:
Code:
chmod a+rx /path/to/change_channel.sh


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 17, 2007 8:15 am 
Offline
Joined: Sat Nov 04, 2006 9:56 pm
Posts: 23
Location: Ontario, Canada
I'll try the when I get home tonight, but I still have the feeling it has something to do with the mythtv user not having rights to run perl scripts.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 17, 2007 7:06 pm 
Offline
Joined: Sat Nov 04, 2006 9:56 pm
Posts: 23
Location: Ontario, Canada
Did that.. all I get is the same message

Can't do setuid (cannot exec sperl)


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 17, 2007 7:46 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Probably because sperl isn't on the system...


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 17, 2007 10:22 pm 
Offline
Joined: Sat Nov 04, 2006 9:56 pm
Posts: 23
Location: Ontario, Canada
But the script works fine under root.
This is the script:

#!/usr/bin/perl

# make sure to set this string to
# the corresponding remote in /etc/lircd.conf
$remote_name = "blaster";

# Let's assume you don't need to press enter after you punch in a
# channel number. Change this to 1 if your cable box expects you press
# enter after each command
$needs_enter = 0;

# Change this to point to your rc executable
$rc_command = "/usr/local/bin/irsend";

# This subroutine actually sends the signal to the cable box
sub change_SIGNAL {
my($SIGNAL) = @_;
system ("irsend SEND_ONCE $remote_name $SIGNAL");
}

$SIGNAL=$ARGV[0];
open F, ">> /var/log/channel.log";
print F "channel changing $SIGNAL\n";
close F;
print "channel changing $SIGNAL\n";

# Checks if $SIGNAL begins with a digit
# If it detects that the string is made up of digits, then it puts
# spaces between the digits. Ex. 1234 becomes 1 2 3 4
if ( $SIGNAL =~ /^\d+$/ )
{
my $length = length($SIGNAL);
my $counter = 0;
my $temp;

while( $counter < $length )
{
$temp .= substr($SIGNAL,$counter,1) ." ";
$counter++;
}

change_SIGNAL($temp);
}
else
{
# argument we passed was not made up of digits, so it must be a
# command that does something other than channel changing on the
# cable box
change_SIGNAL($SIGNAL);
}

# Do we need to send enter
if ( $needs_enter )
{
system ("$rc_command SEND_ONCE $remote_name ENTER");
}


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 24, 2007 9:26 am 
Offline
Joined: Sat Nov 04, 2006 9:56 pm
Posts: 23
Location: Ontario, Canada
Can anyone help me with this? Or at least point me to a different change channel script that won't cause permission problems?


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 24, 2007 10:12 am 
Offline
Joined: Wed Nov 16, 2005 8:55 pm
Posts: 1381
Location: Farmington, MI USA
I copied the script you posted onto my system and executed it fine as both root and myth user.
Quote:
myth3@myth3:~$ /usr/local/bin/change_channel.sh POWER
channel changing POWER
irsend: command failed: SEND_ONCE blaster POWER
irsend: unknown remote: "blaster"
I don't have a blaster so the errors are correct, however you can see that the script executed.

Draeko wrote:
Can't do setuid (cannot exec sperl)

You obviously have something misconfigured, there's no sperl on any of my systems...


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 24, 2007 10:52 am 
Offline
Joined: Sat Dec 24, 2005 11:33 am
Posts: 400
Location: Kitsap Peninsula, Wa., United States
Your script "looks" correct.

Both my lircd.conf and my change_channel script are posted here
http://mysettopbox.tv/phpBB2/viewtopic. ... 0411#90411

Just for grins you might try creating a new change_channel per the instructions on the wiki for setting up an IR Blaster here. http://knoppmythwiki.org/index.php?page ... hSetTopBox

Save your old script by doing an mv change_channel change_channel.orig or something like that.

Use my script above as I know it works for the settop box, as I remember there was a cut and paste issue with the one posted on the wiki. I think it is fixed but just to be sure.

Remember your actual codeset used for controlling your settop box may be different, but you shouldn't need to do that portion as yours is partially working.

You know looking back at the post trail here. I see a small difference, I don't know if this is true of yours or not. my change_channel is exactly that name, I noticed the instructions TJC gave were for change_channel.sh
I don't know if that makes a difference or not. Maybe someone else can speak up on that part my linux is weak there.

Anyway when you set this up you will need to go back and ensure that your tuner setting has the correct path/filename in it to work.

Hope this helps!

_________________
KnoppMyth R5.5
MBE: AMD64 3400+, K8N Neo4 Plat., 1Gig, Asus Extreme N6200, 320G pata, 2x320Gsata, 750Gsata, PVR-150 Retail w/Blaster
SBE: AMD XP2000, GA 7ZMMH, 1 Gig, XFX 256M 6200, 20 Gig, PVR-150 Retail w/Blaster
SBE: AMD Dur1800, 512M, PVR500


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ] 
Go to page 1, 2  Next



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu