First Three Days with Intel Edison

Jeff Plourde and Jeff Peterson 24 Jul 2015

Intel Edison

When the OpenICE team recently had an opportunity to begin exploration with Edison we weren’t sure what to expect. Maker platforms like BeagleBone Black and Raspberry Pi have set lofty expectations of ease-of-use for a new platform. Edison met our expectations and did so in a remarkably small form factor that significantly narrows the gap between lab experiment and product design. Within a few hours we were up and running our Java software with a variety of libraries compiled for x86 Linux. A few hours after that we had connected a number of medical devices, with interfaces ranging from RS-232 to Bluetooth EDR, to OpenICE using the Intel Edison as an adapter.

Intel Edison Wearable Platform

(Jump ahead to configure OpenICE on Intel Edison)

David Hunt has performed some interesting benchmark tests comparing Intel Edison performance with BeagleBone Black and Raspberry Pi. Initial indications are that the Edison is an outstanding performer among the set of remarkably small general purpose computers. The Edison won’t replace your laptop anytime soon but it does have WiFi and Bluetooth aboard; making it almost shocking that the latest BeagleBone Black and Raspberry Pi do not. Empirical measurements of the power consumption of Edison are still hard to come by so we did some measurements on our own. For reference we also measured consumption under similar load for a BeagleBone Black Rev-C. The comparison is apples to oranges for a variety of reasons, however, the results were dramatic enough to warrant sharing. The Edison sipped power even with the WiFi radio continuously active. With a maximum observed draw of 176 mA the unit we tested never exceeded 1 Watt of power consumption. The implications for battery life will be remarkable. The current measurement results convinced us to also conduct an empirical “real world” run-down test of the Edison on battery power. The results are below.

Intel Edison with ammeter

We measured current drawn by BeagleBone Black and Edison in 100 samples over the course of 20 seconds in three scenarios. First we conducted a baseline test merely connected to each device with an ssh session. Next we downloaded a large file from the internet with wget. And last we ran an OpenICE software simulator of a multiparameter phsyiological monitor. One would expect the Edison to be at a power consumption disadvantage using wireless connectivity but that was definitely not the case. In every scenario the Edison performed the task with facility and drawing a fraction of the power of the BeagleBone Black.

** NOTE:100 samples in 20 seconds, bar represents mean with whiskers at min and max

To test the Edison battery life, we attached it to the modular battery block from SparkFun. The block provides power to the Edison from a small, 400mAh single cell LiPo battery. The Edison was setup using the detailed instructions below. During the test, the Edison was running an OpenICE simulated multiparameter patient monitor Device-Adapter. The simulated patient monitor sent simulated real-time vital signs data and waveforms to the lab’s OpenICE network via WiFi. For those following along at home, enter root@edison:~# ./OpenICE-0.6.3/bin/OpenICE -app ICE_Device_Interface -device Multiparameter -domain 15 &.

The Edison was also running a script to log power levels and timestamps. The Edison Poky image comes with a neat command line utility called battery-voltage which outputs the following:

root@edison:~# battery-voltage
Battery Voltage = 4200 mV
Battery level = 100%

The following bash script was used to log the battery info and a time stamp every 10 seconds producing a CSV with the format Battery Voltage = 4200 mV,Battery level = 100%,Wed Jul 22 16:11:50 UTC 2015. sed was used to clean the csv for easy graphing.

1 #!/bin/bash
2 while true
3 do
4         v=$(battery-voltage | tr "\n" ",")
5         d=$(date)
6         echo $v$d >> powerTest.log
7         sleep 10
8 done

The Edison - with it’s x86 architecture, WiFi, 400mAh battery, Linux file system, logging script and OpenICE simulated patient monitor - ran for 3:45:14 before battery exhaustion.

Intel Edison Battery Run-Down

This test shows huge promise for the platform. It is impressive that the relatively small battery (it’s small enough to hide in the watch cases above) still provides 3.75 hours of power to the system running a full patient monitor simulation via WiFi. Using a beefier battery and configuring a more conservative software setup, the battery figures could be extended dramatically - not to mention Intel’s potential future optimization of the young Edison platform. Platforms like Edison demonstrate a bright future not only for wearable and pervasive sensing technologies but also demonstrate the ease with which Medical Device Manufacturers can (and should) adopt next-generation sensor data emission to help create a robust IoT data ecosystem around each patient to improve safety and outcomes.

Technical Details for Configuring an Edison

The primary landing page for Intel Edison can be found here.

Installing the latest Yocto Linux Image using a Mac

  1. Our first stop was the Downloads page where we downloaded the latest Yocto complete image (Release 2.1 at the time) and the “Flash Tool Lite” for Mac OS X.
  2. Next week followed the setup guide instructions. Scroll far enough down the page and you’ll find a section devoted to Mac OS X. Please read all of the following tips before following the instructions on the Intel setup guide:
    • In our experience we found it more reliable to first extract the zip file container of the Yocto image and select the FlashEdison.json configuration directly from the extracted contents.
    • In the Flash Tool Lite, it was also important to set the “Configuration” dropdown to “CDC” for Linux or OS X.
    • Counter-intuitively, the instructions also asked us to click “Start to flash” before connecting the device.
    • The SparkFun Base Block we used required the USB connection to the “OTG” port.
    • Also since our Base Block did not have an information LED we waited 2 minutes after flashing was complete before disconnecting to reboot the Edison.
  3. When Flash Tool Lite has finished flashing and an additional two minutes has passed, unplug the Edison, move the USB to the console port and continue to the next step.

Access the Edison console

  1. We connected the Edison via the “Console” port on our SparkFun Base Block.
  2. A serial-over-USB device appeared in our mac as /dev/tty.usbserial-NNNNNNNN
  3. Access the terminal using gnu screen screen /dev/tty.usbserial-NNNNNNNN 115200
  4. A few presses of the enter key will show a login screen. Login as “root”. There is initially no password configured.

Change device name, change password, and connect wifi

  1. Enter configure_edison --setup on the console to launch an interactive setup. Follow the prompts to set a password, hostname, WiFi SSID and password.

Installing the latest Java JRE

  1. As the Edison houses a full Atom processor any standard JRE for x86 Linux can be used. We used the latest from Oracle. We downloaded locally to our mac then used secure copy to move the file to the edison. The previous interactive setup revealed the IP assigned the edison by DHCP - be sure to use it in the following command.

    scp ~/Downloads/jre-8u51-linux-i586.tar.gz root@

  2. For convenience we extracted the JRE to /usr/local, set JAVA_HOME, and linked the java executable to /usr/local/bin

    mkdir -p /usr/local
    cd /usr/local
    tar xzf ~/jre-8u51-linux-i586.tar.gz
    export JAVA_HOME=/usr/local/jre1.8.0_51
    mkdir -p /usr/local/bin
    cd /usr/local/bin
    ln -s $JAVA_HOME/bin/java

Installing OpenICE software

  1. Visit the latest OpenICE release on GitHub
  2. The current version of OpenICE is 1.0.0; we downloaded the zipped version of the release to the Edison board with wget

  3. We extracted the OpenICE software and ran a software simulator as follows.

    cd OpenICE-1.0.0
    chmod a+x bin/OpenICE
    bin/OpenICE -app ICE_Device_Interface -device Multiparameter -domain 15

Connecting RS-232 devices

  1. Connect a USB “on the go” cable that provides a USB Type A host port to the OTG port on the SparkFun Base Block.
  2. Connect a USB-to-Serial adapter to that cable. We tested with an FTDI-based adapter. Specifically the StarTech ICUSB232D.
  3. Run the OpenICE software specifying the correct device type and serial-over-USB port. We tested with the Capnostream20 device.

    bin/OpenICE -app ICE_Device_Interface -device Capnostream20 -domain 15 -address ttyUSB0

Connecting Bluetooth devices

Basic instructions from Intel can be found here. Unfortunately, it appears that this pairing process has to be repeated each time the device is restarted.

  1. Activate a Bluetooth device in discoverable mode. We tested with a Nonin Onyx II pulse oximeter which uses legacy Bluetooth pairing. The Nonin pulse oximeter powers on and becomes discoverable when a finger is inserted.
  2. Unblock bluetooth capabilities. rfkill unblock bluetooth
  3. Start an interactive bluetooth control console and issue the following commands. bluetoothctl
    1. devices (check to see if the device you are attempting to connect was previously paired, if so remove)
    2. remove <device id> (in case the device had been previously discovered)
    3. agent KeyboardDisplay
    4. default-agent
    5. scan on
    6. What until the device is discovered and note the address of the device
    7. scan off
    8. pair <device id>
    9. When prompted enter pairing code
    10. trust <device id> (trust this device for future connections)
    11. exit (leave bluetoothctl)
  4. rfcomm bind /dev/rfcomm0 <device id> will set up a serial port through which the bluetooth device can be accessed.
  5. Launch an OpenICE Device Interface

     bin/OpenICE -app ICE_Device_Interface -device Nonin -domain 15 -address rfcomm0

Edison is a promising platform we’re excited develop on and use with OpenICE. To learn more about OpenICE, check out our intro docs.