Installing an Infrared Remote Control on the IR100

From Sharpfin
Jump to navigation Jump to search

This applies to all Reciva radios, not just the IR100.

For a remote control to work there must be a suitable IR sensor fitted and a lircd configuration file. That's it!

Adding a sensor

For radios that don't already have an IR sensor some hardware modifications will be required to add one in the case where it will be visible. Almost any IR decoder that will run from a 3.3V supply should work, these devices remove the 38kHz carrier and output a logic signal that the Barracuda board can directly decode. Most remote controls operate at 38kHz but there are some which operate at higher frequencies which won't work with the sensors listed.

Some suitable sensors available from RS components are:

  • TSOP34838 (RS 700-5308)
  • TSOP1138 (RS 708-5550)
  • TSOP31238 (RS 570-578)
  • GP1UX301QS (RS 666-6542)

(Maplin no longer appear to stock anything suitable)

Check the pin-out for whichever model you use - they're not all the same. Connections to the radio are:

  • Decoded signal / output - GPG6 (JP1, pin 5),
  • Vcc / Supply - 3.3V supply (JP1, pin 14),
  • Gnd. (JP1, pin 9)

Pin numbers refer to the Barracuda board itself. It's probably best to solder the wires to the main board inside the radio, rather than directly to the barracuda board so that it can be removed if necessary. Carefully check the connections to make sure the correct pins are used and nothing gets shorted out!

Board outline with numbered pins
Connector pinout

A 47nF ceramic or polyester decoupling capacitor connected to the supply pins at the sensor end of the wires is probably a good idea.

Configuration to enable control

For the radio to respond to an IR remote control a lircd configuration file is required in the /etc/config/ directory. The file must be named lircd_configXXXX.conf where the XXX is replaced with the radio's hardware ID. For a Logik IR100 this would be lircd_config1012.conf

Using a Reciva remote control

If you have a remote control that works with an existing Reciva radio you can simply copy the file for that, renaming it with your radio's hardware ID. It has been reported [1] that a One for all universal remote control set up with code 0435 will work with an MX200i so to use this with a Logik IR100 you would need to do this in a root terminal (login as admin):

Enable write access:

# mount / -orw,remount

Copy the existing config file:

# cp /etc/config/lircd_config825.conf /etc/config/lircd_config1012.conf

Disable write access again:

# mount / -oro,remount

and reboot:

# reboot

And everything should work! No changes are required to the /root/hwconfig/configXXXX.txt file.

Note that some functions, such as volume control, may need to be enabled in the /root/hwconfig/configXXXX.txt file for the corresponding buttons on the remote to respond correctly but no changes are required for the basic functions.

Using any remote control

It should be possible to use any remote control using a suitable configuration file. Check to see if details for your remote control are available or use irrecord, part of lircd available on linux and probably windows, to create a new file.

Note: Not tested with raw codes.

I've used a One for all URC-3920 [2] programmed for code 02230 to make this lircd_configXXX.conf file:

# Please make this file available to others
# by sending it to <>
# this config file was automatically generated
# using lirc-0.8.3(default) on Fri Nov  5 13:52:36 2010
# contributed by GC
# brand:         One for All - urc3920 Code:02230
# model no. of remote control: 
# devices being controlled by this remote:
begin remote
  name  urc3920-02230
  bits           13
  eps            30
  aeps          100
  one           866   909
  zero          866   909
  plead         858
  gap          113721
  toggle_bit    2
      begin codes
# button: menu   
                  v          0x1135
# button: power  
                  O          0x1101
# button: 1
                  C          0x111E
# button: 2      
                  D          0x111F
# button: 3      
                  E          0x1120
# button: 4      
                  F          0x1122
# button: 5      
                  G          0x1123
# button: 6      
                  H          0x1124
# button: 7      
                  I          0x1126
# button: 8      
                  J          0x1127
# button: 9      
                  K          0x1128
# button: ./..   
                  k          0x1130
# button: 0      
                  L          0x112B
# button: av     
                  i          0x112F
# button: vol+   
                  U          0x1116
# button: vol-   
                  V          0x111A
# button: mute   
                  W          0x1117
# button: ok     
                  R          0x1111
# button: ch+    
                  A          0x1119
# button: ch-    
                  B          0x111D
# button: up     
                  p          0x110E
# button: down   
                  q          0x1114
# button: left   
                  N          0x1110
# button: right  
                  R          0x1112
# button: red    
                  c          0x1132
# button: green  
##                            0x1129
# button: yellow 
                  e          0x1125
# button: blue   
                  f          0x111C
# button: rew    
                  Z          0x1105
# button: ff     
                  Y          0x1108
# button: pause  
                  t          0x112E
# button: play   
                  s          0x112E
# button: rec    
##                            0x110C
# button: stop   
                  b          0x110B
# button: guide  
                  d          0x1113
# button: info   
                  3          0x110F
# button: exit   
                  N          0x111B
      end codes 
end remote

The top of the file describes the characteristics of the remote - timings etc. The codes section translates a remote control code (eg. 0x1135) into a single character that the radio decodes as a button (v).

This has the advantage over the MX200i universal remote method of the buttons being directly set to the required function, no keymapping is required. The descriptions in between the codes above are the actual buttons on the remote, not Reciva's name. It's easy to change.

Note that the version of lircd in the Reciva software doesn't seem to understand the toggle_bit_mask command so this may need to be changed to the equivalent toggle_bit command (toggle_bit_mask 0x0 will become toggle_bit 0 and for RC5 codes, as above, 0x800 will become 2).

The list of available options is:

lirc code to event mapping table from idrv_input_event.c (!)
    'A' = INPUT_UP
    'B' = INPUT_DOWN
    'C' = INPUT_PRESET_1
    'D' = INPUT_PRESET_2
    'E' = INPUT_PRESET_3
    'F' = INPUT_PRESET_4
    'G' = INPUT_PRESET_5
    'H' = INPUT_PRESET_6
    'I' = INPUT_PRESET_7
    'J' = INPUT_PRESET_8
    'K' = INPUT_PRESET_9
    'L' = INPUT_PRESET_10
    'N' = INPUT_BACK
    'U' = INPUT_VOL_UP
    'W' = INPUT_MUTE
    'X' = INPUT_ZOOM
    'b' = INPUT_STOP
    'e' = INPUT_ALARM
    'h' = INPUT_SNOOZE
    'k' = INPUT_EXTEND_PRESET "--/-"
    'l' = INPUT_AUDIO_SOURCE  // XXX for backwards compatibility
    'p' = INPUT_RC_UP
    'q' = INPUT_RC_DOWN
    's' = INPUT_PLAY
    't' = INPUT_PAUSE
    'y' = INPUT_SEEK_UP
    '0' = INPUT_REPEAT
#        // don't use '1', it's reserved for unused keys
    '3' = INPUT_INFO
    '4' = INPUT_EQ
    '5' = INPUT_MENU_TOP

If anyone would like to copy all the lircd config files from /etc/config/ give them the corresponding radio names and send them to <> it would give anyone missing a remote control the chance to use their radios without having to install Sharpfin. These files describe all the signals required to controll all the radios factory fitted with an IR sensor.

Diagnosing problems

If the remote control doesn't work at all then restart lircd from the command line and see what it outputs. To restart it is first necessary to stop any running instance of lircd.

Find the process number using:

# ps -A | grep lirc

This should give an output something like:

 102 root      1464 S <  /usr/sbin/lircd -d /dev/lirc/0 /etc/config/lircd_conf
 133 root      2280 S    grep lirc

If nothing is returned lircd isn't running. In this case the number we need is 102, so use:

# kill -9 102

and then simply:

# lircd

and see what errors are shown, hopefully they're meaningful.

Tested on Logik IR200 & BT radio.


Google groups thread on this

How to add remote control function to a BT radio: