Sending Android Wear Sensor data to The Internet of Things
1. Sending Android Wear Sensor data to
The Internet of Things
using MQTT
Markus van Kempen
E: mvk@ca.ibm.com
T: @markusvankempen
2. Goal – sending Android Wear Sensor Data like heart rate
or StepCounter in the IOT Cloud
3. Internet
MQTT Publish
Hosts messages
IoT Cloud / MQTT BrokerAndroid
Visualization
On Laptop
Sending Android Wear Sensor data to The Internet of Things
- My Heart rate on IOT
{"evt_type":
"status","timestamp":{},
"evt":{
"myName":"MOTO",
"Sensor":21,"Gx":0,"Gy":0,"Gz":0
,
"HEART_RATE":63,
"STEP_COUNTER":0}}
Google
DATA
Layer
4. Prerequisite (1)
Enable debugging over Bluetooth on Android and Wear
https://developer.android.com/training/wearables/apps/bt-debugging.html
Hit the build number 7 times
For code deployment and to display debugging message in Studio
5. Prerequisite (2)
Use the Android Wear App and enable debugging
Use adb to connect to Wear over Bluetooth
adb forward tcp:4444 localabstract:/adb-hub
adb connect localhost:4444
adb devices
List of devices attached
038bc79709477f0e device
localhost:4444 device
c:Android-adb>
6. Register on IBM IOT and/or Bluemix
https://console.ng.bluemix.net/
https://internetofthings.ibmcloud.com/
Register your Android Wear Device on IOT
Note Down the registration Information:
org=YourOrg
Type=MOTO
id=112233445566778
auth-method=token
auth-token=YourOrg
This we need to add in our App to send the data to IOT
7. Register a API keys for your clients
The information is your for your client like paho
Or the IOT visualization Tool
Key: a-org-xdrajazsgw
Auth Token: qTiclF-6nBjDt!rxRQ