Skip to content

Commit d5fe1cd

Browse files
authored
DPS MQTT support (#131)
1 parent 2fac897 commit d5fe1cd

37 files changed

+1497
-337
lines changed

MXChip/AZ3166/app/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ set(SOURCES
1010

1111
stm32cubef4/stm32f4xx_hal_msp.c
1212

13+
azure_config.h
1314
nx_client.c
1415
mqtt.c
1516
board_init.c

MXChip/AZ3166/app/azure_config.h

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* Copyright (c) Microsoft Corporation.
22
Licensed under the MIT License. */
3-
3+
44
#ifndef _AZURE_CONFIG_H
55
#define _AZURE_CONFIG_H
66

@@ -15,23 +15,34 @@ typedef enum
1515
// ----------------------------------------------------------------------------
1616
// WiFi connection information
1717
// ----------------------------------------------------------------------------
18-
#define WIFI_SSID ""
19-
#define WIFI_PASSWORD ""
20-
21-
// WIFI Security as defined in lib/wiced_sdk/43xxx_Wi-Fi/wwd_constants.h
22-
#define WIFI_SECURITY WPA2_PSK_AES
18+
#define WIFI_SSID ""
19+
#define WIFI_PASSWORD ""
20+
#define WIFI_MODE WPA2_PSK_AES
2321

2422
// ----------------------------------------------------------------------------
2523
// Azure IoT Hub Connection Transport
2624
// Define this to use the nx client, otherwise MQTT
2725
// ----------------------------------------------------------------------------
28-
// #define USE_NX_CLIENT_PREVIEW
26+
//#define USE_NX_CLIENT_PREVIEW
27+
28+
// ----------------------------------------------------------------------------
29+
// Azure IoT Dynamic Provisioning Service
30+
// Define this to use the DPS service, otherwise direct IoT Hub
31+
// ----------------------------------------------------------------------------
32+
//#define ENABLE_DPS
33+
34+
// ----------------------------------------------------------------------------
35+
// Azure IoT Hub config
36+
// ----------------------------------------------------------------------------
37+
#define IOT_HUB_HOSTNAME ""
38+
#define IOT_DEVICE_ID ""
39+
#define IOT_PRIMARY_KEY ""
2940

3041
// ----------------------------------------------------------------------------
31-
// Azure IoT Device information
42+
// Azure IoT DPS config
3243
// ----------------------------------------------------------------------------
33-
#define IOT_HUB_HOSTNAME ""
34-
#define IOT_DEVICE_ID ""
35-
#define IOT_PRIMARY_KEY ""
44+
#define IOT_DPS_ENDPOINT "global.azure-devices-provisioning.net"
45+
#define IOT_DPS_ID_SCOPE ""
46+
#define IOT_DPS_REGISTRATION_ID ""
3647

3748
#endif // _AZURE_CONFIG_H

0 commit comments

Comments
 (0)