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+.
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:
#!/usr/bin/python import socket import json UDP_IP = "0.0.0.0" 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.