azure-iot-hub

Connecting to Azure Iot Hub using TPM

蹲街弑〆低调 提交于 2020-01-25 06:49:10
问题 I have successfully provisioned a device in Azure IoT using TPM authentication by following this sample and the following guide: https://docs.microsoft.com/en-us/azure/iot-dps/quick-enroll-device-tpm-java Now that my device is provisioned I'm trying to figure out the simplest way to connect to the IoT Hub using the keys stored on the TPM chip. I've tried the following code snippet: SecurityProviderTpm securityClientTPM = new SecurityProviderTPMHsm(); DeviceClient client = DeviceClient

Using same X509 certificate for multiple devices in Azure device provisioning service

家住魔仙堡 提交于 2020-01-16 16:58:34
问题 I have to enroll multiple devices in Azure Device provisioning service and I am using group enrollment to achieve the same. I have created a self signed X509 certificate and enrollment group too. I registered a simulated device to the group using the sample code. I want to create another simulated device with same certificate and enroll in group. Is that possible? The input to the sample app is the Id scope of device provisioning service and the certificate. How can I add another device. if

Using same X509 certificate for multiple devices in Azure device provisioning service

﹥>﹥吖頭↗ 提交于 2020-01-16 16:58:07
问题 I have to enroll multiple devices in Azure Device provisioning service and I am using group enrollment to achieve the same. I have created a self signed X509 certificate and enrollment group too. I registered a simulated device to the group using the sample code. I want to create another simulated device with same certificate and enroll in group. Is that possible? The input to the sample app is the Id scope of device provisioning service and the certificate. How can I add another device. if

Azure Functions - how to set up IoTHubTrigger for my IoTHub messages?

纵然是瞬间 提交于 2020-01-11 05:43:08
问题 How do I setup and configure an IoTHubTrigger correctly to trigger an Azure Function (C#) for my IoTHub messages? Where and how do I plug in my IoTHub's connection string? 回答1: Steps using Visual Studio 2017: First make sure you have the latest version of the Azure Functions and Web Jobs Tools Go to File->New->Project->Azure Functions and select "IoT Hub Trigger" Select Functions V1 or V2 (learn about there differences here). And enter an arbitrary name that will serve as key for your

Azure Stream Analytics job expensive for small data?

大兔子大兔子 提交于 2020-01-06 05:51:36
问题 In order to write sensor data from an IoT device to a SQL database in the cloud I use an Azure Streaming Analytics job. The SA job has an IoT Hub input and a SQL database output. The query is trivial; it just sends all data through). According to the MS price calculator, the cheapest way of accomplishing this (in western Europe) is around 75 euros per month (see screenshot). Actually, only 1 message per minute is send through the hub and the price is fixed per month (regardless of the amount

How do I know if my Device in Azure IoT Hub is reachable?

最后都变了- 提交于 2019-12-25 09:18:52
问题 I have a Azure IoT Hub with 2 Devices. I send a Message from a RaspberryPi to another Device. How do I know that the message was received from the other Device? 回答1: You can refer to the Device Explorer tool, which is open sourced. If you want to monitor if an IoT device is reachable by the IoT Hub, you can got to "Message To Device" tab, select the IoT device in the Device ID tab, and make sure you checked "Monitor Feedback Endpoint" . Whenever a message is sent from the IoT Hub to the

Receiving acknowledgements using IoT Hub

穿精又带淫゛_ 提交于 2019-12-25 09:13:09
问题 When using DeviceClient I can send messages using SendEvent and files using SendBlob. But I did not find a way to receive acknowledgement that messages/files have been received by Azure IoT Hub? The only way I found to solve this is using serviceClient.GetFileNotificationReceiver(). Am I missing something or is this the only way? Also it seems I need SharedAccessKeyName to use ServiceClient. But this is not present in e.g. tokens created by DeviceExplorer (which I use for DeviceClient). Any

An error occurred Send Events: Azure Function Output Adapter failed to write events Azure Function as Stream Analytics Job Output

╄→尐↘猪︶ㄣ 提交于 2019-12-24 21:06:05
问题 I have an Azure IoT Dev Kit MXChip and I am sending the sensor data to the IoT Hub. I have also set up the Stream Analytics Job with Input as IoT Hub and Output as SQL Server and Azure Function. The output is getting written to the SQL Database, so I am confirming that the Query is correct. When I check my stream analytics job log, I am seeing some error as below. { "channels": "Operation", "correlationId": "4a9c9b61-631a-4f4f-a403-c2869b2af66c", "description": "", "eventDataId": "97250faf

IOT Central - Reported properties issue

喜欢而已 提交于 2019-12-24 20:46:53
问题 I'm having an issue getting Reported properties to update/display properly when sending from the device. I'm using the starter code provided in the IOT Central/ IOT Hub docs. Code below. When the function runs it reports back success yet when viewing the properties of the device in IOT Central they are not displayed. I have verified that the property names are configured correctly in the device template but I'm obviously missing something. I also changed the names of the properties in the

Publish with Python to Azure IoT Hub - Subscribe with C# not working

吃可爱长大的小学妹 提交于 2019-12-24 20:26:48
问题 I publish with M2MQTT Paho Python library on the device as follows: msg = "POS {} {} {} {} {} {} {}" msgtosend=msg.format(tagNum, tagID, x_pos, y_pos, z_pos, qos, unk) print(msgtosend) # qos=1 - (must be when clean_session is False) mqttinfo=rpiclient.publish("dwm/position", msgtosend, 1) if mqttinfo.rc != 0: print("Publishing message with ID {) failed. Error Code={}".format(mqttinfo.mid, mqttinfo.rc)) Then, I am trying to read the data in C# application again with M2MQTT C# library (after