I have produced a set of 6 Node.js sample applications for Intel Edison / Galileo and Intel XDK. Grab them off of git, import into Intel XDK (assuming you have the latest, IOT enabled XDK version) and replace the XXXXX with your API keys.
Intel Edison is a tiny computer for building compelling #inteliot hardware hacks. This is a quick intro on how to pair Edison with Intel XDK over a local network.
Getting Started Tips:
- You will need Intel Edison + some kind of mounting board which allows you to SSH into the device / serial into the device to configure Wi-Fi capability
- This will not work on many public networks (where Wi-Fi “Isolation Mode” is enabled). If isolation mode is turned on, you will not be able to use Bonjour Browser to detect the Edison once it is on the local network and you will not be able to pair it with XDK or SSH into it!
- Download the Bonjour Browser, a utility for detecting Edison on the local network
- Download and install Bloop, a tool I have written to automate many common command-line tasks with Edison
Setting Up XDK
Download Intel XDK IoT Edition. Once you install, register for an account and sign into XDK, you should see the following option available under the “New Projects” templates. Click the template to get started with a new Intel XDK project for IoT applications with Intel Edison.
Getting Edison on Wi-Fi
Pairing XDK with Edison
Assuming you have gotten Edison online we can now proceed to deploy code to XDK.
If you haven’t done so already, download the Bojour Browser, a utility for detecting other devices on your local network.
In your XDK project, click the drop down and see if there is an “Edison” option listed. If not, open the Bojour Browser and find the IP address and port of your Edison. Then select input “Add Manual Connection” and input the Edison IP Address and Port information from the Bonjour Browser (see below)
Dealing with Intel XDK Whitelist Warning
If you are getting the “Authorization Required(401)” warning from Intel XDK, you will need to perform the following steps:
- Click the blue underlined text in the below dialog to reveal your current IP address (as below)
- Open Terminal and type in “screen /dev/cu.usbserial” (Tab) to complete then add “115200 -L”
- Once you have logged into your Edion via the Terminal, run the command:
- “xdi-whitelist –add 192.168.1.3” (that is two “-” symbols in front of “add”, not one) (replace the IP address with the one you get from the below dialog)
- Once you submit, you should get a message “192.168.1.3 added to whitelist!”
- You should now be able to run Node.js via Intel XDK IoT Edition by clicking the “Hammer” icon
Troubleshooting: If you are getting errors, check this guide.
Provided you have followed the instructions here to set up your Gen 2 Galileo with Node.js and XDK…
Download and unzip the following samples into a directory and, under the “Develop” tab, select “Open An Intel XDK Project” and import the below directory.
Download Samples: Mashery Galileo XDK Samples
Next, assuming you have connected an Intel Galileo Gen 2 board and paired it with your XDK instance, you should be able to deploy the code to the board and then run it.
Each sample can be run by navigating to the directory containing your Node.js projects and going “node sampleXXX.js”
The team at Jigsaw Renaissance rose to the challenge of producing a more robust Hack-E-Bot implementation based on Intel Galileo Gen 2 and spent all night producing a new, ruggedized version which now has sonar for obstacle avoidance!
I will be demonstrating the v2 robot at Intel Developer Forum next week, thanks to Marty + Budi.
Step 1: Acquire Gen 2 Galileo board + Necessary Cables
- Plug in everything
- SD card (4GB or more) on which to load the IoT DevKit Image (needs to be the kind with a micro-SD card slide out bit)
- Power cord that comes with Gen 2
- Ethernet cable (If you are on a public network you will be better off using a USB – Ethernet converter)
- You don’t need the 6-pin USB cable or Micro-USB cable to connect XDK to Gen 2 Galileo.
Follow these steps to share Wi-Fi from your laptop with your Galileo Gen 2 board.
You will need the following:
- Standard ethernet cable
- Laptop connected to Wi-Fi internet
- USB to Ethernet adapter
- Bonjour Browser
- Intel Galileo Gen 2 + proper SD card loaded with necessary software (provided by Intel)
Here is how to do it:
- Step 1: Download + Install Intel XDK
- Step 2: Download and install Bonjour Browser
- Step 3: Power on your Gen 2 board and connect it to your PC’s USB slot via the ethernet -> USB adapter like this (make sure you have the Yocto linux loaded SD card in the slot)
- Step 4: Open System Preferences -> Sharing and select “Internet Sharing.” Before turning it on, make sure to have enabled “USB Ethernet” checkbox.
- Step 5: Discover your connected Galileo device’s IP address using the Bonjour Browser (listed under “xdk-app-daemon”)
- Step 6: SSH into your Galileo and prove it has internet:
Simply make some call like “ping google.com” to see if you get a real internet response back.