Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Plink error connection to serial port

2,722 views
Skip to first unread message

tsr...@gmail.com

unread,
May 19, 2015, 6:30:48 PM5/19/15
to
I've got an Expect script where I spawn plink for serial port communication. We've brought up a new Windows 7 PC to run the script on. The script fails on this new PC but not the others (WinXP). When I run the plink command "plink -serial COM8 -sercfg 115200,8,1,n,N" on the new PC in Windows command line, it fails to connect. If I load a saved session with the same serial configuration "plink -load COM8", it connects with no issue. If I do the original command but substitute "putty" (putty -serial COM8 -sercfg 115200,8,1,n,N), a putty window opens with a successful connection. I'm at a loss on why the plink call is not working. Any thoughts?

Tim


C:\Users\testpc3>plink -serial COM8 -sercfg 115200,8,1,n,N
Unable to open connection:
Unable to open serial port
C:\Users\testpc3>putty -serial COM8 -sercfg 115200,8,1,n,N

C:\Users\testpc3>plink -V
plink: Release 0.63

C:\Users\testpc3>plink -load COM8
^C
C:\Users\testpc3>

mrob...@att.net

unread,
May 20, 2015, 2:16:16 AM5/20/15
to
tsr...@gmail.com wrote:
> We've brought up a new Windows 7 PC to run the script on. The script
> fails on this new PC but not the others (WinXP).

Are you running the same version of PuTTY/plink on the Win7 PC as on the
WinXP ones?

> When I run the plink command "plink -serial COM8 -sercfg 115200,8,1,n,N"
> on the new PC in Windows command line, it fails to connect. If I load
> a saved session with the same serial configuration "plink -load COM8",
> it connects with no issue.

Maybe the saved configuration is setting some option you can't set on
the command line? You might create a new, empty serial configuration,
set only the things you set on the command line (115200, 8N1, no flow
control), and then compare that configuration to your existing COM8
configuration to see if there are any other differences.

> If I do the original command but substitute "putty" (putty -serial
> COM8 -sercfg 115200,8,1,n,N), a putty window opens with a successful
> connection. I'm at a loss on why the plink call is not working.
> Any thoughts?

On the Win7 PC, right click on Command Prompt (in the GUI) and select
"Run as Administrator". Then try plink in that command window.

If it now works, you have some kind of permissions problem. Running it
as Administrator is not a long-term solution, but maybe you can figure
out what you need to enable for the "testpc3" user to fix it.

If it's still broken, there is some other problem.

Matt Roberds

0 new messages