I'm trying to read a line from a serialport (COM3) with readline. I use a adapter USB->SERIAL. The serialport
constant push gps-data. The problem is that I can´t call open().
code:
PS> [System.IO.Ports.Serialport]::getportnames()
PS> $port= new-Object System.IO.Ports.SerialPort COM3,4800,None,8,one
PS> $port.DtrEnable = 'true'
PS> $port.RtsEnable = 'true'
PS> $port.Open()
output:
COM3
Exception calling "Open" with "0" arguments(s): "The I/O operation has been suspended because a thread has been terminated or a program has requested it"
no problem in command prompt (cmd) to type port:
TYPE COM3
type-command output the gps-data.
someone how has experience of the problem?