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:
Thu Oct 04 09:20:18 2018 -0700
Revision:
85:2b4adf7a7a8c
Parent:
84:ba0b84456d5f
1.2.10

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 84:ba0b84456d5f 8 const char certificates[] =
AzureIoTClient 54:ddd0007157a9 9 /* DigiCert Baltimore Root */
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 54:ddd0007157a9 30 "-----END CERTIFICATE-----\r\n"
AzureIoTClient 54:ddd0007157a9 31 /*DigiCert Global Root CA*/
AzureIoTClient 54:ddd0007157a9 32 "-----BEGIN CERTIFICATE-----\r\n"
AzureIoTClient 54:ddd0007157a9 33 "MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBh\r\n"
AzureIoTClient 54:ddd0007157a9 34 "MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3\r\n"
AzureIoTClient 54:ddd0007157a9 35 "d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBD\r\n"
AzureIoTClient 54:ddd0007157a9 36 "QTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAwMDAwMDBaMGExCzAJBgNVBAYTAlVT\r\n"
AzureIoTClient 54:ddd0007157a9 37 "MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j\r\n"
AzureIoTClient 54:ddd0007157a9 38 "b20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkqhkiG\r\n"
AzureIoTClient 54:ddd0007157a9 39 "9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsB\r\n"
AzureIoTClient 54:ddd0007157a9 40 "CSDMAZOnTjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97\r\n"
AzureIoTClient 54:ddd0007157a9 41 "nh6Vfe63SKMI2tavegw5BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt\r\n"
AzureIoTClient 54:ddd0007157a9 42 "43C/dxC//AH2hdmoRBBYMql1GNXRor5H4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7P\r\n"
AzureIoTClient 54:ddd0007157a9 43 "T19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y7vrTC0LUq7dBMtoM1O/4\r\n"
AzureIoTClient 54:ddd0007157a9 44 "gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQABo2MwYTAO\r\n"
AzureIoTClient 54:ddd0007157a9 45 "BgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbR\r\n"
AzureIoTClient 54:ddd0007157a9 46 "TLtm8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUw\r\n"
AzureIoTClient 54:ddd0007157a9 47 "DQYJKoZIhvcNAQEFBQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/Esr\r\n"
AzureIoTClient 54:ddd0007157a9 48 "hMAtudXH/vTBH1jLuG2cenTnmCmrEbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg\r\n"
AzureIoTClient 54:ddd0007157a9 49 "06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIttep3Sp+dWOIrWcBAI+0tKIJF\r\n"
AzureIoTClient 54:ddd0007157a9 50 "PnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886UAb3LujEV0ls\r\n"
AzureIoTClient 54:ddd0007157a9 51 "YSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk\r\n"
AzureIoTClient 54:ddd0007157a9 52 "CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=\r\n"
AzureIoTClient 54:ddd0007157a9 53 "-----END CERTIFICATE-----\r\n"
AzureIoTClient 54:ddd0007157a9 54 /*D-TRUST Root Class 3 CA 2 2009*/
AzureIoTClient 54:ddd0007157a9 55 "-----BEGIN CERTIFICATE-----\r\n"
AzureIoTClient 54:ddd0007157a9 56 "MIIEMzCCAxugAwIBAgIDCYPzMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNVBAYTAkRF\r\n"
AzureIoTClient 54:ddd0007157a9 57 "MRUwEwYDVQQKDAxELVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBD\r\n"
AzureIoTClient 54:ddd0007157a9 58 "bGFzcyAzIENBIDIgMjAwOTAeFw0wOTExMDUwODM1NThaFw0yOTExMDUwODM1NTha\r\n"
AzureIoTClient 54:ddd0007157a9 59 "ME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQKDAxELVRydXN0IEdtYkgxJzAlBgNVBAMM\r\n"
AzureIoTClient 54:ddd0007157a9 60 "HkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTCCASIwDQYJKoZIhvcNAQEB\r\n"
AzureIoTClient 54:ddd0007157a9 61 "BQADggEPADCCAQoCggEBANOySs96R+91myP6Oi/WUEWJNTrGa9v+2wBoqOADER03\r\n"
AzureIoTClient 54:ddd0007157a9 62 "UAifTUpolDWzU9GUY6cgVq/eUXjsKj3zSEhQPgrfRlWLJ23DEE0NkVJD2IfgXU42\r\n"
AzureIoTClient 54:ddd0007157a9 63 "tSHKXzlABF9bfsyjxiupQB7ZNoTWSPOSHjRGICTBpFGOShrvUD9pXRl/RcPHAY9R\r\n"
AzureIoTClient 54:ddd0007157a9 64 "ySPocq60vFYJfxLLHLGvKZAKyVXMD9O0Gu1HNVpK7ZxzBCHQqr0ME7UAyiZsxGsM\r\n"
AzureIoTClient 54:ddd0007157a9 65 "lFqVlNpQmvH/pStmMaTJOKDfHR+4CS7zp+hnUquVH+BGPtikw8paxTGA6Eian5Rp\r\n"
AzureIoTClient 54:ddd0007157a9 66 "/hnd2HN8gcqW3o7tszIFZYQ05ub9VxC1X3a/L7AQDcUCAwEAAaOCARowggEWMA8G\r\n"
AzureIoTClient 54:ddd0007157a9 67 "A1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFP3aFMSfMN4hvR5COfyrYyNJ4PGEMA4G\r\n"
AzureIoTClient 54:ddd0007157a9 68 "A1UdDwEB/wQEAwIBBjCB0wYDVR0fBIHLMIHIMIGAoH6gfIZ6bGRhcDovL2RpcmVj\r\n"
AzureIoTClient 54:ddd0007157a9 69 "dG9yeS5kLXRydXN0Lm5ldC9DTj1ELVRSVVNUJTIwUm9vdCUyMENsYXNzJTIwMyUy\r\n"
AzureIoTClient 54:ddd0007157a9 70 "MENBJTIwMiUyMDIwMDksTz1ELVRydXN0JTIwR21iSCxDPURFP2NlcnRpZmljYXRl\r\n"
AzureIoTClient 54:ddd0007157a9 71 "cmV2b2NhdGlvbmxpc3QwQ6BBoD+GPWh0dHA6Ly93d3cuZC10cnVzdC5uZXQvY3Js\r\n"
AzureIoTClient 54:ddd0007157a9 72 "L2QtdHJ1c3Rfcm9vdF9jbGFzc18zX2NhXzJfMjAwOS5jcmwwDQYJKoZIhvcNAQEL\r\n"
AzureIoTClient 54:ddd0007157a9 73 "BQADggEBAH+X2zDI36ScfSF6gHDOFBJpiBSVYEQBrLLpME+bUMJm2H6NMLVwMeni\r\n"
AzureIoTClient 54:ddd0007157a9 74 "acfzcNsgFYbQDfC+rAF1hM5+n02/t2A7nPPKHeJeaNijnZflQGDSNiH+0LS4F9p0\r\n"
AzureIoTClient 54:ddd0007157a9 75 "o3/U37CYAqxva2ssJSRyoWXuJVrl5jLn8t+rSfrzkGkj2wTZ51xY/GXUl77M/C4K\r\n"
AzureIoTClient 54:ddd0007157a9 76 "zCUqNQT4YJEVdT1B/yMfGchs64JTBKbkTCJNjYy6zltz7GRUUG3RnFX7acM2w4y8\r\n"
AzureIoTClient 54:ddd0007157a9 77 "PIWmawomDeCTmGCufsYkl4phX5GOZpIJhzbNi5stPvZR1FDUWSi9g/LMKHtThm3Y\r\n"
AzureIoTClient 54:ddd0007157a9 78 "Johw1+qRzT65ysCQblrGXnRl11z+o+I=\r\n"
AzureIoTClient 54:ddd0007157a9 79 "-----END CERTIFICATE-----\r\n"
AzureIoTClient 54:ddd0007157a9 80 /*WoSign*/
AzureIoTClient 54:ddd0007157a9 81 "-----BEGIN CERTIFICATE-----\r\n"
AzureIoTClient 54:ddd0007157a9 82 "MIIFdjCCA16gAwIBAgIQXmjWEXGUY1BWAGjzPsnFkTANBgkqhkiG9w0BAQUFADBV\r\n"
AzureIoTClient 54:ddd0007157a9 83 "MQswCQYDVQQGEwJDTjEaMBgGA1UEChMRV29TaWduIENBIExpbWl0ZWQxKjAoBgNV\r\n"
AzureIoTClient 54:ddd0007157a9 84 "BAMTIUNlcnRpZmljYXRpb24gQXV0aG9yaXR5IG9mIFdvU2lnbjAeFw0wOTA4MDgw\r\n"
AzureIoTClient 54:ddd0007157a9 85 "MTAwMDFaFw0zOTA4MDgwMTAwMDFaMFUxCzAJBgNVBAYTAkNOMRowGAYDVQQKExFX\r\n"
AzureIoTClient 54:ddd0007157a9 86 "b1NpZ24gQ0EgTGltaXRlZDEqMCgGA1UEAxMhQ2VydGlmaWNhdGlvbiBBdXRob3Jp\r\n"
AzureIoTClient 54:ddd0007157a9 87 "dHkgb2YgV29TaWduMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAvcqN\r\n"
AzureIoTClient 54:ddd0007157a9 88 "rLiRFVaXe2tcesLea9mhsMMQI/qnobLMMfo+2aYpbxY94Gv4uEBf2zmoAHqLoE1U\r\n"
AzureIoTClient 54:ddd0007157a9 89 "fcIiePyOCbiohdfMlZdLdNiefvAA5A6JrkkoRBoQmTIPJYhTpA2zDxIIFgsDcScc\r\n"
AzureIoTClient 54:ddd0007157a9 90 "f+Hb0v1naMQFXQoOXXDX2JegvFNBmpGN9J42Znp+VsGQX+axaCA2pIwkLCxHC1l2\r\n"
AzureIoTClient 54:ddd0007157a9 91 "ZjC1vt7tj/id07sBMOby8w7gLJKA84X5KIq0VC6a7fd2/BVoFutKbOsuEo/Uz/4M\r\n"
AzureIoTClient 54:ddd0007157a9 92 "x1wdC34FMr5esAkqQtXJTpCzWQ27en7N1QhatH/YHGkR+ScPewavVIMYe+HdVHpR\r\n"
AzureIoTClient 54:ddd0007157a9 93 "aG53/Ma/UkpmRqGyZxq7o093oL5d//xWC0Nyd5DKnvnyOfUNqfTq1+ezEC8wQjch\r\n"
AzureIoTClient 54:ddd0007157a9 94 "zDBwyYaYD8xYTYO7feUapTeNtqwylwA6Y3EkHp43xP901DfA4v6IRmAR3Qg/UDar\r\n"
AzureIoTClient 54:ddd0007157a9 95 "uHqklWJqbrDKaiFaafPz+x1wOZXzp26mgYmhiMU7ccqjUu6Du/2gd/Tkb+dC221K\r\n"
AzureIoTClient 54:ddd0007157a9 96 "mYo0SLwX3OSACCK28jHAPwQ+658geda4BmRkAjHXqc1S+4RFaQkAKtxVi8QGRkvA\r\n"
AzureIoTClient 54:ddd0007157a9 97 "Sh0JWzko/amrzgD5LkhLJuYwTKVYyrREgk/nkR4zw7CT/xH8gdLKH3Ep3XZPkiWv\r\n"
AzureIoTClient 54:ddd0007157a9 98 "HYG3Dy+MwwbMLyejSuQOmbp8HkUff6oZRZb9/D0CAwEAAaNCMEAwDgYDVR0PAQH/\r\n"
AzureIoTClient 54:ddd0007157a9 99 "BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFOFmzw7R8bNLtwYgFP6H\r\n"
AzureIoTClient 54:ddd0007157a9 100 "EtX2/vs+MA0GCSqGSIb3DQEBBQUAA4ICAQCoy3JAsnbBfnv8rWTjMnvMPLZdRtP1\r\n"
AzureIoTClient 54:ddd0007157a9 101 "LOJwXcgu2AZ9mNELIaCJWSQBnfmvCX0KI4I01fx8cpm5o9dU9OpScA7F9dY74ToJ\r\n"
AzureIoTClient 54:ddd0007157a9 102 "MuYhOZO9sxXqT2r09Ys/L3yNWC7F4TmgPsc9SnOeQHrAK2GpZ8nzJLmzbVUsWh2e\r\n"
AzureIoTClient 54:ddd0007157a9 103 "JXLOC62qx1ViC777Y7NhRCOjy+EaDveaBk3e1CNOIZZbOVtXHS9dCF4Jef98l7VN\r\n"
AzureIoTClient 54:ddd0007157a9 104 "g64N1uajeeAz0JmWAjCnPv/So0M/BVoG6kQC2nz4SNAzqfkHx5Xh9T71XXG68pWp\r\n"
AzureIoTClient 54:ddd0007157a9 105 "dIhhWeO/yloTunK0jF02h+mmxTwTv97QRCbut+wucPrXnbes5cVAWubXbHssw1ab\r\n"
AzureIoTClient 54:ddd0007157a9 106 "R80LzvobtCHXt2a49CUwi1wNuepnsvRtrtWhnk/Yn+knArAdBtaP4/tIEp9/EaEQ\r\n"
AzureIoTClient 54:ddd0007157a9 107 "PkxROpaw0RPxx9gmrjrKkcRpnd8BKWRRb2jaFOwIQZeQjdCygPLPwj2/kWjFgGce\r\n"
AzureIoTClient 54:ddd0007157a9 108 "xGATVdVhmVd8upUPYUk6ynW8yQqTP2cOEvIo4jEbwFcW3wh8GcF+Dx+FHgo2fFt+\r\n"
AzureIoTClient 54:ddd0007157a9 109 "J7x6v+Db9NpSvd4MVHAxkUOVyLzwPt0JfjBkUO1/AaQzZ01oT74V77D2AhGiGxMl\r\n"
AzureIoTClient 54:ddd0007157a9 110 "OtzCWfHjXEa7ZywCRuoeSKbmW9m1vFGikpbbqsY3Iqb+zCB0oy2pLmvLwIIRIbWT\r\n"
AzureIoTClient 54:ddd0007157a9 111 "ee5Ehr7XHuQe+w==\r\n"
AzureIoTClient 54:ddd0007157a9 112 "-----END CERTIFICATE-----\r\n"
AzureIoTClient 54:ddd0007157a9 113
AzureIoTClient 54:ddd0007157a9 114 ;