DotNetSerialPort.WriteHexString Method (String)
Writes data represented by a hexadecimal string to the port
Parameters
-
hexStr
- Hex-string to be written to the port
Return Value
Returns true on success
Remarks
- Hex-string can be written in the form of single or double hex-chars separated by spaces.
- A hex-string without any spaces is also accepted.
- This function does not return until the operation is completed.
- This function does not return until the operation is completed.
- This function can only be used when the port is open.
Example
port1.WriteHexString("012345abcd");
port1.WriteHexString("01 23 45 ab cd");
port1.WriteHexString("0 1 2 3 4 5 a b c d");
See Also
DotNetSerialPort Class | SWBOX Namespace | DotNetSerialPort.WriteHexString Overload List