Wiki

Outils pour utilisateurs

Outils du site


antec_fusion_remote

A ce jour (17/09/2010), tout fonctionne avec les version de lirc et lcdproc fournis dans les dépôts Ubuntu (10.04). Donc plus besoin de s'embêter à compiler, il suffit de prendre les fichiers de configuration.

Télécommande et écran LCD d'un boitier Antec Fusion Remote

L'objectif de cet article est de décrire en détail l'installation et la configuration des logiciels en vue de faire fonctionner :

  1. une télécommande Veris RM200 avec le recepteur intégré au boitier
  2. l'écran LCD du boitier
  3. Le bouton de volume du boitier

Configuration

La configuration utilisée pour réaliser ce tutorial est la suivante :

  1. ubuntu 9.04
  2. kernel ubuntu 2.6.28-15
  3. mythtv 0.21 (paquets ubuntu)

Si vous avez déjà parcouru des sites à la recherche de documentation, vous aurez constaté qu'il existe apparement plusieurs types de matériel installé dans ces boitiers. La configuration semble être différente selon ces modèles. Pour ma part j'ai une version 0038.

Pour déterminer votre version :

lsusb | grep -i soundgraph

et vous devriez obtenir quelque chose de semblable à ca :

Bus 004 Device 002: ID 15c2:0038 SoundGraph Inc.

Installation de lirc

Il faut, surtout si vous avez déjà 'tenté' un certain nombre de manipulation pour faire fonctionner la télécommande et l'écran, commencer par faire un petit nettoyage des éléments déjà installés :

	sudo /etc/init.d/lirc stop
	sudo apt-get remove lirc lirc-modules-source lcdproc

On installe ensuite quelques petits outils nécessaires à la configuration / compilation des différentes sources. sudo aptitude install cvs dialog libtool automake1.9 autoconf build-essential automake

Puis on continue par ce qui nous intéresse vraiment : lirc. A l'heure ou j'écris ces lignes, la version de lirc obtenue par CVS est la 0.8.6.

	cvs -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc login
	cvs -z8 -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc co lirc
	cd lirc
	cvs update
 
	cd lirc
	sudo ./autogen.sh
	sudo ./setup.sh
 
	Driver Configuration > USB Devices > Soundgraph iMon IR/LCD
	Save configuration & run configure
 
	make
	make install

Si vous débutez en compilation, pas de panique si vous obtenez des messages d'erreur. Il doit manquer des paquets.

On installe ensuite les drivers que l'on vient de compiler. Attention, la manipulation suivante écrasera vos drivers actuels, donc pensez à faire une sauvegarde.

	cp drivers/lirc_imon/lirc_imon.ko /lib/modules/2.6.28-15-generic/kernel/ubuntu/lirc/lirc_imon/
	cp drivers/lirc_imon/lirc_imon.ko /lib/modules/2.6.28-15-generic/misc/
 
	cp drivers/lirc_dev/lirc_dev.ko /lib/modules/2.6.28-15-generic/kernel/ubuntu/lirc/lirc_dev/
	cp drivers/lirc_dev/lirc_dev.ko /lib/modules/2.6.28-15-generic/misc/

Remarque : si vous avez plusieurs noyaux, ou si vous changez de noyau, ne vous etonnez pas si ca ne fonctionne plus. Il faudra peut-être refaire certaines étapes de l'installation. Pour être sur de remplacer tous les drivers, faites une recherche de tous les fichiers lirc_imon.ko et lirc_dev.ko du système et au besoin, remplacez les.

Configuration de lirc

Les fichiers de configuration de lirc se trouvent dans le répertoire /etc/lirc.

Le fichier hardware.conf est le suivant :

	# /etc/lirc/hardware.conf
	#
	#Chosen Remote Control
	REMOTE="Soundgraph iMON IR/LCD"
	REMOTE_MODULES="lirc_dev lirc_imon"
	REMOTE_DRIVER=""
	REMOTE_DEVICE="/dev/lirc0"
	REMOTE_LIRCD_CONF="/etc/lirc/lircd.conf"
	REMOTE_LIRCD_ARGS="--driver=default --device=/dev/lirc0 --pidfile=/var/run/lirc0.pid --listen=8765"
 
	#Chosen IR Transmitter
	TRANSMITTER="None"
	TRANSMITTER_MODULES=""
	TRANSMITTER_DRIVER=""
	TRANSMITTER_DEVICE=""
	TRANSMITTER_LIRCD_CONF=""
	TRANSMITTER_LIRCD_ARGS=""
 
	#Enable lircd
	START_LIRCD="true"
 
	#Don't start lircmd even if there seems to be a good config file
	#START_LIRCMD="false"
 
	#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=""
	START_LIRCMD=""

Le fichier lircd.conf est le suivant :

	# this config file was hand-generated
	# using lirc-0.8.4a (imon) on Fri Nov  7 13:55:44 2008
	#
	# contributed by Jarod Wilson <jarod@wilsonet.com>
	#
	# brand:                       Antec Veris
	# model no. of remote control: RM200 (Rebadged iMon PAD)
	# devices being controlled by this remote:
	#       -Antec Veris Multimedia Station Premiere
	#       -Antec Veris Multimedia Station Elite, possibly
	#
	# nb: most codes appear to come in with an initial keypress value, as well as
	# a "this key is no longer being pressed" value, which is "key | 0x00004000"

	begin remote

	  name   Antec_Veris_RM200
	  bits                  64
	  eps                   30
	  aeps                 100

	  one              0     0
	  zero             0     0
	  gap               95997
	  ignore_mask 0x0000000000000301
	  min_repeat             1
	  toggle_bit             0

		  begin codes
			  KEY_EXIT                 0x2881d5b700000201 # AppExit
			  KEY_POWER                0x289115b700000201 # Power
			  KEY_RECORD               0x298115b700000201 # Record
			  KEY_PLAY                 0x2a8115b700000201 # Play
			  KEY_OPEN                 0x29b195b700000201 # Tray Open
			  KEY_REWIND               0x2a8195b700000201 # Rewind
			  KEY_PAUSE                0x2a9115b700000201 # Pause
			  KEY_FASTFORWARD          0x2b8115b700000201 # Fast Forward
			  KEY_PREVIOUS             0x2b9115b700000201 # Previous Chapter
			  KEY_STOP                 0x2b9715b700000201 # Stop
			  KEY_NEXT                 0x298195b700000201 # Next Chapter
			  KEY_ESC                  0x0200002900000201 # Esc
			  KEY_EJECTCD              0x299395b700000201 # Eject
			  AppLauncher              0x29b715b700000201 # App. Launcher
			  Go                       0x2ab195b700000201 # Go
			  TaskSwitcher             0x2a9395b700000201 # Task Switcher
			  KEY_MUTE                 0x2b9595b700000201 # Mute
			  KEY_VOLUMEUP             0x28a395b700000201 # VOL +
			  KEY_VOLUMEDOWN           0x28a595b700000201 # VOL -
			  KEY_CHANNELUP            0x289395b700000201 # CH +
			  KEY_CHANNELDOWN          0x288795b700000201 # CH -
			  Timer                    0x2b8395b700000201 # Timer
			  KEY_1                    0x0200001e00000201 # 1
			  KEY_2                    0x0200001f00000201 # 2
			  KEY_3                    0x0200002000000201 # 3
			  KEY_4                    0x0200002100000201 # 4
			  KEY_5                    0x0200002200000201 # 5
			  KEY_6                    0x0200002300000201 # 6
			  KEY_7                    0x0200002400000201 # 7
			  KEY_8                    0x0200002500000201 # 8
			  KEY_9                    0x0200002600000201 # 9
			  KEY_0                    0x0200002700000201 # 0
			  Star                     0x0220002500000201 # *
			  Hash                     0x0220002000000201 # #
			  KEY_VIDEO                0x2b8515b700000201 # Videos
			  KEY_AUDIO                0x299195b700000201 # Music
			  KEY_PHOTO                0x2ba115b700000201 # Pictures
			  KEY_TV                   0x28a515b700000201 # TV
			  KEY_BOOKMARKS            0x288515b700000201 # Bookmark
			  Thumbnail                0x2ab715b700000201 # Thumbnail
			  Zoom                     0x29a595b700000201 # Zoom
			  FullScreen               0x2aa395b700000201 # Full Screen
			  KEY_DVD                  0x29a395b700000201 # DVD
			  KEY_MENU                 0x2ba395b700000201 # Menu
			  Subtitle                 0x298595b700000201 # Subtitle
			  KEY_LANGUAGE             0x2b8595b700000201 # Audio
			  MouseKeyboard            0x299115b700000201 # Mouse/Keyboard
	# MouseKeyboard also spews 0100007f between press and release...
			  KEY_BACKSPACE            0x0200002a00000201 # Backspace
			  KEY_SELECT               0x0200002c00000201 # Select/Space
	# SelectSpace also spews 2b9115b7 and 289115b7 between press and release...
			  LeftMenu                 0x0280000000000201 # Left Menu
			  RightMenu                0x0200006500000201 # Right Menu
			  BTN_LEFT                 0x0101000000000201 # L. Click
	# LeftClick flips to 01010001 when held
			  BTN_RIGHT                0x0102000000000201 # R. Click
	# Un-click for both right and left is 01000000
			  KEY_ENTER                0x0200002800000201 # ENTER
	# Un-click for all 0x02foo buttons is 02000000
			  KEY_UP                   0x0100800000000201 # Pad Up
			  KEY_DOWN                 0x01007f0000000201 # Pad Down
			  KEY_LEFT                 0x0100008000000201 # Pad Left
			  KEY_RIGHT                0x0100007f00000201 # Pad Right
		  end codes

	end remote

Pour démarrer automatiquement lirc, il faut créer le fichier /etc/init.d/lircd :

	#! /bin/sh
	#
	# This is an init script for Debian Sid
	# Copy it to /etc/init.d/lirc and type
	# > update-rc.d lirc defaults 20
	#
 
 
	test -f /usr/local/sbin/lircd || exit 0
 
	case "$1" in
	  start)
		# Dans le cas ou /var/run/lirc n'esiste pas => creation
		test -c /var/run/lirc || (mkdir /var/run/lirc)
		# in case your lirc dev points are not created automatically, the next
		# line will create them.
		test -c /dev/lirc || (mkdir -p -- . /dev && /bin/mknod /dev/lirc c 61 0)
		echo -n "Starting lirc daemon: lircd"
		start-stop-daemon --start --quiet --exec /usr/local/sbin/lircd -- --device=/dev/lirc
		echo "."
		;;
	  stop)
		echo -n "Stopping lirc daemon: lircd"
		start-stop-daemon --stop --quiet --exec /usr/local/sbin/lircd
		echo "."
		;;
	  reload|force-reload)
		start-stop-daemon --stop --quiet --signal 1 --exec /usr/local/sbin/lircd
		;;
	  restart)
		echo -n "Stopping lirc daemon: lircd"
		start-stop-daemon --stop --quiet --exec /usr/local/sbin/lircd
		sleep 1
		echo -n "Starting lirc daemon: lircd"
		start-stop-daemon --start --quiet --exec /usr/local/sbin/lircd -- --device=/dev/lirc
		echo "."
		;;
	  *)
		echo "Usage: /etc/init.d/lircd {start|stop|reload|restart|force-reload}"
		exit 1
	esac
 
	exit 0

Changer ses droits pour le rendre exécutable, puis l'exécuter automatiquement au démarrge :

       update-rc.d /etc/init.d/lircd defaults 15

La position (15), devra peut être être modifiée. En effet, il faut respecter un ordre dans le démarrage des démons : lirc → LCDProc → mythtv.

Démarrer lirc en faisant

	/etc/init.d/lircd start

A ce stade de l'installation, vous devez normalement être en mesure de faire bouger le pointeur de la souris avec votre télécommande.

De même, vous devez pouvoir afficher des informations sur l'écran LCD :

	perl -e 'print pack "H*", "80000000091e0088"' > /dev/lcd0

Pour effacer les informations présentes à l'écran :

	perl -e 'print pack "H*", "4000000000000088"' > /dev/lcd0

Installation de LCDProc

L'installation de LCDProc ne pose pas de soucis majeurs. Cependant, j'ai rencontré quelques difficultés avec la version 0.5.3. Je n'ai pas creusé pour trouver l'origine du disfonctionnement et suis donc repassé en version 0.5.2.

Téléchargement et décompression des sources :

	wget http://sourceforge.net/projects/lcdproc/files/lcdproc/0.5.3/lcdproc-0.5.3.tar.gz/download
	tar zxvf lcdproc-0.5.3.tar.gz

Compilation et installation :

	cd lcdproc-0.5.3
	./configure --enable-drivers=imonlcd
	make
	make install

Configuration de LCDProc

Ouvrir le fichier /usr/local/etc/LCD.conf

Chercher Driver= et remplacer par Driver=imonlcd Chercher DriverPath et remplacer par DriverPath=/usr/local/lib/lcdproc/

Créer le fichier /etc/init.d/LCDd :

	#!/bin/sh -e
 
	#### BEGIN INIT INFO
	# Provides:          LCDd
	# Required-Start:    $syslog $local_fs $network $remote_fs
	# Required-Stop:     $syslog $local_fs $network $remote_fs
	# Default-Start:     2 3 4 5
	# Default-Stop:      S 0 1 6
	# Short-Description: LCDproc Server Daemon
	# Description:       Debian init script for LCDd, the display
	#                    server daemon in the LCDproc suite
	### END INIT INFO
 
	# local variables
	prefix=/usr/local
	exec_prefix=${prefix}
	bindir=${exec_prefix}/bin
	sbindir=${exec_prefix}/sbin
	etc=${prefix}/etc
 
	NAME=LCDd
	DAEMON=${sbindir}/${NAME}
	DESC="LCDproc display server daemon"
	OPTIONS=""
 
	# installation check
	test -x ${DAEMON} || exit 0
 
	case "$1" in
		start)
			printf "Starting ${DESC}: "
			start-stop-daemon --start --quiet --exec ${DAEMON} -- ${OPTIONS}
			printf "${NAME}."
			;;
		stop)
			printf "Stopping ${DESC}: "
			start-stop-daemon --stop --oknodo --quiet --exec ${DAEMON}
			printf "${NAME}."
			;;
		restart|force-reload)
			$0 stop
			sleep 1
			$0 start
			;;
		*)
			printf "Usage: $0 {start|stop|restart|force-reload}\n" >&2
			exit 1
			;;
	esac
 
	exit 0

Changer ses droits pour le rendre exécutable, puis l'exécuter automatiquement au démarrge :

	update-rc.d /etc/init.d/LCDd defaults 25

Démarrer LCDProc en faisant

	/etc/init.d/LCDd start

A ce stade, il doit y avoir des informations sur l'ecran LCD, informations transmises par LCDProc.

Configuration de mythtv

Se rendre dans le répertoire de l'utilisateur qui va exécuter le frontend :

cd /home/mythtv/

Puis créer le fichier .lircrc :

	# Record
	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = KEY_RECORD
	  repeat = 2
	  config = R
	end

	# Skip Backwards
	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = KEY_REWIND
	  repeat = 2
	  config = PgUp
	end

	# Pause
	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = KEY_PAUSE
	  repeat = 2
	  config = P
	end

	# Skip Forward
	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = KEY_FASTFORWARD
	  repeat = 2
	  config = PgDown
	end

	# Previous Commercial Cut
	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = KEY_PREVIOUS
	  repeat = 2
	  config = Q
	end

	# Stop
	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = KEY_STOP
	  repeat = 2
	  config = T
	end

	# Next Commercial Cut Forward
	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = KEY_NEXT
	  repeat = 2
	  config = Z
	end

	# Cancel / Back
	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = KEY_ESC
	  repeat = 2
	  config = Esc
	end

	# Show OSD
	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = Go
	  repeat = 2
	  config = I
	end

	# Mute
	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = KEY_MUTE
	  repeat = 2
	  config = F9
	end

	# Volume Up
	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = KEY_VOLUMEUP
	  repeat = 2
	  config = F11
	end

	# Volume Down
	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = KEY_VOLUMEDOWN
	  repeat = 2
	  config = F10
	end


	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = KEY_1
	  repeat = 2
	  config = 1
	end


	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = KEY_2
	  repeat = 2
	  config = 2
	end


	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = KEY_3
	  repeat = 2
	  config = 3
	end


	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = KEY_4
	  repeat = 2
	  config = 4
	end


	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = KEY_5
	  repeat = 2
	  config = 5
	end


	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = KEY_6
	  repeat = 2
	  config = 6
	end


	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = KEY_7
	  repeat = 2
	  config = 7
	end


	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = KEY_8
	  repeat = 2
	  config = 8
	end

	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = KEY_9
	  repeat = 2
	  config = 9
	end

	# Number Zero
	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = KEY_0
	  repeat = 2
	  config = 0
	end

	# Change Aspect Ratio
	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = Zoom
	  repeat = 2
	  config = W
	end

	# Swap PIP Windows
	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = KEY_MENU
	  repeat = 2
	  config = N
	end

	# Delete
	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = KEY_BACKSPACE
	  repeat = 2
	  config = D
	end

	# Select
	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = KEY_SELECT
	  repeat = 2
	  config = Return
	end


	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = KEY_SELECT
	  repeat = 2
	  config = Space
	end

	# PiP On-Off Toggle
	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = RightMenu
	  repeat = 2
	  config = V
	end

	# Menu
	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = BTN_LEFT
	  repeat = 2
	  config = M
	end

	# Change PiP Focus
	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = BTN_LEFT
	  repeat = 2
	  config = B
	end

	# OSD browse
	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = KEY_ENTER
	  repeat = 2
	  config = O
	end


	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = KEY_UP
	  repeat = 2
	  config = Up
	end


	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = KEY_DOWN
	  repeat = 2
	  config = Down
	end


	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = KEY_LEFT
	  repeat = 2
	  config = Left
	end


	begin
	  prog = mythtv
	  remote = Antec_Veris_RM200
	  button = KEY_RIGHT
	  repeat = 2
	  config = Right
	end

C'est lui qui va faire le lien entre lirc et mythtv.

Je précise qu'il peut contenir des erreurs. Il n'est pas de moi et je n'ai pas encore eu le temps de tester toutes les touches.

Il faut ensuite se rendre dans le frontend de mythtv, puis aller dans Paramètres > Paramètres > Aspect, puis dans la 4ème ou 5ème fenêtre, activer l'affichage sur écran LCD en cochant la case “Activer les afficheurs LCD”.

That's it. Si tout va bien, mythtv va vous afficher tout ce qu'il peut.

Rédacteur : mmbourgc (19/09/2009, MythTV [0.21] ) —

antec_fusion_remote.txt · Dernière modification: 05/08/2012 par gilles74