- 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/node_modules/.../debug.node"
- Error: "Cannot find module 'mime-types' at Function.Module ..."
- Error: "Write Failed" messages in console log, esp. on Edison boards.
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/node_modules/.../debug.node"
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!!