Skip to Content
Azure IoT Development Cookbook
book

Azure IoT Development Cookbook

by Yatish Patil
August 2017
Intermediate to advanced
254 pages
6h 10m
English
Packt Publishing
Content preview from Azure IoT Development Cookbook

How to do it...

In this section we are going to build the IoT protocol gateway:

  1. Connection with IoT Hub:
{  cmd: 'connect',  protocolId: 'MQTT', // Or 'MQIsdp' in MQTT 3.1.1  clean: true, // Can also be false  clientId: 'myFirstDevice',       // Device Id registered in IoT Hub  keepalive: 0, // Seconds which can be any positive number, with 0 as the default setting  username: 'IoTHubCookBook.azure-devices.net/myFirstDevice/api-version=2016-11-14', // 'hostname/deviceId/version'  password: 'LKCXsBKMKISTjr3ii08UXgIpELxy8/38EiMuxNAiqek=', // SharedAccessKey  will: {    topic: 'devices/myFirstDevice/messages/events/'  }}
  1. Process the message ingested into IoT Hub:
 readonly string iotHubD2cEndpoint = "messages/events";readonly string iotHubD2cEndpoint = "messages/events"; ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Azure Serverless Computing Cookbook - Third Edition

Azure Serverless Computing Cookbook - Third Edition

Praveen Kumar Sreeram, Kasam Shaikh, Greg Leonardo

Publisher Resources

ISBN: 9781787283008Supplemental Content