View unanswered posts    View active topics

All times are UTC - 6 hours





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

Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Wed May 21, 2008 9:44 pm 
Offline
Joined: Tue Mar 28, 2006 8:26 pm
Posts: 804
Location: Minneapolis, MN
I've got an Iguanaworks serial irblaster which also has an IR receiver on it. I've been using it for about a year as an IR receiver and that part works fine.
Now, I'd like to finally use the irblaster part and change channels on my Sony Directv box.

From virtual termianl 1 (CTRL-ALT-F1), I logged in as root, stopped LIRC and used IRRECORD and created a file of the button codes from the Sony IR remote. That worked ok. I've tried to run the /usr/local/bin/irblaster.sh script in order to create all the irblaster files needed for irblaster use, but nothing happens - no errors, nothing at all.

So, I reran /usr/local/bin/lirc-reconfig.sh to see if the irblaster script would run afterwards. The IRblaster script seemed to run and I chose one of the boxes from the list - knowing I would have to hand edit the relevant files it created at a later time. After the script finished, I looked and there is no /etc/irblaster/irblaster.conf file and no /etc/irblaster/channel_change.sh file.

Any idea why the auto-config process isn't working and how to jump-start the process?

Eric

_________________
KnoppMyth R5.5, Asus A8N-VM CSM (nvidia 6150 onboard video), AMD Athlon 64 dual-core 4200+, two 1GB sticks DDR 400, HD-3000 HDTV card, PVR-150 card, Iguanaworks RS-232 IR receiver/transmitter, Pioneer DVR-110 DVD burner


Last edited by neutron68 on Wed Apr 22, 2009 9:49 pm, edited 5 times in total.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 21, 2008 11:14 pm 
Offline
Joined: Mon May 10, 2004 8:08 pm
Posts: 1891
Location: Adelaide, Australia
The irblaster script is designed to work where the serial blaster is a secondary lirc device (i.e you have a non-serial lirc receiver). Two daemons run, lircd for the receiver and irblasterd for the serial transmitter.

If you have a serial lirc receiver and blaster on the same port, you shouldn't need to run irblaster.sh because the default lirc daemon lircd will handle both receive and transmit. You just need to add the codes to be transmitted to /etc/lirc/lircd.conf and use irsend with the default lirc daemon (/dev/lircd i.e you dont need irsend -d /dev/irblasterd just use irsend).


Last edited by Greg Frost on Sat May 24, 2008 5:09 pm, edited 1 time in total.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 22, 2008 10:30 am 
Offline
Joined: Fri Sep 15, 2006 12:16 pm
Posts: 292
Greg Frost is the man in this area. I am using scripts that he
authored a while back.

My hardware is exactly like yours

I recall that the conf file that you created this way with irrecord
needs to be copied to /etc/irblaster/irblasterd.conf (not irblaster.conf)
and that you need to create your own /etc/irblaster/channel_change.sh
(and enter the path to it in the mythtv-setup field for channel change
script). Here is my slightly modified channel_change.sh. You will
need to modify it to use the names (and capitalization?) that
exist in your irblasterd.conf and to know how to escape from
the PPV / unpurchased channel prompts that your box has
Code:
#!/bin/bash
 
REMOTE_NAME=$(grep ^[[:space:]]*name[[:space:]] /etc/irblaster/irblasterd.conf | awk '{ print $2 }')

# send a cancel in case it is at a pay per view that won't take channel down
/usr/bin/irsend SEND_ONCE $REMOTE_NAME cancel
sleep 0.35

# send a channel down in case it is at a pay channel that accepts only channel up or down
/usr/bin/irsend SEND_ONCE $REMOTE_NAME down
sleep 0.35

# send the digits one at a time
for digit in $(echo $1 | sed -e 's/./& /g'); do
/usr/bin/irsend SEND_ONCE $REMOTE_NAME $digit
sleep 0.35
done


Here is the hardware.conf that I run with it
Code:
# /etc/irblaster/hardware.conf
#
#  Author: Greg Frost

# The COM Port used by the IRBlaster. Set it to COM1 COM2 or "".
IRBLASTER_SERIAL_PORT=COM1


Here is my irblasterd.conf for comparison
Code:
#
# this config file was automatically generated
# using WinLIRC 0.6.5 (LIRC 0.6.1pre3) on Tue Apr 04 06:16:24 2006
#
# contributed by
#
# brand:             301
# model:             
# supported devices:
#

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

_________________
R5F27 using R5F1 Nvidia drivers
HD-5500 analog from NTSC Sat Rx, with OTA DVB too
GeForce MX-440 SVideo tvout to a TV
Older dual core 3.4ghz Intel CPU
Asus P5PE-VM Motherboard
2 GB RAM
1 TB LVM2
VirtualBox
Samba


Top
 Profile  
 
 Post subject: my specifics
PostPosted: Thu May 22, 2008 7:12 pm 
Offline
Joined: Tue Mar 28, 2006 8:26 pm
Posts: 804
Location: Minneapolis, MN
Oh boy, each of you said to put the remote codes in a different file. :shock:
I'm not sure what to do now.
What happens if I put the codes for the Sony DSS receiver in both /etc/irblaster/irblasterd.conf and /etc/lirc/lircd.conf ?

At present, my IR receiver/transmitter is addressed as /dev/lirc0.
I had to change the IRRECORD command to "IRRECORD -d /dev/lirc0" in order to make it work.
For this to work, do I need to rename it so it is called a different device, such as /dev/irblaster?

Since the IRBLASTER is only going to send channel change info to the Sony DSS box, I decided that only certain buttons needed to be captured, rather than every single one.

For kicks, here's a look at the Sony DSS codes that IRRECORD generated:
Code:
# Please make this file available to others
# by sending it to <lirc@bartelmus.de>
#
# this config file was automatically generated
# using lirc-0.8.2-CVS-pvr150(default) on Wed May 21 21:24:09 2008
#
# contributed by neutron68 at yahoo dot com
#
# brand:   Sony DSS
# model no. of remote control: RM-Y130
# devices being controlled by this remote: Sony SAT-A2 DSS receiver
#

begin remote

  name  sony-dss
  bits            7
  flags SPACE_ENC|CONST_LENGTH
  eps            30
  aeps          100

  header       2425   585
  one          1205   585
  zero          608   585
  post_data_bits  8
  post_data      0xED
  gap          44770
  min_repeat      2
  toggle_bit_mask 0x3000

      begin codes
          1                        0x00
          2                        0x40
          3                        0x20
          4                        0x60
          5                        0x10
          6                        0x50
          7                        0x30
          8                        0x70
          9                        0x08
          0                        0x48
          enter                    0x68
          power                    0x54
          channel-up               0x04
          channel-down             0x44
      end codes

end remote

_________________
KnoppMyth R5.5, Asus A8N-VM CSM (nvidia 6150 onboard video), AMD Athlon 64 dual-core 4200+, two 1GB sticks DDR 400, HD-3000 HDTV card, PVR-150 card, Iguanaworks RS-232 IR receiver/transmitter, Pioneer DVR-110 DVD burner


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 22, 2008 9:42 pm 
Offline
Joined: Fri Sep 15, 2006 12:16 pm
Posts: 292
It's been a long time since I had to fiddle with these files.

My satellite box name is 301 and my remote name is grayhauppauge.
Looking at my files more closely shows that I have only the 301
setup in /etc/irblaster/irblasterd.conf but that I have both 301 and
grayhauppauge in /etc/lirc/lircd.conf

<edited>
The cleanest way to code it would be to put both sets of codes (transmit
and receive) in /etc/lirc/lircd.conf and modify the channel_change.sh
to hard code the remote name there.

The easiest way which is also a shotgun approach and thus most likely to
work the first time is to put both codes in lircd.conf, to put only the
remote code in irblasterd.conf, and to leave the channel_change.sh
as I first posted.

Your guess is as good as mine as to whether /etc/irblaster/hardware.conf
is even needed. It doesn't hurt (other than our understanding of
which thing actually makes it work) to put it there.
</edited>
..................

Thinking about how this works, we know that lirc reads /etc/lirc/lircd.conf
and we know that irsend gets the actual codes to send from somewhere
that we are not specifying, so the best guess is that this
unspecified config file is /etc/lirc/lircd.conf

Hope this helps.

Cliff

_________________
R5F27 using R5F1 Nvidia drivers
HD-5500 analog from NTSC Sat Rx, with OTA DVB too
GeForce MX-440 SVideo tvout to a TV
Older dual core 3.4ghz Intel CPU
Asus P5PE-VM Motherboard
2 GB RAM
1 TB LVM2
VirtualBox
Samba


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 23, 2008 1:47 am 
Offline
Joined: Mon May 10, 2004 8:08 pm
Posts: 1891
Location: Adelaide, Australia
Read my post again. It is done differently if you have a serial reciever/blaster on the same port compared to if you have some other receiver (like the hauppauge) and a serial blaster.

In the first case, lirc can handle both with the one instance, so there is no need to bother with irblaster/irblasterd. In the second case you need two instances of lirc, one for the receiver (/dev/lirc0 and lircd) and one for the transmitter (/dev/irblaster and irblasterd).

I think cliff has confused the issue.

Swing by #knoppmyth on irc.freenode.net and if we cross paths, I'll help you get it going. I go by the nick Slartybartfast. (I use chatzilla in firefox on my myth box)


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 23, 2008 8:18 am 
Offline
Joined: Fri Sep 15, 2006 12:16 pm
Posts: 292
Although I use a hauppauge gray remote which may make one
think that I use i2c lirc for the remote, I actually use serial for
both transmit and receive on COM1 with an iguanaworks serial
lirc device.

This is a working setup on R5F27.

Cliff


Top
 Profile  
 
 Post subject: will do
PostPosted: Fri May 23, 2008 9:57 am 
Offline
Joined: Tue Mar 28, 2006 8:26 pm
Posts: 804
Location: Minneapolis, MN
Greg,

I will follow your method of having the Sony DSS codes in the /etc/lirc/lircd.conf file. I think I've got everything set, as far as the files go.
I've already had LIRC working with the IR receiver/sender for almost 2 years so I know that is set to go on COM1.
The bootmisc.sh file has this called out in it "setserial /dev/ttyS0 uart none".
I've got a /etc/irblaster/channel_change.sh changed to call out the remote "sony-dss".

Do you think my channel_change.sh will work as shown below? Will the IRSEND command will talk to the serial IR device (/dev/lirc0) without me calling out /dev/lirc0?

I think my next step is to add a PVR-150 card and get the Directv channels entered. I play to use the s-video input on the PVR-150 to capture the analog video from the Sony DSS box.

Here are the relavant files for your review:
Code:
# /etc/irblaster/hardware.conf
#
#  Author: Greg Frost

# The COM Port used by the IRBlaster. Set it to COM1 COM2 or "".
IRBLASTER_SERIAL_PORT=COM1

Code:
#!/bin/bash

# /etc/irblaster/channel_change.sh
# make this script executable ---> chmod +x channel_change.sh

REMOTE_NAME=sony-dss

# send the digits one at a time
for digit in $(echo $1 | sed -e 's/./& /g'); do
sleep 0.2
/usr/bin/irsend SEND_ONCE $REMOTE_NAME $digit
sleep 0.4
done

_________________
KnoppMyth R5.5, Asus A8N-VM CSM (nvidia 6150 onboard video), AMD Athlon 64 dual-core 4200+, two 1GB sticks DDR 400, HD-3000 HDTV card, PVR-150 card, Iguanaworks RS-232 IR receiver/transmitter, Pioneer DVR-110 DVD burner


Last edited by neutron68 on Wed May 28, 2008 8:21 pm, edited 1 time in total.


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 23, 2008 5:44 pm 
Offline
Joined: Mon May 10, 2004 8:08 pm
Posts: 1891
Location: Adelaide, Australia
The irsend command will actually talk to /dev/lircd by default which is a socket file that is created when the lircd daemon is started. I dont think it actually reads the lirc config file at all, but instead passes your irsend request to the lircd daemon which does have knowledge of the config file (/etc/lirc/lircd.conf). When there are two types of lirc interface (e.g hauppauge i2c and a serial receiver/blaster), you need two instances of lirc which is where the irblaster daemon comes in.

If you use a combined serial receive/transmitter you only need one instance of the lirc deamon, and you can actually set it up to use lircd or irblasterd. It is up to you. Since you already have the receiver working using lircd, the transmitter should automatically work as long as the codes are in /etc/lirc/lircd.conf and your irsend command leaves the "-d /dev/irblasterd" bit off so that it defaults to connecting to the /dev/lircd socket.


Top
 Profile  
 
PostPosted: Mon May 26, 2008 1:14 pm 
Offline
Joined: Tue Mar 28, 2006 8:26 pm
Posts: 804
Location: Minneapolis, MN
I've added the PVR-150 card to the system and entered all the Directv channels to Schedules Direct and the Mythtv program guide.
The s-video output of my Sony satellite receiver is connected to the s-video input of the PVR-150 card.
The Iguanaworks IR receiver/transmitter is positioned so that IR transmissions from it will be received by the Sony satellite receiver.

At what times does the IR transmitter actually send IR? Does it only send channel change info during timed recordings? Or does it also send when you use the WatchTV command?

I ask because, I have not been able to change channels on the Sony satellite receiver while in WatchTV mode. Note that I do have valid video on screen from the s-video input of the PVR-150 card when I use the WatchTV command.
I also watched the IR transmitter with a video camera that is sensitive to IR remotes and it did not show any IR signals coming from the transmitter.

Eric

_________________
KnoppMyth R5.5, Asus A8N-VM CSM (nvidia 6150 onboard video), AMD Athlon 64 dual-core 4200+, two 1GB sticks DDR 400, HD-3000 HDTV card, PVR-150 card, Iguanaworks RS-232 IR receiver/transmitter, Pioneer DVR-110 DVD burner


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 26, 2008 3:05 pm 
Offline
Joined: Mon May 10, 2004 8:08 pm
Posts: 1891
Location: Adelaide, Australia
have you entered your channel change command in mythtv-setup?


Top
 Profile  
 
 Post subject: channel change command
PostPosted: Mon May 26, 2008 3:51 pm 
Offline
Joined: Tue Mar 28, 2006 8:26 pm
Posts: 804
Location: Minneapolis, MN
Greg Frost wrote:
have you entered your channel change command in mythtv-setup?

I had entered the channel change command in the mythtv-setup.
After you asked, I doublechecked and I found that I spelled it wrong. :oops:

Thanks for the doublecheck. I would not have looked at that if you hadn't suggested it!

Now I see the IR transmitter blinking when I look at it with my video camera.

Thanks!
Eric

_________________
KnoppMyth R5.5, Asus A8N-VM CSM (nvidia 6150 onboard video), AMD Athlon 64 dual-core 4200+, two 1GB sticks DDR 400, HD-3000 HDTV card, PVR-150 card, Iguanaworks RS-232 IR receiver/transmitter, Pioneer DVR-110 DVD burner


Top
 Profile  
 
 Post subject: the next thing
PostPosted: Mon May 26, 2008 4:12 pm 
Offline
Joined: Tue Mar 28, 2006 8:26 pm
Posts: 804
Location: Minneapolis, MN
Greg,

Now that I've got IR sending going, it is trying to change channels in WatchTV mode but I am seeing odd behavior. I wonder if you have seen similar and can help track down the source.

When trying to change channels in WatchTV mode, the satellite receiver sometimes stays on the same channel it starts on and other times it changes to an unwanted channel. For example, the satellite receiver started on ch.355. With my Mythtv remote, I keyed in 202 then the OK button. The video on screen (from the satellite reveicer into the PVR-150 card) pauses as it it is changing channels. When the video restarts, you can see the satellite receiver is on the same channel as it started and extra numbers (that I didn't enter) being entered one by one. At that point, the receiver changes channels to those numbers (that I didn't enter). Sound familiar?

It's like the numbers being sent are being sent wrong. Do you think I need to add more delay to the sleep commands? Do you think that sending the ENTER command after the numbers is doing this?

Stumped,
Eric

_________________
KnoppMyth R5.5, Asus A8N-VM CSM (nvidia 6150 onboard video), AMD Athlon 64 dual-core 4200+, two 1GB sticks DDR 400, HD-3000 HDTV card, PVR-150 card, Iguanaworks RS-232 IR receiver/transmitter, Pioneer DVR-110 DVD burner


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 27, 2008 1:41 am 
Offline
Joined: Fri Sep 15, 2006 12:16 pm
Posts: 292
Silly question, but are you using the remote that came with the satellite
receiver? If so the satellite receiver might be getting ir signals from both
the remote and the blaster.

If you want to do this you need to position the blaster LED right next to
the satellite receiver eye and cover the whole thing up (I use aluminum
foil, but be careful about shorting it out. The only way to do this on a
LIRC unit that is both a transmitter and a receiver is to put the blaster
LED on a length of wire.

Second possibility: flaky LIRC receiver. You didn't make your own LIRC
receiver out of a photo resistor/transistor did you? You really need to use
an IR receiver chip made especially for this, they have automatic gain
control. I learned this the hard way when the setting sun was shining in
the window.

Third possibility: busy system. I had problems with one system that I
built where LIRC would not work reliably when the system was under a
load (like when you were watching tv). The result was that it worked ok
to get into a show, but was really flaky once the show was playing.

Cliff


Top
 Profile  
 
PostPosted: Tue May 27, 2008 8:03 am 
Offline
Joined: Tue Mar 28, 2006 8:26 pm
Posts: 804
Location: Minneapolis, MN
cliffsjunk wrote:
Silly question, but are you using the remote that came with the satellite
receiver? If so the satellite receiver might be getting ir signals from both
the remote and the blaster.

Good question, actually. No, I'm using an RCA remote as my Mythtv remote. The satellite receiver is a Sony.

I'm using an serial IR transceiver designed by Iguanaworks.
http://iguanaworks.net/products.psp
Note that the receiver part of this has been working fine with the RCA remote for almost 2 years, and is still working fine.

At present, the IR receiver/transmitter is sitting on top of the Sony satellite receiver. I put a sheet of aluminum foil in front of the Sony so the IR would reflect off it and go into the IR sensor of the Sony.

I ran a IRW test last night on both the Sony and RCA remotes. The RCA remote was being read correctly with every button press. The Sony was NOT being read correctly every button press! For example, sometimes I would press a 4 and it would read it as a 2. Perhaps when I first ran IRRECORD, it wasn't getting a perfect read on the Sony remote (low Sony batteries perhaps)?

OK. I just re-ran IRRECORD and got a different answer this time?!
Code:
begin remote

  name  /home/eric/sony-dss-new
  bits           15
  flags SPACE_ENC|CONST_LENGTH
  eps            30
  aeps          100

  header       2425   584
  one          1205   585
  zero          608   585
  gap          44768
  toggle_bit_mask 0x0

      begin codes
          1                        0x00ED
          2                        0x40ED
          3                        0x20ED
          4                        0x60ED
          5                        0x10ED
          6                        0x50ED
          7                        0x30ED
          8                        0x70ED
          9                        0x08ED
          0                        0x48ED
          enter                    0x68ED
          power                    0x54ED
          display                  0x2EED
          ch+                      0x04ED
          ch-                      0x44ED
      end codes

end remote

This file contents seems to be correct when testing the Sony remote with IRW. If I push a 5 on the Sony remote, I see a 5 listed on screen. I got this new data copied into the /etc/lirc/lircd.conf file and rebooted.

A test with WatchTV doesn't give me any erroneous numbers showing up in the satellite receiver's On Screen Display, so I think that is an improvment. But, there is no response from the satellite receiver - no channel change occurs. The screen freezes and the audio stops as if the channel were being changed, but when the video restarts, it's the same channel.

I just ran a timed recording test. I just picked a show from the satellite lineup that was starting in 5 minutes and set it to record. Mythtv started recording using the PVR-150, but the channel did not change. It just recorded the channel the satellite receiver was set to already. Can you tell anything from the mythbackend.log file entry?
Code:
2008-05-28 20:59:56.299 TVRec(3): Changing from None to RecordingOnly
2008-05-28 20:59:56.330 TVRec(3): HW Tuner: 3->3
2008-05-28 20:59:56.396 Channel(/dev/video1) Error: SetInputAndFormat(3, ATSC)
         while setting format (v4l v2)
         eno: Invalid argument (22)
2008-05-28 20:59:56.397 Channel(/dev/video1): SetInputAndFormat(3, ATSC)
         Setting video mode with v4l version 1 worked
2008-05-28 20:59:57.437 ret_pid(0) child(4658) status(0x0)
2008-05-28 20:59:58.476 ret_pid(4658) child(4658) status(0x0)
2008-05-28 20:59:58.478 External Tuning program exited with no error
2008-05-28 20:59:58.656 Started recording: Man Caves "A Home Gym Good Enough for the Goose": channel 2230 on cardid 3, sourceid 2
2008-05-28 21:00:17.945 MainServer::HandleAnnounce Playback
2008-05-28 21:00:17.947 adding: mythtv as a client (events: 0)

If any of the symptoms I've documented are familiar to you, please don't hesitate to relate your experience or solution. It will be much appreciated!

Eric

_________________
KnoppMyth R5.5, Asus A8N-VM CSM (nvidia 6150 onboard video), AMD Athlon 64 dual-core 4200+, two 1GB sticks DDR 400, HD-3000 HDTV card, PVR-150 card, Iguanaworks RS-232 IR receiver/transmitter, Pioneer DVR-110 DVD burner


Top
 Profile  
 

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



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 22 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