You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/iot-dps/understand-azure-iot-dps-mqtt-support.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,13 +20,13 @@ DPS is not a full-featured MQTT broker and does not support all the behaviors sp
20
20
All device communication with DPS must be secured using TLS/SSL. Therefore, DPS doesn’t support non-secure connections over port 1883.
21
21
22
22
> [!NOTE]
23
-
> DPS does not currently support devices using TPM [attestation mechanism](https://docs.microsoft.com/en-us/azure/iot-dps/concepts-device#attestation-mechanism) over the MQTT protocol.
23
+
> DPS does not currently support devices using TPM [attestation mechanism](https://docs.microsoft.com/azure/iot-dps/concepts-device#attestation-mechanism) over the MQTT protocol.
24
24
25
25
## Connecting to DPS
26
26
27
27
A device can use the MQTT protocol to connect to a DPS using any of the following options.
28
28
29
-
* Libraries in the [Azure IoT Provisioning SDKs](https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-sdks#microsoft-azure-provisioning-sdks).
29
+
* Libraries in the [Azure IoT Provisioning SDKs](https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-sdks#microsoft-azure-provisioning-sdks).
30
30
* The MQTT protocol directly.
31
31
32
32
## Using the MQTT protocol directly (as a device)
@@ -35,7 +35,7 @@ If a device cannot use the device SDKs, it can still connect to the public devic
35
35
36
36
* For the **ClientId** field, use **registrationId**.
37
37
38
-
* For the **Username** field, use `{idScope}/registrations/{registration_id}/api-version=2019-03-31`, where `{idScope}` is the [idScope](https://docs.microsoft.com/en-us/azure/iot-dps/concepts-device#id-scope) of the DPS.
38
+
* For the **Username** field, use `{idScope}/registrations/{registration_id}/api-version=2019-03-31`, where `{idScope}` is the [idScope](https://docs.microsoft.com/azure/iot-dps/concepts-device#id-scope) of the DPS.
39
39
40
40
* For the **Password** field, use a SAS token. The format of the SAS token is the same as for both the HTTPS and AMQP protocols:
41
41
@@ -62,12 +62,12 @@ To use the MQTT protocol directly, your client *must* connect over TLS 1.2. Atte
62
62
63
63
To register a device through DPS, a device should subscribe using `$dps/registrations/res/#` as a **Topic Filter**. The multi-level wildcard `#` in the Topic Filter is used only to allow the device to receive additional properties in the topic name. DPS does not allow the usage of the `#` or `?` wildcards for filtering of subtopics. Since DPS is not a general-purpose pub-sub messaging broker, it only supports the documented topic names and topic filters.
64
64
65
-
The device should publish a register message to DPS using `$dps/registrations/PUT/iotdps-register/?$rid={request_id}` as a **Topic Name**. The payload should contain the [Device Registration](https://docs.microsoft.com/en-us/rest/api/iot-dps/runtimeregistration/registerdevice#deviceregistration) object in JSON format.
66
-
In a successful scenario, the device will receive a response on the `$dps/registrations/res/202/?$rid={request_id}&retry-after=x` topic name where x is the retry-after value in seconds. The payload of the response will contain the [RegistrationOperationStatus](https://docs.microsoft.com/en-us/rest/api/iot-dps/runtimeregistration/registerdevice#registrationoperationstatus) object in JSON format.
65
+
The device should publish a register message to DPS using `$dps/registrations/PUT/iotdps-register/?$rid={request_id}` as a **Topic Name**. The payload should contain the [Device Registration](https://docs.microsoft.com/rest/api/iot-dps/runtimeregistration/registerdevice#deviceregistration) object in JSON format.
66
+
In a successful scenario, the device will receive a response on the `$dps/registrations/res/202/?$rid={request_id}&retry-after=x` topic name where x is the retry-after value in seconds. The payload of the response will contain the [RegistrationOperationStatus](https://docs.microsoft.com/rest/api/iot-dps/runtimeregistration/registerdevice#registrationoperationstatus) object in JSON format.
67
67
68
68
## Polling for registration operation status
69
69
70
-
The device must poll the service periodically to receive the result of the device registration operation. Assuming that the device has already subscribed to the `$dps/registrations/res/#` topic as indicated above, it can publish a get operationstatus message to the `$dps/registrations/GET/iotdps-get-operationstatus/?$rid={request_id}&operationId={operationId}` topic name. The operation id in this message should be the value received in the RegistrationOperationStatus response message in the previous step. In the successful case, the service will respond on the `$dps/registrations/res/200/?$rid={request_id}` topic. The payload of the response will contain the RegistrationOperationStatus object. The device should keep polling the service if the response code is 202 after a delay equal to the retry-after period. The device registration operation is successful if the service returns a 200 status code.
70
+
The device must poll the service periodically to receive the result of the device registration operation. Assuming that the device has already subscribed to the `$dps/registrations/res/#` topic as indicated above, it can publish a get operationstatus message to the `$dps/registrations/GET/iotdps-get-operationstatus/?$rid={request_id}&operationId={operationId}` topic name. The operation ID in this message should be the value received in the RegistrationOperationStatus response message in the previous step. In the successful case, the service will respond on the `$dps/registrations/res/200/?$rid={request_id}` topic. The payload of the response will contain the RegistrationOperationStatus object. The device should keep polling the service if the response code is 202 after a delay equal to the retry-after period. The device registration operation is successful if the service returns a 200 status code.
71
71
72
72
## Connecting over Websocket
73
73
When connecting over Websocket, specify the subprotocol as `mqtt`. Follow [RFC 6455](https://tools.ietf.org/html/rfc6455).
0 commit comments