![]() The Python script will run and we should get a result similar to the one in figure 9. To test if we can run the Python script, just type the following command and press enter: As shown in figure 8, you should be able to see the test.py file we transferred before. ![]() ls is the Linux command to list files in a directory. Now, in the default directory, just type ls and hit enter to list the files in that directory. If you didn’t do it before, check here how to do it. So to confirm if everything was correctly done, we will access to the LinkIt Smart via Putty. This is the default directory of the LinkIt Smart when we connect to it via SSH. The file should now appear on the LinkIt Smart section, as shown in figure 7.įigure 7 – Transference of file to the LinkIt Smart. To transfer the file from your computer to the LinkIt Smart, just drag it to the right section of the GUI, corresponding to the LinkIt Smart current directory. We just double click on the file on the LinkIt Smart directory and the same editor should appear. ![]() Just type a simple python command and click the save button, as explained in figure 6.Ĭlose the window and the new file should be visible in the computer directory you are working. Keep in mind that we can directly edit a file in the LinkIt Smart. Let’s assume that we are creating a simple Python script called test.py, as shown in figure 5. On the window that pops, we need to specify the file name. To do so from the WinSCP GUI, right click on an empty space on the directory of your computer, select “New” -> “File”, as shown in figure 4 (my GUI is in Portuguese).įigure 4 – Creating a new file to transfer in WinSCP. Although we could have the file to transfer to the LinkIt Smart already created, we will create a new file from scratch with WinSCP. You can change the directory of your computer, but for this example I will be staying in the “My documents” folder. In my case, the default folder for my computer is the “My documents”. Just press “yes”.Īfter WinSCP establishes the connection to the LinkIt Smart, a window will appear, with the left section being a folder in your computer and the right a directory in your LinkIt Smart. If you are connecting for the first time, you may get a security warning, as shown in figure 2. Use the password configured for your root account.įigure 1 – Configuration of WinSCP to connect to the LinkIt Smart Duo.Īs explained in the previous tutorial, if your computer cannot resolve local domains into IPs using mDNS, you need to change the mylinkit.local to the IP of the LinkIt Smart in your WiFi network. On the window that appears, configure the connection as shown in figure 1. Transferring files to the LinkIt SmartĪfter installing WinSCP, just launch it. Also, I’m assuming that the LinkIt Smart is connected to a WiFi network, with the procedure explained in this tutorial. To follow this tutorial, I’m assuming that the getting started tutorial was already completed, and so the root account is configured. This program will allow us to transfer files from/to the LinkIt Smart using a very simple graphical user interface (GUI). In this tutorial we will use WinSCP, a free SCP client for Windows. It can also be used to get files from the LinkIt Smart to our computer. SCP allows us to copy files over SSH connections, meaning that we can have a file in our computer and transfer it to the LinkIt Smart. A very simple way of doing this is using the SCP protocol. Nevertheless, it’s more comfortable to develop in our computer, in a text editor of our choice, and then upload the file to the LinkIt Smart Duo. One that comes installed with the operating system is vim. Since we use a command line environment to access the LinkIt Smart, we can only create files on it using command line editors. The objective of this post is to explain how to transfer files from a computer to the LinkIt Smart Duo using the SCP protocol.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |