Recommended Delay Between IR Codes

Software related support

Moderator: marcus

Recommended Delay Between IR Codes

Postby rhodesy22 » Thu 1. Jul 2010, 23:17

Hey,

I'm in the middle of creating software that sends multiple ir commands of which I can set an interval between them.

I keep sending commands too quickly after one another and it then freezes up the IR Trans unit leaving it unusable until I restart it by re-inserting the power.

It would be great if you had a known tolerance. I realise I could wait for "has space available" however that would be an unknown interval where as I need to use set intervals.

Thanks

Luke
rhodesy22
 
Posts: 27
Joined: Mon 1. Feb 2010, 10:51

Re: Recommended Delay Between IR Codes

Postby rhodesy22 » Thu 1. Jul 2010, 23:18

P.S. I'm sending protocols via TCP.
rhodesy22
 
Posts: 27
Joined: Mon 1. Feb 2010, 10:51

Re: Recommended Delay Between IR Codes

Postby IRTrans » Thu 1. Jul 2010, 23:52

Hi,
which IRTrans Device are you using and how exactly are you sending codes ?

All protocols do support a status code. Once the status code has been received the next code can be sent.

Even if that is not done the IRTrans usually does not freeze.

IRTrans
IRTrans
Administrator
 
Posts: 2115
Joined: Mon 21. Apr 2008, 23:32

Re: Recommended Delay Between IR Codes

Postby rhodesy22 » Mon 5. Jul 2010, 13:00

Hi,

I'm using the IR Trans WiFi module and I'm making a TCP connection on port 21000.

As an example:

I learn a code for volume up on the TV.

I can then send the code I learnt back to the IR Trans.

I send this code back through the IR Trans 5 times at 0.1 second intervals.

I realise I can send code the first time, then wait for the response result or wait for the "Has Available Space" stream event, and then send the second code, but then I'm likely to get irregular intervals (which is very much undesired for the application I'm creating).

I'm looking for a more fluid action, so if for example you knew that it's won't ever allow me to send more than one code per 0.3 seconds, then I could put that limit in.

Thanks
rhodesy22
 
Posts: 27
Joined: Mon 1. Feb 2010, 10:51

Re: Recommended Delay Between IR Codes

Postby rhodesy22 » Mon 5. Jul 2010, 13:17

After the IRTrans crashes, if I try and connect just via a terminal screen (telnet 192.168.1.3 21000) I either get a timeout of a connection refused.
rhodesy22
 
Posts: 27
Joined: Mon 1. Feb 2010, 10:51

Re: Recommended Delay Between IR Codes

Postby IRTrans » Mon 5. Jul 2010, 14:07

Hi,
the only way to handle this correctly is to wait for the result code. Using "Has available space" will not help either as that only refers to the sending side.

You cannot send IR Codes with constant delays as the IR Codes themselves have a different length.

Of course the device should not hang after you have sent to many codes. We will check why that happens. However, you will still need to wait for the result code.

IRTrans
IRTrans
Administrator
 
Posts: 2115
Joined: Mon 21. Apr 2008, 23:32

Re: Recommended Delay Between IR Codes

Postby rhodesy22 » Mon 5. Jul 2010, 14:14

Hey,

I've found out what the issue was. I was making a new connection to the irtrans with each command send and that was causing the overload/connection refusal. I now just setup the connection the one time, then when I send the code I check to see if it's already connect (if not it connects) then sends the code and processes the next code in the queue.

Thanks for your help!
rhodesy22
 
Posts: 27
Joined: Mon 1. Feb 2010, 10:51

Re: Recommended Delay Between IR Codes

Postby IRTrans » Mon 5. Jul 2010, 14:38

OK, then the device did not crash - you simply used up all TCP connections and did not close the ones no longer in use.

It will take some time (depending on the OS of your PC) until such connections are closed and the resources in the IRTrans can be used again.

IRTrans
IRTrans
Administrator
 
Posts: 2115
Joined: Mon 21. Apr 2008, 23:32


Return to Software

Who is online

Users browsing this forum: No registered users and 9 guests

cron