Page 1 of 1

Error when sending remote command with own TCP socket

PostPosted: Thu 29. Sep 2011, 10:32
by IREric
Irtrans: Ethernet/IRDB
Firmware version: E6.05.40
Developplatform: NETMF 4.2 C#
Microcontroller: ARM
ARM Device ipnumber : 192.168.2.117
NOT using IRtransserver

LAN IRDB Device IR Codes are uploaded to my device.
I use 2 IRDB ethernet devices in my network: 192.168.2.49 /192.168.2.48

Subject: Error when sending remote command with own TCP socket.


Code: Select all
Socket m_socListener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);// tried also Dgram/UDP

byte[] startmsg = new byte[256];
startmsg = Encoding.UTF8.GetBytes("ASCI");
m_socListener.Send(startmsg, 0, startmsg.Length, SocketFlags.None);< can recieve remotecontrol code here

string command = "Asnd ebmultimedia,macro-sat"; <<<<<<<<< wrong
msg1 = Encoding.UTF8.GetBytes(command);
m_socListener.Send(msg1, 0, startmsg.Length, SocketFlags.None);< Error here



tested with: snd (Asnd) ebmultimedia,macro-sat.... li,p21000.... \n\r \n tried everything (NO spaces)

Errors:
got **00067 RESULT This operation is only supported using the irserver (snd)
got **00034 RESULT ASCII Format Error (Asnd)


What works:
I can recieve the remotecommands : got **00043 RCV_COM ebmultimedia,macro-sat,0,0
I can use Aver, gives: **00034 VERSION E6.05.40 L1.09.02

Agetremotes ebmultimedia > **00034 RESULT ASCII Format Error

I don't know what to do more, can (remote, command)name's be too long ?
Eric

Re: Error when sending remote command with own TCP socket

PostPosted: Thu 29. Sep 2011, 11:51
by IRTrans
Hi,
the ASCII commands surely work like shown in the manual.

That means "Asnd ebmultimedia,macro-sat" will work if there is a remote control "ebmultimedia" with a command "macro-sat".

There should be either <LF> or <CR><LF> (ASCII 10 or ASCII 13 10) at the end of the string.

The max. length for remote names is 80 and for command names 20 chars.

Please check what is actually sent using a TCP monitor.

You are using UTF8 encoding - however the IRTrans will only understand ASCII.

The correct syntax for getremotes is "Agetremotes" without any further arguments.

There area lot of different applications using this API and it is working exactly as shown in the manual.

IRTrans