Top Rated Pune Call Girls Katraj โ 6297143586 โ Call Me For Genuine Sex Serv...
ย
Open Source for You: Etherios Cloud Connector
1. Open Gurus Let's Try
D
evice Cloud is a device management platform and
data service that allows you to connect any device to
any application, anywhere. As a public cloud service,
it is designed to provide easy integration between devices and
the Device Cloud by Etherios to facilitate real-time network
management and rapid M2M application development. It
is simple to integrate client software, Web applications or
mobile applications to Device Cloud, using Etherios Cloud
Connector and open source APIs.
Device Cloud security
service. With over 175 different security controls in place that
take into account security frameworks including ISO27002โs
ISMS, NERCโs critical infrastructure protection (CIP)
Etherios Cloud Connector allows you to seamlessly connect any M2M device to Device
Cloud by Etherios.
Get to Know the Etherios Cloud Connector
guidance, the payment card industryโs PCI-DSS v2, the Cloud
Security Allianceโs (CSA) Cloud Controls Matrix, as well as
relevant HIPAA and NIST standards, Device Cloud customers
are assured that there is no safer place for their data.
Etherios Cloud Connector
Etherios Cloud Connector is a software development
package that is ANSI X3.159-1989 (ANSI C89) and ISO/
IEC 9899:1999 (ANSI C99) compliant and enables devices
to exchange information with Device Cloud over the
Internet, securely.
The devices could range from Arduino boards and
Freescale or Intel chips, to PIC or STM microcontrollers, a
Raspberry Pi microcomputer or a smartphone.
Etherios Cloud Connector enables application-to-
device data interaction (messaging), application and
88 | May 2014 | OPEN SOURCE FOR yOU | www.OpenSourceForU.com
2. Open GurusLet's Try
device data storage and remote management of devices.
Using Etherios Cloud Connector, you can easily develop
cloud-based applications for connected devices that
quickly scale from dozens, to hundreds or even millions
of endpoints.
Prerequisites for Etherios Cloud Connector
Etherios Cloud Connector can run on any device
that has a minimum of 2.5 kB of RAM and 32 kB of
Flash memory. A unique feature of the Etherios Cloud
Connector is that it is OS independent, which means you
donโt need an OS running on your device to connect to
Device Cloud by Etherios.
Features
By integrating Etherios Cloud Connector into your device,
you instantly enable the power of Device Cloud device
management capabilities and application enablement
features for your device:
Send data to Device Cloud
Receive data from Device Cloud
Enable remote control of devices via the Device Cloud
platform, including:
Firmware updates
Software downloads
Reboot devices
Communicating with your device
To manage your device remotely, log in to your Device
Cloud account and navigate to the Device Management
tab. Alternatively, you can communicate with your device
programmatically by using Device Cloud Web Services.
Device Cloud Web Services requests are used to
send data from a remote application (written in Java,
Python, Ruby, Perl and C#) to Device Cloud, which
then communicates with the device. This allows for bi-
directional M2M communication.
Source code structure
The Etherios Cloud Connector source code is divided into
two partitions.
Private partition: The private partition includes the
sources that implement the Etherios Cloud Connector
public API.
Public Application Framework: The Public Application
Framework includes a set of sample applications used
for demonstration purposes.
It also has a HTML help system plus pre-written
onto devices running any Linux OS, i.e., even a Linux PC.
You can download Etherios Cloud Connector for free from
http://www.etherios. com/products/devicecloud/connector/
embedded. Extract it and you will see the following contents:
connector/docs > API reference manual
connector/private ->The protocol core
connector/public -> Application framework
The threading model
Etherios Cloud Connector can be deployed in a multi-
threaded or round robin control loop environment.
In multi-threaded environments that include pre-emptive
threading, Etherios Cloud Connector can be implemented as a
separate standalone thread by calling connector_run(). This is
a blocking call that only returns due to a major system failure.
Alternatively, when threading is unavailable, e.g., in
devices without an OS, typically in a round robin control
be implemented using the non-blocking connector_step() call
within the round robin control loop.
Etherios Cloud Connector execution guidelines
Here we will try to run Etherios Cloud Connector on a PC
running Linux. Similarly, you can port to any device with or
without an OS.
Go to /connector/public/step/platforms
You need to create a folder for your custom platform here.
If you have a Linux platform, then go to /connector/public/
step/platforms/linux
os.c -> OS routines like app_os_malloc(), app_os_free(), app_
malloc and get system time on your platform.
and
go to
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
static connector_callback_status_t app_get_mac_
{
return connector_callback_continue;
}
This callback
device, and for testing you may hardcode MAC and rewrite it
as follows:
www.OpenSourceForU.com | OPEN SOURCE FOR yOU | May 2014 | 89
3. Open Gurus Let's Try
90 | May 2014 | OPEN SOURCE FOR yOU | www.OpenSourceForU.com
static connector_callback_status_t app_get_mac_
{
return connector_callback_continue;
}
Now go to /connector/public/step/samples/connect_
to_device_cloud /.
Device Cloud.
To connect, you need to create a free Device Cloud
Developer account. Go to http://www.etherios.com/
products/devicecloud/ developerzone. You can connect up
to five devices with a Developer Edition account. When
registering, choose the cloud instance appropriate for you,
either Device Cloud US (login.etherios.com) or Device
Europe (login.etherios.co.uk). When you log in youโll see
a dashboard (Figure 1) with a single window for managing
all your devices.
a Device ID, which is a globally unique 16-octet
MAC addresses.
To access a device from Device Cloud, we
need to add the device using MAC/IMEI to
Device Cloud. Once added, Device Cloud will
generate a Device ID.
Cloud Connector to connect to Device Cloud,
e.g., a VendorID, which can be found in My
Account (Figure 3).
Vendor ID wonโt be available by default. You
need to click Generate/Provision Vendor ID to get
a unique Vendor ID for the account.
Now go to /connector/public/step/samples/
and
make the following changes:
or
Save and build the application as follows:
athomas@ubuntu:~/connector/public/step/samples/
connect_to_ device_cloud$ make clean all
executed now:
athomas@ubuntu:~/connector/public/step/samples/connect_to_
device_cloud$ ./connector
app_network_tcp_open: connected to login.etherios.co.uk
Send keepalive params
Send protocol version
Figure 1: Device management
Figure 2: Adding devices to Device Cloud
Figure 3: My Account
4. Open GurusLet's Try
www.OpenSourceForU.com | OPEN SOURCE FOR yOU | May 2014 | 91
address: found
Address
Send complete
connector_tcp_communication_started
keepalive
You can see Etherios Cloud Connector
reporting the MAC/VendorID/IP address of the
device to the cloud instance.
Now if you check Device Cloud, you can see
that the device is connected (Figure 4).
If you right-click on the device, you can see
its properties and execute management tasks, such
as rebooting the device (Figure 5). If you want to
reboot the Linux machine, then re-run Etherios
Cloud Connector with root privileges.
#sudo ./connector
Now if you try to reboot from Device Cloud,
your Linux PC will be rebooted. We have now
successfully connected a Linux PC to Device Cloud.
Next you can add features to Etherios Cloud
Connector one at a time, as follows:
Data points: This is used to upload device
statistics periodically, like temperature, CPU
speed, etc.
Device requests: You can send messages to the device
from Device Cloud or from an end application.
Device Cloud.
the device.
a remote location via Device Cloud.
Device Cloud; from there your application can download
them at any time.
Once your device is connected to Device Cloud using
Figure 4: Device connection status
Figure 5: Device properties
Figure 6: API explorer
By: Bob Thomas
The author is an embedded open source enthusiast who works
at Digi International, with expertise in Etherios Cloud Connector
integration. You can reach him at Bob.thomas@digi.com
Etherios Cloud Connector, you can talk to your device from
any application around the world using the Web Services
APIs provided in Device Cloud.
Device Cloud allows you to generate source code
for the type of execution you want to do, which makes a
developerโs job easy.