Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédente | |||
pctv_usb_stick_remote [Le 26/03/2016, 19:18] – 90.36.3.68 | pctv_usb_stick_remote [Le 11/04/2016, 10:34] (Version actuelle) – [Carte TV : Pinnacle PCTV Hybrid Pro Stick : installation de la télécommande] L'Africain | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | {{tag> | ||
+ | ---- | ||
+ | |||
+ | ======Carte TV : Pinnacle PCTV Hybrid Pro Stick : installation de la télécommande ====== | ||
+ | |||
+ | |||
+ | Après avoir installé votre carte pctv hybrid pro stick, il est temps de configurer la télécommande. | ||
+ | |||
+ | Il y a plusieurs types de télécommande pour cette carte.\\ | ||
+ | La configuration suivante est pour la télécommande noire toute plate, mais cela doit être identique pour les autres types de télécommande. | ||
+ | |||
+ | |||
+ | Par défaut, la télécommande ne fonctionne pas très bien: il n'y a que le son qui fonctionne. | ||
+ | |||
+ | Nous allons configurer d' | ||
+ | |||
+ | * Fonctionner le son (touches **+**, **-** et **mute**) | ||
+ | * Fermer **Kaffeine** | ||
+ | * Chaîne suivante et Chaîne Précédente | ||
+ | * Plein écran | ||
+ | * Stopper l' | ||
+ | |||
+ | Nous allons pour cela utiliser **lineak.** | ||
+ | |||
+ | |||
+ | ===== Installation ===== | ||
+ | |||
+ | [[: | ||
+ | |||
+ | |||
+ | ===== Configuration ===== | ||
+ | |||
+ | [[: | ||
+ | |||
+ | < | ||
+ | [PCTV] | ||
+ | brandname = " | ||
+ | modelname = "PCTV USB Stick Remote Control" | ||
+ | | ||
+ | Mute = 160 | ||
+ | Lancer | ||
+ | Eteindre | ||
+ | Chaine_Precedente = 152 | ||
+ | Stop = 232 | ||
+ | Plein_Ecran | ||
+ | Chaine_Suivante | ||
+ | VolumeUp | ||
+ | VolumeDown | ||
+ | [END KEYS] | ||
+ | [END PCTV] | ||
+ | | ||
+ | #### END Pinnacle PCTV USB Stick Remote ####</ | ||
+ | |||
+ | Nous allons maintenant rechercher le type de la télécommande en tapant la commande suivante dans un [[terminal]] : | ||
+ | |||
+ | lineakd -l | ||
+ | |||
+ | Si tout va bien, nous devrions voir la télécommande dans la liste sous le nom de PCTV | ||
+ | |||
+ | PCTV | ||
+ | |||
+ | Créons un fichier de configuration pour cette télécommande: | ||
+ | |||
+ | lineakd -c PCTV | ||
+ | |||
+ | Ce nouveau fichier est enregistré dans **~/ | ||
+ | |||
+ | Maintenant, éditons ce fichier et mettons ces paramètres: | ||
+ | |||
+ | < | ||
+ | # LinEAK - Linux support for Easy Access and Internet Keyboards | ||
+ | # Copyright (c) 2001,2002, 2003 Sheldon Lee Wen < | ||
+ | # and Mark Smulders < | ||
+ | # http:// | ||
+ | # | ||
+ | # lineakd configuration file | ||
+ | # | ||
+ | # example key configuration: | ||
+ | # play = "xmms --play-pause" | ||
+ | # eject = EAK_EJECT | ||
+ | # | ||
+ | # Lineakd supports the following modifier keys: | ||
+ | # control alt shift mod2 mod3 mod4 mod5 | ||
+ | |||
+ | CdromDevice = /dev/cdrom | ||
+ | Display_align = center | ||
+ | Display_color = 0aff00 | ||
+ | Display_font = -adobe-helvetica-bold-r-normal-*-*-240-*-*-p-*-*-* | ||
+ | Display_hoffset = 0 | ||
+ | Display_plugin = xosd | ||
+ | Display_pos = bottom | ||
+ | Display_soffset = 1 | ||
+ | Display_timeout = 3 | ||
+ | isplay_voffset = 50 | ||
+ | KeyboardType = PCTV | ||
+ | MixerDevice = /dev/mixer | ||
+ | Screensaver = | ||
+ | conffilename = / | ||
+ | deffilename = / | ||
+ | keystate_capslock = | ||
+ | keystate_numlock = | ||
+ | keystate_scrolllock = | ||
+ | userdeffile = / | ||
+ | | ||
+ | Mute = " | ||
+ | VolumeDown = " | ||
+ | VolumeUp = " | ||
+ | Chaine_Precedente = "dcop kaffeine KaffeineIface previous" | ||
+ | Chaine_Suivante = "dcop kaffeine KaffeineIface next" | ||
+ | Lancer = "dcop kaffeine KaffeineIface play" | ||
+ | Eteindre = "dcop kaffeine KaffeineIface quit" | ||
+ | Plein_Ecran = "dcop kaffeine KaffeineIface fullscreen" | ||
+ | Stop = "dcop kaffeine KaffeineIface stop" | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | Voila, c'est presque fini... | ||
+ | |||
+ | Nous allons rajouter Lineak au démarrage: | ||
+ | |||
+ | **Pour Ubuntu/ | ||
+ | lineakd & | ||
+ | |||
+ | **Pour Kubuntu/ | ||
+ | |||
+ | ln -s / | ||
+ | |||
+ | Une fois votre ordinateur redémarré, | ||
+ | |||
+ | Il faut savoir que l' | ||
+ | Les touches suivante et précédente sont les touches de retour et d' | ||
+ | |||
+ | |||
+ | **Pour information: | ||
+ | Les touches de 0 à 9 ne sont pas configurables car elles correspondent à des caractères du clavier (é,è,à, etc...), et si nous les configurons, | ||
+ | Les autres touches sont inactives. J'ai essayé de les faire reconnaître avec **xev** et en fouillant dans les logs, mais rien... | ||
+ | Il est certainement possible de configurer totalement les touches, mais je n'ai pas les connaissances pour. | ||
+ | |||
+ | |||
+ | ===== Via lirc ===== | ||
+ | |||
+ | L' | ||
+ | |||
+ | ====Patch des pilotes ==== | ||
+ | |||
+ | |||
+ | Il faut d' | ||
+ | |||
+ | < | ||
+ | hg clone http:// | ||
+ | cd v4l-dvb | ||
+ | </ | ||
+ | |||
+ | Il nous faut ensuite créer le patch : | ||
+ | < | ||
+ | Puis le remplir avec le code ci-dessous : | ||
+ | < | ||
+ | diff -Naur v4l-org/ | ||
+ | --- v4l-org/ | ||
+ | +++ v4l-mod/ | ||
+ | @@ -2053,6 +2053,41 @@ | ||
+ | }; | ||
+ | | ||
+ | |||
+ | +IR_KEYTAB_TYPE ir_codes_pinnacle3[IR_KEYTAB_SIZE] = { | ||
+ | + /* Keys 0 to 9 */ | ||
+ | + [ 0x27 ] = KEY_0, | ||
+ | + [ 0x0f ] = KEY_1, | ||
+ | + [ 0x15 ] = KEY_2, | ||
+ | + [ 0x10 ] = KEY_3, | ||
+ | + [ 0x18 ] = KEY_4, | ||
+ | + [ 0x1b ] = KEY_5, | ||
+ | + [ 0x1e ] = KEY_6, | ||
+ | + [ 0x11 ] = KEY_7, | ||
+ | + [ 0x21 ] = KEY_8, | ||
+ | + [ 0x12 ] = KEY_9, | ||
+ | + | ||
+ | + [ 0x39 ] = KEY_POWER, | ||
+ | + | ||
+ | + [ 0x03 ] = KEY_VOLUMEUP, | ||
+ | + [ 0x09 ] = KEY_VOLUMEDOWN, | ||
+ | + [ 0x06 ] = KEY_CHANNELUP, | ||
+ | + [ 0x0c ] = KEY_CHANNELDOWN, | ||
+ | + [ 0x3f ] = KEY_INFO, | ||
+ | + | ||
+ | + [ 0x00 ] = KEY_MUTE, | ||
+ | + | ||
+ | + //[ 0x06 ] = KEY_PLAY, | ||
+ | + [ 0x2d ] = KEY_REWIND, | ||
+ | + [ 0x33 ] = KEY_FORWARD, | ||
+ | + [ 0x30 ] = KEY_PAUSE, | ||
+ | + [ 0x3c ] = KEY_STOP, | ||
+ | + [ 0x36 ] = KEY_RECORD, | ||
+ | + [ 0x24 ] = KEY_ZOOM, /* fullscreen */ | ||
+ | + [ 0x2a ] = KEY_M, | ||
+ | + | ||
+ | +}; | ||
+ | +EXPORT_SYMBOL_GPL(ir_codes_pinnacle3); | ||
+ | + | ||
+ | /* for the Geniatech X800 remote: */ | ||
+ | | ||
+ | [ 0x00 ] = KEY_0, | ||
+ | diff -Naur v4l-org/ | ||
+ | --- v4l-org/ | ||
+ | +++ v4l-mod/ | ||
+ | @@ -2112,7 +2112,7 @@ | ||
+ | | ||
+ | | ||
+ | | ||
+ | - em2880_ir_attach(dev, | ||
+ | + em2880_ir_attach(dev, | ||
+ | | ||
+ | } | ||
+ | | ||
+ | diff -Naur v4l-org/ | ||
+ | --- v4l-org/ | ||
+ | +++ v4l-mod/ | ||
+ | @@ -92,10 +92,12 @@ | ||
+ | | ||
+ | | ||
+ | | ||
+ | - | ||
+ | + | ||
+ | + // | ||
+ | | ||
+ | - else | ||
+ | + } else { | ||
+ | | ||
+ | + } | ||
+ | } | ||
+ | |||
+ | | ||
+ | diff -Naur v4l-org/ | ||
+ | --- v4l-org/ | ||
+ | +++ v4l-mod/ | ||
+ | @@ -141,6 +141,7 @@ | ||
+ | | ||
+ | | ||
+ | | ||
+ | +extern IR_KEYTAB_TYPE ir_codes_pinnacle3[IR_KEYTAB_SIZE]; | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | On a plus qu'à patcher et recompiler les modules : | ||
+ | |||
+ | < | ||
+ | patch -p1 < telecommande.patch | ||
+ | make | ||
+ | make install | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Installation et configuration de lirc ==== | ||
+ | |||
+ | On doit d' | ||
+ | < | ||
+ | |||
+ | Vous devriez voir un paragraphe qui ressemble à ça : | ||
+ | < | ||
+ | N: Name=" | ||
+ | P: Phys=USB | ||
+ | S: Sysfs=/ | ||
+ | U: Uniq= | ||
+ | H: Handlers=kbd event8 | ||
+ | B: EV=100003 | ||
+ | B: KEY=c0000 100040 0 0 0 0 0 180 80000001 9e0000 0 40000 ffd | ||
+ | </ | ||
+ | |||
+ | Ici, c'est donc le fichier / | ||
+ | |||
+ | Ensuite, on doit installer et paramétrer lirc | ||
+ | < | ||
+ | Si vous avez déjà installé lirc, vous devez le reconfigurer (en root : sudo) via : | ||
+ | < | ||
+ | |||
+ | Lors de l’installation, | ||
+ | |||
+ | |||
+ | Cette méthode n'est pas valable lorsque le périphérique IR est amovible. Le numéro X de l' | ||
+ | Par exemple pour le récepteur Pinnacle DVB-T 72e ce sera **/ | ||
+ | Pour être sûr que le lien pointe viens vers l' | ||
+ | < | ||
+ | lrwxrwxrwx 1 root root 9 2009-12-01 11:39 pci-0000: | ||
+ | </ | ||
+ | C'est bien celui là, il ne reste plus qu'à le choisir à la troisième étape de configuration. | ||
+ | |||
+ | Enfin, on règle les codes de la télécommande : | ||
+ | < | ||
+ | < | ||
+ | begin remote | ||
+ | name linux-input-layer | ||
+ | bits 32 | ||
+ | begin codes | ||
+ | 1 0x10002 | ||
+ | 2 0x10003 | ||
+ | 3 0x10004 | ||
+ | 4 0x10005 | ||
+ | 5 0x10006 | ||
+ | 6 0x10007 | ||
+ | 7 0x10008 | ||
+ | 8 0x10009 | ||
+ | 9 0x1000a | ||
+ | 0 0x1000b | ||
+ | mute | ||
+ | vol-down | ||
+ | vol-up | ||
+ | power 0x10074 | ||
+ | pause 0x10077 | ||
+ | forward | ||
+ | rewind | ||
+ | info | ||
+ | zoom | ||
+ | chan-up | ||
+ | chan-down | ||
+ | m 0x10032 | ||
+ | record | ||
+ | stop | ||
+ | end codes | ||
+ | end remote | ||
+ | </ | ||
+ | |||
+ | ====Paramétrage de lirc ==== | ||
+ | |||
+ | Il ne reste plus qu'a créer un fichier ~/.lircrc (cf : [[: | ||
+ | En voici un d' | ||
+ | < | ||
+ | begin | ||
+ | prog = irexec | ||
+ | button = play | ||
+ | config = dcop kaffeine KaffeineIface playDvb | ||
+ | end | ||
+ | |||
+ | begin | ||
+ | prog = irexec | ||
+ | button = pause | ||
+ | config = dcop kaffeine KaffeineIface pause | ||
+ | end | ||
+ | |||
+ | begin | ||
+ | prog = irxevent | ||
+ | button = record | ||
+ | config = Key r kaffeine | ||
+ | config = Key space CurrentWindow | ||
+ | end | ||
+ | |||
+ | begin | ||
+ | prog = irexec | ||
+ | button = info | ||
+ | config = dcop kaffeine KaffeineIface dvbOSD | ||
+ | end | ||
+ | |||
+ | begin | ||
+ | prog = irexec | ||
+ | button = stop | ||
+ | config = dcop kaffeine KaffeineIface stop | ||
+ | end | ||
+ | |||
+ | begin | ||
+ | prog = irexec | ||
+ | button = forward | ||
+ | config = dcop kaffeine KaffeineIface posPlus | ||
+ | end | ||
+ | |||
+ | begin | ||
+ | prog = irexec | ||
+ | button = rewind | ||
+ | config = dcop kaffeine KaffeineIface posMinus | ||
+ | end | ||
+ | |||
+ | begin | ||
+ | prog = irexec | ||
+ | button = chan-up | ||
+ | config = dcop kaffeine KaffeineIface next | ||
+ | end | ||
+ | |||
+ | begin | ||
+ | prog = irexec | ||
+ | button = chan-down | ||
+ | config = dcop kaffeine KaffeineIface previous | ||
+ | end | ||
+ | |||
+ | begin | ||
+ | prog = irexec | ||
+ | button = power | ||
+ | config = dcop kaffeine KaffeineIface quit | ||
+ | end | ||
+ | |||
+ | begin | ||
+ | prog = irexec | ||
+ | button = vol-up | ||
+ | config = dcop kaffeine KaffeineIface volUp | ||
+ | end | ||
+ | |||
+ | begin | ||
+ | prog = irexec | ||
+ | button = mute | ||
+ | config = dcop kaffeine KaffeineIface mute | ||
+ | end | ||
+ | |||
+ | begin | ||
+ | prog = irexec | ||
+ | button = vol-down | ||
+ | config = dcop kaffeine KaffeineIface volDown | ||
+ | end | ||
+ | |||
+ | begin | ||
+ | prog = irexec | ||
+ | button = zoom | ||
+ | config = dcop kaffeine KaffeineIface fullscreen | ||
+ | end | ||
+ | |||
+ | begin | ||
+ | prog = irexec | ||
+ | button = up | ||
+ | config = dcop kaffeine KaffeineIface zoomIn | ||
+ | end | ||
+ | |||
+ | begin | ||
+ | prog = irexec | ||
+ | button = down | ||
+ | config = dcop kaffeine KaffeineIface zoomOut | ||
+ | end | ||
+ | |||
+ | begin | ||
+ | prog = irexec | ||
+ | button = 1 | ||
+ | config = dcop kaffeine KaffeineIface setNumber 1 | ||
+ | repeat = 0 | ||
+ | end | ||
+ | |||
+ | begin | ||
+ | prog = irexec | ||
+ | button = 2 | ||
+ | config = dcop kaffeine KaffeineIface setNumber 2 | ||
+ | repeat = 0 | ||
+ | end | ||
+ | |||
+ | begin | ||
+ | prog = irexec | ||
+ | button = 3 | ||
+ | config = dcop kaffeine KaffeineIface setNumber 3 | ||
+ | repeat = 0 | ||
+ | end | ||
+ | |||
+ | begin | ||
+ | prog = irexec | ||
+ | button = 4 | ||
+ | config = dcop kaffeine KaffeineIface setNumber 4 | ||
+ | repeat = 0 | ||
+ | end | ||
+ | |||
+ | begin | ||
+ | prog = irexec | ||
+ | button = 5 | ||
+ | config = dcop kaffeine KaffeineIface setNumber 5 | ||
+ | repeat = 0 | ||
+ | end | ||
+ | |||
+ | begin | ||
+ | prog = irexec | ||
+ | button = 6 | ||
+ | config = dcop kaffeine KaffeineIface setNumber 6 | ||
+ | repeat = 0 | ||
+ | end | ||
+ | |||
+ | begin | ||
+ | prog = irexec | ||
+ | button = 7 | ||
+ | config = dcop kaffeine KaffeineIface setNumber 7 | ||
+ | repeat = 0 | ||
+ | end | ||
+ | |||
+ | begin | ||
+ | prog = irexec | ||
+ | button = 8 | ||
+ | config = dcop kaffeine KaffeineIface setNumber 8 | ||
+ | repeat = 0 | ||
+ | end | ||
+ | |||
+ | begin | ||
+ | prog = irexec | ||
+ | button = 9 | ||
+ | config = dcop kaffeine KaffeineIface setNumber 9 | ||
+ | repeat = 0 | ||
+ | end | ||
+ | |||
+ | begin | ||
+ | prog = irexec | ||
+ | button = 0 | ||
+ | config = dcop kaffeine KaffeineIface setNumber 0 | ||
+ | repeat = 0 | ||
+ | end | ||
+ | </ | ||
+ | |||
+ | Pour finir, il faut ajouter au démarrage : | ||
+ | |||
+ | * **Sous Gnome :** Système-Préférences-Sessions-Programmes au démarrage : irxevent puis irexec | ||
+ | |||
+ | * - **Sous kde :** | ||
+ | < | ||
+ | kate ~/ | ||
+ | #!/bin/bash | ||
+ | irexec | ||
+ | </ | ||
+ | < | ||
+ | kate ~/ | ||
+ | #!/bin/bash | ||
+ | irxevent | ||
+ | </ | ||
+ | < | ||
+ | chmod u+x ~/ | ||
+ | </ | ||
+ | |||
+ | ===== Voir aussi ===== | ||
+ | |||
+ | * **(en)** [[http:// | ||
+ | |||
+ | ---- | ||
+ | |||
+ | // | ||
+ | |||
+ | // Basé sur « [[http:// | ||