Forum
[SOLVED] remote only works on xbmc (not system) restart - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Hardware (/forum-7.html)
+--- Forum: Remotes and CEC support (/forum-26.html)
+--- Thread: [SOLVED] remote only works on xbmc (not system) restart (/thread-2327.html)



remote only works on xbmc (not system) restart - Ollie Smith - 4th Jun, 2014 12:58 AM

Hello,
I have xbian RC2 and i've managed to setup a gpio ir receiver with lirc which is an absolute pain and took way too long. the problem is it only works if i "stop xbmc" and "start xbmc" again from ssh

anyway through perserverance i do the following to get ir working from a clean xbian RC2

Setp 1: add "lirc_rpi gpio_in_pin=14" to /etc/modules

Setp 2: mv /etc/lirc/hardware/lirc_rpi.conf /etc/lirc/hardware.conf

Step 3: remove -u from LIRCD_ARGS="-u" in above file (fixes double input glitch)

Step 4: copy my lircd.conf to /etc/lirc/

My lircd.conf (Click to View)
Step 5: copy my Lircmap.xml to /home/xbian/.xbmc/userdata

Code:
<lircmap>
    <remote device="devinput">
    <altname>Trust_RC-2400</altname>
        <left>KEY_LEFT</left>
        <right>KEY_RIGHT</right>
        <up>KEY_UP</up>
        <down>KEY_DOWN</down>
        <select>KEY_OK</select>
        <start>KEY_HOME</start>
        <back>KEY_BACK</back>
        <play>KEY_PLAY</play>
        <pause>KEY_PAUSE</pause>
        <stop>KEY_STOP</stop>
        <forward>KEY_FASTFORWARD</forward>
        <reverse>KEY_REWIND</reverse>
        <volumeplus>KEY_VOLUMEUP</volumeplus>
        <volumeminus>KEY_VOLUMEDOWN</volumeminus>
        <pageplus>KEY_CHANNELUP</pageplus>
        <pageminus>KEY_CHANNELDOWN</pageminus>
        <subtitle>KEY_SUBTITLE</subtitle>
        <skipplus>KEY_FRAMEFORWARD</skipplus>
        <skipminus>KEY_FRAMEBACK</skipminus>
        <mute>KEY_MUTE</mute>
        <power>KEY_POWER</power>
        <myvideo>KEY_VIDEO</myvideo>
        <mymusic>KEY_AUDIO</mymusic>
        <mypicture>KEY_IMAGES</mypicture>
        <one>KEY_1</one>
        <two>KEY_2</two>
        <three>KEY_3</three>
        <four>KEY_4</four>
        <five>KEY_5</five>
        <six>KEY_6</six>
        <seven>KEY_7</seven>
        <eight>KEY_8</eight>
        <nine>KEY_9</nine>
        <zero>KEY_0</zero>
        <red>KEY_RED</red>
        <green>KEY_GREEN</green>
        <yellow>KEY_YELLOW</yellow>
        <blue>KEY_BLUE</blue>
        <menu>KEY_MENU</menu>
        <clear>KEY_CLEAR</clear>
        <info>KEY_INFO</info>
    </remote>
</lircmap>

irw Snippet
Terminal

root@xbian:~# irw
000000037ff04be1 00 KEY_UP Trust_RC-2400
000000037ff04be0 00 KEY_DOWN Trust_RC-2400
000000037ff04be0 01 KEY_DOWN Trust_RC-2400
000000037ff04bdf 00 KEY_LEFT Trust_RC-2400
000000037ff04bdf 01 KEY_LEFT Trust_RC-2400
000000037ff04bde 00 KEY_RIGHT Trust_RC-2400
000000037ff04bf3 00 KEY_POWER Trust_RC-2400
000000037ff04bfe 00 KEY_1 Trust_RC-2400
000000037ff04bfd 00 KEY_2 Trust_RC-2400
000000037ff04bfd 01 KEY_2 Trust_RC-2400
000000037ff04bfc 00 KEY_3 Trust_RC-2400
000000037ff04bfb 00 KEY_4 Trust_RC-2400
000000037ff04bfb 01 KEY_4 Trust_RC-2400
000000037ff04bfa 00 KEY_5 Trust_RC-2400
000000037ff04bf9 00 KEY_6 Trust_RC-2400
000000037ff04bf6 00 KEY_9 Trust_RC-2400
000000037ff04bf6 01 KEY_9 Trust_RC-2400
000000037ff04bf6 02 KEY_9 Trust_RC-2400
000000037ff04bf7 00 KEY_8 Trust_RC-2400
000000037ff04bf8 00 KEY_7 Trust_RC-2400
000000037ff04be2 00 KEY_ZOOMIN* Trust_RC-2400
000000037ff04bff 00 KEY_0 Trust_RC-2400
000000037ff04bff 01 KEY_0 Trust_RC-2400
000000037ff04be3 00 KEY_ZOOMOUT# Trust_RC-2400
000000037ff04be3 01 KEY_ZOOMOUT# Trust_RC-2400

So, after restart of system, irw allways shows up fine but xbmc only responds after ssh stop/start.

Fixed it by delaying xbmc start
Modified /etc/init/xbmc-preload.conf

"start on starting mountall"
to
"start on stopping mountall and started networking and net-device-up wlan0"


RE: remote only works on xbmc (not system) restart - CurlyMo - 4th Jun, 2014 01:03 AM

This is a known issue waiting to be fixed. Can you maybe add it on github to bring it to mk01's attention again?


RE: remote only works on xbmc (not system) restart - Ollie Smith - 4th Jun, 2014 01:39 AM

(4th Jun, 2014 01:03 AM)CurlyMo Wrote:  This is a known issue waiting to be fixed. Can you maybe add it on github to bring it to mk01's attention again?

Added to xbian-packages-lirc as an issue. thanks for the quick reply


RE: remote only works on xbmc (not system) restart - CurlyMo - 4th Jun, 2014 01:54 AM

Please add all issues to the main xbian repository here:
https://github.com/xbianonpi/xbian/


RE: remote only works on xbmc (not system) restart - Ollie Smith - 4th Jun, 2014 02:44 AM

Fixed it by delaying xbmc start
Modified /etc/init/xbmc-preload.conf

"start on starting mountall"
to
"start on stopping mountall and started networking and net-device-up wlan0"

also put the issue in the right place


RE: remote only works on xbmc (not system) restart - CurlyMo - 4th Jun, 2014 03:23 AM

Nice one for the wiki Smile


RE: remote only works on xbmc (not system) restart - prelsidente - 14th Jun, 2014 08:42 PM

(4th Jun, 2014 02:44 AM)Ollie Smith Wrote:  Fixed it by delaying xbmc start
Modified /etc/init/xbmc-preload.conf

"start on starting mountall"
to
"start on stopping mountall and started networking and net-device-up wlan0"

also put the issue in the right place

It broke my xbian startup.

Then I tried just "start on stopping mountall" and "start on stopping mountall and started networking", but same problem with remote control. I'm running Xbian RC2 and this remote control issue is really annoying since it makes me have to ssh and restart xbmc service each time I reboot xbian.


RE: remote only works on xbmc (not system) restart - mk01 - 22nd Jun, 2014 07:33 AM

@prelsidente

see my comment at https://github.com/xbianonpi/xbian/issues/549#issuecomment-45655011