View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 4 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Thu Oct 11, 2007 8:21 pm 
Offline
Joined: Sun Feb 26, 2006 11:34 pm
Posts: 83
Location: Toronto, ON, Canada
Hi,

I just did a clean install of R5F27, using a www.irblaster.info dual head irblaster on com 2

I started off trying to do a auto upgrade, but ran into the same problem as the user in [url=http://mysettopbox.tv/phpBB2/viewtopic.php?t=16458
]this thread [/url]

Through searching I managed to find somone else with similar problems to me, but the solution of rebooting has not made any difference.

In short, I have the irblasterd.conf file in the /etc/irblaster/ directory, with a remote called 301 here is the file:
Code:
begin remote

  name  301
  bits           16
  flags SPACE_ENC
  eps            30
  aeps          100

  header        400  6100
  one           400  1700
  zero          400  2800
  ptrail        400
  gap          6200
  min_repeat      4
  toggle_bit      0

  frequency    56000

      begin codes
          info                     0x0000000000000000
          power                    0x0000000000000800
          play                     0x0000000000000C10
          1                        0x0000000000001000
          2                        0x0000000000001400
          3                        0x0000000000001800
          frwd                     0x0000000000001C10
          4                        0x0000000000002000
          5                        0x0000000000002400
          6                        0x0000000000002800
          menu                     0x0000000000002C00
          7                        0x0000000000003000
          8                        0x0000000000003400
          9                        0x0000000000003800
          ffwd                     0x0000000000003C10
          select                   0x0000000000004000
          0                        0x0000000000004400
          cancel                   0x0000000000004800
          guide                    0x0000000000005000
          mute                     0x0000000000005401
          view                     0x0000000000005800
          tv_video                 0x0000000000005C00
          right                    0x0000000000006000
          vol+                     0x0000000000006401
          up                       0x0000000000006800
          recall                   0x0000000000006C00
          left                     0x0000000000007000
          vol-                     0x0000000000007401
          down                     0x0000000000007800
          rec                      0x0000000000007C00
          pause                    0x0000000000008000
          stop                     0x0000000000008400
          sys_info                 0x0000000000009000
          */ptv_list               0x0000000000009400
          #/search                 0x0000000000009800
          sat                      0x000000000000A400
          tv                       0x000000000000A801
          rew                      0x000000000000C410
          fwd                      0x000000000000C810
          skip_back                0x000000000000D810
          skip_fwd                 0x000000000000DC10
      end codes

end remote



Here is the channel_change.sh
Code:
#!/bin/bash

# Automatically Generated by /usr/local/bin/irblaster.sh

echo Changing to $1

REMOTE_NAME=301

for digit in $(echo $1 | sed -e 's/./& /g'); do
  /usr/bin/irsend --device=/dev/irblasterd SEND_ONCE $REMOTE_NAME $digit
  sleep 0.9
done



and here is the output of me trying to change the channel:
Code:
root@mythtv:/etc/irblaster# ./channel_change.sh 510
Changing to 510
/usr/bin/irsend: command failed: SEND_ONCE 301 5
/usr/bin/irsend: unknown remote: "301"
/usr/bin/irsend: command failed: SEND_ONCE 301 1
/usr/bin/irsend: unknown remote: "301"
/usr/bin/irsend: command failed: SEND_ONCE 301 0
/usr/bin/irsend: unknown remote: "301"


It is like it is looking at another irblasterd.conf file.

I have changed the name of the remote in both irblasterd.conf and channel_change.sh. in the latter it just changes which remote is not found.

BTW, here are the permissions:
Code:
# ls -la /etc/irblaster/
total 36
drwxr-xr-x   2 root root 4096 Oct 11 19:35 .
drwxr-xr-x 115 root root 8192 Oct 11 21:52 ..
-rwxr-xr-x   1 root root  248 Oct 11 21:58 channel_change.sh
-rw-r--r--   1 root root  151 Oct 11 12:03 hardware.conf
-rwxr-xr-x   1 root root 6671 Oct 11 19:35 irblaster.conf
-rwxrwxrwx   2 root root 6460 Oct 11 21:59 irblasterd.conf

Any ideas?

Thanks in advance
Victor


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 11, 2007 8:54 pm 
Offline
Joined: Sat Dec 24, 2005 11:33 am
Posts: 400
Location: Kitsap Peninsula, Wa., United States
I just looked in my change_channel.sh
I see one difference

Where you define your Remote name
Mine looks like this..

$remote_name = "blaster";

I wouldn't worry about the specifc name but maybe the syntax is the problem???

hth


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 12, 2007 8:40 am 
Offline
Joined: Sun Feb 26, 2006 11:34 pm
Posts: 83
Location: Toronto, ON, Canada
bigbro wrote:
I just looked in my change_channel.sh
I see one difference

Where you define your Remote name
Mine looks like this..

$remote_name = "blaster";

I wouldn't worry about the specifc name but maybe the syntax is the problem???

hth


Are you sure that is a shell script, not a perl script?

In any case, I gave it a try and no joy.

Victor


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 12, 2007 12:08 pm 
Offline
Joined: Sat Dec 24, 2005 11:33 am
Posts: 400
Location: Kitsap Peninsula, Wa., United States
It probably is a Perl script now that I look at it and have seen some of the other posts mostly by tjc about perl vs shell, etc.

I know I copied it this way from elsewhere in R5A30.1 and only had to make a minor file locate change when it went into R5F27.

Here it is today, maybe it can help you. You decide. I know it works for me at the moment.
Code:
#!/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/bin/irsend";

# This subroutine actually sends the signal to the cable box
sub change_SIGNAL {
    my($SIGNAL) = @_;
    system ("$rc_command 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");
}


I notice it says inside of it that this is a perl script. It was copied from elsewhere exaclty as you see it here and it works.

Also of note there are numerous places it shows to be a Fat Hyphen in the script but I actually see those as an "equal" sign.

I suppose the proper thing to do for me is to change the name to .pl since it is most likely perl.

Anyway, I hope this is helpful for you.

I know tjc and others have posted numerous items around here about Understanding LIRC etc.
Regards.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 7 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:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu