Comments (2)
I'll take a look
from azure-iot-sdk-csharp.
Hi @v-tbert
You are actually seeing the expected behavior.
First, as mentioned in the documentation, the "connectionState" value should NOT be used in production, but only in debug and development. The reason for this is because the value is not updated for all protocols (it will never be set to true when using HTTP for example), and the meaning of this flag is more "the device was seen at least once in the last x minutes" (X being the TCP idle time for Azure load balancer) rather than an actual indicator of whether or not the device is connected.
We know that this can be confusing and I am about to send out a proposal to the team to have a proper device heartbeat mechanism implemented that would be protocol agnostic.
Now that said, when you use the UWP NuGet package, the device client is created using HTTP by default (as AMQP support for UWP is only arriving now) while when using the package in a .Net app the default protocol used is AMQP. The connectionState is indeed never set when connecting a device running a UWP app.
We should definitively document this and also set the default protocol to the same when possible to ensure the behavior is the same.
I will close this issue as it is NOT a bug in the clients, but a limitation of the service.
from azure-iot-sdk-csharp.
Related Issues (20)
- IoT Edge not connecting to IOT Hub HOT 2
- Route data directly from opc publisher to rabbit mq is possible? HOT 2
- [Technical Question] [v2] How to set Properties on TelemetryMessage HOT 1
- [Bug Report] Upgrade dependency on Microsoft.Rest.ClientRuntime to Azure.Core HOT 2
- Microsoft.Azure.Devices.Client v1.42.0 has indirect security vulnerabilies HOT 3
- AOT-compatible Microsoft.Azure.Devices.Client HOT 1
- SDK version :2.0.0-preview007 CreateAsync() Json Error
- [Bug Report] WebSockets not working on Web Assembly HOT 1
- Latest device client does not connect over MQTT HOT 9
- Errors while running e2e tests with .NET 8.0 HOT 1
- How to use tpm private key for TLS with IoT Hub SDK (Not TPM Attestation) - for DeviceAuthenticationWithX509Certificate HOT 4
- [Bug Report] AMQP DeviceClient is slow to respond to device being disabled
- Desired Properties callback not triggering after a reconnect HOT 5
- [feature request] Move to System.Text.Json to support AOT HOT 2
- [Bug Report] DeviceClient.SendEventAsync takes over one minute after update from 1.42.0 to 1.42.2 HOT 7
- [BUG] error CS0426: The type name 'Create' does not exist in the type 'ServiceClient' HOT 1
- Building digital twin of the robotic arm [Technical Question] HOT 2
- How do I send data stored in array (floating type) from my robot to IoT hub? [Technical Question]
- [Bug Report] Fails to establish TPM connection HOT 1
- [Technical Question] Security: Check root certificate on device-to-cloud connection HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-iot-sdk-csharp.