jacobsa / go-serial

A Go library for dealing with serial ports.
Apache License 2.0
631 stars 121 forks source link

windows pipe serial problem #28

Open smirkcat opened 7 years ago

smirkcat commented 7 years ago

hello:

I think this code setCommState should replaced by like this

if err = setCommState(h, options); err == nil {
        if err = setupComm(h, 64, 64); err != nil {
            return nil, err
        }
        if err = setCommTimeouts(h, options); err != nil {
            return nil, err
        }
        if err = setCommMask(h); err != nil {
            return nil, err
        }
    }

the vmware create the pipe serial port \\.\pipe\com_1 will can work

this idea form putty

in winser.c the line of 101

Otherwise it can not work