Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
lircd hates me!!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
eriq
n00b
n00b


Joined: 25 Jan 2004
Posts: 31

PostPosted: Wed Dec 08, 2004 4:18 am    Post subject: lircd hates me!! Reply with quote

OK, I have a WinTV BT878 tvcard with a silver hauppauge remote. I am using TVTime because it ROCKS!! Kicks XawTV's butt concerning dual display setups. Anyway, I have emerged lirc 0.7.0 with hauppauge driver support to get the lirc_i2c module, and I have i2c support enabled as a module in my kernel-2.6.9-gentoo-r9 (I am using udev).

I have double checked my setup with the directions here http://www.lirc.org/html/configure.html#lircd.conf. My directory for /dev:

Code:

ls -la /dev/lir*
crw-rw-rw-  1 root root 61, 0 Nov 28 10:20 /dev/lirc
srw-rw-rw-  1 root root     0 Dec  7 22:38 /dev/lircd
prw-r--r--  1 root root     0 Dec  7 22:23 /dev/lircm


I have the correct /etc/lircd.conf for my Hauppauge remote and I have setup my /etc/.lircrc for TVTime as per the directions here http://tvtime.sourceforge.net/lirc.html.

One of the issues I have is that the lircd daemon dies:
Code:

Dec  7 22:38:31 kosmo lircd 0.7.0: lircd(hauppauge) ready
Dec  7 22:41:41 kosmo lircd 0.7.0: accepted new client on /dev/lircd
Dec  7 22:41:41 kosmo lircd 0.7.0: could not get file information for /dev/lirc0
Dec  7 22:41:41 kosmo lircd 0.7.0: default_init(): No such file or directory
Dec  7 22:41:41 kosmo lircd 0.7.0: caught signal
/var/log/lircd (END)


I read another post where /dev/lirc0 was mknod'ed. Is this part of the normal installation because I couldn't find it in the docs? I emerged my lirc via:
Code:

ACCEPT_KEYWORDS="~x86" WANT_AUTOCONF=2.5 LIRC_OPTS="--with-driver=hauppauge" emerge lirc


Here's an lsmod:
Code:

 lsmod
Module                  Size  Used by
lirc_i2c                9476  0
lirc_dev               14604  1 lirc_i2c
ohci_hcd               35204  0
snd_bt87x              14664  3
snd_emu10k1            99336  3
snd_rawmidi            26660  1 snd_emu10k1
snd_ac97_codec         72144  1 snd_emu10k1
snd_util_mem            5632  1 snd_emu10k1
snd_hwdep              10884  1 snd_emu10k1
hw_random               6548  0
rtc                    13768  1
e1000                  86660  0
tuner                  21156  0
tvaudio                23840  0
bttv                  156620  1
video_buf              22276  1 bttv
firmware_class         11264  1 bttv
i2c_algo_bit           10632  1 bttv
v4l2_common             7040  1 bttv
btcx_risc               5768  1 bttv
i2c_core               25088  5 lirc_i2c,tuner,tvaudio,bttv,i2c_algo_bit
videodev               10880  2 bttv
nvidia               3465212  12


I'm sure I forgot to add some helpful piece of information. Thanks for the suggestions. Hopefully I can get this working so I can be COMPLETELY lazy :=)
Back to top
View user's profile Send private message
Sipi
Guru
Guru


Joined: 03 Apr 2003
Posts: 406
Location: Hungary

PostPosted: Wed Dec 08, 2004 9:09 am    Post subject: Reply with quote

Emerging lirc with the --with-driver option cause to install the appropriate config files, too. So, you will get the correct lircrc in /etc, and you will get a /etc/conf.d/lircd file. Here you can select which device lircd should use.

Sometimes it is misconfigured. Default, it should be /dev/lircd/0. But I see you have no such directory... (I think it means it will never work, but keep trying.)
Change the device line to whatever you have on your machine (I think it should be /dev/lircd in your case), rmmod lirc_i2c and lirc_dev and restart lircd.

You should test if it works with irw: start irw, and press buttons. If you immediately get to prompt, it has device problems. If no don't get any text written to the console, there is some config problem.
Usually, you should get the button names printed on the console.

Sipi
Back to top
View user's profile Send private message
eriq
n00b
n00b


Joined: 25 Jan 2004
Posts: 31

PostPosted: Wed Dec 08, 2004 11:56 pm    Post subject: Reply with quote

I seem to be unable to start the lircd process which always fails in reference to /dev/lirc0 even if I specify /dev/lircd or /dev/lirc or /dev/lirc/0 in my /etc/conf.d/lircd. I'm not sure where the problem is, if it is udev or what but lircd refuses to start and gives the error message below. I have remerged lirc but still no go. Thanks for the ideas.

Code:

tail /var/log/lircd
Dec  7 22:38:31 kosmo lircd 0.7.0: lircd(hauppauge) ready
Dec  7 22:41:41 kosmo lircd 0.7.0: accepted new client on /dev/lircd
Dec  7 22:41:41 kosmo lircd 0.7.0: could not get file information for /dev/lirc0Dec  7 22:41:41 kosmo lircd 0.7.0: default_init(): No such file or directory
Dec  7 22:41:41 kosmo lircd 0.7.0: caught signal


I am thinking this is udev related because of the line:
Code:

Dec  7 22:41:41 kosmo lircd 0.7.0: could not get file information for


Is there something I am missing?
Back to top
View user's profile Send private message
Sipi
Guru
Guru


Joined: 03 Apr 2003
Posts: 406
Location: Hungary

PostPosted: Thu Dec 09, 2004 11:06 am    Post subject: Reply with quote

If lircd wants to use /dev/lirc0, try setting this in /etc/conf.d/lircd.

However, udev has some issues. I don't use udev, but the forum has some topics regading to lirc and udev - please, search for it, as I can't help more.
(I don't want to mess up my working system with trying udev. :) )

Sipi
Back to top
View user's profile Send private message
eriq
n00b
n00b


Joined: 25 Jan 2004
Posts: 31

PostPosted: Thu Dec 09, 2004 12:04 pm    Post subject: Reply with quote

I've already tried that. I will search again and find the udev mknod post. I may file this as a bug in the ebuild.
Back to top
View user's profile Send private message
ivor_orrible
n00b
n00b


Joined: 09 Nov 2003
Posts: 44
Location: 127.0.0.1

PostPosted: Fri Dec 10, 2004 7:03 am    Post subject: Reply with quote

I had the same problem using devfs. In the end I had to add a line to local.start and not use the /etc/init.d/lircd script stop lircd and run lircd from a console as root using the -d to set the device to what device you have and the -p flag to set permissions on device for everyone 777
Then test the remote.


Ivor Cave
Back to top
View user's profile Send private message
Sipi
Guru
Guru


Joined: 03 Apr 2003
Posts: 406
Location: Hungary

PostPosted: Fri Dec 10, 2004 10:05 am    Post subject: Reply with quote

If the only modifications you did are the change of device to use and -p for permissions, it is not needed to kill the correct /etc/init.d way of daemons.
You can set these settings into /etc/conf.d/lircd file.
Just append "-p 777 -de /dev/lirc/0" to the line.

Sipi
Back to top
View user's profile Send private message
eriq
n00b
n00b


Joined: 25 Jan 2004
Posts: 31

PostPosted: Sat Dec 11, 2004 2:52 am    Post subject: Reply with quote

Thanks for the tips. I have not tried all of them yet, but I am as I write this. I have looked at some suggestions from this post: https://forums.gentoo.org/viewtopic.php?t=71148&highlight=lircd. Basically I can get lirc to start now, but with the following:
Code:

/usr/local/sbin/lircd -d /dev/lirc -p 777


Is there a need to do this if I do the above?
Code:

mkdir /dev/lirc
mknod -m 0660 /dev/lirc/lirc0 c 61 0


However, I think I have a more serious problem. If I do:
Code:

cat /proc/bus/input/devices
I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
H: Handlers=kbd event0
B: EV=120013
B: KEY=4 2000000 3802078 f840d001 f2ffffdf ffefffff ffffffff fffffffe
B: MSC=10
B: LED=7

I: Bus=0003 Vendor=046d Product=c50e Version=2500
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:1d.0-1/input0
H: Handlers=kbd mouse0 event1
B: EV=120007
B: KEY=ffff0000 10000 0 0 0 0 0 0 0
B: REL=103
B: LED=fc00


I get two listings, the first being my keyboard and the second being my MX1000 mouse. Shouldn't I be seeing some sort of infrared device listing? My TV card is a Hauppaugge WinTV Pro with the infrared port built in on the card. I do not use a serial interface for my IR. I am using the Hauppaugge silver remote that came with the card. Lirc states there is full support for this remote. There are two drivers the Hauppaugge (requires I2C) and the Hauppauge DVB driver. I am using the former and have I2C setup correctly - lm_sensors works fine. Thanks for the help.
Back to top
View user's profile Send private message
eriq
n00b
n00b


Joined: 25 Jan 2004
Posts: 31

PostPosted: Sat Dec 11, 2004 3:10 pm    Post subject: Reply with quote

OK, just out of curiosity I plugged in an ATI remote control and got this dmesg output. There wasn't anything else populated in /proc/bus/input/devices so that's correct.

Code:

usb 2-2: new low speed USB device using address 3
usb 2-2: new device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-2: default language 0x0409
usb 2-2: Product: USB Receiver
usb 2-2: Manufacturer: X10 Wireless Technology Inc
usb 2-2: hotplug
usb 2-2: adding 2-2:1.0 (config #1, interface 0)
usb 2-2:1.0: hotplug


I then started lirc via the following command:
Code:

/usr/local/sbin/lircd -d /dev/lirc -p 777


I then tried to record some IR commands from the remote by running:
Code:

irrecord ir.tmp

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

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

irrecord: could not open /dev/lirc
irrecord: default_init(): No such device
irrecord: could not init hardware (lircd running ? --> close it, check permissions)


So this tells me that my structure under /dev for lirc is borked and my Hauppauge remote is fine, which is good because I like it better than the ATI. The question is how to fix my /dev entries and get lirc satisfied. Again, I am running kernel-gentoo-2.6.9-r9 with udev. I have tried the following with creating my entries in /dev.

After installing lirc the following is in /dev:
Code:

ls -la /dev/lirc*
crw-r--r--  1 root root 61, 0 Dec 11 09:39 /dev/lirc
prw-r--r--  1 root root     0 Dec 11 09:39 /dev/lircd
prw-r--r--  1 root root     0 Dec 11 09:39 /dev/lircm


I then start the lirc process and ps shows the command I started it with and that it is running:
Code:

21877 ?        Ss     0:00 /usr/local/sbin/lircd -d /dev/lirc -p 777


I then try and capture some IR data and get:

Code:

irrecord ir.tmp

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

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

irrecord: could not open /dev/lirc
irrecord: default_init(): No such device
irrecord: could not init hardware (lircd running ? --> close it, check permissions)


So then since this failed miserably I manually created the devices via the following:

Code:

mkdir /dev/lirc
mknod /dev/lirc/lirc0 c 61 0


My /etc/conf.d/lircd matches the above node:
Code:

LIRCD_OPTS="-d /dev/lirc/lirc0"


Not concerned about security at the moment, just rying to get this working I did:
Code:

chmod 755 /dev/lirc -R


After this I again tried to capture some IR data but got:
Code:

 irrecord ir.tmp

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

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

irrecord: could not open /dev/lirc
irrecord: default_init(): Is a directory
irrecord: could not init hardware (lircd running ? --> close it, check permissions)


I have also tried the following:
Code:

mode2 -d /dev/lirc/lirc0
mode2: error opening /dev/lirc/lirc0
mode2: No such device


This is in my /var/log/lircd:
Code:

Dec 11 09:27:56 kosmo lircd 0.7.0: caught signal
Dec 11 09:28:24 kosmo lircd 0.7.0: lircd(hauppauge) ready
Dec 11 09:38:30 kosmo lircd 0.7.0: caught signal
Dec 11 09:41:13 kosmo lircd 0.7.0: lircd(hauppauge) ready
Dec 11 09:47:08 kosmo lircd 0.7.0: caught signal
Dec 11 09:49:42 kosmo lircd 0.7.0: lircd(hauppauge) ready


I'm not giving up. If you guys think of anything please let me know. I want some infrared action!![/b]
Back to top
View user's profile Send private message
ivor_orrible
n00b
n00b


Joined: 09 Nov 2003
Posts: 44
Location: 127.0.0.1

PostPosted: Sun Dec 12, 2004 10:46 am    Post subject: Reply with quote

Sipi wrote:
If the only modifications you did are the change of device to use and -p for permissions, it is not needed to kill the correct /etc/init.d way of daemons.
You can set these settings into /etc/conf.d/lircd file.
Just append "-p 777 -de /dev/lirc/0" to the line.

Sipi


I tried that and no matter what was in /etc/conf.d/lircd lirc always
tried to use /dev/lirc not /dev/lirc/0 the only way around this seemed
to be to start lircd manually maybe its because i use ~x86 packages.

Just a heads up as I had lirc working for ages but couldn't use it because of
this. Ended up doing numerous kernel compiles that weren't needed.

Ivor Cave
Back to top
View user's profile Send private message
Sipi
Guru
Guru


Joined: 03 Apr 2003
Posts: 406
Location: Hungary

PostPosted: Mon Dec 13, 2004 10:14 am    Post subject: Reply with quote

Hi,

first, if you start lircd from /usr/local/bin, than it is not emerged by portage, since it moves the binary to /usr/bin. So, it is a manual install, thus it will not use Gentoo's /etc/conf.d settings.

You will not see anything in dmesg when plugging in. You should see some strings only when modprobe lirc_i2c, saying new device detected, etc. I think it is a 3 lines message.
But it is not USB bus, so you will not see anything in USB logs.

Device should not be /dev/lirc. I think it must be /dev/lircd. (BTW, I don't know why you don't have /dev/lirc/lirc0 or /dev/lirc/0. It MUST be the device, but since you don't have it, you should try the lircd devices, not lirc.)

So, if you use a hand-made install, not portage, than forget the conf.d lircd file. Use command line parameters. I think you MUST have /dev/lircd/* directory, so there should be a problem with compiled modules. Maybe wrong configure parameters?
Or, you should try this existing installation with -d /dev/lircd parameter to start.

Should you try to uninstall this lirc installation and emerge it from portage?
Dont't forget to do it with LIRC_OPTS="--with-driver=hauppauge" emerge lircd. (If you have the original Hauppauge, but for testing you shoudl try it with hauppauge_dvb. :) )

Sipi
Back to top
View user's profile Send private message
eriq
n00b
n00b


Joined: 25 Jan 2004
Posts: 31

PostPosted: Sun Dec 19, 2004 4:09 am    Post subject: Reply with quote

I built lirc from the normal source and not an ebuild because of an emerge error. I haven't spent too much time searching the forum for this but if I do an:

Code:

LIRC_OPTS="--with-driver=hauppauge" emerge lirc

I get:
Code:

You will have to use the lirc_i2c kernel module.

Now enter 'make' and 'make install' to compile and install the package.

 * /usr/src/linux is a symbolic link
 * Determining the real directory of the Linux kernel source code
 * Building for Linux 2.6.9-gentoo-r9 found in /usr/src/linux
 * which outputs to /usr/src/linux
 * By not using the kernel's ability to output to an alternative
 * directory, some external module builds may fail.
 * See <insert link to user doc here>
 * Due to the 2.6 kernel build system, external module compilation
 * with a normal setup requires write access to //usr/src/linux
 * There are several ways to fix/prevent this.
 * Users can willingly let portage make this writable by doing
 * # config-kernel --allow-writable yes
 * However, this is considered a security risk!
 *
 * The prefered method is to enable Gentoo's new 'koutput' method
 * for kernel modules. See the doc
 * http://www.gentoo.org/doc/en/2.6-koutput-user.xml
 * To enable this, you'll need to run
 * # config-kernel --output-dir /var/tmp/kernel-output
 * and then install a new kernel

!!! ERROR: app-misc/lirc-0.7.0_pre7 failed.
!!! Function kmod_make_linux_writable, Line 207, Exitcode 0
!!! Incompatible kernel setup
!!! If you need support, post the topmost build error, NOT this status message.


At some point in my lirc compilation process I do vaguely remember a successful install from emerge lirc, but that experience seems to escape me at the moment. I was curious as to this bug filed here: https://bugs.gentoo.org/show_bug.cgi?id=54518.

I recently did a full rebuild of my system based on my wanting for XFS and the NPTL glibc seg fault bug. As soon as I get a good install of lirc I will resume getting it working with tvtime again. Thanks...
Back to top
View user's profile Send private message
Syfte
n00b
n00b


Joined: 17 Dec 2004
Posts: 1

PostPosted: Sun Dec 19, 2004 6:07 am    Post subject: Reply with quote

I had that problem myself , don't worry ... just read what the msg tells you.
What you need to do is to enable emerge (lirc for our specific case) to access
and write to /usr/src/linux dir :

Go and read this :
http://www.gentoo.org/doc/en/2.6-koutput-user.xml
Do
Code:
config-kernel --allow-writable=yes

*** you need to emerge config-kernel first

Then re-compile you're kernel with that enabled . then when you'll re-emerge lirc
it would be able to access the dir and make the modules .

Other problem i had while trying to make lirc work :
1. A clash between 8250 (serial driver) and the lirc serial driver:
the 8250 compiled to the kernel loaded vefore the lirc driver and blocked
my (com1 in my case) , so lirc said com1 was already in use .

fix:
compile both the 8250 serial driver and the lirc and modules .


then i did :


Code:

     modprobe 8250
     setserial /dev/ttyS0 uart none
     modprob lirc_serial
     /etc/init.d/lircd start
   



Hope it'll work out for you , and don't forget ....

127.0.0.1 - There's no place like home :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum