[SOLVED] Installed LIRC-0.9.0 on Fedora 14, /dev/lirc was not created, lirc programs won't run
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Installed LIRC-0.9.0 on Fedora 14, /dev/lirc was not created, lirc programs won't run
I installed LIRC-0.9.0 on a fresh 'software developer' installation of Fedora 14 using "sudo yum install lirc-*" as advised by a colleague who is a linux expert. I can run lircd now but when I try to run applications using lircd (irrecord, mode2) I get an error message:
irrecord: could not get file information for /dev/lirc0
irrecord: default_init(): No such file or directory
When I look for /dev/lirc I don't see it, the device was not created during installation. Also, when I type lsmod I don't see any lirc_dev or lirc_serial device in the list.
I'm wondering if using yum package install was a bad idea, maybe I should uninstall and follow the build procedure on lirc.org, although I don't relish the idea of building a kernel just to get lirc running, ugh!
Any recommendations on this?
(I try not to over-pester my colleague with linux questions)
You may just need to reboot, but do you know what IR kernel module you are loading? I believe a driver needs to be properly loaded before anything will show up under /dev/.
At the very least, do you know what IR hardware you have?
Thanks for the reply!
Reboot! Surely you jest, isn't that for Windoz only! (just kidding)
The loadable kernel modules I'm using are lirc_serial.ko and lirc_dev.ko
Interestingly, I was able to get things working if I did 'make', then manually loaded these two modules using insmod. I manually started lircd, then I was able to run mode2 and irrecord successfully, recording all the buttons from my Sony XDR-F1HD Tuner remote (sony_rmt-cf1a.conf).
(When I install lirc_serial.ko manually the device /dev/lirc0 is created so I must use the --device=/dev/lirc0 command line arg (or is it --driver=..., I forget). There is no /dev/lirc device)
I'm still sorting through why 'make install' doesn't work at all for me, I find that VERY strange, since it must be working for many other people out there.
Also, I'm trying to get transmits to work, I have to build lirc_serial.ko with CONFIG_LIRC_SERIAL_TRANSMITTER defined.
I'll reply to myself, I got some key info in a few e-mails that might be useful to other newbie's:
Note: I'm running kernel 2.6.35.6-45.fc14.i686
1) Read the LIRC.ORG documentation but DON'T do everything it says. Fedora 14 (and probably latest versions of other distros) include the loadable kernel modules lirc_*.ko with the distro. Use the loadable kernel modules from the distro, no need to build yours, in fact you'll probably break things if you do 'make install'
2) Just so it's clear to other newbie's: lirc_serial.ko requires that lirc_dev.ko be installed first. lirc_serial.ko also requires control over the serial port so make sure you execute(for COM1): 'sudo setserial /dev/ttyS0 uart none port 0 irq 0' to disable the base system control of COM1 before you install lirc_serial.ko
3) I found that I needed to specify the device /dev/lirc0 because my build defaulted to /dev/lirc which is not created by lirc_serial.ko. On my Fedora 14 install, loading lirc_serial.ko creates the device file /dev/lirc0, so whenever I execute a program such as lircd or irsend I had to specify the device using the cmd line arg '-d /dev/lirc0'
I saw the following 2009 note in the history about lirc0 being the default, I haven't quite figured out why my programs don't default to the correct device, I'll post again when I figure this out.
2009-07-21 - Jarod Wilson 0.8.6-0.3.pre1
- Set up tools to use /dev/lirc0 instead of /dev/lirc by default
I found that most of my issues came from following the installation instructions on lirc.org. I would like to volunteer to update those instructions, especially for users relatively new to Linux that don't know any better (like me!). My updates would need to be reviewed I think since I'm brand new to these forums. Here's what I would add for newbie's on lirc.org:
1) Please read through all the LIRC docmentation to familiarize yourself with the LIRC project and its history. When it is time to setup your Fedora 14 system please follow these updated instructions.
Updated LIRC instructions for users new to Linux.
Getting started with your home-brew serial IR receiver/transmitter:
First: Get lirc running manually:
1) Install Fedora 14, 2.6.35.6-45.fc14.i686 or later
Open a terminal
2) Manually free up the serial port your home-brew hardware will use, in this sample, COM1.
'sudo setserial /dev/ttyS0 uart none port 0 irq 0'
3) Manually load the lirc_dev.ko and lirc_serial.ko loadable kernel modules. First you need
to locate them using the find command:
'sudo find / -name lirc_*.ko'
On my system they were found here:
/lib/modules/2.6.35.6-45.fc14.i686/kernel/drivers/media/IR/lirc_dev.ko
/lib/modules/2.6.35.6-45.fc14.i686/kernel/drivers/staging/lirc/lirc_serial.ko
Load them using insmod, you must load lirc_dev.ko first:
'sudo insmod /lib/modules/2.6.35.6-45.fc14.i686/kernel/drivers/media/IR/lirc_dev.ko'
'sudo insmod /lib/modules/2.6.35.6-45.fc14.i686/kernel/drivers/staging/lirc/lirc_serial.ko'
After lirc_serial.ko is loaded you will see the device file /dev/lirc0 has been created. To allow
any user access to the lirc0 device change the permissions of the device file:
'sudo chmod 666 /dev/lirc0'
4) Install the usermode lirc software using the following command:
'sudo yum install lirc-*'
I'm sure you can do the same thing using the GUI Add/Remove Software tool but I didn't use it.
5) You may need to change permission on the files in /var/run/lirc:
6) Copy your LIRC config file to /etc/lirc/lircd.conf if you have one
7) Run the lircd daemon using its default settings: 'sudo lircd'
Second: To have LIRC startup at system boot time:
(Still on Fedora 14 2.6.35.6-45)
1) Use the "Services" tool to Enable & Start LIRCD at system startup.
2) Add the following lines to your /etc/rc.d/rc.local startup script
# Stop the COM1 module and load the lirc_serial modules
setserial /dev/ttyS0 uart none port 0 irq 0
insmod /lib/modules/2.6.35.6-45.fc14.i686/kernel/drivers/media/IR/lirc_dev.ko
insmod /lib/modules/2.6.35.6-45.fc14.i686/kernel/drivers/staging/lirc/lirc_serial.ko
Note: There are probably smarter ways to disable COMn support
Ubuntu 10.04 LTS setup is similar but not exactly the same.
A notable difference on my Ubuntu setup was that the lirc tools use /dev/lirc by default so you must specify '-d /dev/lircd' for the tools to find the socket and '-d /dev/lirc0' for the tools to find the hardware serial port. Example: irsend needs /dev/lircd while irrecord needs /dev/lirc0, very confusing. I need to confirm this.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.