Click here to Skip to main content
15,886,873 members
Articles / Internet of Things
Article

Getting Started with Intel® XDK IoT Edition on Intel® IoT Platforms

19 Feb 2015CPOL7 min read 26.2K   2  
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.

This article is in the Product Showcase section for our sponsors at CodeProject. These articles are intended to provide you with information on products and services that we consider useful and of value to developers.

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

  • 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

Install the Intel® XDK IoT Edition

This section describes how to install the latest version of the Intel XDK IoT Edition.

  1. 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.
  2. 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.
  3. Follow the instructions in the installation wizard to install the Intel XDK IoT Edition (Figure 1).

Image 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.

  1. To download Bonjour, go to the Bonjour Print Services for Windows page at http://support.apple.com/kb/DL999.
  2. Click Download.
  3. Right-click BonjourPSSetup.exe, then select Run as Administrator. If a confirmation message is displayed, click Yes to continue.
  4. Follow the instructions in the installation wizard to install Bonjour (Figure 2).

Image 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.

  1. Run the Intel XDK IoT Edition.
  2. 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.

  1. From the left menu (Figure 3), select Start with a Sample or Template.

    Image 3
     
    Figure 3 - The left menu of the Intel® XDK IoT Edition

  2. In the list of templates that displays, select the Onboard LED Blink template, then click Use This Template (Figure 4).

    Image 4
     
    Figure 4 - Choose a template and click Use This Template.

  3. In the Name Your Project field, type a name for your project (Figure 5).

    Image 5
     
    Figure 5 - Type a name into the Name Your Project field.

  4. 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.

Image 6

Figure 6 - The "Bonjour is missing" message

Connect to your Intel® IoT Platform

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.

  1. From the IoT Device drop down list, select your development board.
  2. 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.
  3. 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.

Image 7

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<br />
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.

  1. From the IoT Device drop-down list, select Add Manual Connection.
  2. 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.
  3. Click Connect. A confirmation message is displayed (Figure 8). Continue with the steps in the Run the application section.

Image 8

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).

Image 9

Figure 9 - Locate the IP address of your board.

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.

Image 10

Figure 10 - Intel XDK IoT Edition
  1. 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.
  2. Click the Install/Build icon. In the dialog box that opens, click Build.
  3. To upload your project to the development board, click the Upload icon.
  4. 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.
  5. 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.

Image 11

Intel Galileo Gen 2 board

The green LED located next to the USB port blinks.

Image 12

Intel Edison board

The green LED in the center of the board blinks.

Image 13

Note: If a "cannot find mraa" message is displayed when you run the program, you must update your mraa library files, as follows:

  1. Connect to your board using a serial communication session.
  2. Enter the following commands:
    echo "src maa-upm http://iotdk.intel.com/repos/1.1/intelgalactic" > /etc/opkg/intel-iotdk.conf<br />
    	opkg update<br />
    	opkg upgrade
  3. 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

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Canada Canada
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
-- There are no messages in this forum --