LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Dell remote (RC1974009/MR268) with lirc (https://www.linuxquestions.org/questions/linux-hardware-18/dell-remote-rc1974009-mr268-with-lirc-848052/)

lpallard 12-02-2010 08:18 PM

Dell remote (RC1974009/MR268) with lirc
 
I am trying to get a remote controller running on my slack64 13.1 machine and need some guidance. I know the computer sees the remote because of the steps below. I also understand I need to put a config file in the /etc/lirc folder.

The remote controller is Dell RC1974009/00 (Dell MR268) with USB receiver and as far as I know, is built by Philips. Look at http://www.techexcess.net/mr268-dell...974009-00.aspx

The lirc website does not have lircd.conf file for this remote. I checked in the philips & dell subdirs.

So far here's what I did:

Load lirc_mcdusb & lirc_dev modules using modprobe (I tried lirc_mceusb2 as well) They nornally load automatically at boot time.

Start lircd with
Code:

/usr/sbin/lircd -d /dev/lirc/0
. lircd automatically start at boot time, but I think it doesnt use the -d switch with /dev/lirc/0 as my command above.

Tested with running
Code:

cat /dev/lirc/0
When I press the remote keys, I see output in the terminal. Sign that the computer sees the remote no?

But irw shows no output whatsoever.

I tried to create a custom lircd.conf file using irrecord but I get:

Code:

root@htpc:/etc/lirc# irrecord dell_usb

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)

whats wrong?

Thanks

cnxsoft 12-03-2010 09:18 AM

Looks like irrecord is expecting /dev/lirc to be the device node, and not a directory. Maybe you need to specify the device is /dev/lirc/0:

irrecord -d /dev/lirc/0 dell_usb

lpallard 12-03-2010 04:33 PM

thanks for replying to my question! I tried the command as ytou suggested and it worked! I recorded my remote to a file named dell_usb and then copied the file as lircd.conf to /etc/lirc/

Then I restarted the lirc daemon and tried irw, but no output... There seems to be no lircd.conf file already prepared for this remote...

lpallard 01-08-2011 01:49 PM

OK I tried for a few weeks now to get this lirc crap to work and still no go. I know I shouldn't get frustrated but eh...

Now I have 3 remotes I can try with. Here's my setup:

-Slackware64 13.1 with lirc 0.8.6 (stock from slack)
-A DELL MR425 mini remote that came with my XPS laptop (http://www.battery-online.org/images/MR425.jpg)
-A DELL RC1974009 (Philips?) remote that also came with my XPS laptop. THis remote also came with its own IR receiver. It is described in my previous posts. (http://www.txcesssurplus.com/catalog...te-control.jpg)
-A new logitech harmony One remote.

Basically I am at the same exact spot as I was when I opened this thread. Seems that everybody are setting up lirc differently and everything I try fails...

I am not going to use the dell remotes on my htpc, but will definitely use the logitech one. So basically I can use the dell remotes to troubleshoot, test and play around to make sure the system works, but ultimately I need the harmony to work.

Here's what I did so far:
1-Because I couldn't find a conf file for the RC1974XXXX remote (seems that nobody uses this one) I went to http://lirc.sourceforge.net/remotes/dell/MR425 to retrieve the lircd.conf file for my dell mr425 remote and saved it as /etc/lircd.conf

2-killed lircd (there is no rc script to start/stop this process?)

3-plugged the IR received in the USB port

4-started lircd with... "lircd" ...

5-typed "irw" to test the remote => no output whatsoever... :(

this is where I am.

I'd be extremely thankful for any indications or instructions.

thanks guys!

lpallard 01-08-2011 02:40 PM

As a side note, my machine just crashed (due to the abysmal ati video card) and upon rebooting, I realized that I've lost all lirc drivers.

Quote:

root@htpc:/home/lpallard# modprobe lirc_mceusb
FATAL: Module lirc_mceusb not found.

root@htpc:/home/lpallard# modprobe lirc_dev
FATAL: Module lirc_dev not found.
What the **** is going on with this machine?

lpallard 01-09-2011 08:40 PM

EDIT: I tried to install lirc from the git site and I think it failed, trying to start it was complaining about missing shared libraries...

Lirc must be the most poorly documented thing I've seen in a long time. How can I reinstall the modules? Debian users and ubuntu users are discussing about lirc-modules-sources but doing tons of googling and research with slackware in the keywords returns only insugnificant results and primitive results.

Where can I get the drivers? I swear I did not uninstall the modules, not coming by the means of a package I would have had a hard time to remove them...

Thanks!

cnxsoft 01-10-2011 03:59 AM

LIRC drivers are inside the tar file: http://prdownloads.sourceforge.net/l...-0.8.7.tar.bz2

lpallard 01-10-2011 06:51 AM

OK I had the same thing with 0.8.6, I saw the drivers in the drivers folder of the source files, but I am clueless as to how to compile them cause I need to compile them right? Then after compilation, where I should dump them so lirc can find them? I guess its modprobe that will load/unload the modules right?

Other question I have: considering that I want to use my logitech harmony remote, I think the lirc_mceusb2 module is what I need (I will double check that) but it is not included in the src files, so can i get the code somewhere else and compile/install independently of the other drivers from the lirc sources?
Once I have the modules installed, I will retry with a proper lirc.conf file and go from there.

Thanks to all!

cnxsoft 01-10-2011 11:40 PM

They have decent documentation in the tar files.
You can check the INSTALL file (or if it not engouh doc/html/index.html) to see how to compile and install lirc (including the modules).

Quote:

./setup.sh && make install
might be enough to install lirc daemon and modules.

For the second question "Historically, there were separate 1st-gen and 2nd-gen drivers, lirc_mceusb and lirc_mceusb2. They were merged into a single lirc_mceusb driver as of lirc 0.8.6". Source: http://www.mythtv.org/wiki/MCE_Remote

lpallard 01-11-2011 09:25 PM

Ok you are right about the lirc_mceusb module... it has been merged with lirc_mceusb2 that is now obsolete:

Quote:

The functionality of the lirc_mceusb2 driver has been merged into the lirc_mceusb driver. The lirc_mceusb2 driver is now obsolete and has been removed. You should use lirc_mceusb from now on.
Now that I installed lirc 0.8.7 and its modules, I searched for the lircd daemon to start it and went, according to the INSTALL file in the source files in /usr/bin/. Here's what I have there:

Quote:

ircat* irexec* irpty* irrecord* irsend* irw* irxevent* libmikmod-config* lircrcd* mediareader/ mode2* pronto2lirc* sensors* sensors-conf-convert* smode2* xmode2*
How come lircd is not there? Where it should be?

lpallard 01-13-2011 09:40 PM

OK good news... AT least I got past the last steps.

Because of sound issues, I had to upgrade my kernel and now I am using kernel 2.6.37 and lirc 0.9.0-pre1 (the last release 0.8.7 would not run on this new kernel)

now lirc is properly installed, configured and all modules are installed and loading without glitches. I still cant use the remotes. Basically, irw will not generate any output. This might be associated to several problems, but looking at my /var/log/lircd log, I've found these lines:

Jan 13 22:30:00 htpc lircd: lircd(default) ready, using /var/run/lirc/lircd
Jan 13 22:30:04 htpc lircd: accepted new client on /var/run/lirc/lircd
Jan 13 22:30:04 htpc lircd: could not get hardware features
Jan 13 22:30:04 htpc lircd: this device driver does not support the LIRC ioctl interface
Jan 13 22:30:04 htpc lircd: major number of /dev/lirc/0 is 244
Jan 13 22:30:04 htpc lircd: LIRC major number is 61
Jan 13 22:30:04 htpc lircd: check if /dev/lirc/0 is a LIRC device
Jan 13 22:30:04 htpc lircd: WARNING: Failed to initialize hardware
Jan 13 22:30:23 htpc lircd: removed client


Thatd be why irw dont output anything. I am confused as to how to interpret this ???

Anybody??

Thanks!

cnxsoft 01-13-2011 11:36 PM

lirc 0.9.0-pre1 has been tested with kernel 2.6.36.

It apparently does not work with kernel 2.6.37, but can be fixed: http://old.nabble.com/mceusb-broken-...d30210223.html

lpallard 01-14-2011 08:29 AM

So seems to be a patch necessary to recompile mceusb and reinstall it...

Can you indicate what to do with this link?
http://git.kernel.org/?p=linux/kerne...5b93e055df7853

its not the first time I am facing patching drivers or modules and I have no clue how to use git sites like this one above...

Thanks cnxsoft!!

cnxsoft 01-14-2011 11:46 PM

Quote:

Originally Posted by lpallard (Post 4224126)
So seems to be a patch necessary to recompile mceusb and reinstall it...

Can you indicate what to do with this link?
http://git.kernel.org/?p=linux/kerne...5b93e055df7853

its not the first time I am facing patching drivers or modules and I have no clue how to use git sites like this one above...

Thanks cnxsoft!!

No need to use git, simply copy the patch on this link starting:
Quote:

--- a/drivers/media/rc/mceusb.c
+++ b/drivers/media/rc/mceusb.c
@@ -47,6 +47,7 @@
#define USB_BUFLEN 32 /* USB reception buffer length */

and ending
Quote:

- mceusb_dev_printdata(ir, ir->buf_in, i, ir->rem + 1, false);
+ mceusb_dev_printdata(ir, ir->buf_in,
+ i, ir->rem + 1, false);
if (ir->rem)
ir->parser_state = PARSE_IRDATA;
break;
Save it to a file .e.g mceusb.patch

Then apply the patch to the kernel directory, something like:
Quote:

patch -p1 < mceusb.patch

lpallard 01-17-2011 05:17 PM

The patch seems to apply to mceusb.c which resides in my new kernel sources at /usr/src/linux-2.6.37/drivers/media/IR/

does it means that I need to patch this file and then recompile the whole kernel???

also I patched the file, and got this output:

Quote:

ash-4.1# patch -p1 < mceusb.patch
patching file drivers/media/IR/mceusb.c
Hunk #1 FAILED at 47.
Hunk #2 FAILED at 91.
Hunk #3 FAILED at 314.
Hunk #4 FAILED at 331.
Hunk #5 FAILED at 340.
Hunk #6 FAILED at 422.
Hunk #7 FAILED at 543.
Hunk #8 succeeded at 840 with fuzz 1 (offset 39 lines).
Hunk #9 FAILED at 887.
Hunk #10 FAILED at 916.
9 out of 10 hunks FAILED -- saving rejects to file drivers/media/IR/mceusb.c.rej
Good or bad?


All times are GMT -5. The time now is 07:35 PM.