Author Topic: lirc support  (Read 5859 times)

Offline clausmuus

  • Full Member
  • ***
  • Posts: 125
    • View Profile
    • MLD
    • Email
lirc support
« on: September 13, 2012, 09:59:19 »
Hi,

does there is lirc support in the vompclient, or do you think, that it is a big think to add it? Or is it alternatively possible to add support for reading the keyboard input from stdin instead of from /dev/input/event*? Or is there a way to control the vompclient via something like the svdrpsend? Or do you know an other way, how I can use a lirc remote control to control the vompclient?

Claus
« Last Edit: September 13, 2012, 10:01:43 by clausmuus »
MLD - A Distribution also for the Raspberry PI

Offline MartenR

  • Hero Member
  • *****
  • Posts: 789
    • View Profile
Re: lirc support
« Reply #1 on: September 13, 2012, 10:26:21 »
Quote
does there is lirc support in the vompclient, or do you think, that it is a big think to add it?
Not in the moment, actually I have no plans to add it. Since I would need to have program something to assign lirc commands to the vomp commands.
I would recommend.
Quote
Or is it alternatively possible to add support for reading the keyboard input from stdin instead of from /dev/input/event*?
I am thinking of it, since in the moment you are also typing into the graphical console, which is not ideal but I am not certain what the best way will be.
But will definitely not  read directly stdin, since I want to run also vomp from ssh or as daemon.
But first I have to figure out, how to separate the keyboards from remotes in /dev/event since I will definitely support usb remotes.
Quote
Or do you know an other way, how I can use a lirc remote control to control the vompclient?
No I do not know it yet.
Quote
Or is there a way to control the vompclient via something like the svdrpsend?
There is an UDP server listening at port 2000, who is processing incoming messages (key presses). I do not know the protocoll, look into udp.cc for details.

Marten

Offline glotzi

  • Full Member
  • ***
  • Posts: 24
    • View Profile
Re: lirc support
« Reply #2 on: September 13, 2012, 11:34:57 »
lircd can inject keycodes via uinput.

From man page:
On Linux systems the --uinput option will enable automatic generation of Linux input events. lircd will open /dev/input/uinput and inject key events to the Linux kernel. The key code depends on the name that was given a button in the lircd config file, e.g. if the button is named KEY_1, the '1' key code will be generated. You will find a complete list of possible button names in /usr/include/linux/input.h.

But I think LIRC is really important missing feature.

Offline glotzi

  • Full Member
  • ***
  • Posts: 24
    • View Profile
Re: lirc support
« Reply #3 on: September 13, 2012, 11:36:33 »
BTW for what is the file remotelirc.cc good for?

Offline MartenR

  • Hero Member
  • *****
  • Posts: 789
    • View Profile
Re: lirc support
« Reply #4 on: September 13, 2012, 12:35:11 »
Quote
lircd can inject keycodes via uinput.
But the question is where can I get the events.
I want to process the raw input events.

Quote
BTW for what is the file remotelirc.cc good for?
It was for the attempt of porting vomp to popcornhour nmts.
They had a device named lirc, but it was not the lirc protocoll.

Quote
But I think LIRC is really important missing feature.
May be, but I do not have any lirc receiver at hand.
I am using for a while only remote controls like the X10, which use the /dev/input/event interface using the remote protocol.
(I think this is much cleaner)
So it is not important for me,  but anyway I am open towards patches, which add this functionality to remotelinux.cc and remotelinux.h.
So any volunteer coders are welcomed. (you can see that it already prepared to handle multiple inputs.

Marten

Offline glotzi

  • Full Member
  • ***
  • Posts: 24
    • View Profile
Re: lirc support
« Reply #5 on: September 13, 2012, 19:45:43 »
Quote
But I think LIRC is really important missing feature.
May be, but I do not have any lirc receiver at hand.
I am using for a while only remote controls like the X10, which use the /dev/input/event interface using the remote protocol.
(I think this is much cleaner)
lircd is able to use /dev/input als input source. There is also inputlirc a really simple lirc-daemon. Works ootb with x10 remote.
http://packages.debian.org/de/sid/inputlirc

I think the lirc interface is more flexible, than /dev/input

So it is not important for me,  but anyway I am open towards patches, which add this functionality to remotelinux.cc and remotelinux.h.
So any volunteer coders are welcomed. (you can see that it already prepared to handle multiple inputs.
ok, I think I will change remotelirc.cc to make vomp to a real lirc client. I've done this already for other projects. But due to lack of raspi hardware this will take a while.

Offline clausmuus

  • Full Member
  • ***
  • Posts: 125
    • View Profile
    • MLD
    • Email
Re: lirc support
« Reply #6 on: September 13, 2012, 23:45:19 »
After read a bit about uinput, I think, it should be no problem to use lirc with the actual version. Unfortunately my igorplug usb reciver wont work on the RPI. So I can not check this now.

Claus
MLD - A Distribution also for the Raspberry PI

Offline MartenR

  • Hero Member
  • *****
  • Posts: 789
    • View Profile
Re: lirc support
« Reply #7 on: September 14, 2012, 07:02:25 »
@glotzi
Quote
ok, I think I will change remotelirc.cc to make vomp to a real lirc client. I've done this already for other projects. But due to lack of raspi hardware this will take a while
Please do not change remotelirc.cc.
Add support to remotelinux.cc .
Vomp is only able to handle one input device, so the remotelinux.cc used by raspberry pi has to be extended.
And please leave the /dev/input stuff there, it is the most clean way, since using this way you can completely configure the remote using vomp remote configuration interface.

Marten

P.S: I do not want the most flexible solution, but the solution, which works for most people out of the box and configuring lirc is an additional hurdle. So the two other ways using the linux native kernel interfaces and libcec has to work out of the box.
« Last Edit: September 14, 2012, 07:06:03 by MartenR »

Offline clausmuus

  • Full Member
  • ***
  • Posts: 125
    • View Profile
    • MLD
    • Email
Re: lirc support
« Reply #8 on: September 15, 2012, 16:18:31 »
Hi,

yesterday I have test the control via cec and it works out of the box (after I have enable it at the TV settings).
But the key repeat is very slow. Is it possible to sped up this, or make it configurable? Also my keyboard has absolutely no key repeat. Is this normal and can I change it?

Claus
MLD - A Distribution also for the Raspberry PI

Offline MartenR

  • Hero Member
  • *****
  • Posts: 789
    • View Profile
Re: lirc support
« Reply #9 on: September 15, 2012, 16:22:40 »
Quote
But the key repeat is very slow. Is it possible to sped up this, or make it configurable? Also my keyboard has absolutely no key repeat. Is this normal and can I change it?
There is no key repeat by design.
The vomp message handling only handles the  key down message.

Marten