The document discusses creating an Internet of Things application using Azure IoT Suite and the Microsoft Band. It provides an overview of Azure IoT Hub for device identity management and secure communication. It also covers IoT security best practices. The document demonstrates connecting a Microsoft Band to log sensor data to Azure IoT Hub and building an IoT app to access the Band's sensors.
4. Internet of Your Things InternetOfYourThings.com
– Starter Kits
– Windows 10 IoT Core
– Azure IoT Certified
Azure IoT Suite azureIoTsuite.com
– Predictive maintenance
– Remote monitoring
6. Azure IoT Hub
Device identity registry
– Block unsolicited network information
– Authorisation and authentication are based on per-device
identities
Bi-directional communication
– Communication between device and service is secured
– Maintains device specific queues for all sent commands
7. IoT Security
Safely connect systems and devices
– Unique identities
– Secured channel communication
Keep connection secure and efficient
– System updates
– Device audit
– Trackable communication path
8. IoT Security
Offline devices
– Low-power mode
– Service-assisted communication
– Cached messages
Service-assisted Communication Pattern
10. Microsoft Band
Sensors
– Accelerometer
– Gyroscope
– Distance
– Heart Rate
– Pedometer
– Skin Temperature
– UV
– Device Contact
– Calories
Microsoft Band 2 only
– Altimeter
– Ambient Light
– Barometer
– Galvanic Skin Response
– RR Interval
11. Microsoft Band
Microsoft Band SDK
– Provides support for Band sensors as subscriptions
– Callback that delivers data at specific intervals
– Each sensor requires a power draw!
Band Sensor
Manager
Subscription
Subscription
IoT
Hub
12. Microsoft Band
On Windows and iOS
– Constant connectivity is required to maintain a subscription
Some sensor subscriptions require user consent
– Heart Rate and RR Interval
– Granted on a per-sensor basis
14. References
Xamarin Components > Microsoft Band SDK
https://components.xamarin.com/view/microsoft-band-sdk
Microsoft Band Developers Page
http://developer.microsoftband.com
Azure IoT Hub
https://azure.microsoft.com/en-us/services/iot-hub
Predictive maintenance
Anticipate maintenance needs and avoid unscheduled downtime by connecting and monitoring your devices for predictive maintenance.
Remote monitoring
Connect and monitor your devices to analyze untapped data and improve business outcomes by automating processes.
The IoT hub receives telemetry from the devices at a single endpoint. An IoT hub also maintains device specific endpoints where each devices can retrieve the commands that are sent to it.
The IoT hub makes the received telemetry available through the service-side telemetry read endpoint.
IoT Hub
A device cannot connect to IoT hub unless it has an entry in the device identity registry.
An IoT hub exposes an Azure Event Hubs-compatible endpoint to enable you to read device-to-cloud messages.
The Device client SDK creates a DeviceClient instance that uses the AMQP protocol to communicate with IoT Hub. To use the HTTPS protocol, use the override of the Create method that enables you to specify the protocol.
System-level authorization and authentication are based on per-device identities. They make access credentials and permissions nearly instantly revocable.
Azure IoT Hub is an Azure service that enables secure and reliable bi-directional communications between your application back end and millions of devices. It allows the application back end to receive telemetry at scale from your devices, route that data to a stream event processor, receive file uploads from devices, and also to send cloud-to-device commands to specific devices. You can use IoT Hub to implement your own solution back end. In addition, IoT Hub includes a device identity registry used to provision devices, their security credentials, and their rights to connect to the hub.
A partition is an ordered sequence of events that is held in an Event Hub.
Azure IoT Hub implements the service-assisted communication pattern to mediate the interactions between your devices and your solution back end. The goal of service-assisted communication is to establish trustworthy, bidirectional communication paths between a control system, such as IoT Hub, and special-purpose devices that are deployed in untrusted physical space.
Your command center sends a message to the device, and in return, the device sends a message to the command center.
This communication path or paths are trackable through a system of receipts; these same messages can then be cached to enable resilience to outages and unreliable communication channels.
Your security scales as your business does because your IoT solution allows you to use unique identities and shared keys to connect devices,
allowing a wide range of devices to interoperate via secure communication paths. And by infusing secure systems into the culture of your business, IoT security will become part of the evolution of your business.
Azure IoT Hub implements the service-assisted communication pattern to mediate the interactions between your devices and your solution back end. The goal of service-assisted communication is to establish trustworthy, bidirectional communication paths between a control system, such as IoT Hub, and special-purpose devices that are deployed in untrusted physical space.
Your command center sends a message to the device, and in return, the device sends a message to the command center.
This communication path or paths are trackable through a system of receipts; these same messages can then be cached to enable resilience to outages and unreliable communication channels.
Your security scales as your business does because your IoT solution allows you to use unique identities and shared keys to connect devices,
allowing a wide range of devices to interoperate via secure communication paths. And by infusing secure systems into the culture of your business, IoT security will become part of the evolution of your business.
Access Sensors
Use a range of sensors including heart rate, UV, accelerometer, gyroscope, and skin temperature, as well as fitness data, to design cutting-edge user experiences:
AccelerometerProvides X, Y, and Z acceleration in meters per second squared (m/s²) units.
GyroscopeProvides X, Y, and Z angular velocity in degrees per second (°/sec) units.
DistanceProvides the total distance in centimeters, current speed in centimeters per second (cm/s), current pace in milliseconds per meter (ms/m), and the current pedometer mode (such as walking or running).
Heart RateProvides the number of beats per minute, also indicates if the heart rate sensor is fully locked onto the wearer’s heart rate.
PedometerProvides the total number of steps the wearer has taken.
Skin TemperatureProvides the current skin temperature of the wearer in degrees Celsius.
UVProvides the current ultra violet radiation exposure intensity.
Device ContactProvides a way to let the developer know if someone is currently wearing the device.
CaloriesProvides the total number of calories the wearer has burned.
Altimeter (Microsoft Band 2 only)Provides current elevation data like total gain/loss, steps ascended/descended, flights ascended/descended, and elevation rate.
Ambient Light (Microsoft Band 2 only)Provides the current light intensity (illuminance) in lux (Lumes/m²).
Barometer (Microsoft Band 2 only)Provides the current raw air pressure in hPa (hectopascals) and raw temperature in degrees Celsius.
Galvanic Skin Response (GSR) (Microsoft Band 2 only)Provides the current skin resistance of the wearer in kohms.
RR Interval (Microsoft Band 2 only)Provides the interval in seconds between the last two continuous heart beats.
The SDK provides support for Band sensors as subscriptions. The subscriptions are managed by the Band Sensor Manager on the Band Client. For each hardware sensor, the Sensor Manager allows the application developer to create a subscription.
A subscription is essentially a platform-specific callback mechanism. It will deliver data at intervals specific to the sensor. Some sensors have dynamic intervals, such as the Accelerometer (on Android and Windows), that allow developers to specify at what rate they want data to be delivered. Other sensors deliver data only as their values change.
It’s important to understand that subscribing to sensor data effects the battery life of the Band. The use of each sensor requires a power draw (some more than others). Developers should subscribe to sensor data only when the data is absolutely necessary for their applications.
On Windows and iOS, constant connectivity is required to maintain a subscription. If the Band loses connectivity with the phone, the subscription is stopped and it’s not automatically enabled upon reconnection.
Some sensor subscriptions require user consent. The subscription permission model is as follows.
1. Permission is granted on a per-sensor basis.
2. Applications can request the permission status of a particular sensor. The status can be Granted, Declined, or Not Specified. If permission is Granted, applications can simply start the subscription.
3. Applications can request to show the permission dialog to ask the user for permission if the permission is Not Specified or Declined.
4. If the permission is Not Specified or Declined and the application requests that the subscription be enabled the subscription, the request to enable the subscription will fail.
Note: At this time, only heart rate and RR Interval sensor subscriptions require an explicit user consent before they can be started.
The SDK provides support for Band sensors as subscriptions. The subscriptions are managed by the Band Sensor Manager on the Band Client. For each hardware sensor, the Sensor Manager allows the application developer to create a subscription.
A subscription is essentially a platform-specific callback mechanism. It will deliver data at intervals specific to the sensor. Some sensors have dynamic intervals, such as the Accelerometer (on Android and Windows), that allow developers to specify at what rate they want data to be delivered. Other sensors deliver data only as their values change.
It’s important to understand that subscribing to sensor data effects the battery life of the Band. The use of each sensor requires a power draw (some more than others). Developers should subscribe to sensor data only when the data is absolutely necessary for their applications.
On Windows and iOS, constant connectivity is required to maintain a subscription. If the Band loses connectivity with the phone, the subscription is stopped and it’s not automatically enabled upon reconnection.
Some sensor subscriptions require user consent. The subscription permission model is as follows.
1. Permission is granted on a per-sensor basis.
2. Applications can request the permission status of a particular sensor. The status can be Granted, Declined, or Not Specified. If permission is Granted, applications can simply start the subscription.
3. Applications can request to show the permission dialog to ask the user for permission if the permission is Not Specified or Declined.
4. If the permission is Not Specified or Declined and the application requests that the subscription be enabled the subscription, the request to enable the subscription will fail.
Note: At this time, only heart rate and RR Interval sensor subscriptions require an explicit user consent before they can be started.