I'm a self admitted software hack, so I'm sure this will sound dumb. I need to send serial commands to my samsung display in hex. When I use a hex com tool, it works. When I use the following code, it doesn't. What am I missing here?
PS> $port= new-Object System.IO.Ports.SerialPort COM1,9600,None,8,onePS> $port.open()PS> $port.WriteLine("0822000000012C")PS> $port.Close()
The stuff in the WriteLine method is the hex string.
Alright! I got it! (Just not with powershell, I had to use VB):
Port1 =
Port1.PortName =
Port1.BaudRate = 9600
Port1.StopBits = IO.Ports.StopBits.One
Port1.DataBits = 8
Port1.Parity = IO.Ports.Parity.None
Port1.Open()
Port1.Write(xmtBuf, 0, xmtBuf.Length)
Port1.Read(rcvBuf, 0, rcvBuf.Length)
Port1.Close()
End