Academic Company Events Community Support Solutions Products & Services Contact NI MyNI
7 ratings:
 4.42 out of 5   

Using ExtraPutty for SSH Communication in TestStand



Primary Software: LabWindows/CVI Add-ons>>Test Executive
Primary Software Version: 2.0.1
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
Many embedded device test applications require communication between the test system and the Device Under Test (DUT). On the production line this can be done via serial interfaces, but once the product has been assembled it can be a waste to include a test port on the connection panel. Instead, as many of these devices now run networked operating systems, Secure SHell (SSH) communication is preferred. How do I achieve this?

Solution:
ExtraPutty is an open source extension of the popular Putty serial client. Added features include session management, dll interfacing, and most importantly TestStand integration. The download can be found in the link below.

Note: You should download the snapshot version (latest) for best compatibility with TestStand 2012.

Run the installer and follow the instructions. It is important that you navigate to the TestStand install directory when prompted. Once installed, you may find that TestStand will not start due to compatibility issues. This is fixed by navigating to <TestStand>\Components\TypePalettes and then editing the ExtraPutty.ini file, changing the version numbers throughout the file to ones compatible with TestStand 2012. Appropriate numbers can be found in the other .ini files in that directory.

Finally when starting TestStand you will need to navigate to the Types view and edit the ExtraPutty types to different version numbers in order to avoid conflicts.

Once installed, using the functions is an easy task. Simply open the insertion palette and find Session Configuration. Drag Initialize Connection into your sequence. Next you must configure the step. Navigate to the Module tab in the Step Settings window. Here you can edit the connection settings as follows:

  • TargetName: The IP address or domain name of the device to connect to.
  • ConnectionId: An ID for this connection. Must be 1 or greater.
  • Login: The username for the remote device.
  • Password: The password for that user.
  • ShowPuTTY: Decide whether to show the Putty terminal window on this machine.
  • Protocol: The internet protocol to use for the connection. 1 for SSH.
  • PortNumber: The port number to connect on.

Now that you have opened a connection, you can use the Send-Received data step in the Session Management palette to send commands to the device. Drag the step into the sequence like before and enter the following step settings:

  • ConnectionId: The ID you gave the connection in the first step.
  • Command: The command you want to execute on the device.
  • TimeCapture: How long you want to wait to receive data back after the command is sent.
  • DataRcv: Where to put any data received from the client after the command is sent.
  • MaxSizeofData: The maximum data received after the command is sent.

Finally, you will need to close the connection afterwards. To do this, use the Close Connection step in the Close palette. The only setting it requires is ConnectionId, which simply tells it which connection to close.

Now you should be able to run the sequence and communicate with the DUT.



Related Links:
External Link: ExtraPutty Download Page

Attachments:





Report Date: 05/17/2013
Last Updated: 07/09/2013
Document ID: 69G3R5BW

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit