Having difficulty with PUT and serial COM port.
Need to send 5 bytes to a radio in the format: p1 p2 p3 p4 cmd
... where p1 to p4 are placeholder bytes which can be any value, and cmd is the hex byte value E7
The port is working fine as evidenced by use with two other applications which communicate back and forth with the radio via its serial port.
The code is:
... and my port analyzer shows this is what is being sent:
Characters: ..????E7 Hex: 06 00 3f 3f 3f 3f 45 37
My question is: what are the hex 06 00 bytes doing here? I didn't send them and they are the reason the radio is not responding to the command.
06 00 appears to be a count of the following bytes ... which I do not want transmitted down the com port.
PS: this is what one of the successfully-operating applications outputs, and what I am trying to emulate (it's using zeros not ?, but that is not the issue -- as any character can fill p1 thru p4 as I said at the top of my post):
Character: .... Hex: 00 00 00 00 e7