LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-04-2011, 07:00 PM   #1
Z_Tagr
Member
 
Registered: Jul 2011
Distribution: Slackware 13.37
Posts: 59
Blog Entries: 1

Rep: Reputation: Disabled
Question Setting up lirc / loading lircd


Hello again!

This time I need some pointers on getting lirc (lircd, more specifically) to LOAD.

I was reading the lirc manual, and I became totally confused! It is meant for ANY DISTRO, and begins at such a "early" stage of the process that I got lost! I have a Hauppauge WinTV PVR 150 tv / capture card INSTALLED and WORKING FINE (now, thanks to a lot of help from you good folks out there!); that card has the IR receiver that I will use, as well as the sensor that detects the IR signals...

I believe that all DRIVERS are installed that I require, but I can't be sure! The lirc manual talks about "rebuilding the kernel" and such, and I really don't think that I will need to do this with Slackware 13.37, will I? I have performed an:
"ls -l /dev/lirc*"

and no device was found! Is the "lirc" device not supposed to be called "/dev/lirc" or "/dev/lirc0" or something similiar? Or would I only see this device AFTER the lircd daemon is running? Gosh, this seems convoluted! I'm still not grasping some fundamental concepts here!

So, what I need help doing is :

1) What do I need to do to get the lircd daemon up and running? How do I test for this after I have performed the steps?

2) I know that the lirc package from SlackBuilds comes with a hauppauge version for the .lircd.conf file, named "lircd.conf.hauppauge", as well as a lircmd.conf file named "lircmd.conf.hauppauge"; I believe that I simply need to copy these two files to their correct location ("/etc", and NOT "/etc/lirc" as the documentation for lirc maintains?) renaming them (respectfully) "lircd.conf" and "lircmd.conf"; what else must I do before I can get the lircd daemon running? Can someone provide me with a sample commandline to perform the loading?

3) When I try and run "lircd", I get the following message:

"lircd: can't open or create /var/run/lirc/lircd.pid"
"lircd: No such file or directory"

What does this mean, exactly? I don't know anything about "sockets", so I don't know what I am looking at, here!

With any help you might provide, please give PROFUSE EXPLANATIONS about what each step is doing, and where I might find more info. on the subject(s)! I really want to LEARN how to do this stuff, but, for right now, it's all just a little too confusing! I am pretty sure I know how to utilize apps. like "irexec" to perform a task when a specific key on my remote is pressed, and I can fairly well follow along with the other docs. I have encountered on using an IR remote to control specific tasks; now I just need to load the daemon!

For specifics, I am running the 32-bit version of Slackware 13.37, and I have never re-compiled the kernel or anything like that!
My system is still "cherry"!

I think maybe just getting me to a point in the lirc manual where the lircd daemon is "up and running", so that I can IGNORE all of the preliminary, non-pertinent info. would be what I am actually after, because I am fairly certain that a LOT of the early parts of the manual do NOT apply to those of us using Slackware 13.37!? Am I correct in my thinking here?

Thanks in advance!

Yours,
Andre. (Z_Tagr)
 
Old 10-04-2011, 07:27 PM   #2
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
Well you fix the error with 'mkdir -p /var/run/lirc'

I've never used lirc so can't answer about the rest.
 
Old 10-05-2011, 10:26 AM   #3
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
LIRC is not a friendly app. Even after you get the hardware working, you'll spend much time tweaking the various configuration files for your system.

First verify udev is loading the lirc kernel modules:

/sbin/lsmod | grep lirc

You should see something like this:

lirc_dev
lirc_mceusb

If the modules are not loaded, then try manually loading:

modprobe lirc

If that fails then check your package. There should be several modules installed:

find /lib/modules/`uname -r` -name '*lirc*'

Bear in mind the kernel does not need rebuilding, but the lirc package must be built specifically for each kernel.

The slackbuilds.org package does not provide an rc.d startup script. You can find a copy of my rc.d script at my web site:

http://humanreadable.nfshost.com/files/rc.lircd
http://humanreadable.nfshost.com/files/shell-colors

If you study that script you can see what should happen to get the lirc daemon running correctly.

When you get that far use the irw command to test your hardware.

Thereafter you can focus on the configuration files.
 
Old 10-19-2011, 05:27 PM   #4
Z_Tagr
Member
 
Registered: Jul 2011
Distribution: Slackware 13.37
Posts: 59

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Question

Thanks for your response, Woodsman! Sorry I didn't get back to the forum sooner,
but I have been working on sevweral other projects as well...

Your response to my posted question was extremely helpful! Let me tell you how I proceeded using your suggestions...

First off, I used lsmod | grep lirc, and I got NADA! So then I tried to load just the "lirc" module (as you suggested) with:
"modprobe lirc"

and of course was told that "Module lirc not found".

Then I did a search for all modules with the word "lirc" in them (also as you suggested), and received the following list:

/lib/modules/2.6.37.6-smp/kernel/drivers/media/IR/ir-lirc-codec.ko
/lib/modules/2.6.37.6-smp/kernel/drivers/media/IR/keymaps/rc-lirc.ko
/lib/modules/2.6.37.6-smp/kernel/drivers/media/IR/lirc_dev.ko
/lib/modules/2.6.37.6-smp/kernel/drivers/staging/lirc
/lib/modules/2.6.37.6-smp/kernel/drivers/staging/lirc/lirc_sasem.ko
/lib/modules/2.6.37.6-smp/kernel/drivers/staging/lirc/lirc_serial.ko
/lib/modules/2.6.37.6-smp/kernel/drivers/staging/lirc/lirc_it87.ko
/lib/modules/2.6.37.6-smp/kernel/drivers/staging/lirc/lirc_ite8709.ko
/lib/modules/2.6.37.6-smp/kernel/drivers/staging/lirc/lirc_i2c.ko
/lib/modules/2.6.37.6-smp/kernel/drivers/staging/lirc/lirc_zilog.ko
/lib/modules/2.6.37.6-smp/kernel/drivers/staging/lirc/lirc_sir.ko
/lib/modules/2.6.37.6-smp/kernel/drivers/staging/lirc/lirc_bt829.ko
/lib/modules/2.6.37.6-smp/kernel/drivers/staging/lirc/lirc_igorplugusb.ko
/lib/modules/2.6.37.6-smp/kernel/drivers/staging/lirc/lirc_parallel.ko
/lib/modules/2.6.37.6-smp/kernel/drivers/staging/lirc/lirc_ttusbir.ko
/lib/modules/2.6.37.6-smp/kernel/drivers/staging/lirc/lirc_imon.ko
/lib/modules/2.6.37.6-smp/misc/lirc_dev.ko
/lib/modules/2.6.37.6-smp/misc/lirc_atiusb.ko
/lib/modules/2.6.37.6-smp/misc/lirc_i2c.ko
/lib/modules/2.6.37.6-smp/misc/lirc_igorplugusb.ko
/lib/modules/2.6.37.6-smp/misc/lirc_imon.ko
/lib/modules/2.6.37.6-smp/misc/lirc_sasem.ko
/lib/modules/2.6.37.6-smp/misc/lirc_serial.ko
/lib/modules/2.6.37.6-smp/misc/lirc_sir.ko
/lib/modules/2.6.37.6-smp/misc/lirc_ttusbir.ko
/lib/modules/2.6.37.6-smp/misc/lirc_wpc8769l.ko

Now, I just had a "feeling" (or, maybe I recalled something...), but I thought that I should try and load the "lirc_i2c.ko" driver...; so I typed:
"modprobe lirc_i2c"

And after this, I typed:
"/etc/rc.d/rc.lircd start"

and finally I received a "successful" response:

Starting the LIRC daemon:
/usr/sbin/lircd -d /dev/lirc/0 --release
Creating /dev/lircd sym link to /var/run/lirc/lircd.
/dev/lircd exists.
Starting the irexec daemon:
/usr/bin/irexec -d /etc/lircrc


Then, I tried lsmod | grep lirc AGAIN (to confirm), and this time I received:

lirc_i2c 5606 0
lirc_dev 8087 1 lirc_i2c
i2c_core 16421 14 lirc_i2c,i915,tuner_simple,drm_kms_helper,wm8775,drm,tuner,cx25840,ivtv,v4l2_common,videodev,i2c_alg o_bit,tveeprom,i2c_i801


I am NOT SURE. but I think that "lirc_i2c.ko" IS the correct driver I need? Do you know?

Anyways, I am farther along now than I was!

Thanks a TON!!!

However, I am still having difficulty determining whether or not the system is actually recognizing button-presses on the remote! I know that a lirc driver is RUNNING, but I have yet to actually have irexec DO ANYTHING in response to my remote! I tried using irw, but get no responses to buttone presses on the remote AT ALL (and I have tried ALL of my Hauppauge-based lircd.conf data files)!

I have a small collection of different "data sets" for the lircd.conf file that are SUPPOSED to be hauppauge-remote parameters, but, so far, none of them have worked!

I have also tried to use the "irrecord" app., but I can not seem to get it to work! I keep getting
different error messages! Here is the outputs from one of my attempts:

> irrecord
irrecord - application for recording IR-codes for usage with lirc

Copyright (C) 1998,1999 Christoph Bartelmus(lirc@bartelmus.de)

irrecord: could not get file information for /dev/lirc
irrecord: default_init(): No such file or directory
irrecord: could not init hardware (lircd running ? --> close it, check permissions)

Yes, lircd WAS RUNNING...; so how do I "check permissions" for it? I know about FILE permissions, and about program execution permissions, but if I have already RAN "rc.lircd" successfully, then what could be wrong with "permissions" in this case? I really do not understand what it wants me to do here! And, what is "default_init()? I didn't see anythin about it in the docs. / man pages...!

The source of my earlier problem with this situation was that I did not even know how to CHECK to see if a specific driver was loaded or not, so you really helped me out a lot! I just really do not know how to proceed at this point...; if I could just get the system to acknowledge ONE BUTTON PRESS on the remote, I think I'd have it all squared!!!

Thanks again for all of your help!

Andre. (Z_Tagr)
 
Old 10-20-2011, 12:48 PM   #5
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
According to this page the i2c driver seems correct. You might want to read that page for other tips about the remote.

I don't know why the lirc_i2c driver is not being loaded automatically. You might want to look into that.

Using irw is not obvious. Open a terminal window and run the command. Nothing will happen until you start pressing buttons with the remote control device. Terminate irw by pressing Ctrl-C. If you are seeing no response then my first guess is the lircd.conf file is incorrect. This page might help: http://wiki.linuxmce.org/index.php/A...0_Remote_Setup

I don't remember the reasons or story, but I ran into similar problems with respect to /dev/lirc. If you look at my rc.lircd startup script, you'll notice I run a check for /dev/lirc. If that device node does not exist my script creates a sym link to /var/run/lirc/lircd.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Installed LIRC-0.9.0 on Fedora 14, /dev/lirc was not created, lirc programs won't run FalkiD Linux - Software 4 06-06-2011 09:33 AM
Lirc (lirc_dev) causing a Bad EIP on lircd stop conn-fused Linux - Software 0 03-12-2007 08:36 AM
Lirc (lircd) acting strangely when tested with irw conn-fused Linux - Software 0 03-11-2007 05:29 AM
Lirc vs. Lircd jagot Linux - Hardware 2 06-19-2006 01:34 AM
lirc lircd installation freevo mimsmall Fedora 1 05-11-2004 07:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration