Author |
Message |
Girkers
|
Posted: Thu Jan 05, 2006 11:57 pm |
|
Joined: Tue Mar 22, 2005 9:18 pm
Posts: 1422
Location:
Brisbane, Queensland, Australia
|
My remote control works as a keyboard and I want to change the MythTV mappings to the appropriate keys. For me to do this I need to work out what keypress the remote button relates too.
I have tried to do this through nano (pico), but some are special keys and I get a funny characters in nano. Could anyone suggest a X11 app that will display the keypressed thus I can work out exactly what how to map the keys to the right place.
_________________ Girkers
Last edited by Girkers on Thu Jan 26, 2006 5:02 am, edited 1 time in total.
|
|
Top |
|
 |
Greg Frost
|
Posted: Fri Jan 06, 2006 12:59 am |
|
Joined: Mon May 10, 2004 8:08 pm
Posts: 1891
Location:
Adelaide, Australia
|
Does it work in an xterm? If so, just run xd (or something like that, try man -k hex) to hex dump standard input and then press away. man ascii will tell you the ascii code for a given hex value.
|
|
Top |
|
 |
nermander
|
Posted: Fri Jan 06, 2006 5:46 am |
|
Joined: Tue Sep 27, 2005 12:32 pm
Posts: 104
|
Read the topics on the Nova-T remote. What you should look for is to let lirc use dev/input.
|
|
Top |
|
 |
Girkers
|
Posted: Sun Jan 08, 2006 10:23 pm |
|
Joined: Tue Mar 22, 2005 9:18 pm
Posts: 1422
Location:
Brisbane, Queensland, Australia
|
I have used xterm previously, but the problem is keys that don't act like normal, like pg up and down, that sort of thing.
I will look into the Nova-T thread and see how I go.
Cheers 
_________________ Girkers
|
|
Top |
|
 |
Girkers
|
Posted: Thu Jan 26, 2006 5:02 am |
|
Joined: Tue Mar 22, 2005 9:18 pm
Posts: 1422
Location:
Brisbane, Queensland, Australia
|
Okay here is what I tried.
I did find that my USB remote is set as keyboard as event1. So I downloaded the latest version of LIRC and ran the configure and set it appropriately. I set the LIRC to run at boot and rebooted the computer.
I then start a terminal windows and run irw, but I get nothing when I push buttons.
So I am back again at the beginning. 
_________________ Girkers
|
|
Top |
|
 |
mad_paddler
|
Posted: Thu Jan 26, 2006 5:58 am |
|
Joined: Sun Jun 12, 2005 2:39 pm
Posts: 464
Location:
UK
|
Girkers, have you checked hardware.conf is set to use the correct event? Also you probably only need to make a new lircd.conf using irrecord
|
|
Top |
|
 |
nermander
|
Posted: Thu Jan 26, 2006 6:24 am |
|
Joined: Tue Sep 27, 2005 12:32 pm
Posts: 104
|
Right, irrecord must be run. Short version of how to do it:
Locate the right eventX using for example "cat /dev/input/eventX". (Note that during boot input devices are dynamically assigned, boot the machine with the device you are normally going to use, then after boot connect any extra devices. For example I always boot without keyboard and mouse.)
Use irrecord to generate a new config file.
Set up lirc using the new config, dev/input driver and the right eventX.
Modify .lircrc if you gave the keys other names during irrecord.
|
|
Top |
|
 |
Girkers
|
Posted: Thu Jan 26, 2006 3:27 pm |
|
Joined: Tue Mar 22, 2005 9:18 pm
Posts: 1422
Location:
Brisbane, Queensland, Australia
|
I already have an lircd.conf file from LIRC website and all the buttons have the right names.
I have tried doing the install manually by changing the hardware.conf but again this made no difference. Here are some of my files to help diagnose.
Code: cat /proc/bus/input/devices ... I: Bus=0003 Vendor=6253 Product=0100 Version=0100 N: Name="Twinhan Tech Remote Control" P: Phys=usb-0000:00:1d.1-1/input0 H: Handlers=kbd event1 B: EV=120003 B: KEY=800000 0 e0b0ffdf 1cfffff ffffffff fffffffe B: LED=1f
I: Bus=0003 Vendor=6253 Product=0100 Version=0100 N: Name="Twinhan Tech Remote Control" P: Phys=usb-0000:00:1d.1-1/input1 H: Handlers=mouse0 event2 ts0 B: EV=7 B: KEY=70000 0 0 0 0 0 0 0 0 B: REL=3 ...
This is consistant across reboots, I've checked. Code: # /etc/lirc/hardware.conf # # Arguments which will be used when launching lircd LIRCD_ARGS=""
#Don't start lircmd even if there seems to be a good config file START_LIRCMD=false
#Try to load appropriate kernel modules LOAD_MODULES=true
# Run "lircd --driver=help" for a list of supported drivers. DRIVER="dev/input" # If DEVICE is set to /dev/lirc and devfs is in use /dev/lirc/0 will be # automatically used instead DEVICE="/dev/input/event1" MODULES="lirc_dev lirc_i2c"
I get the lircd.conf from http://lirc.sourceforge.net/remotes/twinhan/DTV
As writing this post I found that I have a lircd.conf in /etc and one in /etc/lirc directories, funny thing is, it is the same file and I don't remember putting it both places.
Next step 
_________________ Girkers
|
|
Top |
|
 |
mad_paddler
|
Posted: Fri Jan 27, 2006 3:01 am |
|
Joined: Sun Jun 12, 2005 2:39 pm
Posts: 464
Location:
UK
|
Seriously girkers, try making a new lircd.conf with irrecord. Or at least test making it and only do 1 key. When I was getting my nova-t to work all the ones I downloaded and tried didn't work.
|
|
Top |
|
 |
Girkers
|
Posted: Sun Jan 29, 2006 8:38 pm |
|
Joined: Tue Mar 22, 2005 9:18 pm
Posts: 1422
Location:
Brisbane, Queensland, Australia
|
No worries, I will give that a try and see how we go.
_________________ Girkers
|
|
Top |
|
 |
RichardBronosky
|
Posted: Wed Feb 01, 2006 2:03 am |
|
Joined: Tue Aug 16, 2005 11:50 am
Posts: 181
Location:
Douglasville, GA
|
Girkers wrote: No worries, I will give that a try and see how we go.
I take this silence to indicate success
okay, so I've tried to follow as much as I could. I'm totally green.
1. I'm using the LIRC that came with R5A26. Is that okay?
2. here is my /etc/lirc/hardware.conf
Code: # /etc/lirc/hardware.conf # # Arguments which will be used when launching lircd LIRCD_ARGS=""
#Don't start lircmd even if there seems to be a good config file START_LIRCMD=false
#Try to load appropriate kernel modules LOAD_MODULES=true
# Run "lircd --driver=help" for a list of supported drivers. #DRIVER="default" DRIVER="dev/input" # If DEVICE is set to /dev/lirc and devfs is in use /dev/lirc/0 will be # automatically used instead #DEVICE="/dev/usb/hiddev0" DEVICE="/dev/input/event2" MODULES="lirc_dev lirc_mceusb2"
2. here is my dmesg|grep -i usb Code: usbcore: registered new driver usbfs usbcore: registered new driver hub USB Universal Host Controller Interface driver v2.3 ohci_hcd: 2005 April 22 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI) ohci_hcd 0000:00:02.0: nVidia Corporation MCP2A USB Controller ohci_hcd 0000:00:02.0: new USB bus registered, assigned bus number 1 hub 1-0:1.0: USB hub found ohci_hcd 0000:00:02.1: nVidia Corporation MCP2A USB Controller (#2) ohci_hcd 0000:00:02.1: new USB bus registered, assigned bus number 2 usb 1-2: new full speed USB device using ohci_hcd and address 2 usb 1-3: new low speed USB device using ohci_hcd and address 3 hub 2-0:1.0: USB hub found Initializing USB Mass Storage driver... scsi0 : SCSI emulation for USB Mass Storage devices usbcore: registered new driver usb-storage USB Mass Storage support registered. usb-storage: device found at 2 usb-storage: waiting for device to settle before scanning usbcore: registered new driver hiddev input: USB HID v1.00 Keyboard [Philips RCS USB IR Combo Device] on usb-0000:00:02.0-3 input,hiddev96: USB HID v1.00 Mouse [Philips RCS USB IR Combo Device] on usb-0000:00:02.0-3 usbcore: registered new driver usbhid drivers/usb/input/hid-core.c: v2.01:USB HID core driver usbcore: registered new driver ttusb usbcore: registered new driver ttusb-dec usb-storage: device scan complete lirc_mceusb2: USB remote driver for LIRC v0.22 lirc_mceusb2: Martin Blatter <martin_a_blatter@yahoo.com> usbcore: registered new driver lirc_mceusb2 ehci_hcd 0000:00:02.2: nVidia Corporation MCP2A USB Controller ehci_hcd 0000:00:02.2: new USB bus registered, assigned bus number 3 ehci_hcd 0000:00:02.2: USB 2.0 initialized, EHCI 1.00, driver 10 Dec 2004 usb 1-2: USB disconnect, address 2 hub 3-0:1.0: USB hub found usb 1-3: USB disconnect, address 3 usb 3-2: new high speed USB device using ehci_hcd and address 2 scsi1 : SCSI emulation for USB Mass Storage devices usb-storage: device found at 2 usb-storage: waiting for device to settle before scanning usb 1-3: new low speed USB device using ohci_hcd and address 4 input: USB HID v1.00 Keyboard [Philips RCS USB IR Combo Device] on usb-0000:00:02.0-3 input,hiddev96: USB HID v1.00 Mouse [Philips RCS USB IR Combo Device] on usb-0000:00:02.0-3 usb-storage: device scan complete
3. Here are some other things that my give clues Code: root@mythtv:/home/mythtv# irrecord /tmp/irrecord
irrecord - application for recording IR-codes for usage with lirc
Copyright (C) 1998,1999 Christoph Bartelmus(lirc@bartelmus.de)
irrecord: could not init hardware (lircd running ? --> close it, check permissions) root@mythtv:/home/mythtv# irrecord -d /dev/input/event2 /tmp/irrecord
irrecord - application for recording IR-codes for usage with lirc
Copyright (C) 1998,1999 Christoph Bartelmus(lirc@bartelmus.de)
irrecord: could not init hardware (lircd running ? --> close it, check permissions) root@mythtv:/home/mythtv# cat /dev/lirc lirc lirc1 lircd lircm root@mythtv:/home/mythtv# cat /dev/lirc cat: /dev/lirc: No such device
Please give my very basic instruction. Like full paths and annoying stuff like that. I don't even know how to insure that lirc will/will not start on boot. (/etc/init/d/lirc is present, but I think there is more to it than that, right?)
|
|
Top |
|
 |
mad_paddler
|
Posted: Wed Feb 01, 2006 2:10 am |
|
Joined: Sun Jun 12, 2005 2:39 pm
Posts: 464
Location:
UK
|
Paste the output of cat /proc/bus/input/devices please 
|
|
Top |
|
 |
RichardBronosky
|
Posted: Wed Feb 01, 2006 2:22 am |
|
Joined: Tue Aug 16, 2005 11:50 am
Posts: 181
Location:
Douglasville, GA
|
cat /proc/bus/input/devices
Code: 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=0011 Vendor=0002 Product=0001 Version=0001 N: Name="PS/2 Logitech Mouse" P: Phys=isa0060/serio1/input0 H: Handlers=mouse0 event1 ts0 B: EV=7 B: KEY=30000 0 0 0 0 0 0 0 0 B: REL=3
I: Bus=0010 Vendor=001f Product=0001 Version=0100 N: Name="PC Speaker" P: Phys=isa0061/input0 H: Handlers=kbd event4 B: EV=40001 B: SND=6
I: Bus=0003 Vendor=413c Product=2505 Version=0001 N: Name="Philips RCS USB IR Combo Device" P: Phys=usb-0000:00:02.0-3/input0 H: Handlers=kbd event2 B: EV=120003 B: KEY=10000 7 ff87207a c14057ff febeffdf ffefffff ffffffff fffffffe B: LED=1f
I: Bus=0003 Vendor=413c Product=2505 Version=0001 N: Name="Philips RCS USB IR Combo Device" P: Phys=usb-0000:00:02.0-3/input1 H: Handlers=kbd mouse1 event3 ts1 B: EV=7 B: KEY=1ffffff 0 18000 21f8 d001d000 9e0000 0 0 0 B: REL=103
BTW, since this thing is behaving like a keyboard, the arrows, help,enter, clear (esc) and number buttons appear to be delivering standard key codes. But the only why I've detected signals from the other buttons is to
xxd /dev/usb/hiddev0
which is not resposive to the buttons that deliver the standard key codes.
|
|
Top |
|
 |
mad_paddler
|
Posted: Wed Feb 01, 2006 4:28 am |
|
Joined: Sun Jun 12, 2005 2:39 pm
Posts: 464
Location:
UK
|
In hardware.conf change the MODULES= line to:
MODULES="lirc_dev lirc_i2c"
reboot then try irrecord again
If that still doesn't work try changing it to event3 and reboot (use event3 with irrecord aswell)
|
|
Top |
|
 |
RichardBronosky
|
Posted: Wed Feb 01, 2006 7:14 am |
|
Joined: Tue Aug 16, 2005 11:50 am
Posts: 181
Location:
Douglasville, GA
|
Still getting:
irrecord: could not init hardware (lircd running ? --> close it, check permissions)
I tried:
Code: DEVICE="/dev/input/event3" MODULES="lirc_dev lirc_i2c"
and: Code: irrecord -d /dev/input/event3 /tmp/irrecord
as both event2 and event3, rebooting for both. What does the "check permissions" part of the error mean? Permissions of what? Code: root@mythtv:/home/mythtv# ll /dev/lirc* crw-r--r-- 1 root root 61, 0 Sep 25 03:01 /dev/lirc crw-r--r-- 1 root root 61, 1 Oct 1 04:02 /dev/lirc1 srw-rw-rw- 1 root root 0 Feb 1 08:01 /dev/lircd prw-r--r-- 1 root root 0 Jul 30 2004 /dev/lircm
I don't know where to go from here.
|
|
Top |
|
 |