LinHES Forums
http://forum.linhes.org/

Where is lirc's hardware.conf? [SOLVED]
http://forum.linhes.org/viewtopic.php?f=23&t=21180
Page 1 of 1

Author:  otoh [ Wed Jun 30, 2010 3:24 pm ]
Post subject:  Where is lirc's hardware.conf? [SOLVED]

Just trying out LinHES (6.03) after my previous Mythbuntu install went AWOL, and so far it looks like a nicer, more integrated distro.

Having trouble setting up my remote using a Hauppauge Nova-T DVB-T USB Stick and the IR receiver therein. I had all manner of fun setting this up on MythTV, so I'm more familiar than I really wanted to be with the various config files involved.

As I did under Myth, I'd like to check/change the path to the IR receiver. However, I don't seem to have a /etc/lirc and therefore no /etc/lirc/hardware.conf.

Sorry if I'm missing something really obvious here...

Author:  mihanson [ Wed Jun 30, 2010 7:05 pm ]
Post subject: 

Try checking out the service menu. Off the top of my head...

Main Menu > Service Menu > LinHES Config > Remotes (?)

Author:  graysky [ Thu Jul 01, 2010 3:14 am ]
Post subject: 

Search is your friend: http://knoppmyth.net/phpBB2/viewtopic.p ... light=lirc

Author:  otoh [ Thu Jul 01, 2010 3:18 am ]
Post subject: 

Thanks for the reply - I had a look there but whatever I select in remote and receiver type, I don't have any luck.

I had the same issue in MB, and had to tell explicitly tell lirc the path to my receiver, after which it worked. But to do that, I had to edit /etc/lirc/hardware.conf which should be in any lirc install, but I don't even have /etc/lirc.

I do have /etc/lircd.conf, the remote frequency/button mappings; and /etc/lircrc, the key and function mappings for MythTV). But no hardware.conf, which tells it the /dev path to the receiver itself.

Author:  otoh [ Thu Jul 01, 2010 3:22 am ]
Post subject: 

graysky wrote:


Oops sorry, posted at the same time as you - thanks for the link, but I already found the lircd.conf and the lircrc, which I understand from my previous MB install.

I'm still mystified as to where the hardware.conf is, though, that tells lirc where to find the receiver itself. Along the lines of:

Code:
DRIVER="dev/input"
DEVICE="/dev/input/event2"

Author:  graysky [ Thu Jul 01, 2010 4:40 am ]
Post subject: 

otoh wrote:
graysky wrote:


Oops sorry, posted at the same time as you - thanks for the link, but I already found the lircd.conf and the lircrc, which I understand from my previous MB install.

I'm still mystified as to where the hardware.conf is, though, that tells lirc where to find the receiver itself. Along the lines of:

Code:
DRIVER="dev/input"
DEVICE="/dev/input/event2"


My bad, I didn't read your post carefully. I dunno about hardware.conf but I can have a look when I get home.

Author:  tjc [ Thu Jul 01, 2010 6:57 am ]
Post subject: 

Find is your friend. As root:
Code:
find / -name hardware.conf -ls

If it's on the system, that will tell you where.

Author:  graysky [ Thu Jul 01, 2010 2:08 pm ]
Post subject: 

tjc wrote:
Find is your friend. As root:
Code:
find / -name hardware.conf -ls

If it's on the system, that will tell you where.


Right! Alternatively, if you don't know the filename but you do know some contents:

Code:
find / -type f -exec grep -i "key words you know" {} \; -print

Author:  Greg Frost [ Fri Jul 02, 2010 12:01 am ]
Post subject: 

I think the issue is there is no hardware.conf in R6. That was a feature of the way the R5.5 lirc scripts worked. In the R6 updates that allowed the remote selection from the service menu, and the changes to use runit for starting services, and the chaining if lircd instances, the features that hardware.conf provided were lost.

For now, until someone knowledgeable has the time & inclination, it is handled in the run script which has become more complex than necessary:
http://linhes.org/cgit/cgit.cgi/LinHES- ... /lircd/run

Author:  tophee [ Fri Jul 02, 2010 12:25 am ]
Post subject: 

Having just taken the time to read your original post, I wonder if my regular Nova-T solution will work for you?

Have a look at this: clicky

It took me a few days of scratching my head and reading around!

HTH

Author:  otoh [ Fri Jul 02, 2010 11:20 am ]
Post subject: 

Folks, thank you all for your help so far! Much appreciated, and I think I'm getting there :)

Quote:
Having just taken the time to read your original post, I wonder if my regular Nova-T solution will work for you?


I tried this, but alas with no luck. The code in the usr/share/hal/fdi/preprobe/20thirdparty/lirc.fdi seems to match the name I get when I do cat /proc/bus/input/devices, but still no luck. In your successful config there, what do you have the remote and receiver set to in LinHES Config > Remotes?

Many thanks graysky for the grep tips, I can never remember the syntax for that stuff. With a bit of fooling around with it, I discovered what Greg said, that there is no hardware.conf.

Instead I found /etc/sv/lircd/run - which seems to fire up lircd with arguments according to the LinHES settings. As in the comments, it can be overridden by creating /etc/runit/lirc.sh - which I did, with this:

Code:
/usr/sbin/lircd -r -d /dev/input/by-path/pci-2-3-event- -H dev/input --output /dev/lircd


And... yay, it works! However, it doesn't seem to run on boot. When I boot, there is no lircd running at all. Once I manually run my /etc/runit/lirc.sh (and restart the front end), my remote is working as expected.

So my next - hopefully last - question to all you patient folk is:

a) Any ideas why it doesn't start? or
b) Where is a good alternative place to put my lircd command, such that it will run on start?

MTIA!

Author:  mihanson [ Fri Jul 02, 2010 11:56 am ]
Post subject: 

otoh wrote:
a) Any ideas why it doesn't start? or
b) Where is a good alternative place to put my lircd command, such that it will run on start?


Code:
$ sudo add_service.sh lircd
should do it.

Author:  otoh [ Fri Jul 02, 2010 1:26 pm ]
Post subject: 

Code:
$ sudo add_service.sh lircd


Thanks - but this just replies:

Code:
lircd is already present


I promise I've not fooled around with anything else, I've just installed LinHES :) There is definitely no lircd process on reboot, but then running /etc/sv/lircd/run (or my own /etc/runit/lirc.sh that it calls) gets it going correctly. Any other place I can run this to fire up lircd?

Author:  mihanson [ Fri Jul 02, 2010 1:50 pm ]
Post subject: 

otoh wrote:
I promise I've not fooled around with anything else, I've just installed LinHES :) There is definitely no lircd process on reboot, but then running /etc/sv/lircd/run (or my own /etc/runit/lirc.sh that it calls) gets it going correctly. Any other place I can run this to fire up lircd?


I think your lircd process is forking to the background and runit needs to keep it in the foreground. In your lirc.sh add the -n switch to your /usr/sbin/lircd command and see if that helps.

Author:  otoh [ Fri Jul 02, 2010 2:20 pm ]
Post subject: 

Yay! Working a treat; reboot and straight into frontend with remote working. Thank you Mike and everyone else!

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/