Easy start: Intel Edison as gateway for IoT and more ...

Version 1

    This document should help you getting a quick and safe start into the Intel Edison world … have FUN!

    Getting started:

    Shortest instruction getting Intel Edison up an running without any troubles:
    use Windows, both USB, format Edison drive FAT32, PuTTy on USB Serial Port 115200, upgrade Yocto


    Do NOT go the hard way doing the connection setup via MacOS … drivers on Microsoft Windows are running well and
    you do get easily an PuTTY connection up and running, as stated connect both USB cables!!
    Using Intel Edison Mini Breakout Board:
    J3 – brings USB Serial Port (in my case COM18) connects internal to Edison UART2, this is one you connect with
    PuTTY (serial,115200 Baud) to get a remote console!!
    J16 – brings power and Intel Edison Virtual Com Port (in my case COM17)

    Next make sure you get the latest Edison Yocto image installed on Edison! (as of today version 68)
    Before making an OS upgrade – ensure that the shared Edison volume is formatted FAT32 (factory is FAT only) !
    Before running “reboot ota” ensure the shared Edison drive is safely unmounted from any Windows

    you can check version cat /etc/version or configure_edison --version
    I started with build 56, Poky 1.6 Edison (factory) upgraded to build 68

    >>> with these tricks, welcome to the new Intel Edison world!

    now run configure_edison --setup, the option --setup is not present before doing an successful upgrade

    always check for latest image updates: configure_edison --upgrade

    hint: if you are on build >=68 you can activate the Wifi AP mode (see section down) and run the configuration
    via webconsole<your Edison IP address>

    Turning Edison Wifi remote SSH on:

    (configure_edison -- setup, als already enabled WiFi so make sure you have run that already, or rfkill unblock wifi)

    First make sure you have set Wifi and root pwd  running configure_edison --setup
    usb0 on 192,168.x.15 and wlan0 on 192.168.x.y can’t be up together link (external)
    to fix: vi /etc/systemd/system/basic.target.wants/network-gadget-init.service
    and change both both occurrences of to, reboot!

    >>> with these tricks, welcome to remote access via ssh root@<your Edison IP address>
    >>> even more you can now access from Edison the WWW – isn’t that magic ;-)

    Turning Edison into an WLAN/WiFi Accesspoint:

    link (external) – confirmed working as well just press the power button >4sec & <7sec sec and you will
    find a hotspot with the name you have given your Edison during setup, use the given root pwd
    to get a connection. My Edison can now be reached e.g. from smartphone via SSH<your Edison IP address>
    (notice different network setting as with DHCP above) ATTENTION: will stay in AP mode after reboot!

    You want manuelly to switch back from AP mode in Client mode of Wifi? simply run configure_edison –setup again

    systemctl stop hostapd
    systemctl disable hostapd
    systemctl enable wpa_supplicant
    systemctl start wpa_supplicant
    wpa_cli reconfigure
    wpa_cli select_network wlan0
    udhcpc -i wlan0

    hint: if you want to understand more about the power switch settings check this link (external)

    Turning Edison into an Beacon/iBeacon:

    rfkill unblock bluetooth
    hciconfig hci0 up
    hcitool lescan
    LE Scan …
    63:58:79:E0:17:7C (unknown) In this example an Estimote Beacon was found!
    63:58:79:E0:17:7C (unknown)
    Ctrl+C Stop Scan

    OK Bluetooth Low Energy based on blueZ (5.18) is up and running!

    hciconfig hci0 leadv >> now you can discover with any BLE explorer an “BlueZ 5.18″ service, which you can’t connect to yet
    hcitool -i hci0 cmd 0x08 0x0008 1E 02 01 1A 1A FF 4C 00 02 15 63 6F 3F 8F 64 91 4B EE 95 F7 D8 CC 64 A8 63 B5 00 00 01 00 C8 >> exposing and iBeacon does not yet work – anybody out there who tried it?

    Update – this tool is quite handy, it will measure also RSSI value changes on BLE devices!

    [bluetooth]# scan on (starts scan of Bluetooth devices 2.0 up to 4.0 BLE devices!)

    [NEW] Device 56:F1:16:6B:51:A8 RSSI: -55
    [CHG] Device 56:F1:16:6B:51:A8 RSSI: -38
    [bluetooth]# scan off
    [bluetooth]# connect 56:F1:16:6B:51:A8 
    Attempting to connect to 56:F1:16:6B:51:A8
    [CHG] Device 56:F1:16:6B:51:A8 Connected: yes
    Connection successful
    [CHG] Device 56:F1:16:6B:51:A8 UUIDs: >>> will discover all BLE services!
    [CHG] Device 56:F1:16:6B:51:A8 Appearance: 0x0040
    [CHG] Device 56:F1:16:6B:51:A8 Icon: phone

    TRICK: to get on build 68 an stable connection do the BLE connection first
    hcitool lecc 56:F1:16:6B:51:A8

    Final update – noble.js, getting TI SensorTag running first, next will be blueIOT itself … stay tuned!

    upgrade from Intel repro, this is currently a workaround ...

    vi /etc/opkg/base-feeds.conf (insert only following lines)

    src/gz all http://repo.opkg.net/edison/repo/all
    src/gz edison http://repo.opkg.net/edison/repo/edison
    src/gz core2-32 http://repo.opkg.net/edison/repo/core2-32

    opkg update

    will get also Configuring bluez5-dev.

    npm install -g async - required by noble.js
    npm install noble - try: node advertisement-discovery.js
    npm install bleno - try: node test-ibeacon.js
    npm install sensortag – try: node test.js

    Speeding up with things … next is:

    Node-Red installation:

    check for latest release and installation – link (external)

    wget –no-check-certificate https://github.com/node-red/node-red/archive/0.9.0.zip
    unzip 0.9.0.zip
    cd node-red-0.9.0
    npm install –production
    cd nodes
    wget –no-check-certificate https://github.com/node-red/node-red-nodes/archive/0.8.0.tar.gz
    gunzip 0.8.0.tar.gz
    tar xvf 0.8.0.tar

    cd ..

    root@fablab:~/node-red-0.9.0# node red.js

    Welcome to Node-RED

    19 Oct 16:19:36 – [red] Version: 0.9.0
    19 Oct 16:19:36 – [red] Loading palette nodes
    19 Oct 16:19:41 – [26-rawserial.js] Info : only really needed for Windows boxes without serialport npm module installed.
    19 Oct 16:19:42 – ——————————————
    19 Oct 16:19:42 – [red] Failed to register 39 node types
    19 Oct 16:19:42 – [red] Run with -v for details
    19 Oct 16:19:42 – ——————————————
    19 Oct 16:19:42 – [red] Server now running at
    19 Oct 16:19:42 – [red] Flows file not found : flows_fablab.json

    >>> big milestone – Node-Red is running on Edison!

    You might want to add additional modules:

    cd nodes
    npm install node-stringprep firmata serialport sensortag wemo noble


    Start Coding > Java(™) on Edison:

    You must accept the Oracle Binary Code License Agreement for Java SE to download this software!

    mkdir bin
    mkdir java

    (next command all in one single line! download take couple minutes)

    – CHOICE THIS ONE – Java SE Development Kit 7 Downloads:

    wget –no-check-certificate –no-cookies – –header “Cookie: oraclelicense=accept-securebackup-cookie” http://download.oracle.com/otn-pub/java/jdk/7u67-b01/jdk-7u67-linux-i586.tar.gz
    tar -xvzf  jdk-7u67-linux-i586.tar.gz

    cd jdk1.7.0_67/bin
    ./java -version

    root@fablab:~/jdk1.7.0_67/bin# ./java -version
    java version “1.7.0_67″
    Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
    Java HotSpot(TM) Client VM (build 24.65-b04, mixed mode)

    – OR THIS ONE – Java SE Development Kit 8 Downloads:

    wget –no-check-certificate –no-cookies – –header “Cookie: oraclelicense=accept-securebackup-cookie” http://download.oracle.com/otn-pub/java/jdk/8u25-b17/jdk-8u25-linux-i586.tar.gz
    tar -xvzf  jdk-8u25-linux-i586.tar.gz

    cd jdk1.8.0_25/bin
    ./java -version

    root@fablab:~/jdk1.8.0_25/bin# ./java -version
    java version “1.8.0_25″
    Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
    Java HotSpot(TM) Client VM (build 25.25-b02, mixed mode)

    make sure you complete installation while putting bin in your path/profile!

    Start Coding > Intel DevKit

    The Intel Development Kit for IoT (IoTDK) is a complete solution to create and test applications for Intel IoT platforms like the Intel® Galileo and Edison maker boards – link (external)

    systemctl enable xdk-daemon
    systemctl restart xdk-daemon

    echo “src maa-upm http://iotdk.intel.com/repos/1.1/intelgalactic” > /etc/opkg/intel-iotdk.conf
    opkg update
    opkg upgrade

    Tricks / Good to know:

    configure_edison --setup (beware: /etc/hostapd/hostapd.conf takes the root pw)

    rfkill unblock wifi
    rfkill unblock bluetooth

    opkg list – list available package to be installed

    enable and start connman initially:
    systemctl enable connman && systemctl start connman (just crashed by Edison image – why?)

    Created by www.Fab-Lab.eu, check for updates www.Fab-Lab.eu/Edison, please forgive typos made ;-)