Author |
Message |
cabl3guy
|
Posted: Mon Apr 24, 2006 9:27 am |
|
Joined: Sun Mar 06, 2005 7:55 pm
Posts: 11
|
Quote: You need the config file for the dct, you put it in /etc/irblaster
Name it irblasterd.conf
the dct2500 one I use is this
# # # # brand: Motorola # model no. of remote control: DCT2000 # devices being controlled by this remote: #
begin remote name DCT2000 bits 16 flags SPACE_ENC|CONST_LENGTH eps 30 aeps 100
header 9036 4424 one 556 2185 zero 556 4424 ptrail 556 gap 100025 toggle_bit 0
begin codes HELP 0x000000000000B3F2 POWER 0x000000000000AFF9 MUTE 0x0000000000000FF7 PAGE+ 0x000000000000A3F3 PAGE- 0x00000000000023FB LOCK 0x00000000000097F6 EXIT 0x000000000000B7F4 OK 0x00000000000077F8 VOL+ 0x0000000000004FF3 VOL- 0x0000000000008FFB LAST 0x00000000000037FC FAV 0x00000000000057FA CH+ 0x0000000000002FF5 CH- 0x000000000000CFFD A 0x00000000000017FE B 0x0000000000001BF1 C 0x000000000000EBF9 1 0x0000000000007FF0 2 0x000000000000BFF8 3 0x0000000000003FF4 4 0x000000000000DFFC 5 0x0000000000005FF2 6 0x0000000000009FFA 7 0x0000000000001FF6 8 0x000000000000EFFE 9 0x0000000000006FF1 0 0x000000000000FFFF BYPASS 0x000000000000D7F2 MUSIC 0x000000000000F7F0 STOP 0x00000000000063FD PAUSE 0x00000000000007FF PLAY 0x000000000000E3F5 REW 0x00000000000087F7 REC 0x00000000000073FC FFWD 0x00000000000047FB end codes
end remote
You also need a channel change script.
mine is in /etc/irblaster
and is named channel_change.sh
Like this
#!/bin/bash
echo "changing to $1"
REMOTE_NAME=DCT2000 # $(grep ^[[:space:]]*name[[:space:]] /etc/irblaster/irblasterd.conf | awk '{ print $2 }')
for digit in $(echo $1 | sed -e 's/./& /g'); do sleep 0.2 /usr/bin/irsend --device=/dev/irblasterd SEND_ONCE $REMOTE_NAME $digit sleep 0.5 done /usr/bin/irsend --device=/dev/irblasterd SEND_ONCE $REMOTE_NAME OK sleep 0.2
Mine is slightly modified to send an OK at the end so I don't have to count on auto tune.
You then need to go into the setup and on that tuner card put the path to the channel change script.
Give that a try
Craig
Gave it a try and it failed to change the channels... I just reloaded a new install and I'm going to try the usual method from: http://losdos.dyndns.org:8080/public/my ... _LIRC.html
I would really to contribute to an "out of the box" solution for the next release. If there is anything I can help to contribute, please let me know.
Craig, could you please document the steps you took from a fresh install in order to setup the IR Blaster with your DCT?
Here are the steps as I understand them from fresh install to a fully functional IR Blaster.
1) Create your DCT config file (irblasterd.conf) in /etc/irblaster
2) Create your channel changing script (change_channel.sh) also in /etc/irblaster and make the file executeable
3) Reboot the PC
4) MythTV Live should now change your channels
Four easy steps to success and far as I know it...
Assumptions I have made are that during the install, you would of selected YES to the IR Blaster questions and set it up on the correct COM Port. Also that your are using the serial IR Blaster and not the USB IR Blaster.
One final thought, is there nothing we have to do with any Lirc config files now?
Let's see if we can hammer out a how to for all of us Rogers/Shaw/Cogeco Myth users.
|
|
Top |
|
 |
grg3
|
Posted: Mon Apr 24, 2006 6:31 pm |
|
Joined: Mon Jan 30, 2006 6:57 pm
Posts: 90
|
I have been happily using my mythbox for a year now and changing channels on my DCT2000 was a easily achieved with a serial cable attached to a USB to Serial adapter.
My new cable company does not open the serial port on their DCT2000 like the last company did. Consequently, I am faced with taking a perfectly good installation and adding irblaster to it or building a new box.
Since my current mythbox does not have a serial port and I have been itching to try my PVR-150 card, I decided to try a new setup on an old computer that has serial ports.
I am quite pleased by how the PVR-150 is detected and setup (as long as it is in a PCI slot the computer likes). The irblaster is really needed for unattended channel changing.
I have been playing with R5b7 all day and aside from the irblaster setup I am ready to go. I have read at least a half a dozen howtos and many of the threads on the forum and after following various howtos without much luck, my head is spinning.
It appears that r5b7 almost works out of the box, but I am not clear on what works and what doesn't. I have tried a couple of different howtos that show how to recompile LIRC to get two separate instances, one for receiver and one for transmitter. Does that still need to be done for R5b7 or it just configuration files?:oops:
This is a very general post because at this point, I would just like to get general guidelines for a step by step configuration for R5b7 irblaster functionality. I have usually been able to solve all my myth problems myself but I a little lost on this one. Please give me an overview and I will be able to go from there.
Thanks in advance to all who can enlighten me! 
|
|
Top |
|
 |
iscraigh
|
Posted: Mon Apr 24, 2006 7:31 pm |
|
Joined: Mon Mar 21, 2005 1:43 pm
Posts: 388
Location:
Nanaimo BC
|
You going to have to follow this post's (sorry other post) troubleshooting step by step to figure out where your problem begins.
Questions to answer
Which com port and are you sure it is correct!
Did you put your conf file in /etc/irblaster?
Did you follow the commands regarding getting irblaster to start after lirc?
What response do you get when you use irsend?
Craig
|
|
Top |
|
 |
iscraigh
|
Posted: Mon Apr 24, 2006 7:33 pm |
|
Joined: Mon Mar 21, 2005 1:43 pm
Posts: 388
Location:
Nanaimo BC
|
|
Top |
|
 |
grg3
|
Posted: Mon Apr 24, 2006 9:21 pm |
|
Joined: Mon Jan 30, 2006 6:57 pm
Posts: 90
|
I tried following that post earlier:
1.remove s20 irblaster update to s21
2.copy irblaster script to /etc/init.d , looks same but copy anyway
3.create hardware.conf in /etc/irblaster
4.create irblasterd.conf in /etc/irblaster (dct200 remote)
5.irsend must be called? Is this the change channel script?
6.create change_chan.sh in irblaster (copy craig's)
Is this the right track?
irblaster was set to COM2 by irblaster.sh
Do I need to use /etc/irblaster/change_chan.sh for the remote channel change control in mythtv-setup?
|
|
Top |
|
 |
iscraigh
|
Posted: Mon Apr 24, 2006 9:34 pm |
|
Joined: Mon Mar 21, 2005 1:43 pm
Posts: 388
Location:
Nanaimo BC
|
Try running Irsend from command prompt
SSH in
You can find the correct command in here somewhere.
Yes in the setup you put the reference for the change channel script
Craig
|
|
Top |
|
 |
Greg Frost
|
Posted: Tue Apr 25, 2006 2:01 am |
|
Joined: Mon May 10, 2004 8:08 pm
Posts: 1891
Location:
Adelaide, Australia
|
cabl3guy wrote: I would really to contribute to an "out of the box" solution for the next release. If there is anything I can help to contribute, please let me know.
Well, It would be nice to know if the suggested procedure for getting the blaster to work (the second post in the thread already referenced by iscraigh http://mysettopbox.tv/phpBB2/viewtopic. ... =irblaster ) actually works on your (and anyone elses) system. The next release will do all of this for you and also prompt you for what device you are controlling so it can install the irblasterd.conf file for you and create a channel change script (so long as you have provided me with the irblasterd.conf file required for the device you are controlling).
However if you have already tried other methods such as http://losdos.dyndns.org:8080/public/my ... _LIRC.html , ymmv, because the instructions are supposed to work off of a base r5b7 install. iscraigh helped me iron out a few issues with his hardware configuration by arranging a time where we could work on it whilst chatting over skype (he also have me ssh access which helped).
|
|
Top |
|
 |
Greg Frost
|
Posted: Tue Apr 25, 2006 2:29 am |
|
Joined: Mon May 10, 2004 8:08 pm
Posts: 1891
Location:
Adelaide, Australia
|
grg3 wrote: 2.copy irblaster script to /etc/init.d , looks same but copy anyway If it looks exactly the same you must be doing something wrong. It should look similar though. grg3 wrote: 3.create hardware.conf in /etc/irblaster The only thing you need to define in there when using the new irblaster script is: Code: IRBLASTER_SERIAL_PORT=COM2 grg3 wrote: 4.create irblasterd.conf in /etc/irblaster (dct200 remote) I assume you mean DCT2000. If not, and there is such a thing as a dct200, you should supply me with a conf file. grg3 wrote: 5.irsend must be called? Is this the change channel script? That was just an example of how you need to call irsend in your channel change script. grg3 wrote: 6.create change_chan.sh in irblaster (copy craig's) Not sure which one you are referring to, but so long as the call to irsend looks as shown in my post, it should work. grg3 wrote: Is this the right track? pretty close so far. grg3 wrote: Do I need to use /etc/irblaster/change_chan.sh for the remote channel change control in mythtv-setup? Yes, I kind of omitted that because I use my blaster just to control my TV (i have mapped some buttons on my remote to call irsend). I dont use a channel change script. I might go back and edit the post to make that a bit clearer.
|
|
Top |
|
 |
iscraigh
|
Posted: Tue Apr 25, 2006 8:47 am |
|
Joined: Mon Mar 21, 2005 1:43 pm
Posts: 388
Location:
Nanaimo BC
|
Greg
The only difference in my change channel script is that I have irsend send (ok that seems like really bad english) an OK to my digital box. By doing this it speeds up the channel change on the box, it no longer waits for the third digit to be entered befor changing.
Craig
|
|
Top |
|
 |
grg3
|
Posted: Tue Apr 25, 2006 5:42 pm |
|
Joined: Mon Jan 30, 2006 6:57 pm
Posts: 90
|
Greg
Thanks for the response! Good to know I am on the right track. I havent' had time to play with it today. I will give it a another try tonight.
Sorry for all the typos last night, I was half asleep.
|
|
Top |
|
 |
grg3
|
Posted: Tue Apr 25, 2006 6:56 pm |
|
Joined: Mon Jan 30, 2006 6:57 pm
Posts: 90
|
I moved the change channel script to /usr/local/bin and tried it out. This is the result:
> /usr/local/bin/change_chan.sh 10
changing to 10
/usr/bin/irsend: could not connect to socket
/usr/bin/irsend: No such file or directory
/usr/bin/irsend: could not connect to socket
/usr/bin/irsend: No such file or directory
/usr/bin/irsend: could not connect to socket
/usr/bin/irsend: No such file or directory
I'll go back trough and make sure that I didn't mess up something. Any hints are welcome! 
|
|
Top |
|
 |
Greg Frost
|
Posted: Tue Apr 25, 2006 7:35 pm |
|
Joined: Mon May 10, 2004 8:08 pm
Posts: 1891
Location:
Adelaide, Australia
|
Have you rebooted since setting everything up so that things get loaded in the right order?
Also, type Code: set -x before running your channel change script so that I can see what commands are being executed.
That socket error suggests you have either specified the wrong socket device for irsend to use or the irblasterd daemon is not running.
|
|
Top |
|
 |
grg3
|
Posted: Wed Apr 26, 2006 7:37 pm |
|
Joined: Mon Jan 30, 2006 6:57 pm
Posts: 90
|
Greg,
I did some double checking on my configuration and found the irblaster script in init.d was blank! Fixed that and rebooted again.
The demon seems to be running but trying the change_chan.sh script fails and apparently kills the process. I tried to follow the troubleshooting suggestions from the sticky and this is some of what I tried:
> /etc/init.d/irblaster restart
Stopping irblaster daemon: irblasterdNo process in pidfile `/var/run/irblasterd.pid' found running; none killed.
Starting irblaster daemon:.
> grep -A1 lirc_serial: /var/log/messages
Apr 26 20:37:52 mythtv kernel: lirc_serial: auto-detected active low receiver
Apr 26 20:37:52 mythtv kernel: lirc_dev: lirc_register_plugin: sample_rate: 0
--
Apr 26 20:44:47 mythtv kernel: lirc_serial: auto-detected active low receiver
Apr 26 20:44:47 mythtv kernel: lirc_dev: lirc_register_plugin: sample_rate: 0
--
Apr 26 20:51:24 mythtv kernel: lirc_serial: auto-detected active low receiver
Apr 26 20:51:24 mythtv kernel: lirc_dev: lirc_register_plugin: sample_rate: 0
> ps ax | grep blaster
5598 ? Ss 0:00 /usr/sbin/irblasterd --driver=default --device=/dev/irblaster --pidfile=/var/run/irblasterd.pid --output=/dev/irblasterd /etc/irblaster/irblasterd.conf
5613 ? S 0:00 sh -c (ps ax | grep blaster) 2>&1
5614 ? S 0:00 sh -c (ps ax | grep blaster) 2>&1
5616 ? S 0:00 grep blaster
> change_chan.sh 10
changing to 10
/usr/bin/irsend: could not connect to socket
/usr/bin/irsend: Connection refused
/usr/bin/irsend: could not connect to socket
/usr/bin/irsend: Connection refused
> ps ax | grep blaster
5642 ? S 0:00 sh -c (ps ax | grep blaster) 2>&1
5643 ? S 0:00 sh -c (ps ax | grep blaster) 2>&1
Here is the change script I am using:
#!/bin/bash
echo "changing to $1"
REMOTE_NAME=DCT2000
# $(grep ^[[:space:]]*name[[:space:]] /etc/irblaster/irblasterd.conf | awk '{ print $2 }')
for digit in $(echo $1 | sed -e 's/./& /g'); do
sleep 0.2
/usr/bin/irsend --device=/dev/irblasterd SEND_ONCE $REMOTE_NAME $digit
sleep 0.5
done
/usr/bin/irsend --device=/dev/irblasterd SEND_ONCE $REMOTE_NAME OK
sleep 0.2
hardware.conf=
# /etc/irblaster/hardware.conf
#
# Author: Greg Frost
# The COM Port used by the IRBlaster. Set it to "COM1" "COM2" or "".
IRBLASTER_SERIAL_PORT="COM2"
# Set this to the lirc device that will be used by lirc_serial. In my case
# it is /dev/lirc. I have a USB remote, so my remote does not use the
# /dev/lirc device, so it is used by lirc_serial for my ir blaster. If you
# have a remote that uses /dev/lirc, the blaster may user /dev/lirc1. Not
# sure.
IRBLASTER_DEVICE="/dev/lirc1"
This is what the links in rc5.d look like:
> ls -la /etc/rc5.d/*ir*
lrwxrwxrwx 1 root root 14 Apr 24 21:55 /etc/rc5.d/S20lirc -> ../init.d/lirc
lrwxrwxrwx 1 root root 19 Apr 24 23:09 /etc/rc5.d/S21irblaster -> ../init.d/irblaster
iIrblaster.conf contains the commands for the DCT2000.
Is there a step I am leaving out? Thanks for your help!
|
|
Top |
|
 |
iscraigh
|
Posted: Wed Apr 26, 2006 7:47 pm |
|
Joined: Mon Mar 21, 2005 1:43 pm
Posts: 388
Location:
Nanaimo BC
|
In the hardware.conf take out the irblaster line completely. all that is needed is the com port.
Craig
|
|
Top |
|
 |
Greg Frost
|
Posted: Wed Apr 26, 2006 8:41 pm |
|
Joined: Mon May 10, 2004 8:08 pm
Posts: 1891
Location:
Adelaide, Australia
|
If you restart the irblaster daemon again Code: /etc/init.d/irblaster restart And then run the command Code: irsend -d /dev/irblasterd SEND_ONCE DCT2000 1 Does it give the same error
i.e
/usr/bin/irsend: could not connect to socket
/usr/bin/irsend: Connection refused?
Is it at that point that the irblasterd daemon dies?
What does ls -la /dev/irblaster* look like when the daemon is running?
|
|
Top |
|
 |