[linux-dvb] AF9005 remote control

Luca Olivetti luca at ventoso.org
Sun Sep 16 21:19:04 CEST 2007


El Sun, 16 Sep 2007 15:37:33 +0200
"Moisés Pérez" <spir73 at gmail.com> escribió:

[please keep this on the list]

> 2007/9/15, Luca Olivetti <luca at ventoso.org>:
> >
> > En/na Moisés Pérez ha escrit:
> >
> > >> Searching on luca's web, I found a new Readme.lirc and a
> > >> af9005-lirc.c. I tried build it as readme says and I got lots of
> > >> make errors:
> > >>
> > > >I've modified the Makefile in correct folder and added the flag
> > > >"-I/usr/src/lirc-0.8.1/", just where I've decompressed the lirc
> > sources.
> >
> > >At the time I tried it with lirc 0.8.1 and lirc-0.6.6, so it
> > >should work
> 
> 
>   I could compile it!! The Include was -I/usr/src/lirc- 0.8.2/, not
> -0.8.1 I erased the original module af9005-remote and put the new
> lines in Makefile.The compilation was succesfully.
> 
> >>
> > >> I have any questions:
> > >> 1 - the dvb-usb-af9005-lirc module (if i can compile it) will be
> > >> as a module of lirc defaults?? how is it used??
> >
> > >the module replaces the standard one (so make sure the standard one
> > >isn't found/loaded). The "standard" modules supplied with the
> > >driver decodes the ir code of a couple of remotes: the one I got
> > >with my card and one of another user. The "standard" modules
> > >emulates an input device (like all other remotes in linux-dvb do,
> > >since most devices don't give you the complete ir stream but
> > >decode it themselves in firmware): if it works you should try to
> > >press e.g. "1" and you should see a "1" on the console like you
> > >typed it on the keyboard. OTOH the lirc module doesn't try to
> > >decode the ir, but just massages it in a format that lirc
> > >understands, so you can use it like a lirc homebrew receiver.
> 
> 
>   Now I can understand it. If I use the provided remote module, It
> would have to work writing in console as a input device (I have
> another remote recognized as HID usb that works so)

yes

>   But after compiling, dmesg insert the correct modules:
> $dmesg:
> [ 6912.376000] DVB: registering new adapter (Afatech DVB-T USB1.1
> stick) [ 6912.384000] DVB: registering frontend 0 (AF9005 USB
> DVB-T)... [ 6912.384000] input: IR-receiver inside an USB DVB
> receiver as /class/input/input10

IIRC this message comes from the dvb-usb infrastructure when using the
standard module, not the lirc one (but I may be wrong, it's been a
while since I did this)

> [ 6912.384000] dvb-usb: schedule remote query interval to 200 msecs.
> [ 6912.384000] dvb-usb: Afatech DVB-T USB1.1 stick successfully
> initialized and connected.
> 
>   $ modprobe -l | grep af9005
> /lib/modules/2.6.20-16-generic/kernel/drivers/media/dvb/dvb-usb/dvb-
> usb-af9005.ko
> /lib/modules/2.6.20-16-generic/kernel/drivers/media/dvb/dvb-usb/dvb-
> usb-af9005-lirc.ko
> 
>   the module is charged!!
> 
> >>
> > > >2 -  the remote module charged with v4l-dvb standards modules
> > > >doesn't work?? Can't be used with lirc or another way??
> >
> > >It can be used with lirc but I lost the link where it explains how
> > >to convert the input device to a lirc device. Note that with the
> > >"standard" method it only recognizes the supplied remote anyway,
> > >so it's of limited use, while my alternative lirc module should
> > >work with any remote (once you configured it with irrecord).
> 
> 
>   Now, with the af9005-lirc module charged, is it recognised as
> /dev/input/event10, but it doesn't be:

no, with the lirc module you should configuire it with irrecord and use
it with lircd, see the lirc documentation

> 
> b$ ls /dev/input/e*
> /dev/input/event0  /dev/input/event3  /dev/input/event6  /dev/input/event9
> /dev/input/event1  /dev/input/event4  /dev/input/event7
> /dev/input/event2  /dev/input/event5  /dev/input/event8
> 
>    I've read about "inputlirc" for  configure lirc with the inputs
> from a device recognized as a device input (when it's a IR one).
> Either I can't make it work
> 
>    ¿How have to be used the af9005-irc module??
> 
> >>
> > >> 3 - dmesg seems to recognize the IR-receiver inside of  USB DVB
> > receiver
> > >> as /class/input/input11, can be lirc configured to use it?? On
> > >> README.lirc he said he have a serial IR receiver, but can we use
> > >> lirc with the IR-receiver inside of dongle??
> >
> > >if you want to use it with any remote, make sure the standard
> > >module isn't loaded and load the lirc one. Then look at lirc
> > >documentation on how to use it.
> > >OTOH if the standard remote is enough for you, try to see if the
> > >standard module works. If it does, you just have to configure your
> > >software to use the input device, if it doesn't probably your
> > >remote is different and we can try to discover its codes to put in
> > >the driver
> > table.
> 
> 
>  As I could understand, the standard module, if working, I could type
> in console directly with it. Using the new if9005-lirc module, I
> could use any remote with the receptor  inside the dongle. Now only
> I  have available the receptor's remote control, then, I could want
> make it work.....
> 
>    Then, the new module get the complete IR string from IR dongle
> receptor (with any remote control) and send it to LIRC.... but, ¿How
> can i do to send it? It is recognized as an input device.

again, no if you use the lirc module, yes if you use the normal
module.

> 
>     OTOH, seen that my remote doesn't work with the v4l driver, I
> need to use the "alternative" method.
>     You have said that I could get the IR string form my remote and
> include it on driver table, ¿how can i get this IR string?

basically it involves enabling debug (debug=1) for the af9005-remote
module, pressing keys and looking for "key pressed, raw value xxx"
messages in syslog, checking that the same key always generates the
same value, taking note of the value for each key and then either send
me the list with the keys and the corresponding codes or a patch
implementing the new table, I'd prefer the latter ;-)

-- 
Luca



More information about the linux-dvb mailing list