Moving toward an open-standard platform for M2M development -

Moving toward an open-standard platform for M2M development

One company serves its cloud customers with some practical, surefire techniques–techniques that may influence M2M standards.

Eurotech , the international board, subsystem, and high-performance computer manufacturer, is at the forefront of developing an open-standard platform for M2M software development. Using the lightweight publish/subscribe MQTT protocol, along with Java and Eclipse, Eurotech has devised an approach that makes it easier for their clients to connect Eurotech's (and other companies') boards and devices in a machine-to-machine (M2M) network.

Here's a barebones explanation of how they devised the system, what it is, and how Eurotech made it into a new product.

Mother of invention
Eurotech ended up in a “helping profession” out of necessity. As a board and module systems manufacturer, they developed a way to help customers who struggled to connect Eurotech's boards and devices to some type of cloud or M2M network. The hardware wasn't the problem. Eurotech's CTO Arlen Nipper described working with customers, who “had no business doing embedded systems” but who knew exactly what hardware they wanted. When it came to the operating systems and firmware, he says these same customers frequently made uneducated choices that didn't work well with hardware. Eurotech's team ended up fixing the software or at least counseling the customer on what software they should be using.

These integration issues were derailing projects. Half of projects fail because the customer can't do the integration, says Nipper.

Therefore, Eurotech created a development platform to help programmers develop applications and components in the form of bundles that can be added, removed, or updated without affecting the operating system or other components and devices. “I'm blowing dust off techniques done 10 to 15 years ago that are now coming to fruition,” Nipper said. Using Open Services Gateway Initiative (OSGi) specification, which was originally designed in 1998 for home automation, Eurotech devised the software framework (shown as OSGi application framework in Figure 1 ), which holds the Java bundles. Developers code the bundles themselves using the Eclipse Equinox IDE (integrated development environment) or use some existing bundles. Developers then can add, remove, and update bundles via the Equinox IDE.

Figure 1. The ESF software framework. (Image courtesy of Eurotech.)

Click on image to enlarge.

The OSGi framework sits on top of the Java Virtual Machine (JVM)–JavaME Virtual Machine, to be precise. The JVM sits between the operating system and OSGi bundles to virtualizes the operating system. The JVM makes it possible to use Java bytecode; it also makes it possible to add different devices to the system.

As does the OSGi. The 10+-year old OSGi specifications started as a way to design applications for disparate, independent components, says OSGi on “Today, most software is largely wiring up open source artifacts that were often not designed to work together,” according to the OSGi web site. “This is similar to the problem that OSGi was designed to solve. Many open source projects are therefore adopting the OSGi specifications because they see that they can focus on the real problem and worry less about infrastructure, as well as becoming easier to use in other projects.”

Eurotech, as of 2009, has offered this software framework under the name ESF (Everywhere Software Framework) as a ready-to-use application programming interface for customers. They offer standard bundles and specific bundles for different enterprise types.
MQ Telemetry Transport protocol
The next step: get the middleware (ESF) to communicate with the Internet (the cloud). Eurotech uses IBM's MQ Telemetry Transport (MQTT) protocol, a protocol that Arlen Nipper (who worked at Arcom at the time) co-created back in 1999 with Dr Andy Stanford-Clark of IBM. MQTT is a publish/subscribe messaging protocol, that according to , is “designed for constrained devices and low-bandwidth, high-latency or unreliable networks. The design principles are to minimise network bandwidth and device resource requirements whilst also attempting to ensure reliability and some degree of assurance of delivery.” The protocol was designed to work well in “constrained environments” such as embedded systems.

Through the protocol, multiple clients connect to a broker and “subscribe to topics that they are interested in. Clients also connect to the broker and publish messages to topics. Many clients may subscribe to the same topics and do with the information as they please. The broker and mqtt act as a simple, common interface for everything to connect to. This means that you if you have clients that dump subscribed messages to a database, to twitter, pachube or even a simple text file, then it becomes very simple to add new sensors or other data input to a database, twitter or so on.” (From )

(Nipper demonstrated MQTT to some journalists at a press meeting I attended. He hooked up everyone's laptop in about 15 minutes and showed us how to subscribe and publish on the system. It seemed easy from a user standpoint.)

SCADA protocols are built in. “The ‘SCADA protocol' and the ‘MQ Integrator SCADA Device Protocol' (MQIsdp) are both old names for what is now known as the MQ Telemetry Transport (MQTT).” according to MQTT uses TCP/IP to provide basic network connectivity, and is a messaging transport that is “agnostic to the content of the payload,” states IBM's MQTT developer site .  MQTT is openly published with a royalty-free license. Working groups are now working on standardizing MQTT.

Eurotech uses MQTT in their Everywhere Device Cloud (EDC) product, which they announced in 2010. EDC includes ESF (the software/middleware framework and the JVM) and MQTT protocol for communicating to the cloud, as shown in Figure 2 . The combination of MQTT, Eclipse, JavaME Virtual Machine, the OSGi set-top box standard, and WindRiver's 3.0 Linux is intended to keep the programming uncomplicated, scalable; the customer in theory just provides business logic and business applications as shown in Figure 2, but ESF/EDC enables the business apps to interact with the data, in the cloud.

Figure 2. How Eurotech's Everywhere Device Cloud with Everywhere Software Framework interacts with cloud. (Image courtesy of Eurotech.)

Click on image to enlarge.

Java and a tale of two C bugs
If you see developers searching at 2 a.m. for a bug in their code, the two bugs they're invariably searching for are caused by “C pointer problems and C threading problems. Both go away with Java,” said Nipper. Java doesn't give the developer a choice, and therefore eliminates those bugs.

David L. Ripps, in “Java for embedded systems: An introduction to using Java in embedded systems” a article ( ), way back in September of 1996 explained: “Java is not just a new concept in portability. The Java language evolved from C and C++ by locating and eliminating many of the major sources of program error and instability. For example, C has an element know as a pointer that is supposed to contain the address at which a specific type of information is stored. However, the pointer can be set to literally any address value, and by “casting” a programmer can trick the compiler into storing any type of information at the arbitrary pointer address. This is convenient if you write error-free code, and a snake pit if you don't. Java does not have pointers.”

Michael Barr, from Netrino and former editor in chief of ESD magazine, concurs that “Java's a great language,” he said, “but small it is not. You need a few MB of RAM/flash and a 32-bit CPU. Of course, a Linux-powered device has at least that.”

Indeed, today's embedded processors don't have a problem running Java JVM. “That would have been a good point perhaps 8 years ago,” said Nipper. “The new generation of embedded processors (starting with the Intel PXA250 8 or 9 years ago) are more that capable of running a Java JVM. Now with Intel ATOM class CPUs I would say this argument goes away entirely. For all practical purposes most cell phones on the market today run some form of a ‘virtual machine.' Some are indeed pure Java Virtual Machines (JVM) but Android is based (for all practical purposes) on the definition of a JVM and even IOS apps run within a virtualized sandbox (although of the technologies available, I'm not a tech authority on the IOS side of things).”

Java is, according to a white paper on ESF , has these benefits:

  • Java runs across all operating systems (code reuse across platforms)
  • Java applications run in a “virtual machine” sandbox
  • Java is a “type safe” interpreted application language. It is the “perfect” application tool to give to customers to eliminate collateral damage to the OS.
  • Network-centric (Sun leveraged the Internet connectivity extensively when creating Java)
  • IT-centric (All major IT companies use Java)
  • True object-orientated programming language
  • Native multithreading support
  • Junit testing
  • Built-in memory management
  • Built-in self documentation (JavaDocs)
  • Rapid code development from a huge repository of existing code
C and C++ vs. Java for cloud applications
“Developers and managers of those developers all know that C allows the greatest amount of flexibility in writing embedded computer applications. But with this flexibility come great risks when it come to concise and manageable code over the life of a product. C does not enforce any strong 'data typing' and therefore pointers can be passed around between C functions at will. Without strict and proper management of these pointers, all kinds of subtle bugs can (and do) crop up. I'd hate to imagine the man-decades or man-centuries that have been spent tracking these pointer problems down. The Java language does not even allow developers to create 'pointers' and it manages the memory as a part of the language execution.

Many modern applications now have to manage many 'threads' of execution in an application. Even more so now due to the very characteristics of TCP/IP and networking applications. The C programming language does not have a native implementation of a 'Thread of Execution' and therefore applications developers are left to their own initiative to develop a threading model. Now not only do these threads have to allocate/deallocate memory (again, with POINTERS), they can invent their own set of APIs with which to do the threading. As you can imagine, without strict discipline and guidelines, complex applications can result in threading bugs, which are almost impossible to debug. Java, on the other hand, has threading built in  as a native construct of the programming language. Therefore, developers all use the same APIs with known characteristics to develop multithreaded applications.”

–Arlen Nipper
CTO, Eurotech

The universe and everything
Eurotech now provides the whole M2M/cloud system, from hardware devices, a Java-based software framework, to the cloud services itself, with all components guaranteed to work together. Customers may also choose just the components they need, ala carte, including ESF and EDC frameworks. It's a mix and match system or a complete end-to-end package: from the web-enabled devices (sensors, boards, modules), the edge devices (like routers), the software framework to connect to the cloud, a GUI for developing applications targeted to specific industries in the cloud, to the cloud itself (data center and all). Customers can actually buy many bundled services from them, even following a service model where Eurotech provides the boards as a service.

Of course, they also sell their products along a traditional model. Hilary Tomasson, vice president, of marketing, Eurotech North America, explains, “We have two different models. Customers can purchase the devices outright and buy simply the Everyware Cloud service from us, whether the service is data transmission only or with data storage as well. This allows customers to choose another communication method, if they have the infrastructure or service provider relationships already. The other model is the Device as a Service (DaaS), where the customer is effectively paying a monthly fee for the use of the devices as well as the cloud connectivity and/or storage services. With DaaS, Eurotech manages the devices (including upgrades) as part of the service to the customer. “

What's admirable is that Eurotech created M2M/cloud systems and services observing what worked with their customers integration issues and evolving them into a package of components and services that are guaranteed to work well together. It sounds ideal for the small customer, such as a local government agency or a small business, that might not have a staff of embedded systems developers on hand or a staff that doesn't want to wrestle code. In theory, the customer just provides the business logic and some business applications.

Robert Andres, corporate marketing director for Eurotech Group, said “Embedded systems companies and OEMs won't grow if they don't tackle the IP space.” Andres also said Eurotech intentionally offers ESF/EDC at price point low enough for small companies to try it as proof of concept that M2M can work for them.

Industry magazines have honored Eurotech's cloud products–its Everywhere Software Framework [ESF] and Everywhere Device Cloud [EDC]. Connected World naming Eurotech in its CW 100 list of top companies and Electronic Design naming ESF and EDC as some of the best tools for cloud computing in 2010.

Now Eurotech worked this helping hand into a new business for themselves and perhaps a new standard for M2M.

Working groups
The Eclipse Foundation and Sierra Wireless just created a new working group to simplify the open-standard development tools for M2M ; Eurotech is providing some of their code to the effort. The working group's charter is available online .

IBM and Eurotech will be contributing software to the Eclipse Foundation to “accelerate the standardization of the MQTT protocol with the ultimate goal to more easily connect the Internet of Things. Our 10+-year-old ‘overnight sensation' is poised to simplify connectivity, reduce network traffic load, and lower bandwidth requirements for M2M,” writes Tomasson in an email.

Susan Rambo is the managing editor of Embedded Systems Design magazine. You may reach her at .

Additional reading:
Hochanadel, Kurt (Eurotech). “Storing Device Data in the Cloud,” RTC Magazine , May 2011; .

MD&D News Staff. “Eurotech Launches Everyware Device Cloud For Device Data Management,”, posted on Nov 22, 2010 3:16 PM,

MQTT manual, user forum, and other content is available at

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.