IR remote not working with XBMC

Home Forums i.MX6 XBMC support IR remote not working with XBMC

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #2090
    Pepe Anguita
    Guest

    Hi Stephen,

    first of all, thank you very much for all your hard work to put those images together. You’ve done an incredible job.

    My setup is a Wandboard quad with your v0.0.6 yocto image. I have been able to go all the way to issue an “irw” command with success. The lircd is running and gets well any key that I send from my Apple TV2 remote. So far so good. The problem is that XBMC does not seem to get any command from the remote and after several hours of testing I am totally desperate. I have tried many config files for XBMC and lirc with no success.

    It be great if you could give me a hand and head me to the right direction, namely where do I start to debug this problem.

    best regards,
    Pepe

    #2097
    stephan
    Keymaster

    Hi pepe

    You have done the hardest part of the work..
    To get it running with xbmc you will have to do 2 additional things :
    – Launch xbmc with correct “-l” option so that XBMC reads lirc inputs
    /imx6/xbmc/lib/xbmc/xbmc.bin -l /dev/lirc0
    – Configure correctly ~/.xbmc/userdata/Lircmap.xml
    Check http://wiki.xbmc.org/index.php?title=Userdata/lircmap.xml for more info

    Tell me if you need more help..
    Best regards
    Stéphan

    #2105
    Pepe Anguita
    Guest

    Hello Stephan, thank you very much for your answer.

    I have setup the file you mentioned and issued the xbmc-bin you suggested with no success. Do please allow me to show you what I got so far:

    iwr command result:

    0000000077e1b087 00 down "AppleRemote"
    0000000077e14087 00 menu "AppleRemote"
    0000000077e17a87 00 play "AppleRemote"
    0000000077e14087 00 menu "AppleRemote"
    0000000077e14087 01 menu "AppleRemote"
    0000000077e17a87 00 play "AppleRemote"
    0000000077e1ba87 00 enter "AppleRemote"
    0000000077e11087 00 left "AppleRemote"
    0000000077e11087 01 left "AppleRemote"
    0000000077e1b087 00 down "AppleRemote"
    0000000077e1e087 00 right "AppleRemote"
    0000000077e1e087 01 right "AppleRemote"
    0000000077e1d087 00 up "AppleRemote"

    File /home/root/.xbmc/userdata/Lircmap.xml

    <lircmap>
      <remote device="AppleRemote">
                   <play>play</play>
                    <pause>play</pause>
                    <stop>play</stop>
                    <forward>right</forward>
                    <reverse>left</reverse>
                    <left>left</left>
                    <right>right</right>
                    <up>up</up>
                    <down>down</down>
                    <select>enter</select>
    
      </remote>
    </lircmap>
    

    File /etc/lirc/lircd.conf

    # Please make this file available to others
    # by sending it to <lirc@bartelmus.de>
    #
    # this config file was automatically generated
    # using lirc-0.9.0(default) on Fri Jul  4 17:54:49 2014
    #
    # contributed by 
    #
    # brand:                       myremote.conf
    # model no. of remote control: 
    # devices being controlled by this remote:
    #
    
    begin remote
    
      name  "AppleRemote"
      bits            8
      flags SPACE_ENC|CONST_LENGTH
      eps            30
      aeps          100
    
      header       9034  4453
      one           593  1622
      zero          593   533
      ptrail        598
      repeat       9040  2222
      pre_data_bits   16
      pre_data       0x77E1
      post_data_bits  8
      post_data      0x87
      gap          107871
      toggle_bit_mask 0x0
    
          begin codes
              menu                     0x40
              play                     0x7A 0x20
              enter                    0xBA 0x20
              up                       0xD0
              down                     0xB0
              right                     0xE0
              left                     0x10
          end codes
    
    end remote
    

    File /etc/rc.local

    
    #!/bin/sh -e
    #
    # rc.local
    #
    # This script is executed at the end of each multiuser runlevel.
    # Make sure that the script will "exit 0" on success or any other
    # value on error.
    #
    # In order to enable or disable this script just change the execution
    # bits.
    #
    # By default this script does nothing.
    
    /usr/sbin/NetworkManager
    echo 0 >  /sys/class/graphics/fbcon/cursor_blink
    mkdir /tmp/temp
    export HOME=/home/root
    mkdir -p "/var/run/lirc"
    modprobe lirc_wand
    sleep 2
    ln -s /var/run/lirc/lircd /dev/lircd
    #/usr/bin/usynergy &  
    #/usr/bin/tvheadend -l /dev/null &
    /imx6/xbmc/lib/xbmc/xbmc.bin -l /dev/lircd  2> /dev/null &
    

    I think everything is ok … what would you suggest to test now ?

    Best regards,
    Pepe

    #2106
    Pepe Anguita
    Guest

    The last line in the rc.local file is now the one you suggested with -l lirc0

    #2107
    Pepe Anguita
    Guest

    I have enable debug mod and found out the following lines in the /home/root/.xbmc/temp/xbmc.log

    11:01:24 T:738545664    INFO: LIRC Initialize: using: /dev/lirc0
    11:01:24 T:738545664   DEBUG: Failed to connect to LIRC. Giving up.

    For some reason xbmc is not able to connect to LIRC. What would you suggest ?

    Any help is appreciated, best regards
    Pepe

    #2108
    Pepe Anguita
    Guest

    One step ahead, I am starting xmbc like this:

    /imx6/xbmc/lib/xbmc/xbmc.bin --lircdev /var/run/lirc/lircd
    

    I set up debug mode on xbmc and I find key presses of my remote in the log file /home/root/.xbmc/temp/xbmc.log

    14:08:12 T:738549760   DEBUG: LIRC: Update - NEW at 441794:0000000077e1d087 00 up "AppleRemote" (up)
    14:08:13 T:738549760   DEBUG: LIRC: Update - NEW at 442527:0000000077e1d087 00 up "AppleRemote" (up)
    14:08:14 T:738549760   DEBUG: LIRC: Update - NEW at 443044:0000000077e1d087 00 up "AppleRemote" (up)
    14:08:14 T:738549760   DEBUG: LIRC: Update - NEW at 443777:0000000077e11087 00 left "AppleRemote" (left)
    

    It seems that right now xbmc is “receiving” the commands from the remote but there is some sort of problem translating them.

    #2115
    Pepe Anguita
    Guest

    XBMC is not reacting on my remote. Any hint Stephan ?. I´d appreciate it.

    cheers
    Pepe

    #2117
    stephan
    Keymaster

    Hi pepe
    Sorry for my late answer

    Several remarks :
    * First note that -l or –lircdev is the same option (short or gnu long formats but they are the same)
    * If the socket /var/run/lirc/lircd works it is very likely because you run (event)lircd which is just fine if it is your preferred way of doing it…

    Now it just works : You have properly associated lirc buttons to xbmc buttons !

    It seems that you still need to associate xbmc buttons to xbmc actions and it shoud be done by the file remote.xml as it will tell XBMC how to map real actions to the buttons…
    I think default remote.xml would just be ok : just copy it :
    cp /imx6/xbmc/share/xbmc/system/keymaps/remote.xml /home/root/.xbmc/userdata/keymaps/

    Kind regards
    Stéphan

    • This reply was modified 9 years, 2 months ago by stephan.
    #2124
    Pepe Anguita
    Guest

    Hello Stephan,

    thanks very much for your help !

    I finally got to work a different remote, a Syabas a200 from a Popcorn hour network player
    Syabas a200

    Your suggestion about remote.xml was very spotted, I had also to put Lircmap.xml in /home/root/.xbmc/userdata/Lircmap.xml and customize it a litte bit to make it work. For the ones interested, I added the following to the stock Lircmap.xml:

    <lircmap>
      <remote device="Syabas_A-100">
          <left>KEY_LEFT</left>
          <right>KEY_RIGHT</right>
          <up>KEY_UP</up>
          <down>KEY_DOWN</down>
          <select>KEY_SELECT</select>
    <!--	<enter>KEY_SELECT</enter>
    	<title>KEY_INFO</title>
          <start>KEY_HOME</start>
          <back>KEY_BACK</back>
          <record>KEY_RECORD</record>
          <play>KEY_PLAY</play>
          <pause>KEY_PAUSE</pause>
          <stop>KEY_STOP</stop>
          <forward>KEY_FORWARD</forward>
          <reverse>KEY_REWIND</reverse>
          <volumeplus>KEY_PAGEUP</volumeplus>
          <volumeminus>KEY_PAGEDOWN</volumeminus>
          <pageplus>KEY_CHANNELUP</pageplus>
          <pageminus>KEY_CHANNELDOWN</pageminus>
          <skipplus>KEY_NEXT</skipplus>
          <skipminus>KEY_AGAIN</skipminus>
          <mute>KEY_MUTE</mute>
          <power>KEY_POWER</power>
          <myvideo>KEY_VIDEO</myvideo>
          <mymusic>KEY_AUDIO</mymusic>
          <mytv>LiveTV</mytv>
          <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_DVD</menu>
          <clear>KEY_CLEAR</clear>
      </remote>
    

    I will keep trying to make the Apple remote working, is got to be easier now. My next step is to make the wifi workin, guess I´ll open another thread to talk about this…

    cheers and thank you again Stephan.
    Pepe

Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘i.MX6 XBMC support’ is closed to new topics and replies.