wialon retrasnlator response

Topic: wialon retrasnlator response

i need to send data via retranslator usin dotnet and  i have this hex string

i convert this string to binary data
then i convert that binary data to an array of bytes and send it via tcp protocol

the response in int is 63 but i dont get any data con the portal

do you know wich is the response to know that the message was succesfully received?
thanks in advance


wialon retrasnlator response

Re: wialon retrasnlator response


Please specify where do you send data via retranslator to Wialon  or to other system (from Wialon)
Which TCP protocol do you use?

Diana Cheley
Wialon Hosting Expert

wialon retrasnlator response

Re: wialon retrasnlator response

hello! thank for the answer!
i  convert the hex string into binary data with this c# code

string finalBinaryString = String.Join(String.Empty,
                    c => Convert.ToString(Convert.ToInt32(c.ToString(), 16), 2).PadLeft(4, '0')

and then i convert the binary data into byte array with this code

int numOfBytes = finalBinaryString.Length / 8;
                byte[] binaryBytes = new byte[numOfBytes];
                for(int i = 0; i < numOfBytes; ++i)
                    binaryBytes[i] = Convert.ToByte(finalBinaryString.Substring(8 * i, 8), 2);

finally i send it via tcp protocol with web socket

IPEndPoint remoteEP = new IPEndPoint(ipAddress, 20163);
 Socket sender = new Socket(ipAddress.AddressFamily, SocketType.Stream, ProtocolType.Tcp); 
int bytesSent = sender.Send(binaryBytes);

wialon retrasnlator response

Re: wialon retrasnlator response

Hi i already have send info to wialon retranslator
my error was that i was sending the course as 2 bytes and the retranslator need 4
thank you!