Internet PLC Forum
General => Technical support => Topic started by: Philippe Parmentier on March 18, 2014, 04:18:00 PM
-
Hello,
I'm trying to set a syslog function that transfert logs to a syslog server.
The PRINT #4 "<TCPCONNECT xxx.xxx.xxx.xxx:514>" function work well,
but after I have to PRINT #4 the content of the TCP packet and the syslog protocol requied as a first parameter a value setting the emergency level in the format <XXX>. It's seems that <XXX> is interpreted as a command tag and the packet is not generated and sended over the TCPIP. If i add a leading space, it's working well, but the packet is missformed and so pisinterpreted by the Syslog protocol.
Is there a way that I can send the <XXX> wihout being considered as a command tag?
Regards.
-
Unfortunately it was not anticipated that the PRINT #4 command is required to send a string that begins with the '<' character and therefore it takes any string that begins with '<' as a tag to command it to do something such as closing of the TCP connection. Adding a leading space is a solution - is there a way for you to modify your syslog server script slightly to accept the command that begins with a space? Alternatively is there any other characters that your syslog server can accept and ignore before the '<' character?
-
The problem is that <> are in the protocol
https://www.ietf.org/rfc/rfc3164.txt
But anyway, if I remove that part of the protocol, the syslog is using a default value and the rest of the message can be displayed.
I've tried to send the first < via the outcomm 4,60
But it's seems that the buffer is analyzed by the firmware before beeins transmitted to the port.
-
Note that as stated in the manual OUTCOMMAND command is not supported on port 4 (virtual serial port which only exists after a TCP connection has been established). So unfortunately you can't use OUTCOMM 4 to send the character.