LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 04-14-2007, 03:25 AM   #1
DaneelGiskard
LQ Newbie
 
Registered: Apr 2007
Posts: 24

Rep: Reputation: 15
Configure buttons of remote control?


Hi all,

I'm using a remote control (TTS35AI) which is connected to the PC using a USB IR receiver (it came with my Skystar 2 DVB-S card). I'm using the latest kernel on FC6 and it's working flawlessly. I plugged it in and it immediately works, for example, if I press "up" on the remote it has the same effect as pressing the "up" arrow on the keyboard - very nice!

However, I have no idea why or how it works and this is the problem. I have no idea how to map buttons of the remote control to specific keys on the keyboard. Can anyone give me a hint where I can configure this?

Many thanks,
Michael

Last edited by DaneelGiskard; 04-14-2007 at 03:27 AM.
 
Old 04-14-2007, 06:38 AM   #2
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Look at the documentation for LIRC.
 
Old 04-14-2007, 06:47 AM   #3
DaneelGiskard
LQ Newbie
 
Registered: Apr 2007
Posts: 24

Original Poster
Rep: Reputation: 15
Awesome...that was the missing link - thanks!
 
Old 04-14-2007, 07:45 AM   #4
DaneelGiskard
LQ Newbie
 
Registered: Apr 2007
Posts: 24

Original Poster
Rep: Reputation: 15
Hi!

Quote:
Originally Posted by Nylex
Look at the documentation for LIRC.
I now went through the lirc documentation and there are still a few strange things. Could it be that lircd is after all not the program providing me access to the remote controll through the USB IR receiver?

The remote is working. However, I do not get any input at the /dev/lircd socket. The input from the remote is comeing from the /dev/input/event4 socket and if I do a "cat /dev/input/event4" I correctly see the input everytime I press a button.

"cat /proc/bus/input/devices" gives me:

I: Bus=0003 Vendor=147a Product=e02d Version=0110
N: Name="USB IR Receiver USB IR Receiver"
P: Phys=usb-0000:00:0b.0-4/input0
S: Sysfs=/class/input/input4
H: Handlers=kbd event4
B: EV=10000b
B: KEY=e080ffdf01cfffff fffffffffffffffe
B: ABS=30000000000

I have the proper lircd.conf for the remote at /etc
I also have a lircrc at /etc with the following entry:

begin
prog = irexec
button = 9
repeat = 0
config = echo "Hello world!"

However, if I run the irexec command to test it it says:
irexec: could not connect to socket
irexec: Connection refused

I guess it is trying to connect to /dev/lircd, right?

A "cat /dev/lircd" gives me:
"cat: /dev/lircd: No such device or address"

I didn't have any lircd.conf or lircrc before and still the remote worked fine...and it is also working fine while doing all this currently.

Any hints what I'm doing wrong in trying to assign additional keyboard keys to the buttons of the remote?

Many thanks,
Michael
 
Old 04-14-2007, 09:14 AM   #5
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Ah yes, that would appear to be the case (I can use some of the buttons on my remote under Slackware without LIRC). I think it might just be that the kernel is treating it like a keyboard. As for defining what the buttons do, I think you may need to use LIRC (other than rewriting kernel code perhaps! I think you'd have to do that if you wanted to remap what keyboard keys "did"), but am not sure.
 
Old 04-15-2007, 01:49 AM   #6
Tovad
LQ Newbie
 
Registered: Mar 2005
Posts: 8

Rep: Reputation: 0
I am unfortuntely not close to the machine where I did the configuration but I remember that I remapped my remote keys using the KDE Accesability - Keyboard shortcuts - then adding dcop controls.

(such as: dcop kmix Mixer0 setMasterVolume 0)


I also used the following script:

#!/bin/bash
# VolUp
# VolDwn
# Mute
# ChanUp
# ChanDwn
# Get remote keycodes with xev

xmodmap -e 'keycode 174=F20'
xmodmap -e 'keycode 176=F21'
xmodmap -e 'keycode 176=F22'
xmodmap -e 'keycode 99=F23'
xmodmap -e 'keycode 105=F24'

Do a search on xev and xmodmap

Sorry that I cannot be more specific but this should give you couple of hints...
 
Old 04-15-2007, 02:42 PM   #7
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Hmm, I guess I'm having the same problem really. My remote works under Debian and I haven't got a clue how. I can press the power button on said remote and I get GNOME's log out dialog :/.
 
Old 04-16-2007, 02:06 AM   #8
DaneelGiskard
LQ Newbie
 
Registered: Apr 2007
Posts: 24

Original Poster
Rep: Reputation: 15
Hi all,

Quote:
Originally Posted by Nylex
Hmm, I guess I'm having the same problem really. My remote works under Debian and I haven't got a clue how. I can press the power button on said remote and I get GNOME's log out dialog :/.
it works fine for me now. The remote (receiver) was indeed registered as a regular USB device and the special file was /dev/input/eventX where X depends on when you plug it in. What I did is to create udev rules to registere the remote as /dev/usb_irc_receiver. Then I configured lircd to read from this file with driver being dev/input. It works fine now and all my lircrc mappings are accepted.

All the best,
Michael
 
Old 04-16-2007, 04:53 AM   #9
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
That's how mine's set up under Slack. What does your lircrc look like, out of interest?
 
Old 04-16-2007, 05:02 AM   #10
DaneelGiskard
LQ Newbie
 
Registered: Apr 2007
Posts: 24

Original Poster
Rep: Reputation: 15
Hi!

Quote:
Originally Posted by Nylex
That's how mine's set up under Slack. What does your lircrc look like, out of interest?
That's still a ToDo for me. I'm currently using the lircrc from this (german) website:
http://mythwiki.de/index.php?title=T...Empf%C3%A4nger

However, the lircrc provided there does not seem to fit the lircd.conf which is provided there. The lircd.conf correctly defines all buttons which are available on the remote, but the lircrc then refers to buttons which are never defined in the lircd.conf. I think the author of this wiki entry made a (copy and paste?) mistake with regards to that.

I'll have to adjust it to my mythtv usage today. Shouldn't take long since that wiki entry does provide all the buttons from the remote and all the mythtv functionalities, it's just a matter of rewriting the lircrc mappings ...

All the best,
Michael
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
IR remote control user programmable buttons BorisMcHack Linux - Hardware 0 12-19-2005 04:41 PM
Howto configure remote control buttons when LIRC is integrated into the kernel? lagu2653 Linux - Hardware 0 12-02-2005 08:42 AM
Anyone got the Remote Wonder (ATI's USB remote control) to work under Linux? dezireduser Linux - Hardware 2 11-06-2005 08:47 AM
How to configure a buttons on my laptop to support volume control? hkl8324 Debian 2 06-27-2005 08:36 PM
ATI Remote 2.6.5 kernel How to configure buttons? Zero-0-Effect Linux - General 1 06-13-2004 09:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:21 PM.

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