Hello @Hop Vu ,
Welcome to Microsoft Q&A and thank you for your question!
If you are following the samples as described here: https://github.com/Azure/azure-sdk-for-c/blob/master/sdk/samples/iot/README.md
1) Can you confirm that you completed all prerequisites?
DPS is used to register your device on a linked IoT Hub. Therefore the D2C and C2D messages will be done at the IoTHub level already created in your Azure Subscription.
See the following doc for better understanding: Provisioning devices with Azure IoT Hub Device Provisioning Service
Thank you!
Remember:
- Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.
- Want a reminder to come back and check responses? Here is how to subscribe to a notification.