Git Product home page Git Product logo

azure-iot-sdk-csharp's Introduction

Microsoft Azure IoT SDK for .NET

This repository contains the following:

  • Microsoft Azure IoT Hub device SDK for C# to connect client devices to Azure IoT Hub with .NET
  • Microsoft Azure IoT Hub service SDK for C# to manage your IoT Hub service instance from a back-end .NET application

The API reference documentation for .NET SDK is here.

To find SDKs in other languages for Azure IoT, please refer to the azure-iot-sdks repository.

Developing applications for Azure IoT

Visit Azure IoT Dev Center to learn more about developing applications for Azure IoT.

How to use the Azure IoT SDKs for .NET

  • Using packages and libraries: The simplest way to use the Azure IoT SDKs is to use packages and libraries when available. Refer to this document on how to get Azure IoT SDKs for .NET using Nuget and build applications.
  • Clone the repository: The repository is using GitHub Submodules for its dependencies. In order to automatically clone these submodules, you need to use the --recursive option as described here:
git clone --recursive https://github.com/Azure/azure-iot-sdk-csharp.git

Key features and roadmap

Device client SDK

✔️ feature available ✖️ feature planned but not supported ➖ no support planned

Features mqtt mqtt-ws amqp amqp-ws https Description
Authentication ✔️ ✔️* ✔️ ✔️* ✔️* Connect your device to IoT Hub securely with supported authentication, including private key, SASToken, X-509 Self Signed and X-509 CA Signed. *IoT Hub only supports X-509 CA Signed over AMQP and MQTT at the moment. X509-CA authentication over websocket and HTTPS are not supported.
Send device-to-cloud message ✔️* ✔️* ✔️ ✔️ ✔️ Send device-to-cloud messages (max 256KB) to IoT Hub with the option to add custom properties and system properties, and batch send. *IoT Hub only supports batch send over AMQP and HTTPS at the moment.
Receive cloud-to-device messages ✔️* ✔️* ✔️ ✔️ ✔️ Receive cloud-to-device messages and read associated custom and system properties from IoT Hub, with the option to complete/reject/abandon C2D messages. *IoT Hub supports the option to complete/reject/abandon C2D messages over HTTPS and AMQP only at the moment.
Device Twins ✔️* ✔️* ✔️* ✔️* IoT Hub persists a device twin for each device that you connect to IoT Hub. The device can perform operations like get twin tags, subscribe to desired properties. *Send reported properties version and desired properties version are in progress.
Direct Methods ✔️ ✔️ ✔️ ✔️ IoT Hub gives you the ability to invoke direct methods on devices from the cloud. The SDK supports handler for method specific amd generic operation.
Upload file to Blob ✔️ A device can initiate a file upload and notifies IoT Hub when the upload is complete. File upload requires HTTPS connection, but can be initiated from client using any protocol for other operations.
Connection Status and Error reporting ✔️ ✔️ ✔️ ✔️ ✔️ Error reporting for IoT Hub supported error code.
Retry policies ✔️ ✔️ ✔️ ✔️ ✔️ Retry policy for unsuccessful device-to-cloud messages have three options: no try, exponential backoff with jitter (default) and custom.
Devices multiplexing over single connection ✔️ ✔️ ✔️
Connection Pooling - Specifying number of connections ✔️ ✔️ ✔️

Service client SDK

✔️ feature available ✖️ feature planned but not supported ➖ no support planned

Features C# .Net Description
Identity registry (CRUD) ✔️* Use your backend app to perform CRUD operation for individual device or in bulk.
Cloud-to-device messaging ✔️ Use your backend app to send cloud-to-device messages in AMQP and AMQP-WS, and set up cloud-to-device message receivers.
Direct Methods operations ✔️ Use your backend app to invoke direct method on device.
Device Twins operations Use your backend app to perform twin operations. This SDK only supports Get Twin at the moment.
Query ✔️ Use your backend app to perform query for information.
Jobs ✔️ Use your backend app to perform job operation.
File Upload ✔️ Set up your backend app to send file upload notification receiver.

Samples

In the repository, you will find a set of simple samples that will help you get started:

OS platforms and hardware compatibility

The IoT Hub device SDK for .NET can be used with a broad range of OS platforms and devices.

Minimum requirements:

  • .NET platform support (see https://dot.net for supported platforms)
  • Device SDK: .NET Framework 4.5; .NET Standard 1.3; PCL

Contribution, feedback and issues

If you encounter any bugs, have suggestions for new features or if you would like to become an active contributor to this project please follow the instructions provided in the contribution guidelines.

For suggestions regarding the Azure IoT Services, please use https://feedback.azure.com/forums/321918-azure-iot

Support

If you are having issues using one of the packages or using the Azure IoT Hub service that go beyond simple bug fixes or help requests that would be dealt within the issues section of this project, the Microsoft Customer Support team will try and help out on a best effort basis. To engage Microsoft support, you can create a support ticket directly from the Azure portal. Escalated support requests for Azure IoT Hub SDKs development questions will only be available Monday thru Friday during normal coverage hours of 6 a.m. to 6 p.m. PST. Here is what you can expect Microsoft Support to be able to help with:

  • SDKs issues: If you are trying to compile and run the libraries on a supported platform, the Support team will be able to assist with troubleshooting or questions related to compiler issues and communications to and from the IoT Hub. They will also try to assist with questions related to porting to an unsupported platform, but will be limited in how much assistance can be provided. The team will be limited with trouble-shooting the hardware device itself or drivers and or specific properties on that device.
  • IoT Hub / Connectivity Issues: Communication from the device client to the Azure IoT Hub service and communication from the Azure IoT Hub service to the client. Or any other issues specifically related to the Azure IoT Hub.
  • Portal Issues: Issues related to the portal, that includes access, security, dashboard, devices, Alarms, Usage, Settings and Actions.
  • REST/API Issues: Using the IoT Hub REST/APIs that are documented in the documentation.

Read more

SDK folder structure

/device

Contains Azure IoT Hub client components that provide the raw messaging capabilities of the library. Refer to the API documentation and samples for information on how to use it.

/doc

Contains application development guides and device setup instructions.

/e2e

Contains end-to-end tests.

/jenkins

Contains scripts used by the Continuous Integration system (Jenkins).

/provisioning

Contains the Azure IoT Provisioning client components.

/security

Contains the SecurityProvider components for Hardware Security Modules.

/service

Contains libraries that enable interactions with the IoT Hub service to perform operations such as sending messages to devices and managing the device identity registry.

/shared

Contains source code for the Microsoft.Azure.Devices.Shared component. This component contains public API shared across the SDK.

/tools/DeviceExplorer

Contains the source code for the Azure IoT Device Explorer tool.

/transport

Contains the TransportClient components.

Long Term Support

The project offers a Long Term Support (LTS) version to allow users that do not need the latest features to be shielded from unwanted changes.

A new LTS version will be created every 6 months. The lifetime of an LTS branch is currently planned for one year. LTS branches receive all bug fixes that fall in one of these categories:

  • security bugfixes
  • critical bugfixes (crashes, memory leaks, etc.)

No new features or improvements will be picked up in an LTS branch.

LTS branches are named lts_mm_yyyy, where mm and yyyy are the month and year when the branch was created. An example of such a branch is lts_07_2017.

Schedule1

Below is a table showing the mapping of the LTS branches to the packages released

Nuget Package Github Branch LTS Status LTS Start Date Maintenance End Date Removed Date
Microsoft.Azure.Devices.Client v1.5.1, Microsoft.Azure.Devices v1.4.0, Microsoft.Azure.Devices.Shared v1.1.1 lts_07_2017 Active 2017-07-01 2017-12-31 2018-06-30
  • 1 All scheduled dates are subject to change by the Azure IoT SDK team.

Planned Release Schedule


This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

azure-iot-sdk-csharp's People

Contributors

alextolp avatar ancaantochi avatar anhashia avatar anporumb avatar arturl avatar asergaz avatar avranju avatar az-iot-builder-01 avatar barnstee avatar bertkleewein avatar cipop avatar damonbarry avatar dcristoloveanu avatar dominicbetts avatar ewertons avatar gmileka avatar ilias-tsigkogiannis avatar iluican avatar jakebjorke avatar jasmineymlo avatar jebrando avatar josesimoes avatar marcschier avatar markrad avatar mhshami01 avatar prmathur-microsoft avatar rajeevmv avatar rvinoth avatar tameraw avatar yzhong94 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.