Updating the libmraa and libupm libraries

The Intel® XDK makes use of the libmraa and libupm IoT libraries. The libmraa library, also called the MRAA I/O library, provides a platform-independent API for low-level access to I/O pins and buses on your IoT development board. the libupm library, also called the UPM sensor library, provides a high-level representation of common IoT I/O devices, using the MRAA I/O library for low-level operations.

For further information on these libraries, see the IoT "template" examples available in the Intel XDK, as well as their respective git repos:

Because the MRAA and UPM libraries are frequently updated, you should consider updating them on your IoT development board; especially when you first start using the board, and at regular intervals thereafter. To do so, click the IoT settings and configuration icon (aka the "Manage your daemon/IoT device" icon) Manage your daemon/IoT device icon located in the IoT "develop drawer" toolbar, below the edit window on the Develop tab. Select Update libraries on board from the settings and configuration menu that appears:

NOTE: On some IoT platforms an update to the MRAA and UPM libraries can take fifteen minutes (or more). This will be the case when your IoT system is not recognized or supported as a "pre-compiled" platform, in which case the installation must compile the low-level C/C++ library modules as part of the update and/or installation process.

Updating the libraries

This tool will check the versions of libmraa and libupm currently installed on your board against the versions currently available, and update the libraries if needed.

NOTE: If the update tool does not recognize your board you will have to update the libraries manually.

If your IoT device is running a Yocto Linux image (typically found on Edison and Galileo boards), you can update the current version of MRAA and UPM by executing the following commands from the Yocto Linux root command-line:

# opkg update
# opkg upgrade

Otherwise, you can manually update the version of MRAA on the board using the following 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).

Unfortunately, updating the UPM library by hand requires updating each individual UPM component. Updating the MRAA library is generally sufficient to handle most board-specific bugs, because the UPM library utilizes the MRAA library for low-level operations. If you need to update the UPM library you can update only those specific UPM components your IoT applications require.

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

 

NOTE: 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.

For more complete information about compiler optimizations, see our Optimization Notice.