Temperature sensor anomaly IoTHub sample

Dependencies:   C12832 EthernetInterface LM75B NTPClient iothub_client iothub_http_transport mbed-rtos mbed serializer wolfSSL azure_c_shared_utility

This sample showcases the usage of Azure IoT client libraries to build an application sample that uploads temperature data and reacts to an alert for a temperature anomaly sent by a cloud service.

Committer:
AzureIoTClient
Date:
Sun Jan 08 11:15:50 2017 -0800
Revision:
48:7eb13ffeeedc
Parent:
19:e6a8e462f730
Child:
51:e16d12ed5c87
1.1.3

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AzureIoTClient 19:e6a8e462f730 1 // Copyright (c) Microsoft. All rights reserved.
AzureIoTClient 19:e6a8e462f730 2 // Licensed under the MIT license. See LICENSE file in the project root for full license information.
AzureIoTClient 19:e6a8e462f730 3
AzureIoTClient 19:e6a8e462f730 4 /* This file contains certs needed to communicate with Azure (IoT) */
AzureIoTClient 19:e6a8e462f730 5
AzureIoTClient 48:7eb13ffeeedc 6 #include "certs.h"
AzureIoTClient 48:7eb13ffeeedc 7
AzureIoTClient 19:e6a8e462f730 8 const char certificates[] =
AzureIoTClient 19:e6a8e462f730 9 /* Baltimore */
AzureIoTClient 19:e6a8e462f730 10 "-----BEGIN CERTIFICATE-----\r\n"
AzureIoTClient 19:e6a8e462f730 11 "MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJ\r\n"
AzureIoTClient 19:e6a8e462f730 12 "RTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYD\r\n"
AzureIoTClient 19:e6a8e462f730 13 "VQQDExlCYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoX\r\n"
AzureIoTClient 19:e6a8e462f730 14 "DTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMCSUUxEjAQBgNVBAoTCUJhbHRpbW9y\r\n"
AzureIoTClient 19:e6a8e462f730 15 "ZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFsdGltb3JlIEN5YmVy\r\n"
AzureIoTClient 19:e6a8e462f730 16 "VHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKMEuyKr\r\n"
AzureIoTClient 19:e6a8e462f730 17 "mD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjr\r\n"
AzureIoTClient 19:e6a8e462f730 18 "IZ3AQSsBUnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeK\r\n"
AzureIoTClient 19:e6a8e462f730 19 "mpYcqWe4PwzV9/lSEy/CG9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSu\r\n"
AzureIoTClient 19:e6a8e462f730 20 "XmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9XbIGevOF6uvUA65ehD5f/xXtabz5OTZy\r\n"
AzureIoTClient 19:e6a8e462f730 21 "dc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjprl3RjM71oGDHweI12v/ye\r\n"
AzureIoTClient 19:e6a8e462f730 22 "jl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoIVDaGezq1\r\n"
AzureIoTClient 19:e6a8e462f730 23 "BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3\r\n"
AzureIoTClient 19:e6a8e462f730 24 "DQEBBQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT92\r\n"
AzureIoTClient 19:e6a8e462f730 25 "9hkTI7gQCvlYpNRhcL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3Wgx\r\n"
AzureIoTClient 19:e6a8e462f730 26 "jkzSswF07r51XgdIGn9w/xZchMB5hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0\r\n"
AzureIoTClient 19:e6a8e462f730 27 "Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsaY71k5h+3zvDyny67G7fyUIhz\r\n"
AzureIoTClient 19:e6a8e462f730 28 "ksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9HRCwBXbsdtTLS\r\n"
AzureIoTClient 19:e6a8e462f730 29 "R9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp\r\n"
AzureIoTClient 19:e6a8e462f730 30 "-----END CERTIFICATE-----\r\n"
AzureIoTClient 19:e6a8e462f730 31 /* MSIT */
AzureIoTClient 19:e6a8e462f730 32 "-----BEGIN CERTIFICATE-----\r\n"
AzureIoTClient 19:e6a8e462f730 33 "MIIFhjCCBG6gAwIBAgIEByeaqTANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJJ\r\n"
AzureIoTClient 19:e6a8e462f730 34 "RTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYD\r\n"
AzureIoTClient 19:e6a8e462f730 35 "VQQDExlCYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTEzMTIxOTIwMDczMloX\r\n"
AzureIoTClient 19:e6a8e462f730 36 "DTE3MTIxOTIwMDY1NVowgYsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5n\r\n"
AzureIoTClient 19:e6a8e462f730 37 "dG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9y\r\n"
AzureIoTClient 19:e6a8e462f730 38 "YXRpb24xFTATBgNVBAsTDE1pY3Jvc29mdCBJVDEeMBwGA1UEAxMVTWljcm9zb2Z0\r\n"
AzureIoTClient 19:e6a8e462f730 39 "IElUIFNTTCBTSEEyMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA0eg3\r\n"
AzureIoTClient 19:e6a8e462f730 40 "p3aKcEsZ8CA3CSQ3f+r7eOYFumqtTicN/HJq2WwhxGQRlXMQClwle4hslAT9x9uu\r\n"
AzureIoTClient 19:e6a8e462f730 41 "e9xKCLM+FvHQrdswbdcaHlK1PfBHGQPifaa9VxM/VOo6o7F3/ELwY0lqkYAuMEnA\r\n"
AzureIoTClient 19:e6a8e462f730 42 "iusrr/466wddBvfp/YQOkb0JICnobl0JzhXT5+/bUOtE7xhXqwQdvDH593sqE8/R\r\n"
AzureIoTClient 19:e6a8e462f730 43 "PVGvG8W1e+ew/FO7mudj3kEztkckaV24Rqf/ravfT3p4JSchJjTKAm43UfDtWBpg\r\n"
AzureIoTClient 19:e6a8e462f730 44 "lPbEk9jdMCQl1xzrGZQ1XZOyrqopg3PEdFkFUmed2mdROQU6NuryHnYrFK7sPfkU\r\n"
AzureIoTClient 19:e6a8e462f730 45 "mYsHbrznDFberL6u23UykJ5jvXS/4ArK+DSWZ4TN0UI4eMeZtgzOtg/pG8v0Wb4R\r\n"
AzureIoTClient 19:e6a8e462f730 46 "DsssMsj6gylkeTyLS/AydGzzk7iWa11XWmjBzAx5ihne9UkCXgiAAYkMMs3S1pbV\r\n"
AzureIoTClient 19:e6a8e462f730 47 "S6Dz7L+r9H2zobl82k7X5besufIlXwHLjJaoKK7BM1r2PwiQ3Ov/OdgmyBKdHJqq\r\n"
AzureIoTClient 19:e6a8e462f730 48 "qcAWjobtZ1KWAH8Nkj092XA25epCbx+uleVbXfjQOsfU3neG0PyeTuLiuKloNwnE\r\n"
AzureIoTClient 19:e6a8e462f730 49 "OeOFuInzH263bR9KLxgJb95KAY8Uybem7qdjnzOkVHxCg2i4pd+/7LkaXRM72a1o\r\n"
AzureIoTClient 19:e6a8e462f730 50 "/SAKVZEhZPnXEwGgCF1ZiRtEr6SsxwUQ+kFKqPsCAwEAAaOCASAwggEcMBIGA1Ud\r\n"
AzureIoTClient 19:e6a8e462f730 51 "EwEB/wQIMAYBAf8CAQAwUwYDVR0gBEwwSjBIBgkrBgEEAbE+AQAwOzA5BggrBgEF\r\n"
AzureIoTClient 19:e6a8e462f730 52 "BQcCARYtaHR0cDovL2N5YmVydHJ1c3Qub21uaXJvb3QuY29tL3JlcG9zaXRvcnku\r\n"
AzureIoTClient 19:e6a8e462f730 53 "Y2ZtMA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUH\r\n"
AzureIoTClient 19:e6a8e462f730 54 "AwIwHwYDVR0jBBgwFoAU5Z1ZMIJHWMys+ghUNoZ7OrUETfAwQgYDVR0fBDswOTA3\r\n"
AzureIoTClient 19:e6a8e462f730 55 "oDWgM4YxaHR0cDovL2NkcDEucHVibGljLXRydXN0LmNvbS9DUkwvT21uaXJvb3Qy\r\n"
AzureIoTClient 19:e6a8e462f730 56 "MDI1LmNybDAdBgNVHQ4EFgQUUa8kJpz0aCJXgCYrO0ZiFXsezKUwDQYJKoZIhvcN\r\n"
AzureIoTClient 19:e6a8e462f730 57 "AQELBQADggEBAHaFxSMxH7Rz6qC8pe3fRUNqf2kgG4Cy+xzdqn+I0zFBNvf7+2ut\r\n"
AzureIoTClient 19:e6a8e462f730 58 "mIx4H50RZzrNS+yovJ0VGcQ7C6eTzuj8nVvoH8tWrnZDK8cTUXdBqGZMX6fR16p1\r\n"
AzureIoTClient 19:e6a8e462f730 59 "xRspTMn0baFeoYWTFsLLO6sUfUT92iUphir+YyDK0gvCNBW7r1t/iuCq7UWm6nnb\r\n"
AzureIoTClient 19:e6a8e462f730 60 "2DVmVEPeNzPR5ODNV8pxsH3pFndk6FmXudUu0bSR2ndx80oPSNI0mWCVN6wfAc0Q\r\n"
AzureIoTClient 19:e6a8e462f730 61 "negqpSDHUJuzbEl4K1iSZIm4lTaoNKrwQdKVWiRUl01uBcSVrcR6ozn7eQaKm6ZP\r\n"
AzureIoTClient 19:e6a8e462f730 62 "2SL6RE4288kPpjnngLJev7050UblVUfbvG4=\r\n"
AzureIoTClient 19:e6a8e462f730 63 "-----END CERTIFICATE-----\r\n"
AzureIoTClient 19:e6a8e462f730 64 /* *.azure-devices.net */
AzureIoTClient 19:e6a8e462f730 65 "-----BEGIN CERTIFICATE-----\r\n"
AzureIoTClient 19:e6a8e462f730 66 "MIIGcjCCBFqgAwIBAgITWgABtrNbz7vBeV0QWwABAAG2szANBgkqhkiG9w0BAQsF\r\n"
AzureIoTClient 19:e6a8e462f730 67 "ADCBizELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcT\r\n"
AzureIoTClient 19:e6a8e462f730 68 "B1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEVMBMGA1UE\r\n"
AzureIoTClient 19:e6a8e462f730 69 "CxMMTWljcm9zb2Z0IElUMR4wHAYDVQQDExVNaWNyb3NvZnQgSVQgU1NMIFNIQTIw\r\n"
AzureIoTClient 19:e6a8e462f730 70 "HhcNMTUwODI3MDMxODA0WhcNMTcwODI2MDMxODA0WjAeMRwwGgYDVQQDDBMqLmF6\r\n"
AzureIoTClient 19:e6a8e462f730 71 "dXJlLWRldmljZXMubmV0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA\r\n"
AzureIoTClient 19:e6a8e462f730 72 "nXC/qBUdlnfIm5K3HYu0o/Mb5tNNcsr0xy4Do0Puwq2W1tz0ZHvIIS9VOANhkNCb\r\n"
AzureIoTClient 19:e6a8e462f730 73 "VyOncnP6dvmM/rYYKth/NQ8RUiZOYlROZ0SYC8cvxq9WOln4GXtEU8vNVqJbYrJj\r\n"
AzureIoTClient 19:e6a8e462f730 74 "rPMHfxqLzTE/0ZnQffnDT3iMUE9kFLHow0YgaSRU0KZsc9KAROmzBzu+QIB1WGKX\r\n"
AzureIoTClient 19:e6a8e462f730 75 "D7CN361tG1UuN68Bz7MSnbgk98Z+DjDxfusoDhiiy/Y9MLOJMt4WIy5BqL3lfLnn\r\n"
AzureIoTClient 19:e6a8e462f730 76 "r+JLqmpiFuyVUDacFQDprYJ1/AFgcsKYu/ydmASARPzqJhOGaC2sZP0U5oBOoBzI\r\n"
AzureIoTClient 19:e6a8e462f730 77 "bz4tfn8Bi0kJKmS53mQt+wIDAQABo4ICOTCCAjUwCwYDVR0PBAQDAgSwMB0GA1Ud\r\n"
AzureIoTClient 19:e6a8e462f730 78 "JQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAdBgNVHQ4EFgQUKpYehBSNA53Oxivn\r\n"
AzureIoTClient 19:e6a8e462f730 79 "aLCz3+eFUJ0wXQYDVR0RBFYwVIITKi5henVyZS1kZXZpY2VzLm5ldIIaKi5hbXFw\r\n"
AzureIoTClient 19:e6a8e462f730 80 "d3MuYXp1cmUtZGV2aWNlcy5uZXSCISouc3UubWFuYWdlbWVudC1henVyZS1kZXZp\r\n"
AzureIoTClient 19:e6a8e462f730 81 "Y2VzLm5ldDAfBgNVHSMEGDAWgBRRryQmnPRoIleAJis7RmIVex7MpTB9BgNVHR8E\r\n"
AzureIoTClient 19:e6a8e462f730 82 "djB0MHKgcKBuhjZodHRwOi8vbXNjcmwubWljcm9zb2Z0LmNvbS9wa2kvbXNjb3Jw\r\n"
AzureIoTClient 19:e6a8e462f730 83 "L2NybC9tc2l0d3d3Mi5jcmyGNGh0dHA6Ly9jcmwubWljcm9zb2Z0LmNvbS9wa2kv\r\n"
AzureIoTClient 19:e6a8e462f730 84 "bXNjb3JwL2NybC9tc2l0d3d3Mi5jcmwwcAYIKwYBBQUHAQEEZDBiMDwGCCsGAQUF\r\n"
AzureIoTClient 19:e6a8e462f730 85 "BzAChjBodHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtpL21zY29ycC9tc2l0d3d3\r\n"
AzureIoTClient 19:e6a8e462f730 86 "Mi5jcnQwIgYIKwYBBQUHMAGGFmh0dHA6Ly9vY3NwLm1zb2NzcC5jb20wTgYDVR0g\r\n"
AzureIoTClient 19:e6a8e462f730 87 "BEcwRTBDBgkrBgEEAYI3KgEwNjA0BggrBgEFBQcCARYoaHR0cDovL3d3dy5taWNy\r\n"
AzureIoTClient 19:e6a8e462f730 88 "b3NvZnQuY29tL3BraS9tc2NvcnAvY3BzADAnBgkrBgEEAYI3FQoEGjAYMAoGCCsG\r\n"
AzureIoTClient 19:e6a8e462f730 89 "AQUFBwMBMAoGCCsGAQUFBwMCMA0GCSqGSIb3DQEBCwUAA4ICAQCrjzOSW+X6v+UC\r\n"
AzureIoTClient 19:e6a8e462f730 90 "u+JkYyuypXN14pPLcGFbknJWj6DAyFWXKC8ihIYdtf/szWIO7VooplSTZ05u/JYu\r\n"
AzureIoTClient 19:e6a8e462f730 91 "ZYh7fAw27qih9CLhhfncXi5yzjgLMlD0mlbORvMJR/nMl7Yh1ki9GyLnpOqMmO+E\r\n"
AzureIoTClient 19:e6a8e462f730 92 "yTpOiE07Uyt2uWelLHjMY8kwy2bSRXIp7/+A8qHRaIIdXNtAKIK5jo068BJpo77h\r\n"
AzureIoTClient 19:e6a8e462f730 93 "4PljCb9JFdEt6sAKKuaP86Y+8oRZ7YzU4TLDCiK8P8n/gQXH0vvhOE/O0n7gWPqB\r\n"
AzureIoTClient 19:e6a8e462f730 94 "n8KxsnRicop6tB6GZy32Stn8w0qktmQNXOGU+hp8OL6irULWZw/781po6d78nmwk\r\n"
AzureIoTClient 19:e6a8e462f730 95 "1IFl2TB4+jgyblvJdTM0rx8vPf3F2O2kgsRNs9M5qCI7m+he43Bhue0Fj/h3oIIo\r\n"
AzureIoTClient 19:e6a8e462f730 96 "Qx7X/uqc8j3VTNE9hf2A4wksSRgRydjAYoo+bduNagC5s7Eucb4mBG0MMk7HAQU9\r\n"
AzureIoTClient 19:e6a8e462f730 97 "m/gyaxqth6ygDLK58wojSV0i4RiU01qZkHzqIWv5FhhMjbFwyKEc6U35Ps7kP/1O\r\n"
AzureIoTClient 19:e6a8e462f730 98 "fdGm13ONaYqDl44RyFsLFFiiDYxZFDSsKM0WDxbl9ULAlVc3WR85kEBK6I+pSQj+\r\n"
AzureIoTClient 19:e6a8e462f730 99 "7/Z5z2zTz9qOFWgB15SegTbjSR7uk9mEVnj9KDlGtG8W1or0EGrrEDP2CMsp0oEj\r\n"
AzureIoTClient 19:e6a8e462f730 100 "VTJbZAxEaZ3cVCKva5sQUxFMjwG32g==\r\n"
AzureIoTClient 19:e6a8e462f730 101 "-----END CERTIFICATE-----\r\n";