Code Monkey home page Code Monkey logo

libssh2-labview's Introduction

LIBSSH2-LabVIEW: Adds SSH client support to LabVIEW™ using the libssh2 library

A LabVIEW add-on and toolkit for communicating with a SSH server. This adds SSH client support to LabVIEW by using the libssh2 library and a LabVIEW-friendly wrapper library, libssh2lv. This only adds client-side SSH support. It does not add SSH server support.

VIPM installs VIPM stars GitHub issues GitHub forks GitHub stars

Table of Contents

Example Usage

A VI snippet of downloading a file from a remote SSH server using this toolkit, similar to the scp.c example from the libssh2 C library project:

Simple SCP file download

A VI snippet of uploading a file to a remote SSH server using this toolkit, similar to the scp_write.c example from the libssh2 C library project:

Simple SCP file upload

A VI snippet of executing a single command on a remote SSH server and reading the response using this toolkit, similar to the ssh2_exec.c example from the libssh2 C library project:

Single Command Execution

For more examples of using this toolkit and VIs instead of VI snippets, see the VIs in the Examples source folder, or (eventually) use the NI Example Finder in the LabVIEW Development Environment after the toolkit has been installed.

Dependencies

Installation

Development

The Caraya, JKI State Machine, OpenG Array Library, OpenG File Library, and VIPM API dependencies must be installed for all versions of LabVIEW (2009 and 2018) to avoid errors during automated builds.

Installation

Desktop

A VI Package (VIP) is available at VIPM.io. The recommended installation instructions are to:

  1. Navigate to the LIBSSH2 for LabVIEW package at VIPM.io.
  2. Click on the Install button to the right. The VI Package Manager (VIPM) (freely available from JKI) will start automatically.
  3. Follow the on-screen instructions to complete the installation.

Alternatively, the toolkit can be installed by: (i) downloading the source code and building the VIP, (ii) downloading a VIP from the releases section of this project, or (iii) manually copying the VIs from the source code into a project.

Real-Time Target

Communication from a CompactRIO or PXI controller running the NI Linux Real-Time (RT) Operating System (OS) to a remote SSH or SFTP server for a real-time application is possible, but several dependencies must be installed on the RT target in order to work.

  1. Follow the Quick Start instructions for installing the libssh2 shared object (SO) onto the CompactRIO. This will place the libssh2.so file in the correct location on the CompactRIO. This SO is needed for the libssh2lv.so file.
  2. Follow the Quick Start instructions for installing the libssh2lv shared object (SO) onto the CompactRIO. This will place the libssh2lv.so file in the correct location on the CompactRIO. This SO is needed for this LabVIEW toolkit's VIs to work.
  3. Install the VIP according to the Desktop installation instructions. This will ensure the VIs are available for development. The VIs will be automatically deployed to the CompactRIO when the real-time application is either built and deployed as an RT executable or when running from within the development environment.

Build

Each component in the LIBSSH2-LabVIEW project has a Source Distribution build specification. The destination of each source distribution build is the builds folder relative to the project root, i.e. same folder as the LIBSSH2.lvproj file. Additionally, the output for the compiled help documentation is also the builds folder. The builds folder should not be included in the version control repository. A Build.vi script is available in the Scripts.lvlib project library that will build all of the components and the help documentation automatically (VIPM Pro is not needed, but the HTML Help Workshop is needed).

The VI Package Build (.vipb) specification, located in the configs folder relative to the project root, is configured for the package source to be the builds folder. Thus, the Source Distribution for each component must be built before opening the LIBSSH2.vipb file in the VIPM; otherwise, the package configuration will be lost.

Packaging using VIPM Pro (recommended)

Important, if creating a package for LabVIEW 2009 from LabVIEW 2018, the VI Server TCP/IP ports must be different for each version of LabVIEW and verified with the VIPM application before proceeding. An error will occur when the VIPM is started if both LabVIEW 2009 and 2018 are running at the same time. Basically, VIPM will not know which VI server to use if both versions of LabVIEW are using the same TCP/IP port.

If VIPM Pro is available, then open the LIBSSH2.lvproj file in any version of LabVIEW newer than 2009 and run the Package.vi located in the Scripts.lvlib project library of the Project Explorer window. Ensure all dependencies are installed before running the Package.vi script.

Note, the version number for the package is set in the configs\LIBSSH2.vipb file. The version number in the VIP build specification file should be modified and saved before running the Package.vi script.

Packaging using VIPM Free

If VIPM Pro is not available, then the following steps can be executed to do essentially the same thing as the Package.vi script. Ensure all dependencies, except VIPM Pro and the VIPM API, are installed before completing these steps.

  1. Start LabVIEW 2018 or newer and open the LIBSSH2.lvproj file.
  2. From the Project Explorer window, File>>Save for Previous Version..., a new dialog will appear.
  3. Select 9.0 from the drop down menu.
  4. Click Save.... A new dialog will open.
  5. Create the target\9.0 folder hierarchy in the project root, i.e. the same folder as the LIBSSH2.lvproj file, if it does not already exists.
  6. Click Save.
  7. Close LabVIEW 2018 or newer and the LIBSSH2.lvproj file.
  8. Navigate to <project root>\src.
  9. Copy the Help folder to <project root>\target\9.0\src.
  10. Start LabVIEW 2009.
  11. Open the <project root>\target\9.0\LIBSSH2.lvproj file. Do NOT open the project in any other version of LabVIEW.
  12. Open each Source Distribution build specification under the "Build Specifications" tree item in the Project Explorer and change the Output Destination to <project root>\target\9.0\builds. Save and close each build specification.
  13. Run the Build.vi in the Scripts project library to build each Source Distribution under the "Build Specifications" tree item and the compiled help documentation file (LIBSSH2.chm). The output of each build will be available in <project root>\target\9.0\builds.
  14. Open the <project root>\target\9.0\configs\LIBSSH2.vipb file in VIPM.
  15. Build the VI package with VIPM. The output will be available at <project root>\target\9.0\packages. Do NOT modify anything in the package build specification, but ensure the "2009" version of LabVIEW is selected in the upper, right-hand corner of the VIPM application window.
  16. Close VIPM.
  17. Close LabVIEW 2009 and the <project root>\target\9.0\LIBSSH2.lvproj file.

Documentation

See the in-app LabVIEW Help system for more information and documentation about using the library after it has been installed, or visit the web-based documentation. Examples are also available within the LabVIEW development environment using the "Help->Find Examples..." menu item.

Tests

Tests are written in LabVIEW using the Caraya unit testing framework and included in the project via the various Tests.lvlib project libraries and the tests on-disk folder. To run the tests, open the LIBSSH2.lvproj file found in the project root in the LabVIEW Development Environment (32-bit or 64-bit) and run the Test.vi script located in the Scripts.lvlib project library. This will run all of the tests defined in all of the various Tests.lvlib project libraries located in the project.

The tests require a SSH server. The SSH server should support password and public/private key authentication. The SSH test server can be the localhost. The tests will prompt for a IP address, username, password, passphrase, etc. as needed. None of the tests are included in the VIP distribution. They are only included with the source code, but they also provide excellent examples for using each of the VIs in the public API of the toolkit.

License

LIBSSH2-LabVIEW is licensed under either the BSD-3-Clause or the Apache-2.0 license, and it contains statically compiled code from the libssh2 and OpenSSL projects, which are licensed under the MIT license and Apache-2.0 license, respectively. See the docs folder for more information about licensing and copyright.

libssh2-labview's People

Contributors

volks73 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

mstroehle nusapb

libssh2-labview's Issues

Change VI Descriptions for polymorphic VI instances

The polymorphic VI description has been copied to the VI description of all "child" instances. The child instances should have different VI descriptions because these will ultimately be compiled into a single Help file (CHM). Only the polymorphic VI's description appears in the Context Help.

The instance VI descriptions should be specific to the functionality of the instance.

Update README examples with new "Done" VIs

The VI snippet for uploading a file provided in the Examples section of the README needs to be updated to use the renamed Close and Wait on Close VIs. These VIs have new names and icon (#6), so it will be confusing for users trying to follow the examples and cannot find the Close-named VIs.

Session Palette wrongly using Agent VIs

Hi, And thanx for making this toolkit.

I'm trying to use it, but there seams to be missing something.
image

According to your snipplets in the Read.me There looks like there are a init season :
image

Also in the Connect.VI there are no input that can tell where to connect.

Pleas look into this and let me know what I do wrong :)
Thanx

libssh2lv.so path issue in PXI RT Linux target- x64 quad core

HI @volks73 ,

We needed a SSH client on the PXI Linux RT target, its a quad core PXIe 8840 controller.

The problem is after placing the libssh2lv.so file in /usr/lib Dir, and providing the path explicitly for the Initialize API it didn't take the path, it returned a file not found error.

After going through the https://github.com/fieldrndservices/libssh2-labview#dependencies-installation-crio
session, I came to know that libssh2.so is a dependency for libssh2lv.so file. I installed the x64 version from the below link,
I couldn't find a quad core version of the ipk file, I'm not sure if this could be the missing link.

https://github.com/fieldrndservices/libssh2-nilrt-ipk/releases

admin@NI-PXIe-8840Quad-Core-031C9C8F:/usr/local/lib# opkg install libssh2*.ipk
Installing libssh2 (1.9.0-r0.4) on root
Configuring libssh2.
admin@NI-PXIe-8840Quad-Core-031C9C8F:/usr/local/lib#

image

I observed libssh2lv.so.1 file created after the installation is competed

Still the file not found error persist after installation of the above ipk file also, can you advice if there is any other dependency or if I'm missing something. Thanks in advance.

Upgrade to root

Hi and thanx for the Lib.

I have not figured how to upgrade for a user to root. after establish the connection.
Short description ;)
I login to UUT with keys. Then I need to become root.
So I have tried to send (su -) and the send a password. But get no reply
image

In putty I can do this without any problems.
image

I hope you can point me in the right direction :)

Change the Channel Create SCP Receive instance to include creation and destruction of the File Info object

The Channel Create SCP Receive instance is kind of awkward to use. A File Info object must be created the Channel first, then the remote file size is obtained and then the File Info object is destroyed. See:

Current

It just looks messy. I think this was done originally because the polymorphic selector was hidden, so the instance controls could not be similar to another instance for the automatic selection to work properly. Now that the selector is visible by default, I think this need is removed and the File Info creation, usage, and destruction can be wrapped into the SCP Receive variant.

However, there are a couple of concerns:

  • The above implementation is explicit and there is no magic involved. This is consistent with the library in that it is explicit and low-level in nature with the intention of a higher level API to be created around it.
  • While in the above snippet and file download example only uses the file size, the other member fields of the File Info object, and ultimately C struct, might be needed for other applications using a SCP Receive-style channel. This issue could be mitigated by getting the values for all of the member fields and returning a cluster of the File Info from the Create SCP Receive instance. This seems reasonable as the File Info object/struct is essentially "read only".
  • Related to the previous issue, are there implementations or usage that I am not seeing where breaking out the File Info creation, usage, and destruction are needed?

Change Open/Close VIs for SFTP File and SFTP Directory classes to polymorphic

To be consistent with the Create/Destroy VIs of all other classes, the Open/Close VIs for the SFTP File and SFTP Directory classes should be changed to polymorphic, even if it is just one instance. This will provide a consistent look-n-feel for using the API and make usage more predictable.

There could be an argument made for renaming these to Create/Destroy as well. I believe I (internally) debated this for awhile and decided to keep the "Open/Close" nomenclature to avoid confusion with creating a file or directory on a remote SFTP server.

Populate the Help Path for all VIs

The Help Path field in the VI Properties under the Documentation section should be populated with: <helpdir>:\Field R&D Services\LIBSSH2.chm for all VIs in the Toolkit library. This is a requirement for submission to the NI Tools Network, and it is necessary for the "Detailed Help" link to work for a VI in the Context Help window of the LabVIEW Development Environment

Ability to tail a file continuously even if the file is recreated on the target

At the outset I would like to thank the team for such a wonderful toolkit. Thanks for sharing with the community.

I'm able to tail the file continuously by writing the tail command to the channel at a 1 second interval after going through the example., thanks to Chris for pointing me here.
https://github.com/fieldrndservices/libssh2-labview/blob/main/src/Examples/Read-Execute-Print-Loop%20with%20a%20Raspberry%20Pi.vi

I'm facing an issue when the file is recreated at the server side. The read operation reads only the tail command that was written to the channel and stops reading the file data.

Creating new session and channel after closing the current ones does work. So it looks like when the original file was momentarily not available, Since it was renamed and backed up on the target side, the reference to it is lost.

I wanted to know if there is any better idea to get around this. I the lib has any specific flag for this means it would be helpful to take a informed decision rather than to develop logics to detect this scenario.
Feedback on this would be greatly helpful.

Test continuous tail

Thanks,
Temin

Populate the Help Tag field for all VIs and Controls

Similar to #15, The Help Tag field in the VI Properties under the Documentation section should be populated with a path to a HTML file relative to the Help documentation root folder (src/Help/pages/) for all VIs and Controls in the Toolkit library, ideally, regardless of class and scope. This is a requirement for submission to the NI Tools Network, and it is necessary for the "Detailed Help" link to work for a VI in the Context Help window of the LabVIEW Development Environment.

Bump source code to LabVIEW 2019 SP1

LabVIEW 2019 SP1 is available, which includes some quality-of-life improvements to the development environment for writing LabVIEW code that I would like to use. This would only bump the minimum version from LabVIEW 2018 to LabVIEW 2019. It would not change the distribution/toolkit's minimum version, which is currently and will remain LabVIEW 2009.

Error 1097 when establishing a SSH connection

As mentioned in #36, when an example or test is run the first time, it completes successfully and/or passes without error. If the example or test is ran again, an Error 1097 occurs when establishing a SSH connection with the Session:Connect.vi or LabVIEW 2018 crashes with an internal error. The Error 1097 occurs with the examples while the LabVIEW 2018 crash occurs with the Caraya-based tests. I believe the LabVIEW 2018 crash is caused by the Error 1097 but Caraya has a conflict.

Error 1097 mentions an internal errors with the external shared library (DLL for Windows) through the Call Library Function node. It is possible there is something wrong with the v0.2.2 of the libssh2lv shared libraries.

Error -8146 at "Create from SCP Send.vi" (DLL returned status -31 "SCP Protocol Error")

Hi Chris,

I got this error when trying to transfer files to a PXI system running NI Linux RT.

Error -8146 at "Create from SCP Send.vi"

I dug a little deeper and see that the call to the lv_libssh2_scp_send function in libssh2lv.dll is returning a status value of -31 ("SCP Protocol Error")

Can you think of any reasons this might be happening or good next steps for debugging?

Note: I have two PXI's and they are on different networks. Maybe the PXI's have a slightly different software configuration or there's a difference in the network.

Thanks for your help. Loving the libssh2-labview toolkit!

Jim

Create from SCP Receive.vi: "Memory Allocation Error - Unable to allocate memory, most likely the system is out of memory."

When using the "Create from SCP Receive.vi" (for example within the SCP Download example), I get a "Memory Allocation Error" (-8102) at the Call Library Node (Function: lv_libssh2_scp_receive).
The problem is that this occurs only with some servers, not all and not at all times.
Working locally with an RPi works 100% of the time without problems.
Working with 2 other servers, I get this error 8 out of 10 times (roughly).

  1. How can I fix this issue?
  2. Is this a problem with the memory on my client machine or on the server? My understanding would be server-side since it oocurs with some machines, but not others.. But the help of the "Create from SCP Receive.vi" sounds as if this happens locally on the client..

Thanks !

Cheers
Niels

SSH cmd sending and receiving

Hi,

I'm trying to use this toolkit to send and received cmd over ssh. I'm find the Execute that sending CMD. but how to received the answer ?

Great toolkit :D Looking forward to test it more

Make port type configurable

Hello,

would it be possible to change Session/connect.vi VI, or add some other with the same functionality, which would allow to use other port for SSH than 22? Currently it is hardcoded as I can see and I dont see any way in the toolkit, which would allow me to select the SSH port.
Here is what I suggest:
Before:
image
After:
image

Error when attempting to authenticate with an empty password

Hi,
When you want to connect with SSH in to a Linux embedded and the user does not have a password, the toolkit gives you an error:
Error -8121 occurred at Toolkit.lvlib:Session.lvclass:Password Authentication.vi
I have to say that I test to put a password and the library runs perfectly and then I have changed the password to empty and run ok. I don't know the difference between not password and empty but it could be a bug....

Create HTML Help files for all VIs and Controls in the toolkit

HTML help files are needed for all VIs and Controls in the toolkit so that a Compiled HTML (CHM) file can be created and included in the VIP. This is a requirement for submission to the NI Tools Network and enables the "Detailed Help" link in the Context Help within the LabVIEW development environment for a VI or Control to work properly.

Login with PPK-file

Thanx alot for this toolkit.

But I have a challenge(or a problem).
I'm not able to get this a valide login using a assigned ppk fil. In your exsample I need both a public key and a private key.
But I only have the server public key. Is there something I don't understand ?

If I try this In e.g. Putty I can give it this pkk file and username and it will connect to given server.
Thanx for your help :)

Correct examples, when saving binaries files from LabVIEW to not add size at beginning of file

When for example the example "Simple SCP File Download.vi" is used, LabVIEW adds the size of the saved binary file at the beginning of that file making it not identical to what was on the SSH server before. I don't know why this is default true in LabVIEW, but for the purpose of transfering a file via SCP and having the identical file after transfer, this needs to be false.

image

Example:
image

SCP Snippet in README is wrong

The boolean False for prepending the length of any array or string needs to be added to the SCP VI snippet in the README. See #36 for more details. This has been fixed in the examples that are included with the package, but the README needs to be updated.

Error -8146 when 1 minute without sending command to SSH channel

Hi,

I'm working on a project where I do SSH communication between a computer (Windows 10) and a motion controller (Debian 8).

I'm having problems sending commands, after being 1 minute without sending any commands. It seems that there is a timeout configured because it is exactly 60 seconds the maximum time I can go without sending commands, so that the error does not happen.

This is the VI (snippet) I developed to simulate the problem:

SSH

Note that I forced a timeout greater than 60 to simulate the problem. Any value less than that, the error does not occur and I am able to send both commands.

The returned error is:
-8146 : Field_RnD_Services_LIBSSH2_Toolkit.lvlib:Channel.lvclass:Write.vi[Socket Receive Error]

I've already tried setting a timeout with Write Timeout.vi, but I understand that this timeout refers to sending or receiving commands, not the connection itself:

image

@volks73 can you help me please?

Inconsistent API for creating, opening, closing, and destroying channels

See the comment from #3, but basically there is a Close VI for a channel but no complementary Open VI. The toolkit generally uses the following naming conventions to create (hopefully) a uniform, consistent API to quickly build VIs without having to constantly refer to documentation:

  • Begin <> End
  • Create <> Destroy
  • Initialize <> Shutdown
  • Initiate <> Complete
  • Introduce <> Conclude
  • Open <> Close
  • Read <> Write
  • Start <> Stop
  • Send <> Receive

While there is a Channel.lvclass:Close.vi, there is no Channel.lvclass:Open.vi to match it. The Open VI is actually "buried" or implicitly executed within the Channel.lvclass:Create.vi because of the libssh2 implementation of always needing to open and destroy (free) a channel, but optionally needing to close a channel.

I think one possibility is to include a boolean control in the Destroy.vi that is True by default and executes a Close automatically when the channel is destroyed. If the control is False, then the channel is not automatically closed when it is destroyed. This would keep the symmetry of the VIs and naming consistent. However, there is the issue of using the Wait on Close VI for a channel and how to handle the usage? I guess in that case, the boolean control would be False and the user can explicitly call the Close and Wait on Close VI. Both of these VIs would still exist in the public API/palette so there would still be some symmetry problems/inconsistencies.

Also, I believe the underlying libssh2_channel_close function just sends a signal to the remote server that no more data will be sent. So, maybe the simplest option is to rename the VI from Close to "Signal Close", "Terminate" and change the icon. Essentially, change the meaning and naming of the VI to be something that does not have an antonym. The Wait on Close VI would be changed to Wait on Close Signal. I am leaning towards this option at the moment, but I am still not a fan of "Close" begin in the name.

Bump to libssh2lv v0.2.1

The source distribution and VIP file includes a shared library for Windows, macOS, and Linux for the libssh2lv library. The libssh2lv library is a LabVIEW-friendly library that "wraps around" the libssh2 library to provide an easier to implement and maintain interface with LabVIEW.

Recently, the libssh2lv project bumped their dependency for libssh2 and OpenSSL from v1.8.2 to v1.9.0 and from v1.1.0j to v1.1.1f, respectively. This resulted in a new release of the libssh2lv library, v0.2.1.

This project should bump the version of the libssh2lv shared library from v0.20 to v0.2.1 so the new functionality and bug fixes for the libssh2 project are supported.

Add a Read/Write All STDERR VI to the Channel class

The Write STDERR VI only can write 30KB of binary data to the remote SSH server's STDERR stream and Read STDERR VI can all read 30KB of binary data. This is similar to the Write and Read VIs. However, there are the Write All and Read All VIs for the STDIN stream that takes care of breaking up and reading/writing binary data larger than 30KB with multiple Read/Write VI calls, respectively. Similar Write All STDERR and Read All STDERR VIs should be added for consistency and API ease-of-use.

SSH read sometimes not working

I am currently using the toolkit for communication with customer device. Sometimes, the behavior is following: I send the command via SSH but I don't receive any response. I was trying to debug and found that the DLL response from libssh2lv.dll in he channel read VI returns array with zeros (if I understand correctly, this means that no response was received)

When I try using desktop SSH app (putty) and try to send same SSH commands via it, I receive response as expected.

I am not sure what is the root cause, but with some commands the response is as expected, with others it is not.

One such a case which I can specify are invalid commands. For example, sending nonsense command "qwer" has the following response in putty:
image

If I replicate with the toolkit, Read VI returns nothing.

Maybe my understanding of the toolkit is wrong (this seems kind of easily discoverable issue so I would expect it to be put here sooner if it was indeed an issue), in such case please let me know if I am doing something wrong.

Create Polymorphic VI for the Create/Destroy VIs

The Known Hosts, Session, and SFTP classes have the Create and Destroy VIs, just like all other classes in the toolkit. However, unlike all other Create and Destroy VIs, these versions are not polymorphic. Just to be on the extreme end of consistent, even though there is (currently) only one variant, the Known Hosts, Session, and SFTP Create and Destroy VIs should be changed to polymorphic VIs.

Note, the Agent and Listener classes only have a single instance for its Create and Destroy VIs but these are polymorphic.

SFTP - File Attributes - Modified Time and File Size

When establishing a SFTP connection, followed by opening an SFTP file attribut reference and querying "modified time" and "file size", erratic numbers are returned, even sometimes including "0".
Edit: somehow now it only gives me zeroes..

It appears as if it takes the data from a specific adress in memory, without that adresses actually containing the correct data.
When using the identical credentials and file path with SCP, everything runs smoothly.

image

Add VI descriptions

Descriptions for each VI in all classes are needed. The VI descriptions are the content that appears in the Context Help when hovered over on the block diagram. These descriptions are required for submission of the toolkit to the NI Tools Network.

The VI descriptions will eventually get converted into HTML help file as well.

Timeouts Is missing

Several times I have ended up in a waiting forever on Read and Read all.
I like to have a Timeout so the apllication don't lock if something happends and these don't get any data.
image

Getting [Bad Use Error] when trying to read/write for two different sessions parallely

Hi @volks73,

Within the same application instance, I would like to maintain two Sessions in different loops. It is observed when we try to read/write to channels of different sessions in parallel, the lib throws below error.

Error -8142 occurred at Field_RnD_Services_LIBSSH2_Toolkit.lvlib:Channel.lvclass:Read.vi
Possible reason(s):

[Bad Use Error]

I tried creating single session and passed the ref to other loop where only channel would be created and closed. Alternatively, tried creating different sessions and channels in parallel. There is no issue while creating session/ channel in parallel but when there is write or read operation occurring in parallel, the issue crops up.

Your feedback on this would be great.

Thanks

Password authentication failed

When I try to login I get an error message:
Field_RnD_Services_LIBSSH2_Toolkit.lvlib:Session.lvclass:Password Authentication.vi
[Authentication Error]
This is since I updated my system for some vulnerability issues.
Is there a chance that the tool gets an update that it support newer algorithms?

Problem with Example "Execute Multiple Commands with a Single Channel.vi"

I'm following up on a recently closed issue with similar title to the current one.

I am using the example on Windows 10 with LabVIEW 2019f2 release. I can "execute multiple commands with multiple channels" and it works fine. However, I run into issues whenever I use the "Shell" channel vi in the "multiple commands with single channel" example. The problem is that, similar to the prior issue that is now closed, when I send a command I only receive the sent command echoed back to me when I read the response. This is not an issue when I use the Execute shell command vi, only when I try to write and read after opening the shell-type channel. So, for example, if I send the command, "date -u +%s" what I receive back is "date -u +%s" instead of the date in elapsed seconds that I would expect to get. Can you please help me with the solution?

Fix File Download VI Snippet Example in README

The File Download VI snippet example in the README links to VIs in the source code as opposed to the installed toolkit. It should be linked to the installed toolkit/package to avoid searching for the VIs and/or needing to install the source code in a specific location.

Example "Execute Multiple Commands with a Single Channel" not working

Hallo,

first thank you for this great tool.

Tested in LabView2017 and LabView2020 on Win 10 (19042.630). Installed Version 1.0.0.20 via VI Package Manager.
The server I'm connecting to is running Debian Buster with Armbian Linux 4.19.62-sunxi on a Banana-Pi

The example "Single Command Execution" works as expected.
But the example "Execute Multiple Commands with a Single Channel" returns the Commands as Response.
So I send echo "Hello World from the first command!" and get echo "Hello World from the first command!" (exactly the same) back. Same goes for other commands.

Tried to add an \r at the end as a test, same result but with \r\n at the end.

If you need any other info, let me know

SSH : two CMD in same channel

Hi, I tried to send more that one CMD into the Channel I had created.
image

But It return:
Field_RnD_Services_LIBSSH2_Toolkit.lvlib:Check Status.vi
[Bad Use Error]
image

Do I need to wait or do something between CMD ?

Change to auto-generated HTML Help Documentation

Currently, the HTML Help files that are compiled into a CHM file during the build are part of the source code. These are currently treated as source files because they are "source" for the CHM compiled file. However, the HTML files are in fact generated from the VI descriptions, terminal descriptions, etc. of the VIs, project libraries, classes, etc. documentation and just placed in a template. Originally, the concept was to do HTML file generation once through the Labricator add-on because the thought was that this only had to be done once.

However, whenever the content of the VI documentation is changed because of a bug, typo, or new feature the HTML files should be regenerated, or the change would have to be replicated again in the existing HTML files. Part of the issue was that the Labricator HTML file generation feature was relatively new and experimental. It was implemented and tested in parallel with the development of this toolkit because so many VIs exist and manually "printing" the HTML Help files from each VI was time consuming and error prone. Now, the Labricator HTML file generation feature appears to be more robust and could be used to automatically generate the HTML files as part of the build process. This would eliminate the need to keep all of the HTML files around in the source code.

New VIP request

Hi,
I'm trying your code, but Like to have a new VIP file for installing these files correct on my computer.

Thanx
Aleksander

Add data entry limits to the controls in various Read/Write VIs

There is a libssh2 shared library defined maximum number of bytes per read or write of 30KB. Thus, there are "Read All" and "Write All" VIs that will read and write larger binary data in chunks, or blocks. The documentation of the VIs indicates these limits but this makes the data entry for the controls on the "Read" and "Write" VIs inconsistent. The limits should be added to avoid confusion.

Make the selector visible for all polymorphic VIs

Some polymorphic VIs have the selector visible, some do not. All polymorphic VIs will automatically select the VI based on the wired inputs, but it is not always obvious what the inputs should be and how the selection occurs. Displaying the selector will make the toolkit easier to understand and use.

I believe I originally hide the selector because I thought it looked messy having a bunch of selectors on the block diagram. There is the Select Type menu item that appears in the right-click, context menu for a polymorphic VI to select the type without displaying the selector, but it is not obvious which VIs are polymorphic unless you are already familiar with the internals of the toolkit.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.