Once again: Emulating prolonged button presses

The place where software developers meet

Moderator: marcus

Re: Once again: Emulating prolonged button presses

Postby Uli Zappe » Mon 25. Feb 2013, 17:24

eric wrote:To send the repeat command you might have to rename it in the .rem file (remove the "@"). Then you will be able to access it directly.

Ah, I see. Does this trick apply only to the ASCII client, or also to the Shared Library?

Unfortunately, modifying the .rem file isn't that easy as I don't run the server on Linux, but address the IRTrans device directly. (In Windows, I have the server running, but there's no shell environment (at least none that I understand ;) ) to use with the ASCII client). So I would have to reflash the IRTrans device, which would make it incompatible with iRed, and I don't want that, because this is my working reference point … This gets all terribly complicated, so I'd really like to try with the Shared Library – can you please make IRTransDLL.c available somehow (update the archive or email me)?

Did you try using iRed as a IRServer? What I'm thinking about is: What happens if you use the ASCII API to tell iRed to send commands.

I'm not aware that iRed is accessible via an ASCII API. Even if it were, this would be no lasting solution, as my Mac isn't running all the time, only the Linux server is.

Uli
Uli Zappe
 
Posts: 17
Joined: Sun 3. Feb 2013, 14:20

Re: Once again: Emulating prolonged button presses

Postby eric » Mon 25. Feb 2013, 17:29

Hi Uli,

what about starting the IRServer on your LINUX machine (which will be using local remote files)?

Eric
eric
Administrator
 
Posts: 157
Joined: Mon 22. Oct 2012, 10:05

Re: Once again: Emulating prolonged button presses

Postby Uli Zappe » Mon 25. Feb 2013, 17:40

eric wrote:what about starting the IRServer on your LINUX machine (which will be using local remote files)?

Yes, I could probably try that, but that means installing software I don't want to use in the end on my Linux "machine" which is in fact a tiny arm processor with little RAM and a tiny SD card "hard drive" – the classical home automation server (uses 1,2 W power …). So I'd like to avoid that if possible and would much prefer to try the Shared Library first.

You pointed out that the software for IRTrans is open sourced, so IRTransDLL.c should really be available. What's the problem here?

Uli
Uli Zappe
 
Posts: 17
Joined: Sun 3. Feb 2013, 14:20

Re: Once again: Emulating prolonged button presses

Postby eric » Mon 25. Feb 2013, 17:49

Hi Uli,

unfortunately I have no access to the source files from where I am right now. However the DLL comes completely compiled with every distribution of our software.

Additionally using the Shared Lib will probably not help anyway because the DLL does nothing different from what you've been doing so far. I strongly suggest using the IRServer.

Eric
eric
Administrator
 
Posts: 157
Joined: Mon 22. Oct 2012, 10:05

Re: Once again: Emulating prolonged button presses

Postby IRTrans » Mon 25. Feb 2013, 17:59

Hi,
there would be one alternative approach:
- Send the critical commands using iRed
- Dump the UDP communication
- Send exactly the same binary data via UDP to the IRTrans

Any other way would need the irserver as all other APIs talk to the internal Device database which is slower than the irserver.

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

Re: Once again: Emulating prolonged button presses

Postby Uli Zappe » Mon 25. Feb 2013, 18:09

eric wrote:unfortunately I have no access to the source files from where I am right now. However the DLL comes completely compiled with every distribution of our software.

That's right, but unfortunately, the arm binary crashes on my Linux server (which uses a specifically adjusted Ubuntu variant), so I'll have to recompile it.

Alternatively, all your Linux software compiles just fine on Mac OS X (something you may not even be aware of as iRed is the only software you mention for the Mac), so I can also test it there, but of course, again would have to compile it myself.

So, please, send me this file when you (or someone else of IRTrans) does have access to it.

Additionally using the Shared Lib will probably not help anyway because the DLL does nothing different from what you've been doing so far.

You mean I would also have to rename the repeat code to make it accessible? There's no way for the DLL to access this code directly (à la sndr)?

I strongly suggest using the IRServer.

But that adds additional complexity to a problem that already now is hard to locate. Don't forget that on Windows, it did not work although I was using the IRServer …

I will try it if it cannot be avoided, but I really have reasons (I cannot list all here, this thread is loooong already now) to try the Shared Library first.

All I need is
1. IRTransDLL.c
2. to know how to "officially" access repeat codes with the DLL (using quieter@, renaming quieter@ to something else in the .rem file and reflash, or another, not as yet mentioned method).

Uli
Last edited by Uli Zappe on Mon 25. Feb 2013, 18:42, edited 2 times in total.
Uli Zappe
 
Posts: 17
Joined: Sun 3. Feb 2013, 14:20

Re: Once again: Emulating prolonged button presses

Postby Uli Zappe » Mon 25. Feb 2013, 18:39

IRTrans wrote:there would be one alternative approach:
- Send the critical commands using iRed
- Dump the UDP communication
- Send exactly the same binary data via UDP to the IRTrans

Yes, I was thinking of that, but only as a "last resort". I'd much prefer a generic solution that everyone else here who has the same problem could also use. (If I can come up with a working generic solution, I would of course post the source here.)

So before I try that, I want to try a precisely timed communication in the "official" way with the shared library (for which I need IRTransDLL.c) because if it worked, it would be much cleaner.

Any other way would need the irserver as all other APIs talk to the internal Device database

Well, the UDP data iRed sends must also come from "somewhere". Is there any documentation of the API between software like iRed or the IRServer on the one side and the IRTrans device (not using its internal database) on the other? (Or could you at least point me to the respective part of the IRServer source that "translates" ASCII commands like Asnd to this API?)

which is slower than the irserver.

I still don't think that timing is that critical. I mean, from dumping the UDP communication I could see that the actual commands took a few ms to execute, whereas the interval between them was 100 ms (and, judging from my trials with iRed, could as well be +/- 15 ms). It's hard for me to imagine that the internal Device database has access times > 30 ms).

Uli
Uli Zappe
 
Posts: 17
Joined: Sun 3. Feb 2013, 14:20

Re: Once again: Emulating prolonged button presses

Postby IRTrans » Mon 25. Feb 2013, 19:24

Hi,
the DLL has no other way to access the IR Codes compared to using ASCII send. It will also send TCP codes to the IRTrans device or irserver. It also has no other means of accessing repeat codes compared to sndr. iRed is based on a modified irserver - therefore it uses a different API.

In general there are two ways to control an IRTrans device:

Client -> irserver (with internal code DB) -> IRTrans device

Client -> IRTrans device (with internal IRDB)

The client will always use TCP to connect to either the IRTrans device or the irserver.

Of course we can send you the DLL source code, however we cannot give you any support on porting it to a different architecture and it might not be fully up to date as we do not have any customers using it. Almost all customers are using the ASCII Interface as it is a lot more flexible. Please send us an Email to info@irtrans.de to get the souce code of the DLL.

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

Re: Once again: Emulating prolonged button presses

Postby Uli Zappe » Mon 25. Feb 2013, 20:16

IRTrans wrote:the DLL has no other way to access the IR Codes compared to using ASCII send. It will also send TCP codes to the IRTrans device or irserver. It also has no other means of accessing repeat codes compared to sndr.

Just to make sure, as this is somewhat ambiguous:

Contrary to the TCP/IP ASCII interface (which has sndr), there is no (documented) separate command in the DLL to specifically send repeat codes. So do I send them with

SendRemoteCommand (<server_socket>, "<remote_name>","quieter@",0,0,0)

or do I have to rename quieter@ in the .rem file first?

Of course we can send you the DLL source code, however we cannot give you any support on porting it to a different architecture and it might not be fully up to date as we do not have any customers using it.

Understood and no problem.

Please send us an Email to info@irtrans.de to get the souce code of the DLL.

OK.

Thanks!

Uli
Uli Zappe
 
Posts: 17
Joined: Sun 3. Feb 2013, 14:20

Re: Once again: Emulating prolonged button presses

Postby IRTrans » Mon 25. Feb 2013, 20:35

As the DLL does not have a specific repeat option you can only use "quieter@".

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

PreviousNext

Return to APIs

Who is online

Users browsing this forum: No registered users and 4 guests

cron