Experiments with a smart band using Bluetooth and Flutter

Fastrack reflex 2.0 (image taken from the website)

Research

So, first I decided to look around for what are the parts, model numbers etc. I did come around a teardown video:

  • Each device has an address, something like: XX:XX:XX:XX:XX:XX , where X is a hexadecimal character.
  • When connected, the mobile device searches for the services available in the device, each service consists of a set of characteristics.
  • These characteristics are responsible for reading and writing data to the device and are of three types: read , write and notify .

About services and characteristics

Both of these are identified using hexadecimal strings of type: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX , called UUIDs.

  • Write: Allows the master device to write data on the other(band in this case) device on demand.
  • Notify: Allows the other device to send custom data(maybe a command) to the master device.

Some more research

About my band in particular. I found the exact UUIDs for the characteristic and its parent service which I wanted to tinker around with. In my case, I wanted to work with the notify characteristic, in order to send some custom commands to my mobile device. All this was done using the “Light Blue” app.

How to get services and characteristics in LIGHT BLUE

Implementation

For implementation, you can go for a variety of ways, I chose flutter because I know how to work with that.

  1. Connect to it
  2. Discover Services
  3. Go to the service that we researched about earlier
  4. Get characteristics of that service
  5. Go to the particular selected characteristic
  6. In my case, since it is notify, I will work with notify and will monitor the input coming from the band
  7. Trigger whatever I want to do when I receive a particular command!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store