General IoT FAQs
- Where can I download the Intel XDK?
- How do I update the MRAA library on my Intel IoT platforms?
- Can the xdk-daemon run on other Linux distributions besides Yocto?
- How do I connect the Intel XDK to my board without an active Internet connection?
- How do I use a web service API in my IoT project from my main.js?
- Error: "Cannot find module '/opt/xdk-daemon/current/node-inspector-server/.../debug.node'"
- Error: "Cannot find module 'mime-types' at Function.Module ..."
- Error: "Write Failed" messages in console log, esp. on Edison boards.
Connecting your board to the Intel XDK
- Name/IP address of the board doesn't appear in the device list
- Network issues when connecting the board to the Intel XDK IoT Edition
- "Bonjour is missing - Please install Bonjour!" message on a system with Windows
- I have Bonjour installed, but the Intel XDK IoT Edition doesn't automatically detect my board
- "ERRCONNREFUSED" message
- The Intel XDK IoT Edition hangs when I try to connect to my device
- Finding and connecting your board to the Intel XDK IoT Edition
- Manually connecting your board to the Intel XDK IoT Edition
- How do I find the IP address of my board?
- Connecting directly to your board with SSH
Resolving runtime issues
- Intel XDK IoT Edition crashes
- Intel XDK IoT Edition won’t upload to the Intel® Edison board/"Error Edison Drive is full" message
- Error: "Cannot find mraa” message when trying to run an application
- NPM ENOSPC errors on the Intel® Edison board
- My xdk-daemon is corrupted
- Connecting directly to your board with SSH
- Check that the daemon is running
- Change the root password
- Restart the daemon
- Error: "Cannot find module '/opt/xdk-daemon/current/node-inspector-server/.../debug.node'"
Where can I download the Intel XDK?
The Intel XDK main page includes download links for the Linux, Windows and OSX operating systems.
How do I update the MRAA library on my Intel IoT platforms?
The simplest way to update the mraa library on an Edison or Galileo platform is to use the built in "Update libraries on board" option which can be found inside the IoT settings panel on the Develop tab. See the screenshot below:
Alternatively, on a Yocto Linux image, you can update the current version of mraa by running the following commands from the Yocto Linux root command-line:
# opkg update # opkg upgrade
If your IoT board is using some other Linux distribution (e.g. a Joule platform), you can manually update the version of mraa on the board using the standard npm install command:
# npm install -g mraa
...or:
$ sudo npm install -g mraa
...for a Linux distribution that does not include a root user (such as Ubuntu).
All command-line upgrade options assume the IoT board has a working Internet connection and that you are logged into the board using either an ssh connection or over a serial connection that provides access to a Linux prompt on your IoT board.
Can the xdk-daemon run on other Linux distributions besides Yocto?
The Intel XDK xdk-daemon is currently (November, 2016) only supported on the Yocto and Ostro Linux distributions. Work is ongoing to provide a version of the xdk-daemon that will run on a wider range of IoT Linux platforms.
How do I connect the Intel XDK to my board without an active Internet connection?
The Intel Edison Board for Arduino supports the use of an RNDIS connection over a direct USB connection, which provides a dedicated network connection and IP address. Other boards can connect to a local network using either a wireless or wired LAN connection. The wired LAN connection may require attaching a USB Ethernet adaptor to the IoT board, in order to provide the necessary physical wired Ethernet connection point. Access to your local network is all that is required to use an IoT device with the Intel XDK, access to the Internet (by the IoT board) is not a hard requirement, although it can be useful for some tasks.
Most Intel IoT platforms that are running Linux (and Node.js) can be "logged into" using a USB serial connection. Generally, a root Linux prompt is available via that USB serial connection. This serial Linux prompt can be used to configure your board to connect to a local network (for example, configure the board's wifi connection) using Linux command-line tools. The specific details required to configure the board's network interface, using the board's Linux command-line tools, is a function of the board and the specific version of Linux that is running on that board. Please see the IoT board's installation and configuration documentation for help with that level of setup.
How do I use a web service API in my IoT project from my main.js?
Your application's main.js file runs on a standard Node.js runtime engine; just as if you were in a server-based Node.js environment, you can create a simple HTTP server as part of your IoT Node.js app that serves up an index.html to any client that connects to that HTTP server. The index.html file should contain a reference to the JavaScript files that update the HTML DOM elements with the relevant web services data. You are accessing the index.html (HTML5 application) from the http server function in the main.js file. A web services enabled app would be accessed through a browser, via the IoT device's IP address.
See this blog, titled Making a Simple HTTP Server with Node.js – Part III, for more help.
Error: "Cannot find module '/opt/xdk-daemon/current/node-inspector-server/.../debug.node" message
In some IoT Linux images the xdk-daemon was not compiled correctly, resulting in this error message appearing when a debug session is started. You can work around this issue on an Edison or Galileo platform by using the "Upgrade Intel xdk-daemon on IoT device" option, which can be found in the IoT settings panel on the Develop tab. See the screenshot below:
Error: "Cannot find module 'mime-types' at Function.Module ..."
This error usually indicates than an npm install may not have completed correctly. This can result in a missing dependency at runtime for your IoT Node.js app. The best way to deal with this is:
Remove the node_modules directory in the project folder on your development system.
Switch to another Intel XDK project (if you don't have another project, create a blank project).
Switch back to the problem project.
Click the "Upload" icon on the Develop tab and you should be prompted by a dialog asking if you want to build.
Click the build button presented by the dialog prompt in the previous step.
Wait for a completion of the build, indicated by this message in the console:
NPM REBUILD COMPLETE![ 0 ] [ 0 ]
Now you should be able safely run the project without errors.
Error: "Write Failed" messages in console log, esp. on Edison boards.
This can be caused by your Edison device running out of disk space on the '/' partition. You can check this condition by logging into the Edison console and running the df command, which should give output similar to this:
# df -h / Filesystem Size Used Available Use% Mounted on /dev/root 463.9M 453.6M 0 100% /
A value of "100%" under the "Use%" column means the partition is full. This can happen due to a large number of logs under the /var/log/journal folder. You can check the size of those logs using the du command:
# cd /var/log/journal # du -sh * 11.6M 0ee60c06f3234299b68e994ac392e8ca 46.4M 167518a920274dfa826af62a7465a014 5.8M 39b419bfd0fd424c880679810b4eeca2 46.4M a40519fe5ab148f58701fb9e298920da 5.8M db87dcad1f624373ba6743e942ebc52e 34.8M e2bf0a84fab1454b8cdc89d73a5c5a6b
Removing some or all of the log files should free up the necessary disk space.
Be sure not to delete the /var/logs/journal directory itself!!
Name/IP address of the board doesn't appear in the device list
See Finding and connecting your board to the Intel XDK IoT Edition.
Network issues when connecting the board to the Intel XDK IoT Edition
If your board is not showing up in the IoT Device list in the Intel XDK IoT Edition, you may have a DNS issue or network conflict that is cached on the board, the Intel XDK IoT Edition, or your system. This section contains workarounds and suggestions to address these connection issues. If you are on a home network or are reasonably sure your network is not the issue, see Finding and connecting your board to the Intel XDK IoT Edition for other possible solutions.
Try the following:
- Check that your host system is on the same network as your board.
- Shut down the Intel XDK IoT Edition and reboot your system. Unplug your board from its power supply and plug it back in.
- If your board is connected to your Wi-Fi network, reconfigure your board's Wi-Fi connection. For the Intel® Edison board, use the
configure_edison --wifi
command. Also set a password for your device usingconfigure_edison --password
, and be sure to provide your login information when connecting to your board. - Make sure your LAN or corporate firewall supports TCP/IP Port 22.
Also try restarting the XDK daemon. In a serial communication session, enter the command:
systemctl restart xdk-daemon
You may need to connect to your board manually under the following circumstances:
- Your Internet network requires additional login credentials (for example, a university Wi-Fi network).
- You are using Ethernet over USB for the Intel® Edison board or a direct Ethernet connection for the Intel® Galileo board.
If the problem persists, you may have a local networking issue that may resolve once fewer people are on the network.
"Bonjour is missing - Please install Bonjour!" message on a system with Windows
If you are a Windows user and Bonjour is not installed on your host system, a "Bonjour is missing" message is displayed. Complete the steps in the Install Bonjour section to install it.
I have Bonjour installed, but the Intel XDK IoT Edition doesn't automatically detect my board
If you have a system with Windows 8.1, consider updating to Bonjour Print Services 3.0, which is included with Apple iTunes*. To download iTunes, see https://www.apple.com/itunes/download/. Note that if you're using a corporate host machine, your firewall may block Bonjour.
If you still have issues connecting with your board, try connecting to your board manually.
"ERRCONNREFUSED" message
For possible workarounds, see the following: https://communities.intel.com/message/279807#279807
The Intel XDK IoT Edition hangs when I try to connect to my device
From the IoT Device drop-down list, attempt to connect again by selecting your device or Add manual connection. Your previous attempt is automatically cancelled and you can try the connection again.
Finding and connecting your board to the Intel XDK IoT Edition
A number of issues may cause difficulty in connecting your board to the Intel XDK IoT Edition:
- Network or DNS issues. This is more likely to be an issue if your network uses additional login credentials (for example, a university Wi-Fi network) or a corporate firewall, or if you are at an event such as a hackathon, with many users trying to connect with limited network resources. It is less likely to be an issue on a home network.
For workarounds and suggestions to deal with network issues, see Network issues when connecting your board to the Intel XDK IoT Edition. If you are using an Intel® Edison board, you may also want to try connecting your board directly to your host, as described in Connecting to your Intel® Edison board using Ethernet over USB. - Problems with Bonjour: If your host system has Windows, you must install Bonjour to have the Intel XDK IoT Edition automatically detect your board and add it to the IoT Device drop-down list. You may experience issues with Bonjour if you have Windows 8.1, or if you are using a corporate host system. Try manually connecting to your board instead.
- If you are connecting your board to the Intel XDK IoT Edition using Ethernet over USB or a direct Ethernet connection, or if you are simply not seeing your board in the IoT Device drop-down list, you may need to connect to your board manually.
Manually connecting your board to the Intel XDK IoT Edition
You can manually connect your board to the Intel XDK IoT Edition using the board's IP address. At a high-level, the steps to connect your device are:
- Set up your board and connect it to your host system.
- Connect your board to the same network as your host.
- Create a serial communication session with your board. In this session, use the ifconfig command to find your board's IP address.
- Manually connect your board to the Intel XDK IoT Edition. In the Intel XDK IoT Edition, from the IoT Device drop-down list, select Add Manual Connection. Enter your board's IP address, as well as your login information, then clickConnect.
The exact steps to connect your board vary depending on your board and what method you use when connecting your board to your network. Whichever method you use, be sure that your board and your host system are connected on the same network.
For guidance to connect your board to the Intel XDK IoT Edition, see the appropriate section:
- Connecting to an Intel® Edison board using Wi-Fi
- Connecting to an Intel® Edison board using Ethernet over USB (for hosts with Windows or Linux)
- Connecting to an Intel® Galileo board using Wi-Fi
- Connecting to an Intel® Galileo board using a direct Ethernet connection
Connecting to an Intel® Edison board using Wi-Fi
This section assumes that you have already assembled your Intel® Edison board and connected it to your host system. For steps, see Assembling the Intel® Edison board with the Arduino expansion board.
- Set up a serial communication session with your board. See the appropriate steps for Windows, Mac OS X, or Linux for detailed instructions.
- If you haven't already, enter the command:
configure_edison --password
and follow the onscreen prompts to set up a login password for your board. Your default user account is root. - Use the command
configure_edison --wifi
and follow the onscreen prompts to connect your board to your Wi-Fi network and find your board's IP address. For detailed steps, see Connecting your Intel Edison board using Wi-Fi*. - In the Intel XDK IoT Edition, from the IoT Device drop-down list, select Add Manual Connection. Enter your board's IP address, as well as your login information, then clickConnect.
Connecting to an Intel® Edison board using Ethernet over USB
This section contains steps to connect your Intel® Edison board directly to your host using Ethernet over USB. It assumes that you have already assembled your Intel® Edison board and connected it to your host system. For steps, see Assembling the Intel® Edison board with the Arduino expansion board. Your host system must have either Windows or Linux to connect to your board using Ethernet over USB.
- Refer to Connecting to your Intel® Edison board using Ethernet over USB for steps to set up Ethernet over USB.
- In the Intel XDK IoT Edition, from the IoT Device drop-down list, select Add Manual Connection.
- In theAddressfield, enter
192.168.2.15
. Enter your board's login information, then clickConnect.
Connecting to an Intel® Galileo board using Wi-Fi
This section assumes that you have already assembled your Intel® Galileo board and connected it to your host system. This includes connecting your Wi-Fi adapter to your board. See the appropriate steps for Windows, Mac, or Linux.
- Open a serial communication session with your board. See the appropriate steps for Windows, Mac, and Linux.
- Connect the board to your Wi-Fi network and find your board's IP address. See the appropriate steps for Windows, Mac, or Linux.
- In the Intel XDK IoT Edition, from the IoT Device drop-down list, select Add Manual Connection. Enter your board's IP address, as well as your login information, then clickConnect.
Connecting to an Intel® Galileo board using a direct Ethernet connection
This section assumes that you have already assembled your Intel® Galileo board and connected it to your host system. An example of a connected Intel® Galileo board is shown below. For detailed instructions to assemble your board, see the appropriate steps for Windows, Mac, and Linux. Note that you don't have to connect a Wi-Fi adapter to your board or connect your board to a Wi-Fi network.
- Connect an Ethernet cable to the Ethernet port on your board. Plug the other end in to your host system.
- Open a serial communication session with your board. See the appropriate steps for Windows, Mac, and Linux.
- Once logged in to your board, enter the command:
ifconfig
This will give you the IP address of the device. In the listing, it is called the inet addr. In the picture below, the IP address is 10.253.60.19. So to connect to this device, you would type10.253.60.19
into the Address field in the Connect to your IoT Device dialog box.
If the response does not include an entry for your Ethernet connection, try the commandipup eth0
before trying ifconfig again.Notice that the line above the IP address entry gives you the HWaddr (hardware address) of your interface, which is the same as the MAC address on the piece of paper glued to the connector in the setup photo above. - If the above method for finding your board's IP address does not work for you, another useful tool can be arp. Use the
arp –a
command to list all the connections to a computer together with their MAC addresses. If your board is on the same subnet as your host, you can start by pinging all the machines on the subnet so that you retrieve all their MAC addresses. You can then usearp –a
to spot your board from its MAC address on that piece of paper glued to the Ethernet connector. In the Intel XDK IoT Edition, from the IoT Device drop-down list, select Add Manual Connection. Enter your board's IP address, as well as your login information, then clickConnect.
Setting up a serial terminal on a system with Windows*
This section contains steps to set up serial communication with an Intel® Galileo Gen 1 or Gen 2 board on a system with Windows.
Intel® Galileo Gen 1 board
- Open the Device Manager. You should see a new entry for your Intel Galileo board in the (COM & LPT)Ports section. Make a note of the COM#, as shown in the example image below (in this case, COM10); you'll need this information to connect to your board. Note that the name and COM# for your particular board may vary.
- Proceed to set up PuTTY.
Intel® Galileo Gen 2 board
- Open the Device Manager. You should see a new USB Serial Port entry in the (COM & LPT)Ports section. Make a note of the COM#, as shown in the example image below (in this case, COM21); you'll need this information to connect to your board.
- Proceed to set up PuTTY.
Set up PuTTY
- Download the PuTTY terminal emulator: http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe.
- Double-click the putty.exe file you downloaded to run it.
- Configure the PuTTY menu as follows
- Under Connection type, select Serial.
- In the Serial line field, type your COM# (the COM port of your FTDI or 3.5mm to DB-9 adapter).
- In the Speed field, type
115200
.
- When you see a blank screen, press Enter. You should see a login screen.
- At the login prompt, type
root
and press Enter. - Enter the password for the root account and press Enter. By default, the root password is blank. You should see a terminal prompt.
Note: You can set the root password by entering the command:passwd
.
You have now set up serial communication with your board.
Setting up a serial terminal on a system with Mac*
This section contains steps to set up serial communication with an Intel® Galileo board on a system with Mac* OS X*.
At the end of this section you will have connected to the board through a terminal, and checked whether your firmware is up to date.
- Launch the Terminal app, as follows:
- Launch Spotlight by typing
Cmd+Space
. - Type
terminal
. - Select the Terminal app.
- Launch Spotlight by typing
- To list all connected devices, enter the command:
ls /dev/tty.*
Be sure to include the .* at the end of the command. - Look for a device that contains cu.usbserial or tty.usbserial. For example, your device may show up as /dev/tty.usbserial-A402YSYU.
Tip: If you don’t see a usbserial device listed, verify the power and USB connection to your Intel® Galileo board. - Connect to the USB serial device using the Terminal screen utility by typing:
screen /dev/xx.usbserial-XXXXXXXX 115200 –L
where /dev/xx.usbserial-XXXXXXXX is replaced by your device’s unique name.
Using the example above, the command would be:screen /dev/tty.usbserial-A402YSYU 115200 –L
Note:115200 indicates the baud rate. Always use 115200. -L turns on output logging so you can see what the result of your commands are. - When you see a blank screen, press Enter. You should see a login screen.
- At the login prompt, type
root
and press Enter. - Enter the password for the root account and press Enter. By default, the root password is blank. You should see a terminal prompt.
Note: You can set the root password by entering the command:passwd
.
You have now set up serial communication with your board.
Setting up a serial terminal on a system with Linux*
This section contains steps to set up serial communication with an Intel® Galileo board on a system with Linux*.
- If you haven't already, install the screen shell session manager by entering the following in the Terminal:
sudo apt-get install screen
- Launch the Terminal.
- Connect to your board by entering:
sudo screen /dev/ttyUSB0 115200
- You may be asked for your root password (within Linux). If so, type in your root password and press Enter.
- When you see a blank screen, press Enter. You should see a login screen.
Enter the password for the root account and press Enter. By default, the root password is blank. You should see a terminal prompt.
Note: You can set the root password by entering the command:passwd
.
You have now set up serial communication with your board.
How do I find the IP address of my board?
- In a serial communication session with your board, enter the command:
ifconfig
- Note your IP address, as shown in the image below. The exact entry containing your IP address may vary slightly depending on how you have connected to your board. For details, see the appropriate link below:
- Connecting to an Intel® Edison board using Wi-Fi
- Connecting to an Intel® Edison board using Ethernet over USB (for hosts with Windows and Linux)
- Connecting to an Intel® Galileo board using Wi-Fi
- Connecting to an Intel® Galileo board using a direct Ethernet connection
Intel XDK IoT Edition won’t upload to the Intel® Edison board/"Error Edison Drive is full" message
If your applications hang during the uploading process or you see the "Error Edison Drive is full" message, this is due to a bug in the file system that is continually logging without a limit. You must delete journal entries and install an update. As a workaround, try configuring systemd (the board's system logger) to set a maximum log file size.
- In a serial communication session with your board, open the /etc/systemd/journald.conf file.
- Replace the line that reads
#SystemMaxFileSize=
withSystemMaxFileSize=200K
Notice the # (pound sign) is now gone. - Restart the system logging service or type
reboot
.
Intel XDK IoT Edition crashes
If you get an error message and the Intel XDK IoT Edition crashes with an option to report the issue, the Intel XDK IoT Edition's connection to the board may have been interrupted. For example, this can happen in a hackathon setting with hundreds of phones, laptops, and boards connected to the LAN.
This is a known issue. As a workaround for the Intel® Edison board, try connecting to your board using Ethernet over USB.
Error: "Cannot find mraa" message when trying to run an application
If you see a “Cannot find mraa” message when trying to run an application on your Intel® Edison board, the default image on the board likely does not have the latest libraries to work with the Intel XDK. As a workaround, follow the instructions here in the Running Sample Applications section.
NPM ENOSPC errors on the Intel® Edison board
If you are getting "Error extracting update" or "Error: Command failed: x node_modules/" messages with your Intel® Edison board, as shown below, you may need to flash your board again.
- In a terminal communication session with your board, enter the command:
reboot ota
. - Log in to your board, then enter the command:
configure_edison -–wifi
- Follow the on-screen instructions to reestablish your board's Wi-Fi connection.
My xdk-daemon is corrupted
Click the Manage your daemon/IoT device icon in the bottom right of the Intel XDK, then select Upgrade Intel xdk-daemon on IoT device. Your daemon is updated and should no longer be corrupted.
Connecting directly to your board with SSH
You will not normally need to connect to your board with SSH, but it can be handy if you have some experience working on Unix or Linux and need to troubleshoot. Just remember that it can be very easy to cause damage as the root user.
To connect to your board with a shell that will allow you to manage your board directly, use the ssh command:
ssh –l root ipaddress
where ipaddress
is the IP address of your board. Often, this address is 192.168.2.15. For steps to find your board's IP address, see Finding and connecting your board to the Intel® XDK IoT Edition.
Alternatively, if you do not have ssh available as a command, you can download PuTTY and use it to SSH into the board.
Once you have connected to your board, you can perform a number of useful tasks:
Check that the daemon is running
To check if the Intel XDK IoT Edition daemon is running, enter the command:
ps | grep xdk
If the daemon is running, you should see a response similar to the following:
root@edison:~# ps | grep xdk 287 root 3132 S {xdk-daemon} /bin/sh /opt/xdk-daemon/xdk-daemon 292 root 35964 S /usr/bin/node /opt/xdk-daemon/main.js 303 root 72224 S /usr/bin/node /opt/xdk-daemon/current/appDaemon.js 443 root 2660 S grep xdk
Change the root password
To change the password for the root account, enter the command:
passwd
Follow the onscreen instructions to change your password, as shown in the example below.
root@edison:~# passwd Changing password for root Enter the new password (minimum of 5 characters) Please use a combination of upper and lower case letters and numbers. New password: Re-enter new password: passwd: password changed.
Restart the daemon
There should be no reason you need tao restart the daemon unless you are working on the daemon itself; the most convenient way to update the daemon is from the Intel XDK IoT Edition. If you need to do some work on the daemon, however, you can restart it by entering the following command:
root@edison:~# systemctl restart xdk-daemon
Error: "Cannot find module '/opt/xdk-daemon/current/node-inspector-server/.../debug.node’"
If you see this message, you need to upgrade your version of the XDK daemon. To do so, click the Manage your daemon/IoT device icon in the lower right of the Intel XDK IoT Edition, then select Upgrade Intel xdk-daemon on IoT device. Your daemon is updated and the correct module is pulled in.