21st Dec, 2012, 12:25 AM
21st Dec, 2012, 12:35 AM
Same.
Code:
root@xbian:/home/xbian# sudo wget -O - https://raw.github.com/xbianonpi/xbian/xbian-alpha4/etc/lirc/hardware/mceusb_event0.conf > /etc/lirc/hardware.conf
--2012-12-20 14:32:54-- https://raw.github.com/xbianonpi/xbian/xbian-alpha4/etc/lirc/hardware/mceusb_event0.conf
Resolving raw.github.com (raw.github.com)... 207.97.227.243
Connecting to raw.github.com (raw.github.com)|207.97.227.243|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 607 [text/plain]
Saving to: `STDOUT'
100%[======================================>] 607 --.-K/s in 0s
2012-12-20 14:33:04 (1.45 MB/s) - written to stdout [607/607]
root@xbian:/home/xbian# /etc/init.d/lirc stop
[ ok ] Stopping remote control daemon(s): LIRC:.
root@xbian:/home/xbian# /etc/init.d/lirc start
[ ok ] Loading LIRC modules:.
[ ok ] Starting remote control daemon(s) : LIRC :.
root@xbian:/home/xbian# irrecord /home/xbian/remote.conf
irrecord - application for recording IR-codes for usage with lirc
Copyright (C) 1998,1999 Christoph Bartelmus(lirc@bartelmus.de)
irrecord: could not get file information for /dev/lirc0
irrecord: default_init(): No such file or directory
irrecord: could not init hardware (lircd running ? --> close it, check permissions)
root@xbian:/home/xbian# /etc/init.d/lirc restart
[ ok ] Stopping remote control daemon(s): LIRC:.
[ ok ] Loading LIRC modules:.
[ ok ] Starting remote control daemon(s) : LIRC :.
root@xbian:/home/xbian# irrecord /home/xbian/remote.conf
irrecord - application for recording IR-codes for usage with lirc
Copyright (C) 1998,1999 Christoph Bartelmus(lirc@bartelmus.de)
irrecord: could not get file information for /dev/lirc0
irrecord: default_init(): No such file or directory
irrecord: could not init hardware (lircd running ? --> close it, check permissions)
root@xbian:/home/xbian# sudo wget -O - https://raw.github.com/xbianonpi/xbian/xbian-alpha4/etc/lirc/hardware/mceusb_event1.conf > /etc/lirc/hardware.conf
--2012-12-20 14:34:57-- https://raw.github.com/xbianonpi/xbian/xbian-alpha4/etc/lirc/hardware/mceusb_event1.conf
Resolving raw.github.com (raw.github.com)... 207.97.227.243
Connecting to raw.github.com (raw.github.com)|207.97.227.243|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 607 [text/plain]
Saving to: `STDOUT'
100%[======================================>] 607 --.-K/s in 0s
2012-12-20 14:35:07 (1.65 MB/s) - written to stdout [607/607]
root@xbian:/home/xbian# /etc/init.d/lirc restart[ ok ] Stopping remote control daemon(s): LIRC:.
[ ok ] Loading LIRC modules:.
[ ok ] Starting remote control daemon(s) : LIRC :.
root@xbian:/home/xbian# irrecord /home/xbian/remote.conf
irrecord - application for recording IR-codes for usage with lirc
Copyright (C) 1998,1999 Christoph Bartelmus(lirc@bartelmus.de)
irrecord: could not get file information for /dev/lirc0
irrecord: default_init(): No such file or directory
irrecord: could not init hardware (lircd running ? --> close it, check permissions)
root@xbian:/home/xbian#
21st Dec, 2012, 12:38 AM
What does this say:
Code:
ls -Al /dev/lirc*
21st Dec, 2012, 12:39 AM
Code:
root@xbian:/home/xbian# ls -Al /dev/lirc*
lrwxrwxrwx 1 root root 21 Dec 20 14:35 /dev/lircd -> ../var/run/lirc/lircd
root@xbian:/home/xbian#
21st Dec, 2012, 12:42 AM
and
Code:
ls -Al /dev/input/
21st Dec, 2012, 12:43 AM
Code:
root@xbian:/home/xbian# ls -Al /dev/input/
total 0
drwxr-xr-x 2 root root 240 Jan 1 1970 by-id
drwxr-xr-x 2 root root 160 Jan 1 1970 by-path
crw-rw---T 1 root input 13, 64 Jan 1 1970 event0
crw-rw---T 1 root input 13, 65 Jan 1 1970 event1
crw-rw---T 1 root input 13, 66 Jan 1 1970 event2
crw-rw---T 1 root input 13, 67 Jan 1 1970 event3
crw-rw---T 1 root input 13, 63 Jan 1 1970 mice
crw-rw---T 1 root input 13, 32 Jan 1 1970 mouse0
crw-rw---T 1 root input 13, 33 Jan 1 1970 mouse1
root@xbian:/home/xbian#
21st Dec, 2012, 12:58 AM
Can you try those hardware.conf again but change these two variables:
Instead of the values already present
If this doesn't work, enable debug mode in XBMC, then check the log:
And post some output when pressing keys.
Code:
MODULES=""
DRIVER="default"
Instead of the values already present
If this doesn't work, enable debug mode in XBMC, then check the log:
Code:
tail -n 10 -f /home/xbian/.xbmc/temp/xbmc.log
And post some output when pressing keys.
21st Dec, 2012, 01:03 AM
I actually dont have a server arrount to upload it, I also dont know how to open and save these files over ssh.
Can you do the changes and upload it at Github?
Code:
MODULES=""
DRIVER="default"
# /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
#Don't start irexec, even if a good config file seems to exist.
#START_IREXEC=true
#Try to load appropriate kernel modules
LOAD_MODULES=true
# Run "lircd --driver=help" for a list of supported drivers.
DRIVER="devinput"
# usually /dev/lirc0 is the correct setting for systems using udev
DEVICE="/dev/input/event0"
MODULES="lirc_dev mceusb"
# Default configuration files for your hardware if any
LIRCD_CONF=""
LIRCMD_CONF=""
Can you do the changes and upload it at Github?
21st Dec, 2012, 01:05 AM
I said to change the values in the previously suggested hardware.conf instead of adding them. Now you have them double defined.
21st Dec, 2012, 01:26 AM
there is only one hardware.conf in the folder
You did sugesst this two.
i dont know what do u want from me?
Should I change the code in this two and try it then again or what?
Code:
root@xbian:/home/xbian# cd /etc/lirc/
root@xbian:/etc/lirc# ls
hardware hardware.conf lircd.conf lircmd.conf remotes
root@xbian:/etc/lirc#
You did sugesst this two.
(21st Dec, 2012 12:05 AM)CurlyMo Wrote: [ -> ]Can you try with this hardware.conf:
https://raw.github.com/xbianonpi/xbian/xbian-alpha4/etc/lirc/hardware/mceusb_event0.conf
or this one:
https://raw.github.com/xbianonpi/xbian/xbian-alpha4/etc/lirc/hardware/mceusb_event1.conf
i dont know what do u want from me?
Should I change the code in this two and try it then again or what?
21st Dec, 2012, 05:33 AM
If you look at your latest hardware.conf content, you see you have defined MODULES 2x and DRIVER 2x, just replace the values of both the hardware.conf i suggested on git with:
Example:
And i also asked:
If this doesn't work, enable debug mode in XBMC, then check the log:
And post some output when pressing keys.
Code:
MODULES=""
DRIVER="default"
Example:
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
#Don't start irexec, even if a good config file seems to exist.
#START_IREXEC=true
#Try to load appropriate kernel modules
LOAD_MODULES=true
# Run "lircd --driver=help" for a list of supported drivers.
DRIVER="default"
# usually /dev/lirc0 is the correct setting for systems using udev
DEVICE="/dev/input/event0"
MODULES=""
# Default configuration files for your hardware if any
LIRCD_CONF=""
LIRCMD_CONF=""
And i also asked:
If this doesn't work, enable debug mode in XBMC, then check the log:
Code:
tail -n 10 -f /home/xbian/.xbmc/temp/xbmc.log
And post some output when pressing keys.
22nd Dec, 2012, 01:03 AM
I also read that you maybe need the 'ir_rc6_decoder' or the 'imon' module.
Try it and post any output (of each step) when present:
The reason why i'm asking for the XBMC log is because these 'unofficial' remotes can present themselves as 'keyboards' simulating keypresses instead of remote buttons. If so, Lirc won't work and we need to take another direction (which i already have done some times before).
Try it and post any output (of each step) when present:
Code:
sudo /etc/init.d/lirc stop
sudo modprobe ir_rc6_decoder imon
sudo dmesg
sudo mode2
#Check if your remote is received
sudo /etc/init.d/lirc start
sudo ls -Al /dev/lirc*
The reason why i'm asking for the XBMC log is because these 'unofficial' remotes can present themselves as 'keyboards' simulating keypresses instead of remote buttons. If so, Lirc won't work and we need to take another direction (which i already have done some times before).
23rd Dec, 2012, 07:26 AM
Edited the hardware.conf as suggested by your example, restart lircd -> no change.
Output from suggested commands:
xbmc.log
Output from suggested commands:
Code:
root@xbian:/home/xbian/.xbmc/temp# /etc/init.d/lirc stop
[ ok ] Stopping remote control daemon(s): LIRC:.
root@xbian:/home/xbian/.xbmc/temp# modprobe ir_rc6_decoder
root@xbian:/home/xbian/.xbmc/temp# modprobe imon
root@xbian:/home/xbian/.xbmc/temp# dmesg | tail -5
[ 1772.751717] IR RC6 protocol handler initialized
[ 1780.254012] usbcore: registered new interface driver imon
[ 1828.887636] usbcore: deregistering interface driver imon
[ 1897.103916] IR RC6 protocol handler initialized
[ 1902.606749] usbcore: registered new interface driver imon
root@xbian:/home/xbian/.xbmc/temp# mode2
mode2: could not get file information for /dev/lirc0
mode2: default_init(): No such file or directory
root@xbian:/home/xbian/.xbmc/temp# /etc/init.d/lirc start
[ ok ] Loading LIRC modules:.
[ ok ] Starting remote control daemon(s) : LIRC :.
root@xbian:/home/xbian/.xbmc/temp# ls -Al /dev/lirc*
lrwxrwxrwx 1 root root 21 Dec 22 21:21 /dev/lircd -> ../var/run/lirc/lircd
Code:
root@xbian:/home/xbian/.xbmc/temp# tail -20 xbmc.log
22:25:48 T:3042435072 DEBUG: Keyboard: scancode: 6d, sym: 0119, unicode: 0000, modifier: 0
22:25:48 T:3042435072 DEBUG: OnKey: pagedown (f085) pressed, action is PageDown
22:25:48 T:3042435072 DEBUG: Keyboard: scancode: 6d, sym: 0119, unicode: 0000, modifier: 0
22:25:48 T:3042435072 DEBUG: OnKey: pagedown (f085) pressed, action is PageDown
22:25:48 T:3042435072 DEBUG: Keyboard: scancode: 6d, sym: 0119, unicode: 0000, modifier: 0
22:25:48 T:3042435072 DEBUG: OnKey: pagedown (f085) pressed, action is PageDown
22:25:48 T:2950689856 DEBUG: CecLogMessage - << Recorder 1 (1) -> TV (0): POLL
22:25:48 T:2950689856 DEBUG: CecLogMessage - << 10
22:25:48 T:3042435072 DEBUG: Keyboard: scancode: 6d, sym: 0119, unicode: 0000, modifier: 0
22:25:48 T:3042435072 DEBUG: OnKey: pagedown (f085) pressed, action is PageDown
22:25:48 T:2950689856 DEBUG: CecLogMessage - command 'POLL' was not acked by the controller
22:25:48 T:2950689856 DEBUG: CecLogMessage - >> POLL not sent
22:25:48 T:3042435072 DEBUG: Keyboard: scancode: 6d, sym: 0119, unicode: 0000, modifier: 0
22:25:48 T:3042435072 DEBUG: OnKey: pagedown (f085) pressed, action is PageDown
22:25:48 T:3042435072 DEBUG: Keyboard: scancode: 6d, sym: 0119, unicode: 0000, modifier: 0
22:25:48 T:3042435072 DEBUG: OnKey: pagedown (f085) pressed, action is PageDown
22:25:48 T:3042435072 DEBUG: Keyboard: scancode: 6d, sym: 0119, unicode: 0000, modifier: 0
22:25:48 T:3042435072 DEBUG: OnKey: pagedown (f085) pressed, action is PageDown
22:25:48 T:3042435072 DEBUG: Keyboard: scancode: 6d, sym: 0119, unicode: 0000, modifier: 0
22:25:48 T:3042435072 DEBUG: OnKey: pagedown (f085) pressed, action is PageDown
23rd Dec, 2012, 10:35 AM
Owk, just as i expected. Most probably the remote acts as a keyboard. What you have to do now it as follows:
Follow the xbmc log. Press all keys and make a list of the names that the key is recognized at. These can be really unlogical as you can see in my example below (of another Chinese remote).
Now open the standard keyboard.xml located here:
What you have to do is create a custom keyboard.xml for yourself. You can put that file in:
If that folder doesn't exist, create it.
What you do is mapping your keys to XBMC functions. In my case, the volumedown button presented itself as 'f14'. So i then searched for a function called volume down and saw it was called 'VolumeDown'. So the entry is:
Do this for all buttons of your remote. Constantly check for the right function names in the keyboard.xml. If you see a log entry like this:
Then you can see the name of that button is 'ctrl-alt-at' (?), you then add something like this:
--Unsure about this part, but try it--
If thing naming doesn't work, you can also define buttons by their id. As far as i remembered take this number (6d) and convert it from hexadecimal to decimal (can be done with calculator in windows). You will then see that 6d represents the number 109 (or use 119, not sure).
Then add this key as follows:
--End of uncertainty part--
My example of my old Chinese remote
Feel free to ask many more questions, and please share the final remote.xml with us.
Follow the xbmc log. Press all keys and make a list of the names that the key is recognized at. These can be really unlogical as you can see in my example below (of another Chinese remote).
Code:
tail -f xbmc.log | grep 'OnKey\|Scancode'
Now open the standard keyboard.xml located here:
Code:
/usr/local/share/xbmc/system/keymaps/keyboard.xml
What you have to do is create a custom keyboard.xml for yourself. You can put that file in:
Code:
/home/xbian/.xbmc/userdata/keymaps/
If that folder doesn't exist, create it.
What you do is mapping your keys to XBMC functions. In my case, the volumedown button presented itself as 'f14'. So i then searched for a function called volume down and saw it was called 'VolumeDown'. So the entry is:
Code:
<f14>VolumeDown</f14>
Do this for all buttons of your remote. Constantly check for the right function names in the keyboard.xml. If you see a log entry like this:
Code:
22:25:48 T:3042435072 DEBUG: OnKey: ctrl-alt-at (f085) pressed, action is
Then you can see the name of that button is 'ctrl-alt-at' (?), you then add something like this:
Code:
<at mod="ctrl,alt">XBMC.ActivateWindow(Video,MovieTitles)</at>
--Unsure about this part, but try it--
If thing naming doesn't work, you can also define buttons by their id. As far as i remembered take this number (6d) and convert it from hexadecimal to decimal (can be done with calculator in windows). You will then see that 6d represents the number 109 (or use 119, not sure).
Code:
22:25:48 T:3042435072 DEBUG: Keyboard: scancode: 6d, sym: 0119, unicode: 0000, modifier: 0
Then add this key as follows:
Code:
<key id="109">Info</key>
My example of my old Chinese remote
Code:
<keymap>
<global>
<keyboard>
<f4 mod="alt">XBMC.ActivateWindow(Home)</f4>
<one mod="ctrl,alt">XBMC.ActivateWindow(Music,Artists)</one>
<at mod="ctrl,alt">XBMC.ActivateWindow(Video,MovieTitles)</at>
<three mod="ctrl,alt">XBMC.ActivateWindow(Pictures)</three>
<dollar mod="ctrl,alt">XBMC.ActivateWindow(Videos,TvShowTitles)</dollar>
<next_track>SkipNext</next_track>
<prev_track>SkipPrevious</prev_track>
<b mod="ctrl,shift">FastForward</b>
<f mod="ctrl,shift">Rewind</f>
<play_pause>Pause</play_pause>
<stop>Stop</stop>
<three mod="ctrl">AspectRatio</three>
<volume_up>VolumeUp</volume_up>
<f14>VolumeDown</f14>
<f13>Mute</f13>
<tab>ContextMenu</tab>
<key id="61952">Info</key>
<escape>Back</escape>
<pageup>PageUp</pageup>
<pagedown>PageDown</pagedown>
<return>Select</return>
<up>Up</up>
<down>Down</down>
<left>Left</left>
<right>Right</right>
<tab mod="shift,alt">ShowSubtitles</tab>
<e>NextSubtitles</e>
<d>ToggleFullScreen</d>
</keyboard>
</global>
<VirtualKeyboard>
<keyboard>
<backspace>Backspace</backspace>
</keyboard>
</VirtualKeyboard>
<FullscreenVideo>
<keyboard>
<left>StepBack</left>
<right>StepForward</right>
<up>BigStepForward</up>
<down>BigStepBack</down>
<return>OSD</return>
</keyboard>
</FullscreenVideo>
<SlideShow>
<keyboard>
<pagedown>ZoomOut</pagedown>
<pageup>ZoomIn</pageup>
</keyboard>
</SlideShow>
</keymap>
Feel free to ask many more questions, and please share the final remote.xml with us.
27th Dec, 2012, 05:10 AM
I don't mean to hijack the thread but I have a somewhat similar problem, but different still. I use my tv remote thru hdmi cec. Some buttons work and some don't. Is there a guide to mapping this type of remote? The button I need the most is context menu. Enter/OK works. Exit works. Up down left right works. Play pause stop rw fw works (I think).