Quantcast

IR repeater (again)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

IR repeater (again)

tommi uimonen
Hello, sorry for the same topic again, but I just joined the list and
don't know how to reply to a mail that was sent before I joined.
The original was from Anders Sandell on 2010-02-12 13:06

"I have an iguana-ir transceiver to control my xbmc-installation. The
iguana usb dongle have extenders that connects to it. I would like to
have the iguana device to retransmit received ir signals on the
extenders. How can this be done in an easy way?"

I'm looking for a similar solution. Actually I already got success
with irexec, by using conf:

begin
        remote = Samsung_BN59-00861A
        button = Vol+
        prog = irexec
        repeat = 0
        config = irsend send_once Marantz_RC006SR Amp_Volume_Up
end

But this was not very efficient way. It was kind of slow and reacted
only for single commands from my remote (eg. holding the button down,
didn't do anything)

Then I did small modifications to the irexec program and made it to
send the commands directly, instead of using system(3):

                while(lirc_nextcode(&code)==0)
                {
                        if(code==NULL) continue;
                        while((ret=lirc_code2char(config,code,&c))==0 &&
                              c!=NULL)
                        {
#ifdef DEBUG
                                if(!daemonize)
                                {
                                        printf("Execing command \"%s\"\n",c);
                                }
#endif
                                // system(c);
                                send_packet(fd,c);
                        }
                        free(code);
                        if(ret==-1) break;
                }
               
And I stripped the 'irsend' out of the config line:

config = send_once Marantz_RC006SR Amp_Volume_Up

But I faced problems. The send_packet wants the command to end with
newline. So I'm throwing in yet another hack which adds the newline.
But still the program recognizes only single commands.

My next step is to take the count from the input and put it to the command.

I'm sure there is more robust way of handling IR repeating. Any hints
how to do it properly? I'm thinking of separate threads to read/send
to make it more responsive.

Tommi

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: IR repeater (again)

Christoph Bartelmus
Hi!

tommi uimonen "[hidden email]" wrote:
[...]
> "I have an iguana-ir transceiver to control my xbmc-installation. The
> iguana usb dongle have extenders that connects to it. I would like to
> have the iguana device to retransmit received ir signals on the
> extenders. How can this be done in an easy way?"
[...]
> I'm sure there is more robust way of handling IR repeating. Any hints
> how to do it properly? I'm thinking of separate threads to read/send
> to make it more responsive.

You should configure lircd to generate release events with --release.
On the first key event you should call irsend with SEND_START.
When the release event is received, you call SEND_STOP.

BTW, this won't work well/at all with the home-brew transmitter because it  
blocks CPU during transmit and will affect the receiver part. iguana-ir  
should be fine.

Christoph

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
Loading...