I'm trying to send a command to a device using windows terminal, so what I do is
[System.IO.Ports.SerialPort]::getportnames()
For getting the good port, then
$port= new-Object System.IO.Ports.SerialPort COM3,9600,None,8,one
$port.open()
for configure it and open it
After that I'm trying to send a command in this form :
<DLE> <command> <CR>
But I clearly have no idea how to do it, I try with the command OFF (easiest because it power off my device) So I test with this code :
[Byte[]] $request = 0x10,79,70,70,0x0D
$port.Write($request)
Didn't work so I test this :
[Char[]] $request = 0x10,"O","F","F",0x0D
$port.Write($request)
Same didn't work,thing is I don't know how to writing it's absolutly not explain in the manual of my device they just give the command form I wrote above and the list of command type OFF / SET / CLR ...
If someone can help me with this thanks :)