Purpose

A way to track how much much water I drank throughout a day by simply weighing my water cup on a food scale. I wanted to use the iOS Health App to store and graph my daily water consumption.


What I wanted to learn

  • General bluetooth programming
  • Building an iOS application
  • iOS HealthKit
  • iOS CoreData

Where do I start?

Order a bluetooth enabled food scale with an iOS app. This made sure I was buying a scale that would work for the project without me having to know anything about BLE or iOS programming. Though one uncertainty was whether BLE communication was encrypted (more on that later).

Learn by observing the bluetooth traffic since I knew very little about bluetooth programming. I decided to skip learning about the Bluetooth discovery and pairing for now by using an existing BLE scanner called BLE Scanner 4.0. The food scale showed up during the scan along with a lot of other unlabeled devices.

After pushing pair on the scanner, I started to see Bluetooth terminology. I slowed my eagerness to build and started to do some homework by reading Apple's Core Bluetooth Programming Guide.

I started to observe the behavior of the Custom Service 0xFFF0 and noticed that this HEX value would change when I weighed an object on the scale. Next was to figure out how to interpret the HEX value.


// TODO: Finish rest of page