Hybrid development aiming to bridge the Bluetooth Smart fragmentation gap

Alex JonssonBlogs

Tweet about this on TwitterShare on FacebookShare on LinkedInShare on Google+

Communicating over Bluetooth Smart is an increasingly common way to connect to hardware using a mobile device, and more specifically one of the few methods which doesn’t require additional network components, wifi hotspots or login credentials. In this article, the objective is to introduce novel ways for developing bluetooth apps for modern smartphones and tables.

Bluetooth Smart, a.k.a (BT Low Energy or 4.0), is perhaps most importantly known as a growing industry standard under bluetooth.org. This radio technology has many traits of a vanilla connection tool for all things connected; allowing operation on pretty much all modern handsets, while lean enough for devices feeding from coin-cell batteries and even energy–harvesting devices embedded in constructions. Interestingly, it’s also fairly secure with its built-in 128-bit AES data encryption.

Up until recently, access to the Bluetooth subsystem was a privileged path for native developers with skills on each respective platform, and especially mobile devices running Windows were late for the party as Bluetooth Smart support was made available only the last 2-3 years. In practice, this means that Bluetooth Smart is fragmented both on handsets and connected peripheral devices. A path to bypass differences in bluetooth implementations is via hybrid applications – partly written in native code and partly made up in HTML5 and JavaScript – the very same code executes seamlessly on any Bluetooth capable handset.

In practice this means that the Bluetooth radio would be running native, while the connection and data flow is established and controlled by the code running inside the container. This approach, commonly practiced in Evothings Studio, creates a simple layer of abstraction virtually eliminating the need to learn the intricacies of each operating system, keeping the low-level programming down to a bare minimum, typically a selected number of function calls using scripts.

Starting a scan for Low Energy devices (e.g. using EasyBLE by Evothings), is made by a single function call:


Finding a device and retrieving a list of its services, is equally straight-forward:

                  evothings.easyble.showInfo('Status: Connected - reading BLE services...');

New versions of bluetooth also come with an increased range of functions, allowing devices to act as both a beacon and connected device concurrently, and create mesh data networks as we’ve seen as one of the main advantages with Zigbee network topologies. How can we assure that mobile applications behave consistently as technology evolves? Backwards compatibility is easier to obtain, than maintaining a set of future proof native plugins. Our philosophy at Evothings is to uphold basic functionality in native code (or Java in the case with Android), and have the intricate details instead expressed in JavaScript to maintain a dynamic behavior. A language like JavaScript allows later binding between an application’s building blocks and accents than languages based on Java or C/C++. This brings on many advantages for development, testing, prototyping as well as for deployment to end users.

Welcome to explore the Bluetooth Smart world with us. For more examples with connected hardware and other bluetooth use cases, you can acquire the Evothings Studio software bundle at evothings.com, as well as additional reading on bluetooth and hands-on tutorials with a number of popular hardware and devices. Mobile clients for development are free, and published on the public app stores (search for “evothings viewer”).


Eddystone is coming, opening up the beacon space

Estimote, Kontakt and Radius Networks are upping their hardware offerings, here’s some things you need to know.
Read more→


Evothings Studio is coming cloud-side

Evothings Studio 2.0 is a Saas solution, bringing on a wide array of possibilities for the IoT developer. Join the growing community and learn more about the benefits of using Evothings Studio for IoT app development.
Read more and download→


Ready for app stores with Phonegap Build

A simple way to build and sign your app for publishing, is via a build service. Adobe’s Phongegap Build is one for the candidates.
Read more→