LinHES Forums
http://forum.linhes.org/

HomeMade Ir device how to use?
http://forum.linhes.org/viewtopic.php?f=2&t=10048
Page 1 of 2

Author:  madsholme [ Mon May 15, 2006 8:13 am ]
Post subject:  HomeMade Ir device how to use?

Hi

i got a homemade ir device, how do i use it with Knopmyth?

i tryed to look at the wiki, but it seems to be outdated?

isent there a easy way to just test if my ir device works?

should i be able to do a cat /dev/ttyS1 and then catch garbage or?

I got a logitech remote, so i need to do the lirc record config thing in order to get the codes for the keys, but first i need to figure out how to get lirc to run, can any help here?

Author:  Greg Frost [ Mon May 15, 2006 5:13 pm ]
Post subject: 

Is that a homebrew transmitter (irblaster) or a homebrew receiver?

For a transmitter, the second post in this thread should get you going:
http://mysettopbox.tv/phpBB2/viewtopic.php?t=9352

Author:  madsholme [ Tue May 16, 2006 4:04 am ]
Post subject: 

its a home made reciever

at least i think that´s the one.. I dont even know if it works, i had it work in an older Knoppmyth, but now i cant remember how the hell i did it.

isent there a easy way to check if it works? cat /dev/ttsy1 or something like that?

Author:  Greg Frost [ Tue May 16, 2006 5:15 am ]
Post subject: 

for a receiver, you run mode2, point a remote at it and start pressing buttons. If all is well, you should start seeing things (pulse timing info) written to standard output.

If you configure your box for a blaster as described in that previous post, then you would use the command:
mode2 -d /dev/irblaster

man mode2 for more info.

cat /dev/ttyS1 will not work because it doesnt use the com port data lines.

Author:  madsholme [ Tue May 16, 2006 6:08 am ]
Post subject: 

i did what that guide said, am i supposed to do anything else? run some kind of script?

Code:
root@mythtv:~# dmesg | grep lirc
lirc_dev: IR Remote Control driver registered, at major 61
root@mythtv:~#


Code:
root@mythtv:~# dmesg | grep serial
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
root@mythtv:~#


if i run that mode2 thing i get:

Code:
root@mythtv:~# mode2 -d /dev/ttyS1
This program is only intended for receivers supporting the pulse/space layer.
Note that this is no error, but this program simply makes no sense for your
receiver.
In order to test your setup run lircd with the --nodaemon option and
then check if the remote works with the irw tool.


if i run that irblaster script i get:

Code:
root@mythtv:~# /usr/local/bin/irblaster.sh
Do you have an IR Blaster?
y
Which comm port is the blaster attached to?
a) COM1
b) COM2
c) COM3
d) COM4

a
/usr/local/bin/irblaster.sh: line 45: /etc/init.d/irblaster: Permission denied
 System startup links for /etc/init.d/irblaster already exist.
irsend: could not connect to socket
irsend: No such file or directory
root@mythtv:~#


sorry for being a dum ass, oh btw the wiki is down?

Author:  Greg Frost [ Tue May 16, 2006 5:57 pm ]
Post subject: 

Make /etc/init.d/irblaster executable with the following command:
Code:
chmod a+x /etc/init.d/irblaster

The device you should be specifying with the mode2 command is /dev/irblaster, not /dev/ttyS1

Author:  madsholme [ Wed May 17, 2006 3:44 am ]
Post subject: 

Code:
root@mythtv:~# /etc/init.d/irblaster start
grep: /etc/irblaster/irblasterd.conf: No such file or directory
/etc/init.d/irblaster: line 56: /etc/modprobe.d/KnoppMyth: Permission denied
/etc/init.d/irblaster: line 91: /tmp/sys_class_lirc_after_lirc_serial: Permission denied
cat: /sys/class/lirc/0a1: No such file or directory
cat: >: No such file or directory
cat: include: No such file or directory
cat: /etc/mythtv/modules/lirc_serial/dev: Not a directory
cat: /sys/class/lirc/0a1: No such file or directory
cat: >: No such file or directory
cat: include: No such file or directory
cat: /etc/mythtv/modules/lirc_serial/dev: Not a directory
mknod: when creating special files, major and minor device
numbers must be specified
Try `mknod --help' for more information.
Starting irblaster daemon:start-stop-daemon: need at least one of --exec, --pidfile, --user or --name
Try `start-stop-daemon --help' for more information.
/etc/init.d/irblaster: line 115: --startas: command not found
/etc/init.d/irblaster: line 116: --: command not found
/etc/init.d/irblaster: line 117: --pidfile=/var/run/irblasterd.pid: No such file or directory
/etc/init.d/irblaster: line 118: /etc/irblaster/irblasterd.conf: No such file or directory
.
root@mythtv:~#


Code:
root@mythtv:~# /usr/local/bin/irblaster.sh
Do you have an IR Blaster?
y
Which comm port is the blaster attached to?
a) COM1
b) COM2
c) COM3
d) COM4

a
grep: /etc/irblaster/irblasterd.conf: No such file or directory
/etc/init.d/irblaster: line 56: /etc/modprobe.d/KnoppMyth: Permission denied
/etc/init.d/irblaster: line 91: /tmp/sys_class_lirc_after_lirc_serial: Permission denied
cat: unrecognized option `---'
Try `cat --help' for more information.
cat: unrecognized option `---'
Try `cat --help' for more information.
mknod: when creating special files, major and minor device
numbers must be specified
Try `mknod --help' for more information.
Starting irblaster daemon:start-stop-daemon: need at least one of --exec, --pidfile, --user or --name
Try `start-stop-daemon --help' for more information.
/etc/init.d/irblaster: line 115: --startas: command not found
/etc/init.d/irblaster: line 116: --: command not found
/etc/init.d/irblaster: line 117: --pidfile=/var/run/irblasterd.pid: No such file or directory
/etc/init.d/irblaster: line 118: /etc/irblaster/irblasterd.conf: No such file or directory
.
 System startup links for /etc/init.d/irblaster already exist.
irsend: could not connect to socket
irsend: No such file or directory
root@mythtv:~#


it still dosent seem to wanna run?

Author:  Greg Frost [ Wed May 17, 2006 4:02 am ]
Post subject: 

Whatever you did to copy the /etc/init.d/irblaster script from the post to your system seems to have royally screwed it. Try again. Make sure that you dont end up with dos style line endings and make sure that it is executable. Also make sure that you dont inadvertantly break lines.

Author:  madsholme [ Wed May 17, 2006 10:40 am ]
Post subject: 

just redid it, and this time i used WinSCP to edit the files with, so i wouldent get that dos space error thing.. how ever i still get the same error...

Code:
root@mythtv:~# /etc/init.d/irblaster start
grep: /etc/irblaster/irblasterd.conf: No such file or directory
/etc/init.d/irblaster: line 56: /etc/modprobe.d/KnoppMyth: Permission denied
/etc/init.d/irblaster: line 91: /tmp/sys_class_lirc_after_lirc_serial: Permission denied
cat: unrecognized option `---'
Try `cat --help' for more information.
cat: unrecognized option `---'
Try `cat --help' for more information.
mknod: when creating special files, major and minor device
numbers must be specified
Try `mknod --help' for more information.
Starting irblaster daemon:start-stop-daemon: need at least one of --exec, --pidfile, --user or --name
Try `start-stop-daemon --help' for more information.
/etc/init.d/irblaster: line 115: --startas: command not found
/etc/init.d/irblaster: line 116: --: command not found
/etc/init.d/irblaster: line 117: --pidfile=/var/run/irblasterd.pid: No such file or directory
/etc/init.d/irblaster: line 118: /etc/irblaster/irblasterd.conf: No such file or directory
.
root@mythtv:~# /usr/local/bin/irblaster.sh
Do you have an IR Blaster?
y
Which comm port is the blaster attached to?
a) COM1
b) COM2
c) COM3
d) COM4

a
grep: /etc/irblaster/irblasterd.conf: No such file or directory
/etc/init.d/irblaster: line 56: /etc/modprobe.d/KnoppMyth: Permission denied
/etc/init.d/irblaster: line 91: /tmp/sys_class_lirc_after_lirc_serial: Permission denied
cat: unrecognized option `---'
Try `cat --help' for more information.
cat: unrecognized option `---'
Try `cat --help' for more information.
mknod: when creating special files, major and minor device
numbers must be specified
Try `mknod --help' for more information.
Starting irblaster daemon:start-stop-daemon: need at least one of --exec, --pidfile, --user or --name
Try `start-stop-daemon --help' for more information.
/etc/init.d/irblaster: line 115: --startas: command not found
/etc/init.d/irblaster: line 116: --: command not found
/etc/init.d/irblaster: line 117: --pidfile=/var/run/irblasterd.pid: No such file or directory
/etc/init.d/irblaster: line 118: /etc/irblaster/irblasterd.conf: No such file or directory
.
 System startup links for /etc/init.d/irblaster already exist.
irsend: could not connect to socket
irsend: No such file or directory
root@mythtv:~#


I did make it executable, like you told me previous..

also it seems dev dosent hold any irblaster?

Code:
root@mythtv:~# mode2 -d /dev/irblaster
mode2: error opening /dev/irblaster
mode2: No such file or directory
root@mythtv:~#

Author:  Greg Frost [ Wed May 17, 2006 9:03 pm ]
Post subject: 

/dev/irblaster gets created by /etc/init.d/irblaster.
If it is not working correctly, it will not create it.
Does root have access to edit /etc/modprobe.d/KnoppMyth? This is required.
Have you copied a lirc config file to /etc/irblaster/irblasterd.conf?

Author:  madsholme [ Thu May 18, 2006 8:51 am ]
Post subject: 

Greg Frost wrote:
/dev/irblaster gets created by /etc/init.d/irblaster.
If it is not working correctly, it will not create it.
Does root have access to edit /etc/modprobe.d/KnoppMyth? This is required.
Have you copied a lirc config file to /etc/irblaster/irblasterd.conf?


I havent copyed a lirc config go etc/irblaster/irblaster.conf
as i need to use the key record program to create the keys for my remote? i have a Logitech Harmony 525

and last tme i got it work, with lircd, i had to first get the serial ir device to work, then i recoreded my keys, and assigned them names. Then i copyed that conf to lirc, and then i sat up what key that should do what in the system.

Author:  Greg Frost [ Thu May 18, 2006 8:58 pm ]
Post subject: 

That may be a bit of a hole in the way it works. I suggest just puting any old lircd.conf file in as /etc/irblaster/irblaster.conf. Otherwise, the irblasterd daemon will not be started for you.

Author:  madsholme [ Fri May 19, 2006 6:08 am ]
Post subject: 

Then i just get:

Code:
root@mythtv:~# /etc/init.d/irblaster start                                      /etc/init.d/irblaster: line 20:  : command not found
/etc/init.d/irblaster: line 56: /etc/modprobe.d/KnoppMyth: Permission denied
/etc/init.d/irblaster: line 91: /tmp/sys_class_lirc_after_lirc_serial: Permission denied
cat: unrecognized option `---'
Try `cat --help' for more information.
cat: unrecognized option `---'
Try `cat --help' for more information.
mknod: when creating special files, major and minor device
numbers must be specified
Try `mknod --help' for more information.
Starting irblaster daemon:start-stop-daemon: need at least one of --exec, --pidfile, --user or --name
Try `start-stop-daemon --help' for more information.
/etc/init.d/irblaster: line 115: --startas: command not found
/etc/init.d/irblaster: line 116: --: command not found
/etc/init.d/irblaster: line 117: --pidfile=/var/run/irblasterd.pid: No such file or directory
/etc/irblaster/irblasterd.conf: line 24: begin: command not found
/etc/irblaster/irblasterd.conf: line 26: name: command not found
/etc/irblaster/irblasterd.conf: line 27: bits: command not found
/etc/irblaster/irblasterd.conf: line 28: flags: command not found
/etc/irblaster/irblasterd.conf: line 28: CONST_LENGTH: command not found
/etc/irblaster/irblasterd.conf: line 29: eps: command not found
/etc/irblaster/irblasterd.conf: line 30: aeps: command not found
/etc/irblaster/irblasterd.conf: line 32: header: command not found
/etc/irblaster/irblasterd.conf: line 33: one: command not found
/etc/irblaster/irblasterd.conf: line 34: zero: command not found
/etc/irblaster/irblasterd.conf: line 35: ptrail: command not found
/etc/irblaster/irblasterd.conf: line 36: repeat: command not found
/etc/irblaster/irblasterd.conf: line 37: pre_data_bits: command not found
/etc/irblaster/irblasterd.conf: line 38: pre_data: command not found
/etc/irblaster/irblasterd.conf: line 39: gap: command not found
/etc/irblaster/irblasterd.conf: line 40: toggle_bit: command not found
/etc/irblaster/irblasterd.conf: line 42: frequency: command not found
/etc/irblaster/irblasterd.conf: line 43: duty_cycle: command not found
/etc/irblaster/irblasterd.conf: line 45: begin: command not found
/etc/irblaster/irblasterd.conf: line 47: POWER: command not found
/etc/irblaster/irblasterd.conf: line 48: MENU: command not found
/etc/irblaster/irblasterd.conf: line 49: FM: command not found
/etc/irblaster/irblasterd.conf: line 50: PC/TV: No such file or directory
/etc/irblaster/irblasterd.conf: line 52: VOL_UP: command not found
/etc/irblaster/irblasterd.conf: line 53: VOL_DOWN: command not found
/etc/irblaster/irblasterd.conf: line 54: CH_UP: command not found
/etc/irblaster/irblasterd.conf: line 55: CH_DOWN: command not found
/etc/irblaster/irblasterd.conf: line 57: 1: command not found
/etc/irblaster/irblasterd.conf: line 58: 2: command not found
/etc/irblaster/irblasterd.conf: line 59: 3: command not found
/etc/irblaster/irblasterd.conf: line 60: 4: command not found
/etc/irblaster/irblasterd.conf: line 61: 5: command not found
/etc/irblaster/irblasterd.conf: line 62: 6: command not found
/etc/irblaster/irblasterd.conf: line 63: 7: command not found
/etc/irblaster/irblasterd.conf: line 64: 8: command not found
/etc/irblaster/irblasterd.conf: line 65: 9: command not found
/etc/irblaster/irblasterd.conf: line 66: RETURN: command not found
/etc/irblaster/irblasterd.conf: line 67: 0: command not found
/etc/irblaster/irblasterd.conf: line 68: DISPLAY: command not found
/etc/irblaster/irblasterd.conf: line 70: HELP: command not found
/etc/irblaster/irblasterd.conf: line 71: SCAN: command not found
/etc/irblaster/irblasterd.conf: line 72: OSD: command not found
/etc/irblaster/irblasterd.conf: line 73: OPTIONS: command not found
/etc/irblaster/irblasterd.conf: line 75: MUTE: command not found
/etc/irblaster/irblasterd.conf: line 76: MTS: command not found
/etc/irblaster/irblasterd.conf: line 77: VIDEO: command not found
/etc/irblaster/irblasterd.conf: line 78: CC: command not found
/etc/irblaster/irblasterd.conf: line 80: RED: command not found
/etc/irblaster/irblasterd.conf: line 81: GREEN: command not found
/etc/irblaster/irblasterd.conf: line 82: YELLOW: command not found
/etc/irblaster/irblasterd.conf: line 83: BLUE: command not found
/etc/irblaster/irblasterd.conf: line 84: end: command not found
/etc/irblaster/irblasterd.conf: line 86: end: command not found
.
root@mythtv:~#

Author:  Greg Frost [ Fri May 19, 2006 6:59 pm ]
Post subject: 

Your script must still be horribly screwed up.
Can you post the output of:
Code:
cat /etc/init.d/irblaster

Author:  Greg Frost [ Sat May 20, 2006 2:08 am ]
Post subject: 

madsholme, the R5C7 has been released. It has all of the irblaster updates, so upgrading to that should hopefully solve your problems.

Page 1 of 2 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/