I'm a real newbie with Serial port communication.
The documentation have for the serial device says I must send this:
1.1.1 Get Status
Get Status Command Format
Byte(s) Value
0-1 0x8001
Response: Immediately after receipt of this command the IDEC will transmit the Status report
message described in the previous IDEC responses section.
This is what I did:
cl.PortName = Gurux.Serial.GXSerial.GetPortNames()[1];
cl.BaudRate = 115200;
cl.DataBits = 8;
cl.Parity = System.IO.Ports.Parity.Space;
cl.StopBits = System.IO.Ports.StopBits.One;
cl.Open();
cl.OnReceived += new ReceivedEventHandler(this.OnReceived);
cl.Send("0x8001");
But I'm not receiving any response, I can see the light on the device flashing when I send my command, but I'm just not sending this properly and I have no clue how to do this.
This was very help full thank you. But it didn't work.
I can see the light flashing on the device when I send the command but I'm not receiving a response. I tried to do it Async and Synchronous both didn't work.
Is this something you could help me with?
I could provide you the protocol specification, and pay for your service.
I think we just need someone to make at least one command to work and we can implement all the other commands.
Hi,
Hi,
You are sending 0x8001 as a string. Try with this:
cl.Send(new byte[]{ 0x80, 0x01);
You can also send data synchronous like this:
lock (cl.Synchronous)
{
Gurux.Common.ReceiveParameters<byte[]> p = new Gurux.Common.ReceiveParameters<byte[]>()
{
WaitTime = 2000,
Count = 1
};
cl.Send(GXCommon.HexToBytes(SendText.Text));
if (cl.Receive(p))
{
System.Diagnostic.Debug.WriteLine(GXCommon.ToHex(p.Reply, true));
}
}
BR,
Mikko
This was very help full thank
This was very help full thank you. But it didn't work.
I can see the light flashing on the device when I send the command but I'm not receiving a response. I tried to do it Async and Synchronous both didn't work.
Is this something you could help me with?
I could provide you the protocol specification, and pay for your service.
I think we just need someone to make at least one command to work and we can implement all the other commands.
Hi,
Hi,
I don't know what byte order meter is using. Try to change this:
cl.Send(new byte[]{ 0x80, 0x01);
to this:
cl.Send(new byte[]{ 0x01, 0x80);
You can contact me by email. I can check the spec and see if we can help on this.
BR,
Mikko