I use Mode E protocal.
In physical.req/ind Stage, I finish handshark and enter HDLC Stage.
When I receive SNRM command, and I return RA Command.
But director show "System.IO.IOException: 裝置無法辨識命令。"
how do I trace the client.GetData(p.Reply, reply)) function to find my bug?
-----------------------------------------------------------------------------------------
//Loop until whole COSEM packet is received.
while (!client.GetData(p.Reply, reply))
{
//If Eop is not set read one byte at time.
if (p.Eop == null)
{
p.Count = 1;
}
if (!media.Receive(p))
{
//Try to read again...
if (++pos != tryCount)
{
System.Diagnostics.Debug.WriteLine("Data send failed. Try to resend " + pos.ToString() + "/3");
continue;
}
string err = "Failed to receive reply from the device in given time.";
GXLogWriter.WriteLog(err, p.Reply);
throw new Exception(err);
}
}
Director_RA Command error
Hi,
Can you send trace to me? We can check what is wrong in your data.
You can get my contact info from here:
http://www.gurux.fi/AboutUs
BR,
Mikko