Setting up Intel® XDK IoT Edition
Overview
- This guide contains steps for installing the Intel® XDK IoT Edition, as well as creating and running a simple application on the Intel® Galileo or the Intel® Edison board. These are steps for all supported operating systems.
- Intel XDK IoT Edition lets you create and test applications on Intel® IoT platforms. It provides code templates for creating new applications that interact with sensors, actuators, and so on, enabling you to get a quick start on developing software for your Intel board.
Requirements
- A system with Windows* OS, Mac* OS, or Linux* OS
- An internet connection
- You have connected your development board to your system. For steps, see the appropriate link below:
- Intel Galileo Gen 1 board or Intel Galileo Gen 2 board:
- Windows OS: https://software.intel.com/en-us/articles/getting-started-with-the-intel-galileo-board-on-windows
- Mac OS: https://software.intel.com/en-us/articles/getting-started-with-the-intel-galileo-board-on-mac
- Linux OS: https://software.intel.com/en-us/articles/getting-started-with-the-intel-galileo-board-on-linux
- Intel® Edison board:
- Windows OS: https://software.intel.com/en-us/articles/getting-started-with-the-intel-edison-board-on-windows
- Mac OS: https://software.intel.com/en-us/articles/getting-started-with-the-intel-edison-board-on-mac
- Linux OS: https://software.intel.com/en-us/articles/getting-started-with-the-intel-edison-board-on-linux
- Intel Galileo Gen 1 board or Intel Galileo Gen 2 board:
- You have connected your development board to the internet.
Install the Intel® XDK IoT Edition
This section describes how to install the latest version of the Intel XDK IoT Edition.
- To download the latest installer for the Intel XDK IoT Edition, visit https://software.intel.com/en-us/html5/xdk-iot. Ensure that your OS platform is selected in the green download box, then click Go.
- Run the installer by doing one of the following:
- For Windows OS: Right-click the installer you just downloaded, then select Run as Administrator. If a confirmation message is displayed, click Yes to continue.
- For Mac OS: Double-click the .dmg file you just downloaded to extract the installer. Double-click the .pkg file to start installation.
- For Linux OS:
- Open Terminal.
- Navigate to the folder where the installer is stored. For example, if the installer is stored in the Desktop folder, type
cd ~/Desktop/
. - To extract the install files, type
tar zxvf installername
. - Navigate to the folder containing the extracted files.
- To run the installer, type
./install.sh
.
- Follow the instructions in the installation wizard to install the Intel XDK IoT Edition (Figure 1).
Figure 1 - Initial screen of the Intel® XDK IoT Edition installation wizard
Install Bonjour* Print Services (Windows OS only)
This section contains steps to install Bonjour* Print Services, which is required for Windows OS systems. Bonjour enables the Intel XDK IoT Edition to automatically detect IoT devices installed on your network.
- To download Bonjour, go to the Bonjour Print Services for Windows page at http://support.apple.com/kb/DL999.
- Click Download.
- Right-click
BonjourPSSetup.exe
, then select Run as Administrator. If a confirmation message is displayed, click Yes to continue. - Follow the instructions in the installation wizard to install Bonjour (Figure 2).
Figure 2 - Initial screen of the Bonjour installation wizard
Launch the Intel® XDK IoT Edition
This section contains steps to launch and log in to the Intel XDK IoT Edition.
- Run the Intel XDK IoT Edition.
- Follow the on-screen instructions to log in to your Intel® XDK account or sign up for a new Intel XDK account.
Create a sample application
This section contains steps to create a simple Intel XDK application using a pre-existing code sample. By the end of this section, you should have a new project that contains the Onboard LED Blink sample code.
- From the left menu (Figure 3), select Start with a Sample or Template.
Figure 3 - The left menu of the Intel® XDK IoT Edition - In the list of templates that displays, select the Onboard LED Blink template, then click Use This Template (Figure 4).
Figure 4 - Choose a template and click Use This Template. - In the Name Your Project field, type a name for your project (Figure 5).
Figure 5 - Type a name into the Name Your Project field. - Click Create. Your project is created.
Note: If you are a Windows user and Bonjour is not installed on your machine, a "Bonjour is missing" message is displayed (Figure 6). Complete the steps in the Install Bonjour section to install Bonjour.
Figure 6 - The "Bonjour is missing" message
Connect to your Intel board
This section contains steps to connect the Intel XDK IoT Edition to your Intel Galileo board or Intel Edison board. At the end of the section, you will see a confirmation message containing the connection status for your board.
- From the IoT Device drop down list, select your development board.
- Note: If your development board is not included in the drop-down list, you must connect to your board manually. For steps, see the Connect to your development board manually section.
- A dialog box appears (Figure 7), displaying the connection status and IP address of your development board. Click Dismiss, then continue with the steps in the Run the application section.
Figure 7 - The connection status and IP address is displayed.
Note: If you are experiencing issues connecting to your board, connect to your board in a serial communication session and type the following:
systemctl enable xdk-daemon
systemctl restart xdk-daemon
Connect to your Intel board manually
This section contains steps to connect the Intel XDK IoT Edition to your development board manually if the software does not automatically detect your baord. At the end of the section, you will see a confirmation message containing the connection status for your board.
- From the IoT Device drop-down list, select Add Manual Connection.
- In the dialog box that opens, provide the connection information for your development board, as follows:
- Type the IP address in the Address field.
- Type the port number in the Port field. The default is 58888.
- Click Connect. A confirmation message is displayed (Figure 8). Continue with the steps in the Run the application section.
Figure 8 - Type the IP address and port number.
Note: If you do not know the IP address of your development board, connect to your board in a serial communication session using a terminal emulator program, such as PuTTY
. Type ip a
. The IP address is displayed after inet
(Figure 9).
Figure 9 - Locate the IP address of your board.
For detailed steps and examples, see the appropriate link below:
- Windows OS: https://software.intel.com/en-us/node/519929
- Mac OS: https://software.intel.com/en-us/node/519943
- Linux OS: https://software.intel.com/en-us/node/532591
Run the application
This section describes how to run your sample application. By the end of the section, you should see the LED on your development board blink on and off.
Figure 10 - Intel XDK IoT Edition
- From the bottom toolbar, click the Manage your daemon/IoT device icon. Select Sync PC time w/ clock on target board to avoid computer and device timing issues.
- Click the Install/Build icon. In the dialog box that opens, click Build.
- To upload your project to the development board, click the Upload icon.
- To run your project on the device, click the Run icon. Any runtime errors in the program are displayed in the console log bar. To display additional information about these errors, click the Toggle console window icon.
- Check your board for a blinking LED. The location of the light varies depending on your development board, as follows:
Intel Galileo Gen 1 board The green LED at the bottom left corner of the board blinks. | |
Intel Galileo Gen 2 board The green LED located next to the USB port blinks. | |
Intel Edison board The green LED in the center of the board blinks. |
Note: If a "cannot find mraa" message is displayed when you run the program, you must update your mraa library files, as follows:
- Connect to your board using a serial communication session.
- Enter the following commands:
echo "src maa-upm http://iotdk.intel.com/repos/1.1/intelgalactic"> /etc/opkg/intel-iotdk.conf
opkg update
opkg upgrade - Click the Run icon again.
Next Steps
Now that you have run your first Intel® XDK application, see the links below for next steps to create applications with the Intel® IoT Developer Kit.
Troubleshooting
Resources
- Intel XDK IoT Edition: http://software.intel.com/en-us/html5/xdk-iot
- Intel® Galileo Development Board - Empower Your Prototype: http://www.intel.com/content/www/us/en/do-it-yourself/galileo-maker-quark-board.html
- Intel® Edison Development Board - One Tiny Platform, Endless Possibility: https://www-ssl.intel.com/content/www/us/en/do-it-yourself/edison.html?wapkw=edison+board+quark
- Intel IoT Getting Started Guides: https://software.intel.com/en-us/iot/getting-started
- Intel Developer Zone for Internet of Things: http://software.intel.com/iot
- Intel Maker Communities: http://maker.intel.com