Thank you for your recommendations, Andrea. I bought Brainboxes ES-257 Ethernet to RS-232 dual ports converter, and it works well. I successfully tried both Telnet and TCP_Raw protocols to convert Ethernet to RS-232.
During Telnet communication, I used tspnet.connect("192.168.127.254", 23, "") command.
During TCP_Raw communication, I used tspnet.connect("192.168.127.254", 9001, "") command.
However, during sending of 26 bytes hex string, I met two problems.
1. I could not send entire string, but only 5 bytes fragment. To solve the problem, I just split the string by several pieces using several tspnet.write commands. Is there another way to do that? Does tspnet.write command limitation for string size?
2. To create hex formatted string, I converted each byte of dat using "\xNN" operator. However, the final RS-232 string was missing "Zero" value data. I tried both "\x00" and "\0" operators. Looks like, "Zero" was interpreted as NULL value and was ignored by "write" command. I spent some time to solve this problem, but not successfully. I believe that Lua has ability to send all kind string data values including "Zero". Please help.
Thank you. Sergey