Cloud service Parse and Intel Edison

Original author: Mihai Tudor Panu, Tuan Bui
  • Transfer
  • Tutorial


Want to remotely use your device for the Internet of things? Then try Parse - a cloud service that allows you to connect a large number of devices and easily use them through the web interface. It has everything you expect from a cloud provider, including analytics, statistics, databases, push notifications, server-side programming, and much more. The Parse Embedded SDK development system is available for many platforms and mobile IoT devices.

In this guide, we will look at how to install the Parse Embedded SDK on the Intel Edison board and show how to launch the application and receive a push notification.
First and foremost. You must install the latest firmware on Intel Edison and connect the board to the Internet. there isA good guide on how to do this on the Intel Developer Zone - IoT.

Unlike Intel Galileo, Intel Edison does not have an Ethernet port, so you have to connect via Wi-Fi. If you still haven’t done this, then connect the board via the serial port or via Ethernet via USB (RNDIS). Then, using the configure_edison program, configure wireless access. Further, I assume that you have a working internet connection.

So, your Intel Edison board is configured, so it's time to install the Parse SDK. Go to parse.comand register. Go to your applications section and create a new application. After you select a name, you will be asked if you want to see the Quickstart Quick Start Guide. I recommend you do this. You can also go to the manual from your control panel:



By clicking on the “Quickstart” quick start link, select the “embedded” option and then “Linux”. This guide was written for the Raspberry Pi, but the initial steps are very similar to what you need to do with the Intel Edison board. In fact, it’s easier to run the SDK on Intel Edison. Most of the required libraries are already installed and we only need uuid-dev. Instead of step 1 in the “Install the SDK” section, open an ssh session on the Intel Edison board using some client (for example, Putty) and print the following commands:

root@edison:~# echo "src/gz i586 http://iotdk.intel.com/repos/1.5/iotdk/i586/" >> /etc/opkg/base-feeds.conf
root@edison:~# opkg update
root@edison:~# opkg install util-linux-dev

The first line will add the Intel IoT developer kit repository to the opkg configuration file. This tool is used to install packages on a Linux distribution. The second and third line of code will update and install the necessary library with all the dependencies.

Now follow steps 2 and 3 from the manual and install Parse SKD in the directory of your choice, for example, in your home folder. Here is an example:

root@edison:~# cd ~
root@edison:~/parse-sdk# wget https://parse.com/downloads/embedded_linux/parse-embedded-sdks-1.0.0.zip --no-check-certificate
root@edison:~/parse-sdk# unzip parse-embedded-sdks-1.0.0.zip
root@edison:~# cd parse-embedded-sdks-1.0.0/
root@edison:~/parse-embedded-sdks-1.0.0# autoreconf -fi
root@edison:~/parse-embedded-sdks-1.0.0# ./configure --prefix=/usr
root@edison:~/parse-embedded-sdks-1.0.0# make
root@edison:~/parse-embedded-sdks-1.0.0# make install

If everything went well, you have the Parse SDK installed and you can use it on the Intel Edison board. To enable push notifications, you need to configure a new application through parse.com. Go to the application page, on the Settings tab. Here select “Push” and “Enable Push Notification”.



Now go back to the manual and follow the remaining steps to download and compile the project from the example:

root@edison:~/parse-embedded-sdks-1.0.0# cd ..
root@edison:~# wget https://parse.com/downloads/embedded_linux/RaspberryPiStarterProject-1.0.0.zip --no-check-certificate
root@edison:~# unzip RaspberryPiStarterProject-1.0.0.zip


This code will unpack main.c and makefile, which is configured to compile and link with the new Parse library installed. To make changes to the file with the program, you can use the vi editor installed on Intel Edison or any other editor on the computer that can work over the network. Personally, I prefer Notepad ++ with the NppFTP plugin, which allows you to modify files via FTP. But there are many other suitable tools, for example, WinSCP.

The rest of the tutorial shows an example for setting up an application, registering it with Parse, and sending push notifications. Paste this code into your main.c file and add the provided keys. Usually they are inserted automatically, but if it is not, here is where you can get them:



After adding the code to the main.c file, everything will look something like this:



Compile the source code using the finished makefile and run the finished application:

root@edison:~# cd raspberry-pi-starter-project
root@edison:~/raspberry-pi-starter-project# make
root@edison:~/raspberry-pi-starter-project# ./quickstart

Leave the application running on the Intel Edison board. Now, if you click the Test button on the Parse website in the manual at the bottom of the page, a push notification will be sent. The following should appear in the console:

received push: '{"data":{"alert":"A test push from Parse!"},"time":"2015-05-18T04:21:13.946Z"}'


That's it! We hope this guide was useful for installing the Parse SDK and running the example on the Intel Edison board.
The steps required to install the Parse SDK are integrated in our github repository .

Also popular now: