Sensor Democracy

Hot on the heels of talking with my friend Kevin about training for data is a revelation by my new favorite fitness company Wahoo makers of fitness sensors, devices and apps.

One of the challenges for any geek who wants to go beyond commercial products for their fitness regimen is the need to understand all the complicated protocols of sensors, namely Bluetooth and ANT+.

I recently acquired a biking cadence and speed sensor to match my heart rate monitor and realized that the app has a hidden gem of a feature!

Under the User Profile settings is a featured called Air Broadcaster, which states it Broadcast[s] your data live over Wi-Fi!!!

It must not be well known within the company, because their support email had no idea what I was talking about, but I was lucky enough to stumble upon the developer via twitter who gave me some code, enough to figure out how it works!

There are two quick and easy ways to get access to this data, the first using our trusty friend netcat:

 nc -w0 -dulk 51530

You should see some data such as:


Note, this was me testing it from my couch and not engaged in any physical activity, so the only sensor it had was GPS.

The second using some simple python:


import socket
import json

UDP_IP = ""
UDP_PORT = 51530

sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # UDP
sock.bind((UDP_IP, UDP_PORT))

while True:
    data_str, addr = sock.recvfrom(1024) # buffer size is 1024 bytes
    data = json.loads(data_str)
    print addr, " -> ", data


    Why is this cool?

This means I can spend my time working with my data, not trying to recreate a sensor bridge!

I’ll still have to spend some time figuring out what HeartbeartBitmap represents, but that’s (hopefully) trivial to reverse engineering how to connect to the sensor and it’s own protocol.

About jay

I'm trying to build something interactive where I can learn from others and hopefully share useful knowledge too.
This entry was posted in uncategorized. Bookmark the permalink.