Antec Fusion lirc

From MythTV Official Wiki
Jump to: navigation, search

There are different receiver models. Run the command lsusb to determine your model. Different remotes also have different codes. This description has a lot of information, and emphasizes Mythbuntu in its description. The description only covers one model

Vendor product 15c2:0038 and Remote Veris RM200

If the output from lsusb shows something like ID 15c2:0038 SoundGraph Inc. and the remote is a Veris RM200, try this solution.

Update: As of LIRC 0.8.6, most of this content is obsolete. LIRC 0.8.6 creates only one /dev/lirc0 device, and the default lircd.conf found in /usr/share/lirc/remotes/imon/lircd.conf.imon-antec-veris works out of the box.


The methods used are described in [MythTV blog description]. You may need to modify the lirc. See the mythtvblog entry for descriptions of how to do this.


The receiver uses 2 devices, /dev/lirc0 and /dev/lirc1. Some commands are received by one, some are received by the other. There is a certain logic behind the separation. Mouse and keyboard commands are received by /dev/lirc0; this includes the directional pad, left click, enter, and the number button, but skips the mouse/keyboard toggle button.

Everything else comes through /dev/lirc1. There are also commands generated by the volume knob. Some of the commands generated by the volume knob have the same bit code as some of the commands generated by the remote, but the duplicate bit codes are received by different devices, so it works out.

The command mode2 -d /dev/lirc0 and mode2 -d /dev/lirc1 was used to determine the codes.

When LClick is pressed briefly, it is followed immediately by MouseButtonUp. When LClick is pressed for a longer period, MouseButtonUp is not sent until another button has been pressed, perhaps RClick. This allows the mouse button to be kept down when dragging. Some of the controls are still unclear, but there is a start here.

The commands received by /dev/lirc1 come in pairs. One code when the button is pressed, another when the button is released. The release commands are appended with the string Release.

The knob has codes for clockwise motion and counterclockwise motion. When the knob is turned quickly, a different command is issued. WheelCW1 is a slow turn clockwise. WheelCW2 is a faster turn. WheelCW3 is a still faster turn. The knob commands are received by /dev/lirc1. WheelCCW1 has the same code as MouseButtonUp, but WheelCCW1 is received by /dev/lirc1, and MouseButtonUp is received by /dev/lirc0.

A few files are included here.



hardware.conf

This controls the entire lirc setup.

 # /etc/lirc/hardware.conf
 #
 #Chosen Remote Control
 REMOTE="Soundgraph iMON Knob"
 REMOTE_MODULES="lirc_dev lirc_imon"
 REMOTE_DRIVER="default"
 REMOTE_DEVICE="/dev/lirc0"
 REMOTE_LIRCD_CONF=""
 REMOTE_LIRCD_ARGS="/etc/lirc/lircd-0.conf"
 
 #Chosen IR Transmitter
 TRANSMITTER="None"
 TRANSMITTER_MODULES=""
 TRANSMITTER_DRIVER="default"
 TRANSMITTER_DEVICE="/dev/lirc1"
 TRANSMITTER_LIRCD_CONF=""
 TRANSMITTER_LIRCD_ARGS="/etc/lirc/lircd-1.conf"
 
 #Enable lircd
 START_LIRCD="true"
 
 #Don't start lircmd even if there seems to be a good config file
 START_LIRCMD="true"
 
 #Try to load appropriate kernel modules
 LOAD_MODULES="true"
 
 # Default configuration files for your hardware if any
 LIRCMD_CONF=""
 
 #Forcing noninteractive reconfiguration
 #If lirc is to be reconfigured by an external application
 #that doesn't have a debconf frontend available, the noninteractive
 #frontend can be invoked and set to parse REMOTE and TRANSMITTER
 #It will then populate all other variables without any user input
 #If you would like to configure lirc via standard methods, be sure
 #to leave this set to "false"
 FORCE_NONINTERACTIVE_RECONFIGURATION="false"
 START_LIRCMD=""

/etc/init.d/lirc

This is a slightly modified version of the official Ubuntu file. Here's the patch.

 --- lirc~	2008-09-24 14:31:50.000000000 -0700
 +++ lirc	2009-02-21 09:55:59.000000000 -0800
 @@ -65,7 +65,8 @@
          #Now, if we ALSO have a transmitter defined, add some args
          #To make the first lircd listen up
          if [ ! -z "$TRANSMITTER_DEVICE" ] || [ ! -z "$TRANSMITTER_DRIVER" ]; then
 -            REMOTE_ARGS="$REMOTE_ARGS --output=/dev/lircd --listen"
 +#            REMOTE_ARGS="$REMOTE_ARGS --output=/dev/lircd --listen"
 +            REMOTE_ARGS="$REMOTE_ARGS --listen"
          fi
      fi
      echo $REMOTE_ARGS
 @@ -87,7 +88,8 @@
          #Now, if we ALSO have a remote defined, add some args
          #To make the second lircd connect
          if [ ! -z "$REMOTE_DEVICE" ] || [ ! -z "$REMOTE_DRIVER" ]; then
 -            TRANSMITTER_ARGS="$TRANSMITTER_ARGS --output=/dev/lircd1 --connect=localhost:8765 --pidfile=/var/run/lircd1.pid"
 +#            TRANSMITTER_ARGS="$TRANSMITTER_ARGS --output=/dev/lircd1 --connect=localhost:8765 --pidfile=/var/run/lircd1.pid"
 +            TRANSMITTER_ARGS="$TRANSMITTER_ARGS --output=/dev/lircd --connect=localhost:8765 --pidfile=/var/run/lircd1.pid"
          fi
      fi
      echo $TRANSMITTER_ARGS



lircd-0.conf

For Ubuntu, this is placed in the directory /etc/lirc. This controls all commands using /dev/lirc0, which is only from the remote.


 #This configuration has been automatically generated via
 #the Ubuntu LIRC package maintainer scripts.
 #
 #It includes the default configuration for the remote and/or
 #transmitter that you have selected during package installation.
 #
 #Feel free to add any custom remotes to the configuration
 #via additional include directives or below the existing
 #Ubuntu include directives from your selected remote and/or
 #transmitter.
 
 #Configuration for the Soundgraph iMON Knob remote:
 include /usr/share/lirc/remotes/imon/lircd.conf.imon.rm200-0

lircd-1.conf

For Ubuntu, this is placed in the directory /etc/lirc. This controls all commands using /dev/lirc1, both from the remote and the knob.

 #This configuration has been automatically generated via
 #the Ubuntu LIRC package maintainer scripts.
 #
 #It includes the default configuration for the remote and/or
 #transmitter that you have selected during package installation.
 #
 #Feel free to add any custom remotes to the configuration
 #via additional include directives or below the existing
 #Ubuntu include directives from your selected remote and/or
 #transmitter.
 
 include /usr/share/lirc/remotes/imon/lircd.conf.imon.rm200-1
 include /usr/share/lirc/remotes/imon/lircd.conf.imon-knob-only


lircd.conf.imon.rm200-0

This file catches codes which come in through /dev/lirc0. For Ubuntu, this is placed in the directory /usr/share/lirc/remotes/imon.


 # Please make this file available to others
 # by sending it to <lirc@bartelmus.de>
 #
 # this config file was automatically generated
 # using lirc-0.8.4(default) on Sat Oct 18 02:21:26 2008
 #
 # contributed by Jean-Yves Avenard
 # Modified by Kevin Dalley
 #
 # brand:                       Antec Fusion Remote
 # model no. of remote control: MX200
 # devices being controlled by this remote:
 #
 # MouseButtonUp indicates the LClick or RClick has been released
 # Pressing quickly on LClick or RClick includes MouseButtonUp
 # When a mouse button had previously been held down.
 # Pushing longer on LClick or RClick, and release
 # and MouseButtonUp will not be sent until another button is hit
 # This allows a mouse button to be pushed down while the
 # mouse is moved.
 
 begin remote
 
   name  mx200
   bits           32
   eps            30
   aeps          100
 
   one             0     0
   zero            0     0
   gap          195991
   toggle_bit_mask 0
 
       begin codes
           Backspace                0x0200002A
           Select/Space             0x0200002C
           LeftMenu                 0x02800000
           RightMenu                0x02000065
           LClick                   0x01010000
           RClick                   0x01020000
           MouseButtonUp            0x01000000
           Enter                    0x02000028
           Up                       0x01008000
           Down                     0x01007F00
           Left                     0x01000080
           Right                    0x0100007F
           ESC                      0x02000029
           1                        0x0200001E
           2                        0x0200001F
           3                        0x02000020
           4                        0x02000021
           5                        0x02000022
           6                        0x02000023
           7                        0x02000024
           8                        0x02000025
           9                        0x02000026
           *                        0x02200025
           0                        0x02000027
           #                        0x02200020
           KeyUp                    0x02000000
       end codes
 
 end remote
 

lircd.conf.imon.rm200-1

This file catches codes which come in through /dev/lirc1. For Ubuntu, this is placed in the directory /usr/share/lirc/remotes/imon.

 # Please make this file available to others
 # by sending it to <lirc@bartelmus.de>
 #
 # this config file was automatically generated
 # using lirc-0.8.4(default) on Sat Oct 18 02:21:26 2008
 #
 # contributed by Jean-Yves Avenard
 #
 # brand:                       Antec Fusion Remote
 # model no. of remote control: MX200
 # devices being controlled by this remote:
 #
 # Button names ending in Release indicate that the button has been released.
 # The wheel commands are for the knob
 
 begin remote
 
   name  mx200
   bits           32
   eps            30
   aeps          100
 
   one             0     0
   zero            0     0
   gap          195997
   toggle_bit_mask 0
       begin codes
           AppExit                  0x288195B7
           AppExitRelease           0x2881D5B7
           Power                    0x289115B7
           PowerRelease             0x289155B7
           Play                     0x2A8115B7
           PlayRelease              0x2A8155B7
           Record                   0x298115B7
           RecordRelease            0x298155B7
           Eject                    0x29B195B7
           EjectRelease             0x29B1D5B7
           Rewind                   0x2A8195B7
           RewindRelease            0x2A81D5B7
           Pause                    0x2A9115B7
           PauseRelease             0x2A9155B7
           Forward                  0x2B8115B7
           ForwardRelease           0x2B8155B7
           Prev                     0x2B9115B7
           PrevRelease              0x2B9155B7
           Stop                     0x2B9715B7
           StopRelease              0x2B9755B7
           Skip                     0x298195B7
           SkipRelease              0x2981D5B7
           Eject2                   0x299395B7
           Eject2Release            0x2993D5B7
           AppLaunch                0x29B715B7
           AppLaunchRelease         0x29B755B7
           TaskSwitcher             0x2a9395b7
           TaskSwitcherRelease      0x2a93D5b7
           Go                       0x2AB195B7
           GoRelease                0x2AB1D5B7
           Mute                     0x2B9595B7
           MuteRelease              0x2B95D5B7
           Vol+                     0x28A395B7
           Vol+Release              0x28A3D5B7
           Vol-                     0x28A595B7
           Vol-Release              0x28A5D5B7
           Ch-                      0x288795B7
           Ch-Release               0x2887D5B7
           Ch+                      0x289395B7
           Ch+Release               0x2893D5B7
           Timer                    0x2B8395B7
           TimerRelease             0x2B83D5B7
           Video                    0x2B8515B7
           VideoRelease             0x2B8555B7
           Music                    0x299195B7
           MusicRelease             0x2991D5B7
           Pictures                 0x2BA115B7
           PicturesRelease          0x2BA155B7
           TV                       0x28A515B7
           TVRelease                0x28A555B7
           Bookmark                 0x288515B7
           BookmarkRelease          0x288555B7
           Thumbnail                0x2AB715B7
           ThumbnailRelease         0x2AB755B7
           Zoom                     0x29A595B7
           ZoomRelease              0x29A5D5B7
           FullScreen               0x2AA395B7
           FullScreenRelease        0x2AA3D5B7
           DVD                      0x29A395B7
           DVDRelease               0x29A3D5B7
           Menu                     0x2BA395B7
           MenuRelease              0x2BA3D5B7
           Subtitle                 0x298595B7
           SubtitleRelease          0x2985D5B7
           Audio                    0x2B8595B7
           AudioRelease             0x2B85D5B7
           MouseKeyboard            0x299115B7
           MouseKeyboardRelease     0x299155B7
       end codes
 
 end remote


lircd.conf.imon-knob-only

This file catches codes coming from the knob, which comes in through /dev/lirc1. For Ubuntu, this is placed in the directory /usr/share/lirc/remotes/imon.


/etc/lirc/lircmd.conf

Allows use of the remote as a mouse. This was slightly modified from the source listed in the file.


 #
 # To find out how to get a proper configuration file please read:
 # 
 #	/usr/share/doc/lirc/README.Debian
 #
 # From http://acidzebra.blogspot.com/2007/07/integrating-mythtv-and-amarok_17.html
 #
 # lircmd config file
 #
 
 PROTOCOL IntelliMouse
 #PROTOCOL MouseSystems
 
 # ACCELERATOR start max multiplier
 
 ACCELERATOR 2 50 5
 
 TOGGLE_ACTIVATE * MouseKeyboard
 
 MOVE_N * Up
 MOVE_E * Right
 MOVE_S * Down
 MOVE_W * Left
 MOVE_IN * Ch+
 MOVE_OUT * Ch-
 
 BUTTON1_DOWN * LClick
 BUTTON1_UP * MouseButtonUp
 #BUTTON1_TOGGLE * star
 BUTTON3_DOWN * MouseButtonUp
 
 #BUTTON1_CLICK * OK
 #BUTTON1_TOGGLE * Prev-Channel
 #BUTTON3_CLICK * Radio
 
 # BUTTONx_CLICK, BUTTONx_UP, BUTTONx_DOWN are also possible


xorg.conf

This section should be added to /etc/X11/xorg.conf, which allows the remote to be recognized as a mouse.

 Section "InputDevice"
     Identifier "Remote"
     Driver "mouse"
     Option "Device" "/dev/lircm"
     Option "Protocol" "IntelliMouse"
     Option "SendCoreEvents"
     Option "Buttons" "5"
     Option "ZAxisMapping" "4 5"
 EndSection
 
 Section "ServerLayout"
     Identifier "StandardLayout"
     Screen 0 "Default Screen" 0 0
     InputDevice "Remote"
 EndSection


.lirc/mythtv

In Ubuntu, this file is placed in ~/.lirc/mythtv. Otherwise, it may be in .lirc. It includes some work for X11.


 # LIRCRC Auto Generated by Mythbuntu Lirc Generator
 # Author(s): Mario Limonciello, Nick Fox
 # Created for use with Mythbuntu
 
 begin
  flags = startup_mode
  mode = mythtv
 end
 
 begin mythtv
 begin
     remote = mx200
     prog = mythtv
     button = 7
     config = 7
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = Mute
     config = |
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = 1
     config = 1
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = 0
     config = 0
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = Pause
     config = P
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = Menu
     config = M
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = 6
     config = 6
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = 2
     config = 2
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = Ch-
     config = Down
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = Ch+
     config = Up
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = Rewind
     config = <
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = Play
     config = P
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = Vol-
     config = [
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = Stop
     config = Escape
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = ESC
     config = Escape
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = Vol+
     config = ]
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = 5
     config = 5
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = 4
     config = 4
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = Enter
     config = Return
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = Record
     config = R
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = 9
     config = 9
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = 3
     config = 3
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = Enter
     config = Enter
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = 8
     config = 8
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = Up
     config = Up
     repeat = 0
     delay = 0
 end
 begin
     remote = mx200
     prog = mythtv
     button = Down
     config = Down
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = Right
     config = Right
     repeat = 0
     delay = 0
 end
 begin
     remote = mx200
     prog = mythtv
     button = Left
     config = Left
     repeat = 0
     delay = 0
 end
 begin
     remote = mx200
     prog = mythtv
     button = Go
     config = Enter
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = AppLaunch
     config = i
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = LClick
     config = i
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = Forward
     config = >
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = Prev
     config = Home
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = Skip
     config = End
     repeat = 0
     delay = 0
 end
 
 begin
     remote = mx200
     prog = mythtv
     button = Bookmark
     config = Space
     repeat = 0
     delay = 0
 end
 
 begin
     remote = IMON_KNOB_ONLY
     prog = mythtv
     button = WheelCCW1
     config = [
     repeat = 0
     delay = 0
 end
 
 begin
     remote = IMON_KNOB_ONLY
     prog = mythtv
     button = WheelCW1
     config = ]
     repeat = 0
     delay = 0
 end
 
 begin
     remote = IMON_KNOB_ONLY
     prog = mythtv
     button = WheelCCW2
     config = [ [
     repeat = 0
     delay = 0
 end
 
 begin
     remote = IMON_KNOB_ONLY
     prog = mythtv
     button = WheelCW2
     config = ] ]
     repeat = 0
     delay = 0
 end
 
 begin
     remote = IMON_KNOB_ONLY
     prog = mythtv
     button = WheelCCW3
     config = [ [ [
     repeat = 0
     delay = 0
 end
 
 begin
     remote = IMON_KNOB_ONLY
     prog = mythtv
     button = WheelCW3
     config = ] ] ]
     repeat = 0
     delay = 0
 end
 
 begin
     button = MouseKeyboard
     repeat = 3
     flags = mode
     mode = X11
 end
 
 end mythtv
 
 begin X11
 
 begin
     button = MouseKeyboard
     repeat = 3
     flags = mode
     mode = mythtv
     end
 
 end X11

References