cheap usb remote from dealextreme
#16
Anastrophe Wrote:....out if interest, if it works as a keyboard and mouse (as mine does), why not just remap the keys to work with xbmc and not use lirc? That way the repeat etc works.

Because if you press some keys (yellow key, for example), ubuntu starts a text-mode console and you cannot go back to XBMC. There are other reasons, but that is pretty important to me!
Reply
#17
Anastrophe Wrote:It would be great if you could explain what you did differently to the unbuntuforums link.

It is a little long, but here it is. Most of this I've found by trial and error, and I do not really know what I am doing or why it works, but it does. I should do more research, but haven't... Also I am more used to fedora linux (from the time it was called "red hat linux" and then "fedora core"), so some things perhaps should be done differently here. But it works for me.

First, become root entering "su -" and then the root password.

1) do "ls -l /dev/input/*" with the IR sensor not attached. Attach the sensor and repeat "ls -l /dev/input/*". That way you can see what devices the sensor creates.
For me, it was "event5" and "mouse1" (I had some other devices attached)

2) then do "udevadm info -a -p $(udevadm info -q path -n /dev/input/eventX)" ("X" being the "event number" you discovered on step 1, mine was "5")
There will be a long listing; look for the FIRST "ATTRS(modalias)" line, for me it was:
Code:
ATTRS{modalias}=="input:b0003v06B4p1C70e0110-e0,1,2,3,4,14,k71,72,73,74,75,77,79,7A,7B,7C,7D,7E,7F,80,81,82,83,84,85,86,87,88,89,8A,8B,8C,8E,8F,90,96,98,9B,9C,9E,9F,A1,A3,A4,A5,A6,A7,A8,A9,AB,AC,AD,AE,B1,B2,B5,B7,B8,B9,BA,BB,BC,BD,BE,BF,C0,C1,C2,CE,CF,D0,D1,D2,D5,D9,DB,E2,EA,EB,F0,100,101,102,103,104,105,106,107,108,109,10A,10B,10C,10D,10E,10F,110,111,112,113,114,115,116,117,118,119,11A,11B,11C,11D,11E,11F,120,121,122,123,124,125,126,127,128,129,12A,12B,12C,12D,12E,12F,130,131,132,133,162,166,16A,16E,178,179,17A,17B,17C,17D,17F,180,181,182,185,18C,18D,192,193,195,1A0,1A1,1A2,1A3,1A4,1A5,1A6,1A7,1A8,1A9,1AA,1AB,1AC,1AD,1AE,1B0,1B1,1B7,r0,1,6,8,9,a10,11,20,m4,lsfw"

from that, line, we can identify our device as "input:b0003v06B4p1C70e0110-e0*"
(yours will be probably similar but different)

3) create a udev rule to catch our device on each boot:

Code:
echo ATTRS{modalias}=="input:b0003v06B4p1C70e0110-e0*",SYMLINK+="input/dxremote" > /etc/udev/rules.d/60-persistent-input.rules

Of course, instead of "b0003v06B4p1C70e0110-e0*", enter the correct data for your device that you found on step 2

Now, by unplugging/plugging the USB IR sensor (or, if that does not work, rebooting) you should have a redirection for the device; "ls -l /dev/input/*" should give something like:

Code:
crw-r-----  1 root root 13, 64 2009-08-24 18:56 /dev/input/event0
crw-r-----  1 root root 13, 65 2009-08-24 18:56 /dev/input/event1
crw-rw----+ 1 root root 13, 66 2009-08-24 18:56 /dev/input/event2
crw-r-----  1 root root 13, 67 2009-08-24 18:56 /dev/input/event3
crw-r-----  1 root root 13, 68 2009-08-24 18:56 /dev/input/event4
crw-rw----+ 1 root root 13, 69 2009-08-24 19:07 /dev/input/event5
crw-rw----+ 1 root root 13, 70 2009-08-24 18:56 /dev/input/event6
crw-r-----  1 root root 13, 71 2009-08-24 18:56 /dev/input/event7
lrwxrwxrwx  1 root root      6 2009-08-24 19:07 /dev/input/dxremote -> event5
crw-r-----  1 root root 13, 63 2009-08-24 18:56 /dev/input/mice
crw-r-----  1 root root 13, 32 2009-08-24 18:56 /dev/input/mouse0
crw-r-----  1 root root 13, 33 2009-08-24 19:07 /dev/input/mouse1
crw-r-----  1 root root 13, 34 2009-08-24 18:56 /dev/input/mouse2

(instead of "dxremote" you may use any name you want)

After that this line:
Code:
/usr/local/sbin/lircd --driver=dev/input --device=/dev/input/dxremote --output=/dev/lircd --pidfile /var/run/lircd.pid
captures the input from the remote, you just need to execute that on each boot. I do that by creating a script on init.d:

Code:
echo /usr/local/sbin/lircd --driver=dev/input --device=/dev/input/mando --output=/dev/lircd --pidfile /var/run/lircd.pid > /etc/init.d/dxremote

making it executable:
Code:
chmod a+x /etc/init.d/dxremote

and creating a link in rc2.d, rc3.d and rc5.d to be sure it runs on each boot
Code:
ln /etc/init.d/dxremote /etc/rc2.d/S71dxremote
ln /etc/init.d/dxremote /etc/rc3.d/S71dxremote
ln /etc/init.d/dxremote /etc/rc5.d/S71dxremote

With that, and the adecuate Lircmap.xml and Keymap.xml in the ~/.xbmc/userdata directory (or /usr/share/xbmc/userdata if you want it to work for every user) you can control xbmc with the remote as I explained before.
Reply
#18
You are a star! Can't wait to try this when I get home.

Thanks!
Reply
#19
I've run into a couple of problems...

my RC is identical to yours, same USB vendor/version etc. it shows as Event 9 on this laptop I'm testing with.

Up to step 3 I was using sudo (as this is ubuntu Jaunty) , but then I had to a sudo su to get premissions to run echo ATTRS{modalias}=="input:b0003v06B4p1C70e0110-e0*",.....

Then ls -l /dev/input/* still showed Event9 and not a redirection , so I rebooted.

Now I have event 9 even when the IR dongle is disconnected and still no redirection.

I just tried a cat /proc/bus/input/devices and got:

Quote:I: Bus=0003 Vendor=06b4 Product=1c70 Version=0110
N: Name="HID 06b4:1c70"
P: Phys=usb-0000:00:1d.0-2/input0
S: Sysfs=/devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.0/input/input11
U: Uniq=
H: Handlers=kbd mouse1 event6
B: EV=10001f
B: KEY=837fff 2c3027 bf004444 0 fffff ffffffff 10c04 a27c007 ffa67bfa d941dfff febeffdf ffefffff ffffffff fffffffe
B: REL=343
B: ABS=1 30000
B: MSC=10

however event 6 is showing up without the IR dongle. strange

I'm going to retry all this using event 6 now.



edit, no joy. I guess my problem is the redirection not working. What event it uses is irrelevant as we're using "input:b0003v06B4p1C70e0110-e0*" to do the redirect.

ls -l /dev/input/* results in

Quote:crw-r----- 1 root root 13, 64 2009-08-25 18:18 /dev/input/event0
crw-r----- 1 root root 13, 65 2009-08-25 18:18 /dev/input/event1
crw-r----- 1 root root 13, 66 2009-08-25 18:18 /dev/input/event2
crw-r----- 1 root root 13, 67 2009-08-25 18:18 /dev/input/event3
crw-rw----+ 1 root root 13, 68 2009-08-25 18:18 /dev/input/event4
crw-r----- 1 root root 13, 69 2009-08-25 18:18 /dev/input/event5
crw-rw----+ 1 root root 13, 70 2009-08-25 18:46 /dev/input/event6
crw-r----- 1 root root 13, 71 2009-08-25 18:18 /dev/input/event7
crw-r----- 1 root root 13, 72 2009-08-25 18:18 /dev/input/event8
crw-r----- 1 root root 13, 73 2009-08-25 18:18 /dev/input/event9
crw-r----- 1 root root 13, 63 2009-08-25 18:18 /dev/input/mice
crw-r----- 1 root root 13, 32 2009-08-25 18:18 /dev/input/mouse0
crw-r----- 1 root root 13, 33 2009-08-25 18:46 /dev/input/mouse1
crw-r----- 1 root root 13, 34 2009-08-25 18:18 /dev/input/mouse2

Am I missing something obvious?
Reply
#20
BTW, gnome is still accepting keypressed from the remote as if it was a keyboard.
Reply
#21
probably the file /etc/udev/rules.d/60-persistent-input.rules has something incorrect... try

sudo nano /etc/udev/rules.d/60-persistent-input.rules

and verify the file contains exactly

ATTRS{modalias}=="(your modalias here)",SYMLINK+="input/dxremote"

if there is any error (i.e., unclosed quotes or something like that) it will not work as intended...
Reply
#22
thanks, that checks out ok - I've even tried with the SYMLINK+= and just plain =

I even have a QUIRK in modules to stop HID grabbing it too, but that doesn't seem to make any difference either.
Reply
#23
I have the same remote and receiver that I have set up to use with my Harmony 1 remote and EventGhost. The IR receiver is recognised as a HID compatible device by Windows.
Is it possible to configure the IR receiver receive additional keystrokes / commands by having the Harmony Remote emulate any other full-featured HID remote? How can I get a comprehensive list of what signals my IR receiver can receive? Since the Harmony can be trained to emit almost any signal, I could theoretically map all the keys on the harmony to XBMC commands.
Has anyone tried this or knows if it can be done?
Reply
#24
This just showed up on DealExtreme.com Check it out...

Universal XBOX 360 IR Remote Control
http://www.dealextreme.com/details.dx/sku.22177

~Sean
Reply
#25
Anastrophe Wrote:thanks, that checks out ok - I've even tried with the SYMLINK+= and just plain =

I even have a QUIRK in modules to stop HID grabbing it too, but that doesn't seem to make any difference either.

I realize this thread is a little old, but in case you'd like to try this again (or for anyone else with this remote) I ran into the same trouble, but was successful in assigning a symlink by inserting the following:

Code:
KERNEL=="event*",ATTRS{modalias}=="input:b0003v06B4p1C70e0110-e0*",SYMLINK="input/dxremote"

Of course, I still don't have it responding to that keymap, but it's a start.
Reply
#26
What I've found is that with many USB dongles, you can use lirc with the 'devinput' lircd.conf, then make a custom lircmap and keymap to make every key do whatever you want.

If it shows up under /dev/input/by-id/, try killing lircd and run sudo hexdump -C /dev/input/by-id/whatever to see if you are getting something with each keypress. If so, each thing should be mappable via lircd.conf, keymap.xml, and lircmap.xml.
Reply
#27
I have USD HID remote as well, but I managed to make it work little bit differently. See my post: http://forum.xbmc.org/showthread.php?tid=63484. Maybe it can help.
Reply
#28
i'm very close, took me a while for the dxremote to show up in the ls -l dev/input command, but i didn't realise there were 2 sets of " quotes, so if anyone else can see it, run the nano command at the top of page 3 and double check quotes are surrounding both parts.

anyway after seeing the dxremote, and pasting

"/usr/local/sbin/lircd --driver=dev/input --device=/dev/input/dxremote --output=/dev/lircd --pidfile /var/run/lircd.pid"

i get

-bash: /usr/local/sbin/lircd: No such file or directory

could be because i've messed around in the past trying to get this thing to work. is there a file i can download or create to create this lrcd file or directory to get this going?

cheers
Reply
#29
how about this one?

http://www.dealextreme.com/details.dx/sku.34435
ﻪﻥﻋﺸﻷﻜﻈﭚ
Reply
#30
i got this one http://www.dealextreme.com/details.dx/sku.14380 (or this one, can't tell http://www.dealextreme.com/details.dx/sku.27596) but you'll have the same 'problem' as me, it's detected as a KB and mouse. asked my mate with the same set up as me if he had the lircd file in /usr/local/sbin/ but he didn't. don't know what to do now!
Reply

Logout Mark Read Team Forum Stats Members Help
cheap usb remote from dealextreme1