Fred Nikgohar edited this page Jan 7, 2019 · 1 revision

Ionic BLE Serial Port (SPP over BLE)

Welcome

This project will provide a ready-to-compile Ionic App that emulates something similar to the Serial Port Profile (SPP) over Bluetooth Low Energy (BLE) class of devices. As such, it serves as a launching point for anyone wishing to rapidly prototype mobile apps that require communication with BLE-enabled devices, such as Arduino or RaspberryPi boards.

Intended Audience

There are two types of people who will benefit from this project.

  • Anyone who needs to rapidly prototype a mobile app to work with their BLE enabled device, and
  • Non-engineers and weekend/hobby DIYers who are not proficient programmers.

Supported BLE Hardware

In this app we will use the HM-10 BLE Device, based on the Texas Instrument CC2540/CC2541 Chipset, a widely available and inexpensive BLE device.

However, supporting other devices is a simple matter of configuring your code with the specific ID_Strings of the specific devices you will be using.

Android & iOS Platform Support

Ionic (in conjunction with Cordova) is an easy to use framework where users can create mobile apps using easy to learn/use programming languages (HTML & Typescript). Furthermore, compiling and deploying mobile apps on iOS (App Store) and Android (Play Store) are easily doable, without the need to write platform-specific code for each Operating System.

Bluetooth Low Energy (BLE) vs Bluetooth Classic (BTC)

Bluetooth Communications like sending and receiving small amounts of data is a breeze with BTC devices as all the heavy lifting is handled by "profiles" such as the Serial Port Profile. BLE provides a much richer and more flexible means of communicating, but does so at the expense of ease... since virtually everything is now handled at the application layer and lots of code needs to be written and customized.

Serial communications with BTC devices was a breeze as each BTC device had supported "Profiles" such as HID or SPP. In BLE, Profiles have been replaced by Attributes and Characteristics. There is still serial communications that underpins it all (using the GAAT protocol), but virtually all the heavy lifting is now done at the application layer... meaning more (complicated) coding. This makes getting off the ground and rapid prototyping extremely difficult and cumbersome (as you start to read the posts and threads on this topic).

Why Get Involved

It is abundantly obvious that we need to have a simple codebase for serial communication with BLE devices using Ionic/Cordova - as no such thing currently exists

Unlike Bluetooth Classic that offered a specific and easy to use Serial Port Profile (SPP), Bluetooth Low Energy does not offer an easy-to-use communications

This will make app development much faster while familiarizing the audience with BLE principles at the same time.

Why I Started This Project

I started this project because I am a non-engineer/programmer who is trying to create a game device for my 2 year old son. I have pieced together enough code to get the job done, but in doing so I've realized that many people, even professional programmers, are running into some of the same issues I've ran into while trying to read/write from BLE devices in a simple, efficient low overhead fashion. And so after much research, reading blogs, reviewing available code, understanding BLE principles, and many many many forum post discussions, I've decided to start this project as a service to the community.

However, I am NOT able to create a clean or professional code as I'm not a programmer. Therefore, I am hereby inviting anyone out there who wants to do something good for the community to help us out. Please feel free to contact me or to simply get involved.

Please email me at frednikgohar@gmail.com if you'd like to get involved!

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.