Skip to content

Instantly share code, notes, and snippets.

@thecapacity
Created April 7, 2013 17:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thecapacity/5331464 to your computer and use it in GitHub Desktop.
Save thecapacity/5331464 to your computer and use it in GitHub Desktop.
Receive Wahoo Fitness "Air Broadcaster" data
#!/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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment