Thanks for the visit. As of 10/10/2014, we're closed for business. Our former Raspberry Pi products have been acquired by ModMyPi.com. All content and support pages will continue to be preserved for future reference.

Mini IR Remote

$4.50
Out of stock - Product discontinued.

Sometime, all you need is a quick and simple way to change the station, adjust the volume, navigate a menu and select something. This tiny infrared remote will give you just that and then some... It has a very good range and works great with LIRC on Linux.

Here are the LIRC configuration settings that you will need, regardless of the Linux distribution you use.

Save these configuration settings in a file named 'nwazet.conf' in the /storage/.config/ directory of your Linux distribution.

# Please make this file available to others
# by sending it to lirc@bartelmus.de
#
# this config file was automatically generated
# using lirc-0.9.1-git(default) on Wed Jan  9 02:45:44 2013
#
# contributed by Fabien Royer @ Nwazet
#
# brand: nwazet.conf
# model no. of remote control: Nwazet IR Remote
# devices being controlled by this remote: Nwazet IR Receiver / XBMC / OpenElec

begin remote

  name  nwazet.conf
  bits           16
  flags SPACE_ENC|CONST_LENGTH
  eps            30
  aeps          100

  header       8989  4433
  one           591  1647
  zero          591   528
  ptrail        585
  repeat       8991  2202
  pre_data_bits   16
  pre_data       0xFD
  gap          107391
  toggle_bit_mask 0x0

      begin codes
          KEY_PLAYPAUSE            0x00FF
          KEY_CHANNELDOWN          0x807F
          KEY_CHANNELUP            0x40BF
          KEY_BACK                 0x20DF
          KEY_VOLUMEDOWN           0xA05F
          KEY_VOLUMEUP             0x609F
          KEY_MENU                 0x10EF
          KEY_PREVIOUS             0x906F
          KEY_NEXT                 0x50AF
          KEY_UP                   0xB04F
          KEY_LEFT                 0x08F7
          KEY_OK                   0x8877
          KEY_RIGHT                0x48B7
          KEY_DOWN                 0xA857
          KEY_PREVIOUSSONG         0x9867
          KEY_NEXTSONG             0x58A7
      end codes

end remote

You may also need to ensure that the 'lirc_rpi' driver is loaded and that the 'lircd' service is automatically started on boot, which is not always the case, by creating an 'autostart.sh' file under /storage/.config.

#!/bin/bash
modprobe lirc_rpi
lircd --driver=default --device=/dev/lirc0 --uinput --output=/var/run/lirc/lircd --pidfile=/var/run/lirc/lircd-lirc0.pid /storage/.config/nwazet.conf

Make 'autostart.sh' executable after saving it.

chmod +x autostart.sh

To start using the IR remote in XBMC immediately, do:

killall lircd
/storage/.config/autostart.sh

To check that lirc_rpi is loaded:

computer:~/.config # lsmod

The output should be something like this:

Module                  Size  Used by
rfcomm                 31273  0
bluetooth             182192  3 rfcomm
uinput                  6242  1
lirc_rpi                5857  3
lirc_dev                9972  1 lirc_rpi

To check that lircd is started and correctly configured:

computer:~/.config # ps | grep lircd

The output should be something like this:

  919 root       0:00 eventlircd --evmap=/etc/eventlircd.d --socket=/var/run/lirc/lircd --release=_UP
  962 root       0:00 lircd --driver=default --device=/dev/lirc0 --uinput --output=/var/run/lirc/lircd --pidfile=/var/run/lirc/lircd-lirc0.pid /storage/.config/nwazet.conf
  996 root       3:22 /usr/lib/xbmc/xbmc.bin --standalone -fs --lircdev /var/run/lirc/lircd
 1524 root       0:00 grep lircd

Testing the Nwazet remote and IR receiver Start an SSH session, then use the 'irw' command. You should see an output similar to the one below as you press random keys on the IR remote:

computer:~/.config # irw
0000000000fd08f7 00 KEY_LEFT nwazet.conf
0000000000fd08f7 01 KEY_LEFT nwazet.conf
0000000000fd906f 00 KEY_PREVIOUS nwazet.conf
0000000000fd906f 01 KEY_PREVIOUS nwazet.conf
0000000000fd50af 00 KEY_NEXT nwazet.conf
0000000000fd50af 01 KEY_NEXT nwazet.conf
0000000000fda05f 00 KEY_VOLUMEDOWN nwazet.conf
0000000000fda05f 01 KEY_VOLUMEDOWN nwazet.conf
0000000000fd609f 00 KEY_VOLUMEUP nwazet.conf
0000000000fd609f 01 KEY_VOLUMEUP nwazet.conf
0000000000fd807f 00 KEY_CHANNELDOWN nwazet.conf
0000000000fd40bf 00 KEY_CHANNELUP nwazet.conf
0000000000fd40bf 01 KEY_CHANNELUP nwazet.conf
0000000000fd00ff 00 KEY_PLAYPAUSE nwazet.conf
0000000000fd00ff 01 KEY_PLAYPAUSE nwazet.conf
0000000000fd20df 00 KEY_BACK nwazet.conf
0000000000fd20df 01 KEY_BACK nwazet.conf
0000000000fd10ef 00 KEY_MENU nwazet.conf
0000000000fd10ef 01 KEY_MENU nwazet.conf
0000000000fdb04f 00 KEY_UP nwazet.conf
0000000000fdb04f 01 KEY_UP nwazet.conf
0000000000fd08f7 00 KEY_LEFT nwazet.conf
0000000000fd8877 00 KEY_OK nwazet.conf
0000000000fd8877 01 KEY_OK nwazet.conf
0000000000fd48b7 00 KEY_RIGHT nwazet.conf
0000000000fd48b7 01 KEY_RIGHT nwazet.conf
0000000000fda857 00 KEY_DOWN nwazet.conf
0000000000fda857 01 KEY_DOWN nwazet.conf
0000000000fd9867 00 KEY_PREVIOUSSONG nwazet.conf
0000000000fd9867 01 KEY_PREVIOUSSONG nwazet.conf
0000000000fd58a7 00 KEY_NEXTSONG nwazet.conf
0000000000fd58a7 01 KEY_NEXTSONG nwazet.conf

Nwazet IR Remote map to LIRC keywords

The following map shows which keys on the Nwazet IR remote correspond to which LIRC key functions.

 >|| = KEY_PLAYPAUSE
 CH- = KEY_CHANNELDOWN
 CH+ = KEY_CHANNELUP
 EQ = KEY_BACK
 VOL- = KEY_VOLUMEDOWN
 VOL+ = KEY_VOLUMEUP
 MENU = KEY_MENU
 |<< = KEY_PREVIOUS
 >>| = KEY_NEXT
 1 = 
 2 = KEY_UP
 3 = 
 4 = KEY_LEFT
 5 = KEY_OK
 6 = KEY_RIGHT
 7 = 
 8 = KEY_DOWN
 9 = 
 0 =
 F- = KEY_PREVIOUSSONG
 F+ = KEY_NEXTSONG

You may need this information to author an 'Lircmap.xml' file for use under XBMC OpenElec on the Raspberry Pi. 'Lircmap.xml' translates key codes coming from LIRC to key codes that XBMC understand. Place the 'Lircmap.xml' file in the ./usr/share/xbmc/userdata folder.

Sample 'Lircmap.xml'

<lircmap>
    <remote device="/storage/.config/nwazet.conf">
        <left>KEY_LEFT</left>
        <right>KEY_RIGHT</right>
        <up>KEY_UP</up>
        <down>KEY_DOWN</down>
        <select>KEY_OK</select>
    </remote>
</lircmap>

Troubleshooting

If something does not work, check the following things first:

  • the IR receiver is correctly connected to the GPIO connector
  • the /dev/lirc0 device is loaded
  • the lircd service is running and configured to use the nwazet.conf file
  • irw outputs data matching nwazet.conf when using the IR remote

Finally, here are helpful guides showing how to configure LIRC and how to create a 'lircmap.xml' file for use with XBMC. The Raspberry Pi forums also has a thread discussing the configuration of LIRC with OpenElec. Also, be sure to check out the OpenElec forum thread on this very topic.

RaspBMC Setup

On the latest releases of Raspbmc the LIRC daemon is already loaded on the system and ready to run. Simply download and copy ‘nwazet.conf’ into the $HOME/pi as 'lircd.conf'

cp nwazet.conf $HOME/pi/lircd.conf

Enable the IR receiver and the configuration file in Raspbmc under XBMC / RASP Settings / IR Remote / Custom. The 'lircd.conf' located in $Home/pi is the default option. Finally, reboot the system to complete the installation and you're done :)

Special thanks to Steve Richinson for contributing the Raspbmc configuration steps for the Nwazet remote :)

Specifications

See also

  • RoHS Compliant
  • Raspberry Pi

Archived: Yes