IoTHub
8 TopicsEdge Module Authentication
Hi Folks, I've made my first IoT Edge Module (container), its just based off: FROM ubuntu:oracular For now, but it seems to start up and run correctly. I've pushed the container into ACR and added it to my manifest which pushed it down to my edge gateway and its up and running. So far so good. Now, I want my application in that container to publish events to the edgeHub, and subscribe to properties set in IoT Central. I followed some of the guides, but have had no luck. Firstly - not much love for a rust application, but aside from that, I've resorted to jumping into the container and trying to use the mosquitto clients likes so: $ docker exec -ti <module_id> bash # mosquitto_sub -d \ -V mqttv311 \ -h edgeHub \ -p 8883 \ -i "${IOTEDGE_DEVICEID}/${IOTEDGE_MODULEID}" \ -u "${IOTEDGE_IOTHUBHOSTNAME}/${IOTEDGE_DEVICEID}/${IOTEDGE_MODULEID}/?api-version=2018-06-30" \ -P "${SAS_TOKEN}" \ -t "devices/${IOTEDGE_DEVICEID}/modules/${IOTEDGE_MODULEID}/messages/events" \ --cafile /etc/ssl/certs/IoTHubRootCA.pem \ -q 1 Client <device_id>/<module_id> sending CONNECT OpenSSL Error[0]: error:0A000086:SSL routines::certificate verify failed Error: Protocol error I just cant get it to validate the certs in the edgeHub. If I look at the edgeHub container it shows: $ docker logs -f edgeHub <4> 2025-06-30 06:52:23.276 +00:00 [WRN] - "TLS handshake failed., System.AggregateException: One or more errors occurred. (Authentication failed, see inner exception.)\n ---> System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception.\n ---> Interop+OpenSsl+SslException: SSL Handshake failed with OpenSSL error - SSL_ERROR_SSL.\n ---> Interop+Crypto+OpenSslCryptographicException: error:0A000418:SSL routines::tlsv1 alert unknown ca\n --- End of inner exception stack trace ---\n at Interop.OpenSsl.DoSslHandshake(SafeSslHandle context, ReadOnlySpan`1 input, Byte[]& sendBuf, Int32& sendCount)\n at System.Net.Security.SslStreamPal.HandshakeInternal(SafeDeleteSslContext& context, ReadOnlySpan`1 inputBuffer, Byte[]& outputBuffer, SslAuthenticationOptions sslAuthenticationOptions)\n --- End of inner exception stack trace ---\n at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](Boolean receiveFirst, Byte[] reAuthenticationData, CancellationToken cancellationToken)\n --- End of inner exception stack trace ---, 0af563ac" That error suggests the edgeHub does not like the CA in my module ? I'm looking for any references to get the right CA's setup so that my translation app can publish events to the edgeHub container.79Views1like0CommentsNeed help with updating disconnected devices
hey, I am new to azure and IOT and I need help with knowing how to do this. The scenario is that: I have a set of Linux devices that can't be connected to the internet ever, these devices should be connected to another device (will have internet) which will act as parent to all these disconnected devices. The challenge is to update these child devices using Azure IOT, the updates will be deployed in the hub, and it has to passed to child devices via parent device and automatically needs to be installed in the child devices. The parent might not require this update or might. How will I do this? also I can't use any scripting mechanisms. Now when I surfed a bit through azure documentation, I found out that I can use device update for this, What I found was: 1) setup every device in IOT hub 2)set the device with internet as parent and others a child 3)set up MCC module in parent 4)Connect the devices physically (Lan or Wi-Fi) 5)Roll out updates Now I don't know whether this is true or not, it's just my understanding. I am having few doubts: 1)do we also add the child devices (disconnected devices in IOT hub), if yes what if we have 1000 devices? (I'm asking about scalability) 2)How do I actually physically connect the parent and child devices, do I just plug in Lan/Wi-Fi, or do I have to do anything else? 3)How to add MCC Module? 4)how does this actually works? is it feasible?76Views0likes0CommentsADX data receiving stop after sometime
I have very strange problem. I have IOT application where device send data to IOT hub, then it routed to event hub. There is function with trigger as azure function ,this function insert data in to ADX . I trace the event from device to event hub. I can see all data I can also see function get trigger ,no error.But in ADX empty record, no data from event. Just date field which add explicitly. Note- Again after some time I can see data in ADX (no change in ADX not even restart any service). Can any body have clue what exactly could be issue?80Views0likes0CommentsFiles from IoTHub in storage are not JSON
Hello, In my IotHub, I defined entrypoint for storage. While I see that the files are arrive successfully, the type of them is not JSON and I defied. The content is JSON, but the extension is empty and not JSON as I used to have. What can i define wrong this time? Thanks1.2KViews0likes3CommentsIoTHub Unauthorised Response
We work with small handheld devices that send events and general info to our backend using Azure IoT Hub and MQTT with self-made SAS Tokens. On the 24th of September we received over 1 million Unauthorized responses when trying to connect to the hub, using our handsets that had not had any code/protocol changes. From there, the number of Unauthorized responses have dropped dramatically to be in the ten thousands, but we are still getting the Unauthorized response on handsets that have the correct provisioning info (keys, hub address). When discussing with Microsoft support team they have said it is due to an expired Sas token, but our Sas tokens have been regenerated and still the problem persists. They also said they didn't make any code/structural changes to the hub, but the sudden unexpected behavior persists. Has anyone had similar issues? We have regenerated Sas tokens, sent new keys and provisioning info, but any handsets we get back into our hands do not show the problem.591Views0likes0CommentsProcessing ordered IoT streams in Azure
There are thousands of articles on the Internet talking about how the cloud can be used to process discrete (un-ordered) streaming IoT data. But almost all are short on specifics and the design trade-offs you need to make when processing ordered IoT streams, at scale. This article discusses why scale can be difficult to achieve, especially when the ordering of the events (aka Series events) is important. Jeff Hollan wrote an article which illustrates the challenge when using Azure Functions, for example. And if you need a primer on Real-time processing, Events, Messages, Series events and Discrete events, please review the following articles: Real time processing Events, Data Points, and Messages - Choosing the right Azure messaging service for your data Choose between Azure messaging services - Event Grid, Event Hubs, and Service Bus5.3KViews3likes0CommentsIoT Device Simulation - Device simulator covering a wide range of Azure IoT SDK features
Hi all, In case you will find this useful for your IoT projects, you will find https://github.com/jonmikeli/azureiotdevicesimulator an #iot device #simulation tool implementing a wide range of #azure IoT SDK capabilities. The approach of the solution is to complete other https://jmidotnetfr.wordpress.com/2019/08/25/azure-iot-device-simulator-vs-microsoft-device-simulator-accelerator/. The solution is a .NET Core application. It can be used : as a development tool as a complete IoT flow simulation tool from the device perspective (C2D/D2C, including IoTHub modules) for building simulation platforms (containerized, Docker image). Many configurations are possible through JSON-based settings. All details are https://github.com/jonmikeli/azureiotdevicesimulator ;). Enjoy 😉1KViews2likes0CommentsTake back control over IoTHub messages in Azure Functions
Azure Functions are a blessing for IoT solutions. To be so flexible executing code whenever messages are arriving, every IoT project is fully depending on it. But one of the biggest frustrations is the casting of (EventHub) messages towards a string! Only the message body is left! Once a message is passed on to an Azure Function, I only have access to the body of the message. I can not access the (routing) properties anymore. And before we got Azure Functions, we had to work with Stream Analytics. And I still do! And it's so nice to have access to the IoT Hub values like the device name of the message. Because I am working with Azure Functions, I have to put it in the Message body first??? It would be great to have access to both the properties and the IoTHub values! Well, it's possible now with some clever casting... Read the full story here811Views0likes0Comments