Installing an Infrared Remote Control on the IR100: Difference between revisions

From Sharpfin
Jump to navigation Jump to search
mNo edit summary
(Major update to add instructions for adding IR control - needs formatting)
Line 2: Line 2:




* [[Enabling remote control in the firmware]]
(First contribution, could someone please fix the formatting it's all messed up)
* Build your own IR receiver circuit (see '''The Receiver Circuit''')
 
 
 
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 an IR sensor
Configuration to enable control
  Using a Reciva remote control
  Using any remote control
 
 
 
Adding a sensor
 
For radios that don't already have an IR sensor some hardware modifications will be required to fit 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.
 
Some suitable sensors available from RS components are:
 
TSOP34838  (RS 700-5308)
TSOP1138  (RS 708-5550)
TSOP31238  (RS 570-578)
GP1UX301QS  (RS 666-6542)
 
Check the pin-out for whichever model you use - they're not all the same. Connections to the radio are:
 
Decoded signal - 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:
http://sharpfin.zevv.nl/index.php/Image:Barracuda-board-outline.jpg
 
Pinout:
http://sharpfin.zevv.nl/index.php/Image:Barracuda-pinout.svg
 
A 47nF ceramic or polyester decoupling capacitor connected across 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  [http://logikir100.tripod.com/Vistron.htm]  that a One for all universal remote control set up with code 0435 will work with an MX200i so 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 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.
 
 
Using any remote control
 
It should be possible to use any remote control using a suitable configuration file. Check http://www.lirc.org/remotes 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.
 
I've used a One for all URC-3920 programmed for code 02230 to make this lircd_configXXX.conf file:
 
 
............
 
 
# Please make this file available to others
# by sending it to <lirc@bartelmus.de>
#
# 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
  flags RC5|CONST_LENGTH
  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 into a single character that the radio decodes as a button.
 
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 (0x0 will become 0, and for RC5 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
    'M' = INPUT_REPLY
    'N' = INPUT_BACK
    'O' = INPUT_POWER
    'P' = INPUT_POWER_ON
    'Q' = INPUT_POWER_OFF
    'R' = INPUT_SELECT
    'S' = INPUT_RELEASE
    'T' = INPUT_SHIFT
    'U' = INPUT_VOL_UP
    'V' = INPUT_VOL_DOWN
    'W' = INPUT_MUTE
    'X' = INPUT_ZOOM
    'Y' = INPUT_SKIP_NEXT
    'Z' = INPUT_SKIP_PREVIOUS
    'a' = INPUT_PLAY_PAUSE
    'b' = INPUT_STOP
    'c' = INPUT_PLAYBACK_MODE
    'd' = INPUT_BROWSE_QUEUE
    'e' = INPUT_ALARM
    'f' = INPUT_SLEEP_TIMER
    'g' = INPUT_AUDIO_SOURCE
    'h' = INPUT_SNOOZE
    'i' = INPUT_STORE_PRESET
    'j' = INPUT_RECALL_PRESET
    'k' = INPUT_EXTEND_PRESET "--/-"
    'l' = INPUT_AUDIO_SOURCE  // XXX for backwards compatibility
    'm' = INPUT_SWITCH_MODE_TO_IRADIO
    'n' = INPUT_SWITCH_MODE_TO_MEDIA_PLAYER
    'o' = INPUT_SWITCH_MODE_TO_LINE_IN
    'p' = INPUT_RC_UP
    'q' = INPUT_RC_DOWN
    'r' = INPUT_FM_STEREO_MONO_SWITCH
    's' = INPUT_PLAY
    't' = INPUT_PAUSE
    'u' = INPUT_PRESET_MENU
    'v' = INPUT_CONFIGURE_MENU
    'w' = INPUT_SWITCH_MODE_TO_FM
    'x' = INPUT_SEEK_DOWN
    'y' = INPUT_SEEK_UP
 
    '0' = INPUT_REPEAT
#        // don't use '1', it's reserved for unused keys
    '2' = INPUT_FORWARD
    '3' = INPUT_INFO
    '4' = INPUT_EQ
    '5' = INPUT_MENU_TOP
 
 
 
 
 
 
 
 


http://www.nslu2-linux.org/wiki/HowTo/AddAnInfraredReceiverAndTransmitterWithLIRC





Revision as of 14:36, 6 November 2010

(Please EDIT if you see something wrong)


(First contribution, could someone please fix the formatting it's all messed up)


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 an IR sensor
Configuration to enable control
 Using a Reciva remote control 
 Using any remote control


Adding a sensor

For radios that don't already have an IR sensor some hardware modifications will be required to fit 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.

Some suitable sensors available from RS components are:

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

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

Decoded signal - 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: http://sharpfin.zevv.nl/index.php/Image:Barracuda-board-outline.jpg

Pinout: http://sharpfin.zevv.nl/index.php/Image:Barracuda-pinout.svg

A 47nF ceramic or polyester decoupling capacitor connected across 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 use this with a Logik IR100 you would need to do this in a root terminal (login as admin):

Enable write access:

  1. mount / -orw,remount

Copy existing config file:

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

Disable write access again:

  1. mount / -oro,remount

and reboot:

  1. reboot

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


Using any remote control

It should be possible to use any remote control using a suitable configuration file. Check http://www.lirc.org/remotes 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.

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


............


  1. Please make this file available to others
  2. by sending it to <lirc@bartelmus.de>
  3. this config file was automatically generated
  4. using lirc-0.8.3(default) on Fri Nov 5 13:52:36 2010
  5. contributed by GC
  6. brand: One for All - urc3920 Code:02230
  7. model no. of remote control:
  8. devices being controlled by this remote:

begin remote

 name  urc3920-02230
 bits           13
 flags RC5|CONST_LENGTH
 eps            30
 aeps          100
 one           866   909
 zero          866   909
 plead         858
 gap          113721
 toggle_bit    2
     begin codes
  1. button: menu
                 v          0x1135
  1. button: power
                 O          0x1101
  1. button: 1
                 C          0x111E
  1. button: 2
                 D          0x111F
  1. button: 3
                 E          0x1120
  1. button: 4
                 F          0x1122
  1. button: 5
                 G          0x1123
  1. button: 6
                 H          0x1124
  1. button: 7
                 I          0x1126
  1. button: 8
                 J          0x1127
  1. button: 9
                 K          0x1128
  1. button: ./..
                 k          0x1130
  1. button: 0
                 L          0x112B
  1. button: av
                 i          0x112F
  1. button: vol+
                 U          0x1116
  1. button: vol-
                 V          0x111A
  1. button: mute
                 W          0x1117
  1. button: ok
                 R          0x1111
  1. button: ch+
                 A          0x1119
  1. button: ch-
                 B          0x111D
  1. button: up
                 p          0x110E
  1. button: down
                 q          0x1114
  1. button: left
                 N          0x1110
  1. button: right
                 R          0x1112
  1. button: red
                 c          0x1132
  1. button: green
    1. 0x1129
  2. button: yellow
                 e          0x1125
  1. button: blue
                 f          0x111C
  1. button: rew
                 Z          0x1105
  1. button: ff
                 Y          0x1108
  1. button: pause
                 t          0x112E
  1. button: play
                 s          0x112E
  1. button: rec
    1. 0x110C
  2. button: stop
                 b          0x110B
  1. button: guide
                 d          0x1113
  1. button: info
                 3          0x110F
  1. 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 into a single character that the radio decodes as a button.

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 (0x0 will become 0, and for RC5 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
    'M' = INPUT_REPLY
    'N' = INPUT_BACK
    'O' = INPUT_POWER
    'P' = INPUT_POWER_ON
    'Q' = INPUT_POWER_OFF
    'R' = INPUT_SELECT
    'S' = INPUT_RELEASE
    'T' = INPUT_SHIFT
    'U' = INPUT_VOL_UP
    'V' = INPUT_VOL_DOWN
    'W' = INPUT_MUTE
    'X' = INPUT_ZOOM
    'Y' = INPUT_SKIP_NEXT
    'Z' = INPUT_SKIP_PREVIOUS
    'a' = INPUT_PLAY_PAUSE
    'b' = INPUT_STOP
    'c' = INPUT_PLAYBACK_MODE
    'd' = INPUT_BROWSE_QUEUE
    'e' = INPUT_ALARM
    'f' = INPUT_SLEEP_TIMER
    'g' = INPUT_AUDIO_SOURCE
    'h' = INPUT_SNOOZE
    'i' = INPUT_STORE_PRESET
    'j' = INPUT_RECALL_PRESET
    'k' = INPUT_EXTEND_PRESET "--/-"
    'l' = INPUT_AUDIO_SOURCE  // XXX for backwards compatibility
    'm' = INPUT_SWITCH_MODE_TO_IRADIO
    'n' = INPUT_SWITCH_MODE_TO_MEDIA_PLAYER
    'o' = INPUT_SWITCH_MODE_TO_LINE_IN
    'p' = INPUT_RC_UP
    'q' = INPUT_RC_DOWN
    'r' = INPUT_FM_STEREO_MONO_SWITCH
    's' = INPUT_PLAY
    't' = INPUT_PAUSE
    'u' = INPUT_PRESET_MENU
    'v' = INPUT_CONFIGURE_MENU
    'w' = INPUT_SWITCH_MODE_TO_FM
    'x' = INPUT_SEEK_DOWN
    'y' = INPUT_SEEK_UP
    '0' = INPUT_REPEAT
  1. // don't use '1', it's reserved for unused keys
    '2' = INPUT_FORWARD
    '3' = INPUT_INFO
    '4' = INPUT_EQ
    '5' = INPUT_MENU_TOP







sources:

https://www.reciva.com/index.php?option=com_joomlaboard&Itemid=108&func=view&id=8074&catid=3 http://groups.google.co.uk/group/sharpfin/browse_thread/thread/1b78b9adefcd8067 http://logikir100.tripod.com/Logik.htm http://sharpfin.zevv.nl/index.php/Config.txt_File


How to add remote control function to a BT radio:

http://logikir100.tripod.com/irmod.htm