Skip to main content

BLE Hello World in Cordova/Phonegap

After learning about bluetooth smart, I have been wanting to write some phonegap/cordova apps for my self. There are few plugins (1,2,3) available on github but in my opinion the most promising one is from EvoThings called cordova-ble. I decided to write my self a sample app for scanning on a weekend and ended up modifying one of the examples from EvoThings and mixing in topcoat and zepto as per phonegap expert recommendations. Code is here.

The code is dead simple, so I won't bother to explain it, but essentially it is just HTML5/CSS3/JS stitched together with the evothings plugin.

Video made with the help of  ReflectorAndroid SCR and Apple iMovie

Comments

  1. I am trying to replicate your example but Scanning Never turns on. Any ideas? Thanks - testing on an Android phone

    ReplyDelete

Post a Comment

Popular posts from this blog

Securing your Ansible deployment on AWS

Lately I have been involved in a team which is developing software as micro-services. It is very interesting work and has helped me to get introduced to some interesting technologies such as AWS Ansible and Docker in depth (and in practice). Ansible is a great deployment automation tool. It is made in python, is declarative and agent-less (i.e. it just needs SSH access to your box). SSH it self is very secure if you use key based authentication. But people tend to use it in very insecure manner (i.e they share SSH keys on email, don't delete old SSH keys once they are revoked etc). In my opinion the best solution to stop sharing of private keys is to generate them on a hardware token from which they cannot be (easily) copied. Fortunately I have access to Yubico Neo  on which I managed to generate a public/private gpg key. The private key resides in your gpg card and public key can be put in your Ansible target hosts. There are quite a few guides ( Mac , Linux , Windows)...

As native as possible

This is a half baked idea and kind of a rant. The idea is very simple and has to do with my personal position position about how to choose technologies. When building a software systems, first do things as natively as possible for your context. As a software developer I would like to construct systems that are easy to get started with, understand, maintain and still can be delivered on time. As you may know that it is impossibly hard to do so many things well in any domain. In my brief career I have seen many examples of technology stacks and systems which try to achieve the previously stated goals by abstracting away complexities of underlying layers but also creating some of their own. If you are a Java server side developer you probably have worked with likes of Hibernate etc (which helps you create database queries). This usually results in poor results and has been discussed in community  (to quote "the resulting cakes  from cake mixes generally taste worse tha...

Micro-services: Learning resources.

I am currently working with/researching about micro-services  software architecture (or approach to software architecture). There are tons of resources on the web but unfortunately very few of them are academic in nature. I hope that over the next coming months software/academic community will agree to have a standard definition (perhaps following a simple format similar to this one ) for this topic as this subject is starting to get hot . I personally think the name/term "micro-services" can be a bit misleading. Quite a lot of people I have talked to focus more on the word "micro" and not on the principles. I am all for light weight approaches to building software though. For the time being this term is trending and I don't see the term fading away time soon. See the buzz on twitter and youtube your self. I hope to make this post as a learning resource for people new to micro-services. I will be curating this over a period of time (so don't expect t...