Page 1 of 2

Delete command

PostPosted: Wed 24. Aug 2011, 18:05
by tiveria
Hi,

is there a .net call available to delete a certain command from a list of commands for a remote control?
i saw one command to delete an entire remote but thats not waht i would need.

br
michael

Re: Delete command

PostPosted: Wed 24. Aug 2011, 18:47
by IRTrans
Hi,
currently that is not supported through the .NET API. However, additional commands do not hurt you in any way.

IRTrans

Re: Delete command

PostPosted: Wed 24. Aug 2011, 19:10
by tiveria
Well, in theory this might be right.
But i want to implement a Learning screen where the user has to push 1-5 times the same button till the command is really learned.
but before i will come back to the issue above i still have another problem. I try to learn ir codes using the following c# code:

IRTrans.NET.NETWORKSTATUS stat = m_Server.LearnIR("test", "test");

if (stat == null)
{
object obj = m_Server.getLearnStatus();
if (obj is IRTrans.NET.NETWORKLEARNSTAT)
{
IRTrans.NET.NETWORKLEARNSTAT ls = (IRTrans.NET.NETWORKLEARNSTAT)obj;
textEdit1.Text = ls.received;
}
}

from the demos i assumed this should be the right code.
The problem is, that i do only get an empty learn status back. without the learned command or any other info in.
what am i doing wrong?

Re: Delete command

PostPosted: Wed 24. Aug 2011, 19:54
by IRTrans
Hi,
learning multiple times is no problem. The command will simply be replaced each time you learn it.

Your code for the status looks correct - we will need to check why it does not work.

You can also integrate our learning dialog into your application:

Simply use: irt.ShowLearnDialog ("mm1","newc" ); ("mm1"/"newc" are the remote and commnand).
To do this you will need to use the GUIClient object instead of the IRTransServer object. Everything else stays the same:

irt = new GUIClient("127.0.0.1");

IRTrans

Re: Delete command

PostPosted: Wed 24. Aug 2011, 20:22
by tiveria
Well your ui doesn*t fit my needs. In parallel i have tried to use the asci interface of the server, but even there i have some trouble.

sending first a ASCI
and then a Alearn
i would expect after a button press something like
** 00123 LEAR HEXCODE

but i get
**00057 RCV_COD S00000000111111110110100010010111320,0,0 for unknown buttons
and
**00030 RCV_COM test,test,0,0 for already learned ones.


i'm really getting desperate as i have to develop an application but have to many problems because of the lack of documentation.

btw. here is the code for the tcp stuff:

TcpClient client = new TcpClient("localhost", 21000);
if (client.Connected)
{
NetworkStream stream = client.GetStream();
Byte[] data = System.Text.Encoding.ASCII.GetBytes("ASCI");
stream.Write(data, 0, data.Length);
String responseData = String.Empty;

data = System.Text.Encoding.ASCII.GetBytes("Alearn\r\n");
stream.Write(data, 0, data.Length);
// Buffer to store the response bytes.
data = new Byte[256];

// String to store the response ASCII representation.
responseData = String.Empty;

// Read the first batch of the TcpServer response bytes.
Int32 bytes = stream.Read(data, 0, data.Length);
responseData = System.Text.Encoding.ASCII.GetString(data, 0, bytes);
Console.WriteLine("Received: {0}", responseData);
}

Re: Delete command

PostPosted: Wed 24. Aug 2011, 22:49
by IRTrans
Hi,
please note that the TCP ASCII interface is not supported on the irserver - it is only supported for direct communication with the IRTrans LAN/WLAN devices with IRDB.

I will check why learning does not work correctly and will come back to you shortly.

IRTrans

Re: Delete command

PostPosted: Thu 25. Aug 2011, 00:21
by IRTrans
Hi,
the problem is, that the "getLearnStatus" call was not supposed to be used in this context.
The simple and short LearnIR calls always close the remote control after learning. Then the status information was lost.

We could, however, fix that with a modified irserver SW.

Please send us an email to support@irtrans.de and we will send you a modified irserver.

IRTrans

Re: Delete command

PostPosted: Thu 25. Aug 2011, 12:17
by tiveria
Hello,

thanks for the offer. I already sent out the email.

Taking all my requirements and the possibilites provided by the HW into account, the best solution would be a learning command that returns the complete timing and signal as hex code as it is implemented in the ascii interface and a send command that could use this hexcodes

Re: Delete command

PostPosted: Thu 25. Aug 2011, 12:26
by tiveria
This would solve all the problems i'm currently facing

Re: Delete command

PostPosted: Thu 25. Aug 2011, 12:32
by IRTrans
You can do that if you are talking directly to LAN/WLAN Devices.

Implementing that for the irserver would mean a lot of work.

IRTrans