Get access to the new Intel® IoT Developer Kit, a complete hardware and software solution that allows developers to create exciting new solutions with the Intel® Galileo and Intel® Edison boards. Visit the Intel® Developer Zone for IoT.
Overview
In this guide you will learn how to transfer files between your computer and Intel® IoT device such as the Intel® Edison or Intel® Galileo board.
Note: This guide is currently only for the Linux OS; Windows* and OS X* guides are coming later.
Requirements
Your Intel IoT device has up-to-date firmware installed and is connected to a network.
How to Flash Intel® Edison board Firmware: Windows* OS X* Linux*
How to Flash Intel® Galileo board Firmware: Windows* OS X* Linux*
Steps
SCP stands for "Secure Copy" and is a file transfer method that uses the Secure Shell (SSH) protocol. To set up SCP, follow the steps below:
-
Update OpenSSH on your computer. Open a terminal and enter the following commands in bold:
-
sudo apt-get remove openssh-client openssh-server
-
When asked, enter Y and press Enter.
-
sudo apt-get install openssh-client openssh-server
-
When asked, enter Y and press Enter.
-
After the installation is complete, you should see output similar to what is in Figure 1.
Figure 1: Output after installation of OpenSSH
-
Find the IP address of your computer on the local network. Open a terminal on your computer and enter the following command:
In the output, look for eth0 if your computer is connected to your router/modem through Ethernet or wlan0 if you are connected through Wi-Fi*. Following either eth0 or wlan0 look for inet addr: xxx.xxx.x.xxx. The xxx.xxx.x.xxx is the IP address that you will use to transfer files to and from your computer. In Figure 2 the IP address is circled and in this case is 192.168.1.158.
Figure 2
-
Plug in your Intel IoT device through the USB connection. Your device should power on.
-
Connect to your device through the serial connection using a utility called ‘screen’. Open a terminal on your computer and enter the following commands in bold.
-
If you do not have screen installed, first run: sudo apt-get install screen
-
To connect to your device run: sudo screen /dev/ttyUSB0 115200
-
Enter your device name or root for the username as well as a password depending how you have configured it. To reconfigure your device run configure_edison through a serial terminal.
-
On your computer, navigate to where you want to move files to or from your device. I have created the folder /home/root/transfer for this purpose. So I would navigate there by entering the following in my device’s terminal:
-
To transfer files from your computer to your device use the following command where USERNAME is your computer username, xxx.xxx.x.xxx is the IP address from step 2, /file/to/transfer is the path to the file you wish to transfer on your computer, and /path/to/location is where on your device you want to transfer the file to:
If you are asked to establish a trusted connection, enter Y and press Enter. You will also be asked for your computer username and password. Enter them and press Enter.
For example, this is how I would transfer the file "example.txt" from /home/user/martin/example.txt on my computer to my device:
Note: The ./ at the end of the line means the file will copy into your current folder, or continuing from the example in step 5 into /home/root/transfer on my device; however, you may enter any path you wish.
If the transfer was successful if you see output similar to what is in Figure 3.
-
To transfer files from your device to your computer use the following command where USERNAME is your computer username, xxx.xxx.x.xxx is the IP address from step 2, /file/to/transfer is the file you wish to transfer to your computer, and /path/to/location is the path to where the file will be transferred to on your computer:
If you are asked to establish a trusted connection enter Y and press Enter. You will also be asked for your computer username and password, enter them and press Enter.
For example, this is how I would transfer a file named "example.txt" from /home/root/transfer/example.txt on my device to my computer:
If the transfer was successful if you see output similar to what is in Figure 3
Figure 3: A successful scp transfer
Troubleshooting
If you have any issues or questions, please go to Intel Edison Forums to post your questions and look for solutions.