10.10.2019
Posted by 
Putty Serial Port Scripting Average ratng: 8,7/10 1829 reviews

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.

I am trying to send commands to the serial com port. Program FilesPuTTY>putty.exe -serial com4. Putty - Recommended Default Settings for a Network Engineer. Putty is is a great piece of software. Because it works and it’s free I find it installed on most. How to connect to a serial port as simple as using SSH? Picocom also will let you connect to a serial port. I found a way using a shell script here that put.

Linux putty serial

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 testpc3plink -serial COM8 -sercfg 115200,8,1,n,N Unable to open connection: Unable to open serial port C: Users testpc3putty -serial COM8 -sercfg 115200,8,1,n,N C: Users testpc3plink -V plink: Release 0.63 C: Users testpc3plink -load COM8 ^C C: Users testpc3 mrob.@att.net 19.05.15 23:16. 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.

Putty Scripting Tool

Matt Roberds.