SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've been tearing my hair out for days, and Googled for hours on this one! Apparently that's par for the course with LIRC.
(This is very long and the LIRC stuff probably of no interest/comprehension unless you have used it.) My MAIN question here is about the udev part, which I've never touched before, and why the /dev files aren't getting created. This is on Vector Linux 5.8 (Slackware 11 based)
Anyway, I just got an ATI Remote Wonder RF/USB remote. I plugged it in, and right off it's detected as:
input: ATI/X10 RF USB Remote Control(0bc7,0004) as /class/input/input4
and the module "ati_remote" is automatically loaded. It works as a mouse replacement (up to 60' away!) immediately, no configuration required whatsoever, and the a-c letters and 0-9 characters type in a terminal!
My goal however, is to run XMMS from another room. I've read I can use xmodmap and map some of the keys to run xmms, but the way I understand it, I would have to make sure that xmms was the selected window before I left the computer for this to work, and I don't want to worry about that. What I'm trying now is to setup LIRC and the lirc-xmms plugin. I've compiled them both from source, lirc-0.8.2 and lirc-xmms-plugin-1.4. Next I
1. Installed a proper /etc/lircd.conf for my ATI remote (part#5000015900A)
2. Copied
### lirc dev entries
KERNEL=="lirc[0-9]*", NAME="lirc/%n", MODE="0666", SYMLINK+="%k"
to the end of /etc/udev/rules.d/udev.rules
3. Edited an /etc/rc.d/rc.lircd file which starts the daemon lircd:
#!/bin/sh
# Start/stop/restart the LIRC daemon:
#
# To use this daemon, you need to create a file called /etc/lircd.conf
# which shows the mapping of IR signals to buttons on your remote. Many
# remote controls have already been mapped and can be found in
# /usr/share/lirc/remotes. Just copy the file for your remote to
# /etc/lircd.conf. Install the lirc-remotes packages to get config files
# for remotes not covered by the base lirc package. If your remote isn't
# in lirc-remotes, you can create a new config using the 'irrecord' tool.
# See the man page for more info.
#
# You will also need a file mapping IR signals from your remote control to
# applications. This file can be located at /etc/lircrc or $HOME/.lircrc.
# A simple one has been included at /etc/lircrc for xine and xmms to get
# you started. You'll need a xine package that's been compiled with the
# --enable-lirc option (not the default Slackware package) and for xmms
# you'll need the lirc-xmms-plugin which works with the default Slackware
# xmms.
#
# I've only worked with xmms and xine on a laptop IrDA port, so there
# are probably many areas for improvement in this package. I had
# problems compiling under 2.4 so this package is 2.6 only (from /extra).
# If you have suggestions for improving this package, send me a note,
# thanks!
#
# cjm <cj@meidlinger.org> 28 Nov 2006 initial version
#
#
make_devices ()
{
if [ ! -e /dev/lirc ]; then
mknod /dev/lirc c 61 0
chown root.root /dev/lirc
chmod 660 /dev/lirc
fi
if [ ! -e /dev/lirc0 ]; then
mknod /dev/lirc0 c 61 0
chown root.root /dev/lirc0
chmod 660 /dev/lirc0
fi
if [ ! -e /dev/lirc/0 ]; then
mknod /dev/lirc/0 c 61 0
chown root.root /dev/lirc/0
chmod 660 /dev/lirc/0
fi
if [ ! -e /dev/lircd ]; then
mknod /dev/lircd p
chown root.root /dev/lircd
chmod 666 /dev/lircd
fi
if [ ! -e /dev/lircm ]; then
mknod /dev/lircm p
chown root.root /dev/lircm
chmod 666 /dev/lircm
fi
}
lircd_start() {
# clear serial port if necessary
#
# COM1
# setserial /dev/ttyS0 uart none
#
# COM2
# setserial /dev/ttyS1 uart none
# since this service conflicts with IrDA services, we'll load and
# unload modules here in the rc script. If you have a dedicated IR
# receiver, you can load modules in /etc/rc.d/rc.modules and not
# worry about loading/unloading here.
Now I tried both
# /etc/rc.d/rc.udev restart
and rebooting. I am starting lircd with # /etc/rc.d/rc.lircd nodaemon (I guess it should start on it's own during bootup if the remote is plugged in). I get the message:
lircd: lircd(atiusb) ready
However, the device files /dev/lirc0 and /dev/lirc/0 aren't getting made. So, when I start irw, a test app. which calls lircd, I get the following message from lircd, which then dies:
lircd: accepted new client on /dev/lircd
lircd: could not get file information for /dev/lirc/0
lircd: default_init(): Not a directory
lircd: caught signal
/etc/rc.d/rc.lircd: line 120: 4386 Terminated /usr/local/sbin/lircd --nodaemon --device=/dev/lirc/0
If I start mode2, another test app. mode2 gives me this message before dieing:
mode2: error opening /dev/lirc/0
mode2: Not a directory
Sooooo, after all that, any ideas why /dev/lirc/0 doesn't get created? Thanks!
1. Fix incorrect udev.rules, added to /etc/udev/rules.d/udev.rules should have been:
### lirc dev entries
KERNEL=="lirc[0-9]*", NAME="lirc/%n"
KERNEL="lirc0", SYMLINK="lirc"
2. udev needs to restarted after modifying the rules!
3. Needed to disable kernel module which conflicts with lirc, ati_remote.ko. I just renamed it so it couldn't autmatically load when I plugged in the USB receiver.
4. Setup a correct .lircrc in my home directory to match with xmms codes.
I also ended up having to record a new /etc/lircd.conf for my remote, even though the serial # on mine matched what was shown in the file included in the source package, it had different keycodes.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.