LIRC

Pagina: 1
Acties:

  • Boudewijn
  • Registratie: Februari 2004
  • Niet online

Boudewijn

omdat het kan

Topicstarter
Hoi,


Ik zit met het probleem dat mijn Creative RM900B lam is onder Linux, en ik heb dus LIRC geinstalled, op mijn MDK10 bakje. Dit deed ik via urpmi, en heb daarna de help files gelezen die in /usr/share/doc/lirc staan

Ik heb die manual uitgevoerd, maar ik snap eigenlijk niet helemaal hoe dat zit met lircmd configureren.... zou iemand me dat aub uit kunnen leggen, of een werkende config-file-set kunnen geven?

Ik heb het volgende gedaan (GoT is geen afhaalchinees :+ ) :

-Google
-Lirc.org
-LinuxQuestions.org
-Mandrakeclub.nl
-Verder heb ik wat mensen in mij Jabber lijst om hulp gevraagd, en zelf wat aangeklooid.

Specs systeem:

-Creative Audigy met breakoutbox en RM900B
-2.6.3.13 kernel
-Mandrake 10

  • Boudewijn
  • Registratie: Februari 2004
  • Niet online

Boudewijn

omdat het kan

Topicstarter
Hmm ik geloof niet dat ik hier op respons hoef te rekenen. Kan iemand me dan even zeggen wat ik fout doe? (jullie maken me niet wijs dat niemand het weet)

  • Bergen
  • Registratie: Maart 2001
  • Laatst online: 18-02 13:22

Bergen

Spellingscontroleur

Nou, zo vreemd vind ik dat niet... Niet iedereen heeft namelijk de behoefte om met een afstandsbediening de pc te besturen. Ik ook niet, maar ik wil wel even inhaken.
BoudewijnLinux schreef op 03 juli 2004 @ 21:53:
Ik heb die manual uitgevoerd, maar ik snap eigenlijk niet helemaal hoe dat zit met lircmd configureren... zou iemand me dat aub uit kunnen leggen
Ik neem aan dat je deze bedoelt. Je verwacht nu toch niet dat iemand die hele handleiding voor jou gaat herschrijven ofzo? :? Zou het misschien handiger zijn als je aangeeft welk gedeelte je niet helemaal begrijpt?

Geef in je topicstart altijd zo veel mogelijk informatie. Daar ben je wel vaker op gewezen.

  • Boudewijn
  • Registratie: Februari 2004
  • Niet online

Boudewijn

omdat het kan

Topicstarter
Nou dat vind ik een goeie tip van je (dank je)... ik zal nu eens gaan proberen jullie wat meer info te geven:

Ik heb jouw link wel bekeken, maar niet uitgevoerd, de volgende howto\manual gelezen (en gedaan wat er stond :+ )

/usr/share/doc/lirc-0.6.6/

Ik heb namelijk de hele zaak met URPMI geinstalled, en dan worden deze pages ook automatische voor me aangemaakt.

Ik zit met het volgende:


The lircmd.conf file format

The config file for lircmd is quite simple. Just look at the example in the contrib directory. Some drivers even already bring their config file for lircmd with them so lircmd is ready to run.

PROTOCOL <protocol>

You can choose between MouseSystems, IntelliMouse and IMPS/2 protocol. The default is MouseSystems protocol.
ACCELERATOR <start> <max> <multiplier>

Change the values here if your mouse pointer is moving too fast/slow. Usually the mouse pointer moves 1 pixel every time it receives a signal. The values here specify how much mouse movement accelerates if you hold down the according button on your remote control for a longer timer. The start value is the threshold that starts acceleration. Then the amount of pixels is calculated with the following formula: x=repeat*multiplier, where repeat is the number of repeated signals. max specifies the maximum number of pixels the pointer can move due to a single command.
ACTIVATE <remote> <button>
TOGGLE_ACTIVATE <remote> <button>

I recommend that you use a special button to activate the mouse daemon with this command. You will see whenever the daemon is activated/deactivated directly on the screen. If you omit this command the daemon will always be active.

The difference between ACTIVATE and TOGGLE_ACTIVATE is how you leave the mouse mode. With TOGGLE_ACTIVATE you have to press the button that you use to enter the mode to leave it. With ACTIVATE you will leave mouse mode as soon as you press a button that is not used for any function in the config file.
MOVE_ [ N [ E | W ] | E | S [ E | W ] | W ] <remote> <button>

The obvious functionality. You can even get better granularity by combing different commands (copied from the config file for AnimaX remotes):

MOVE_N ANIMAX_MOUSE_PAD MOUSE_NNE
MOVE_NE ANIMAX_MOUSE_PAD MOUSE_NNE

This also demonstrates that all commands are executed beginning at the top.
MOVE_[IN|OUT] <remote> <button>

This will only work with IntelliMouse and IMPS/2 protocols and indicates movement of the wheel.

'*' is allowed as wild card for button and remote. Please note that every line that fits to the received signal will be executed. Parsing starts at the top of the file.


Ik ben niet stom (ik schrijf embedded software) maar ik snap dus echt niet hoe ik deze file samen moet stellen!

hetzelfe geldt voor dit stuk:

The .lircrc file format

At this point all you need are the tools, which react on the signals decoded by lircd. To do this you need a file called .lircrc. It should be placed in your home directory. The idea is to have configuration information of all clients in one place. That lets you keep a better overview of clients and simplifies the use of modes explained later.

First I will explain the syntax of the .lircrc file itself. The config file for LIRC tools consists of one or more of the following constructions:

begin
prog = ...
remote = ...
button = ...
repeat = ...
config = ...
mode = ...
flags = ...
end

Bringing it to the point the above says which program (prog) should do what (config, mode, flags) if you press a certain button (remote, button) a specified time (repeat).

prog
gives the name of the program that should receive the configstring given in config.
remote, button
specify a key of a remote control that launches an action. Key sequences can be specified by giving more then one remote/button string. The character '*' can be used as a wild card for remote or button. The default for remote is '*'. The remote name must always be given before its according button. When using key sequences a given remote is valid for all following buttons until you specify another remote.
repeat
tells the program what shall happen if a key is repeated. A value of zero tells the program to ignore repeated keys. Any other positive value 'n' tells the program to pass the config string every 'n'-th time to the according application, when a key is repeated. The default for repeat is zero.
config
is the string that will be passed to the according application whenever the specified key sequence is received by lircd. If you give more than one config string, the config strings will be passed to the applications by turns. With this feature you can for example implement toggle buttons.
You can pass non-printable characters to applications with all standard C escape sequences (most common are: \n = line-feed, \r = carriage return, \t = tab, \e = escape, \<n> = ASCII code in octal representation, \x<n> = ASCII code in hexadecimal representation, \\ = backslash). Additionally you can supply Ctrl-X by specifying \X where X is an upper character or @. For example \C is Ctrl-C.
mode
tells the program to enter a special mode. You can group several configurations by putting them into the following, where mode stands for the mode where these configurations should be active:

begin mode
...
end mode

If mode is equal to the name of a client application this application will always start in this mode. Consider this situation: you want to start xawtv with irexec and enter the tv mode. Then irexec would enter the tv mode but xawtv would begin without any mode enabled. By renaming the mode from tv to xawtv you can solve this problem.
Another way to specify a startup mode is by using the startup_mode flag as described below.

Caveat: In order to avoid many identical entries all actions that modify the mode a program currently is in are independent of the prog token.

The following are valid flags:

once
This is only allowed in conjunction with the mode directive. The config string is passed to the application only the first time the mode is entered or you have explicitly left this mode. This is useful for starting an application whenever you enter a special mode.
quit
Usually all configurations are examined if they have to be executed. You can stop this immediately with this flag.
mode
This is only allowed within a mode block. It tells the program to leave this mode.
startup_mode
Tells the program to start in the mode given in the mode keyword. The following example tells the program to start in the browser mode

begin
flags = startup_mode
mode = browser
end

Ok, now a simple example for a .lircrc file (supposed you use an AnimaX remote and use the sample files for this remote from the remotes/ directory. If you have another remote change remote= and button= according to your remote [this definitions are made in the lircd.conf file] )

begin
remote = ANIMAX
button = MENU_DOWN
prog = irexec
repeat = 0
config = echo "Hello world!"
end

If you have saved this as .lircrc in your home directory, start irexec. Press the button which is selected in the button= line and you will see a 'Hello world!' on your screen. As you can see irexec is a simple program launcher. Of course you can do a lot more than just start programs.

If you start a LIRC client program, it reads your ~/.lircrc and reacts only on prog= entries which point to itself. All programs should give you the possibility to use an alternative config file. If you have included more than one program in your .lircrc, then start all these programs, they react only to their according entries in .lircrc. This also leads to a disadvantage of the mode concept. If you don't start all client programs at a time the mode they have to maintain may differ between applications. Also key sequences might not be recognized equally because all programs then don't have the same starting point.


ALs iemand gewoon toevallig die file heeft liggen (en hem aan mij zou willen geven), of mij uitlegt wat nu eigenlijk de exatce bedoeling is, ben ik uit de brand geholpen :)

Verder wil ik niet echt die pc besturen, maar gewoon lekker een DVDtje kunnen kijken (meer functies zijn OK, maar echt niet noodzakelijk).

Ik hoop je hiermee voldoende te hebben geinformeerd, zo niet hoor ik het wel ;)

Verwijderd

Kijk even op mijn website, ik heb mijn config files voor lirc er ook tussen staan (spec pagina) en een heel verhaal over lirc op mandrake / audio server pagina.

  • Boudewijn
  • Registratie: Februari 2004
  • Niet online

Boudewijn

omdat het kan

Topicstarter
Oh das geweldig :) Ik ga het nu even lezen :)

  • Boudewijn
  • Registratie: Februari 2004
  • Niet online

Boudewijn

omdat het kan

Topicstarter
Ik zie dat je een goeie manual hebt staan op je site :)

Maar ik heb de volgende vraag:

CD
lircd.conf.creative
RM-1000
RM-900
CD.old
lircd.conf.livedrive RM-1500
RM-900.irman

Dit is de inhoud van lirc-remotes/creative, welke moet ik nu hebben voor de lircmd..... jij hebt er een (zo te zien kant en klaar) van hauppage, die is er niet voor creative (voor zover ik kan zien). Wat kan ik nu het beste doen?

Verder heb ik als lircd file de RM900 file genomen, ik ga er wel vanuit dat die goed is :)

[ Voor 1% gewijzigd door Boudewijn op 05-07-2004 15:11 . Reden: wat overzichtelijker gemaakt ]


Verwijderd

Grappig, ik zie nu pas dat Bergen ook al een link gaf naar mijn lirc artikel...

Anyway, eerst moet je zorgen dat je remote het doet. Met de lircd.conf die je noemt; als dat al niet werkt hoef je nog helemaal niet naar lircmd.conf en/of lircmd te kijken.
Volg de instructies op mijn webpagina over lirc: http://www.mandrake.tips.4.free.fr/lirc.html
Bv dit stukje:
I then verified (this you may execute as a regular user too) that the device was functional with:
mode2 -d /dev/lirc/serial
which gives no output, until you start pressing the remote buttons. A lot of codes flash by for each keypress if all is well. (Note that once the deamon "lircd" is running, you can no longer do this.)
waarbij je naar de juiste device moet wijzen in het commando mode2.

Als je een werkende lircd.conf hebt, en je systeem ziet/ontvangt de gedrukte knoppen, dan maak je met mijn lircmd.conf als voorbeeld je eigen lircmd.conf. Gewoon aangeven welke muisbeweging aan welke knop verbonden moet worden.
Pagina: 1