
tyrstag at earthlink
Jan 7, 2005, 8:18 AM
Post #1 of 1
(2722 views)
Permalink
|
|
OT: Second instance of LIRC not needed
|
|
Hi Everyone, Because I was having a hard time compiling a second instance of LIRC to control my DishNetwork receiver(pvr-250 receiver is working fine controlling MythTV, BTW), I shot an e-mail to the LIRC-list. I got a reply from Christoph asking why I wanted to compile a new instance, since my pvr-250 was working correctly. He explained to me that current versions of LIRC can be loaded multiple times with different drivers. (Don't get too excited yet, the ATRPMS package lirc-0.7.0-42.rhfc3.at.i386.rpm doesn't have serial transmit enabled. I've submitted a package request to Bugzilla and hopefully Axel will find the time to create a new package. Axel - I know it's not a high priority.) All that needs to be done is: Quoted from Christoph: "If you want to use more than one device that uses a kernel module you should now have a look at the character device setup in /dev/. Each LIRC kernel module provides a device with major number 61 and a minor number beginning at 0 which is counted up every time a new driver is loaded (note: both the major number and the minor number concept are subject to change in future LIRC releases). If you want to use two devices then the LIRC related files in /dev/ should look something like this (this might be done automatically if you are using devfs or sysfs):" $ ls -l /dev/lirc* crw-r--r-- 1 root root 61, 0 Jan 6 19:01 /dev/lirc srw-rw-rw- 1 root root 0 Jan 6 19:53 /dev/lircd You can create new entries by running: $ mknod /dev/lirc1 c 61 1 $ ls -l /dev/lirc* crw-r--r-- 1 root root 61, 0 Jan 6 19:01 /dev/lirc crw-r--r-- 1 root root 61, 1 Jan 6 19:01 /dev/lirc1 srw-rw-rw- 1 root root 0 Jan 6 19:53 /dev/lircd srw-rw-rw- 1 root root 0 Jan 6 19:28 /dev/lircd1 In modprobe.conf you need something like: alias char-major-61-0(<notice the -0 added) lirc_i2c install lirc_i2c /sbin/modprobe ivtv; /sbin/modprobe --ignore-install \ lirc_i2c alias char-major-61-1 lirc_serial options lirc_serial irq=4 io=0x3f8 install lirc_serial setserial /dev/ttyS0 uart none; /sbin/modprobe \ --ignore-install lirc_serial To start the daemon you use something like: $ /usr/sbin/lircd --driver=default --device=/dev/lirc1 \ --output=/dev/lircd1 --pidfile=/var/run/lircd1.pid When using irsend you use the "device" option to tell irsend which lircd to use: $ irsend --device=/dev/lirc1 SEND_ONCE JVC_RAW 2 The "Something like" reference is because I can't actually test if it's working and I'm not sure those are exactly the right commands. Without transmit enabled in LIRC I've been getting: irsend: command failed: SEND_ONCE JVC_RAW 2 irsend: hardware does not support sending I think that's a good sign though, it means that the daemon is trying to send the output to the serial port from the correct daemon. (I think) Anyway, I hope this will help the people like me out there who are not completely fluent in linux and were either having a hard time compiling or didn't want to try. --Pete
|