My Bluetooth Summer, not so BLE(h)

Hi there,

This last summer I developed Bluetooth Low Energy (BLE) interfaces for a couple of embedded boards and an Android app companion to operate the boards.

BLE Serial Console is currently in Beta and is available in Google Play.

Special thanks to Federico Biagioli who made the app’s Icon!

screenshot_20170202-170429
BLE Serial Console discovered all HM10 Services!

The app can discover all the GATT Services available in a BLE device. It was tested with an HM-10 module (in a breakout board) and Intel Edison’s HM11 integrated BLE module. BLE uses a protocol called Generic Attributes Profile (GATT), that exposes hierarchical data on any BLE device.

Once you enter the right GATT Characteristic, if it has Read/Write permissions you can exchange data with the module from the app to whatever device is connected to the BLE Module. Additionally, if the GATT Characteristic has the Notify permissions, you can subscribe to the device, and receive any updates made to that GATT Characteristic from the other side of the line. Subscribing will enable you to have bidirectional communication with the module.

HM10’s breakout board works with 3.3V with voltage and logic converters and exposes TX/RX pins that you can connect very easily to any Arduino based board having UART protocol. In my case I connected the RX/TX pins to the RS232 RX/TX pins in the CIAA board. HM10’s default GATT Characteristic contains a 20 bytes long registry with Read/Write/Notify permissions.

Service UUID: 0000ffe0-0000-1000-8000-00805f9b34fb
Characteristic UUID: 0000ffe1-0000-1000-8000-00805f9b34fb

0-eus-d2-72d06ae14d9237e9a9a5f176123d903b
EDU-CIAA-NXP & HM-10 BLE Module in Action

I wrote some node.js code for Intel Edison’s board. To enable BLE in this board you have to login and run 3 commands:

rfkill unblock bluetooth
killall bluetoothd
hciconfig hci0 up

After this, you can flash your javascript code to the board, connect & subscribe to the BLE device and operate seamlessly like any other Serial Communication app.

Last but not least, I wrote some plain twenty first century C code to interface with an embedded board called CIAA (Computadora Industrial Abierta Argentina). I connected an HM-10 BLE module to the board and configured the interface between a PC terminal, the board itself and the BLE module in Master Mode.

Advertisements

My Guice Integration Adventures: Building a Server from scratch with Netty

Intro & Motivation

I came to this also by the Android MOOC offered by Coursera last year, and I found this framework really useful for building event-driven application servers.

In previous posts I talked about Node.js and it’s ease of use when developing web applications. Node.js is also event-driven and it counts with a lot of features and today it counts with very wide community. It has been a great experience to work with Node.js.

Netty Rulez Too

Netty Logo

Back in the Java world, Netty tries to achieve Rapid development of maintainable high performance protocol servers & clients, so I wanted to give it a try with my favorite DI framework. The server was drastically more lightweight and feature specific, but I didn’t have Servlet support. This is going to be a next step for sure if you want to fully migrate your webapp from your previous Java Application Server.

I made a very simple Java project with Guice and Netty, a Non-Blocking Event-Driven Server with Dependency Injection integrated.

Project and Code

The example application is in my github repo: guice-netty-bootstrap

Patients System: programming for the people

It’s in our human nature to want to help and assist the ones in need. Sometimes we wish we had the time to help more, and sometimes we need people to help us instead, but the question that came up for me was:

How can I help people as a software developer?

Last summer I joined with a group of friends an initiative called “Manos a la Obra“, as part of the Engineering and Computer Science staff, to teach the basics about computers in a small town called “Carmen del Sauce”. But additionally, I started a web application project to help doctors, making a Patient Clinic History Management System, so they can have real-time and easy statistics gathering of people’s diseases they treat and assist.

There’s plenty of initiatives for people to help others through programming/developing software, you just need look finer in your hometown, and have ideas to share.

This blog post is about PPS, the Patients System I made helped by doctors and close friends, with Node.js, Jade Template Engine, Express MVC Framework, Mongo DB and PhoneGap.

Continue reading Patients System: programming for the people