From fe9631dd73c92322ee42917f630e6944ab7b62f4 Mon Sep 17 00:00:00 2001 From: tameraw Date: Fri, 28 Oct 2016 13:13:38 -0700 Subject: [PATCH 01/13] Link to PAL porting guide is now fixed. --- doc/porting_guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/porting_guide.md b/doc/porting_guide.md index 3fd980b69c..e6bb912756 100644 --- a/doc/porting_guide.md +++ b/doc/porting_guide.md @@ -17,4 +17,4 @@ The IoTHub C SDK relies on the Platform Abstraction Layer implemented by the azu ## PAL porting -In order to port the C IoTHub SDK, one needs to port the PAL following [this](https://www.github.com/Azure/azure-c-shared-utility/blob/doc/porting_guide.md) document. +In order to port the C IoTHub SDK, one needs to port the PAL following [this](https://www.github.com/Azure/azure-c-shared-utility/blob/master/doc/porting_guide.md) document. From 70c50071995b3fd88953c698bd6c0c27a0a247d9 Mon Sep 17 00:00:00 2001 From: Olivier Bloch Date: Thu, 3 Nov 2016 10:39:31 -0700 Subject: [PATCH 02/13] Fixed dead link --- serializer/samples/simplesample_amqp/linux/readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serializer/samples/simplesample_amqp/linux/readme.txt b/serializer/samples/simplesample_amqp/linux/readme.txt index 4ea25db55c..a9ee3fef04 100644 --- a/serializer/samples/simplesample_amqp/linux/readme.txt +++ b/serializer/samples/simplesample_amqp/linux/readme.txt @@ -1,3 +1,3 @@ # To build the sample -Follow the instructions [here](https://github.com/Azure/azure-iot-sdks/blob/master/c/doc/run_sample_on_desktop_linux.md). \ No newline at end of file +Follow the instructions [here](https://github.com/Azure/azure-iot-sdks/blob/master/c/doc/devbox_setup.md). From 49b30976c330c45ea897ee29b18eef4d5bed981a Mon Sep 17 00:00:00 2001 From: Olivier Bloch Date: Thu, 3 Nov 2016 10:42:57 -0700 Subject: [PATCH 03/13] Changed link to specific C on Linux sample instructions --- serializer/samples/simplesample_amqp/linux/readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serializer/samples/simplesample_amqp/linux/readme.txt b/serializer/samples/simplesample_amqp/linux/readme.txt index a9ee3fef04..f55f3f1d6a 100644 --- a/serializer/samples/simplesample_amqp/linux/readme.txt +++ b/serializer/samples/simplesample_amqp/linux/readme.txt @@ -1,3 +1,3 @@ # To build the sample -Follow the instructions [here](https://github.com/Azure/azure-iot-sdks/blob/master/c/doc/devbox_setup.md). +Follow the instructions [here](https://github.com/Azure/azure-iot-sdks/blob/master/doc/get_started/linux-desktop-c.md). From dfd3a50b6377e844b921b1b9ead63c59066a00c2 Mon Sep 17 00:00:00 2001 From: Pierre Cauchois Date: Tue, 15 Nov 2016 14:26:37 -0800 Subject: [PATCH 04/13] Add build and release files --- .gitignore | 206 ++++ .gitmodules | 17 + CONTRIBUTING.md | 65 ++ LICENSE | 21 + build_all/arduino/build.sh | 2 +- build_all/arduino/setup.sh | 4 +- build_all/arduino_cc/build.cmd | 2 +- build_all/arduino_cc/make_sdk.cmd | 28 +- build_all/packaging/linux/apt-get-release.sh | 2 +- build_all/packaging/linux/debian/copyright | 2 +- ...icrosoft.Azure.IoTHub.AmqpTransport.nuspec | 4 +- ...icrosoft.Azure.IoTHub.HttpTransport.nuspec | 4 +- ...Microsoft.Azure.IoTHub.IoTHubClient.nuspec | 4 +- ...icrosoft.Azure.IoTHub.MqttTransport.nuspec | 4 +- .../Microsoft.Azure.IoTHub.Serializer.nuspec | 4 +- jenkins/arduino_cc.cmd | 14 + jenkins/arduinoyun_c.sh | 62 + jenkins/inteledison_c.sh | 116 ++ jenkins/linux_c.sh | 11 + jenkins/linux_c_gcc44.sh | 11 + jenkins/mbed_c.cmd | 4 + jenkins/raspberrypi_c.sh | 90 ++ jenkins/ti3200_c.cmd | 105 ++ jenkins/ubuntu1510_c.sh | 11 + jenkins/windows_c.cmd | 14 + jenkins/windowsce_c.cmd | 14 + thirdpartynotice.txt | 1015 +++++++++++++++++ 27 files changed, 1806 insertions(+), 30 deletions(-) create mode 100644 .gitignore create mode 100644 .gitmodules create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE mode change 100644 => 100755 build_all/packaging/linux/apt-get-release.sh create mode 100644 jenkins/arduino_cc.cmd create mode 100755 jenkins/arduinoyun_c.sh create mode 100755 jenkins/inteledison_c.sh create mode 100755 jenkins/linux_c.sh create mode 100755 jenkins/linux_c_gcc44.sh create mode 100644 jenkins/mbed_c.cmd create mode 100755 jenkins/raspberrypi_c.sh create mode 100644 jenkins/ti3200_c.cmd create mode 100755 jenkins/ubuntu1510_c.sh create mode 100644 jenkins/windows_c.cmd create mode 100644 jenkins/windowsce_c.cmd create mode 100644 thirdpartynotice.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..14a7384b87 --- /dev/null +++ b/.gitignore @@ -0,0 +1,206 @@ +# Compiled object files +*.o +*.opp + +# Compiled static libraries +*.a + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results + +[Dd]ebug/ +[Rr]elease/ +x64/ +[Bb]in/ +[Oo]bj/ +/build/release/Maven +!/build/release/ +[Cc]make/ + +# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets +!packages/*/build/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.log +*.scc + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.VC.opendb + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +*.ncrunch* +.*crunch*.local.xml + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.Publish.xml + +# NuGet Packages Directory +packages/ + +# Windows Azure Build Output +csx +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +sql/ +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.[Pp]ublish.xml +*.pfx +*.publishsettings +*.jar + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +App_Data/*.mdf +App_Data/*.ldf + + +#LightSwitch generated files +GeneratedArtifacts/ +_Pvt_Extensions/ +ModelManifest.xml + +# CPython & Wheels +*.pyc +*.pyd +*.whl +*.egg-info + +# ========================= +# Windows detritus +# ========================= + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Mac desktop service store files +.DS_Store + +# Visual studio build artifacts +*.tlog +*.lastbuildstate +*.idb +*.exp +*.lib +*.dll + +# Visual Studio Temporary files +*.VC.db + +# Windows CE build artifacts +Build.err +Build.wrn +Buildx86retail.dat +*.dat + +# Tools EXE that doesn't end up in a typical build directory +common/tools/macro_utils_h_generator/macro_utils_h_generator.exe + +# hg directories should be ignored +**/hg/ + +# VS Code stuff +**/typings/** +**/.vscode/** +# C/C++ extension for VS Code +.browse.VC.db* + +build_all/windows/nuget.exe + +/cmake +/build diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..2e43a0e932 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,17 @@ +[submodule "azure-c-shared-utility"] + path = c-utility + url = https://github.com/Azure/azure-c-shared-utility.git +[submodule "azure-umqtt-c"] + path = umqtt + url = https://github.com/Azure/azure-umqtt-c.git + branch = develop +[submodule "azure-uamqp-c"] + path = uamqp + url = https://github.com/Azure/azure-uamqp-c.git + branch = master +[submodule "parson"] + path = parson + url = https://github.com/kgabis/parson +[submodule "iothub_service_client/parson"] + path = iothub_service_client/parson + url = https://github.com/kgabis/parson \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..165324750b --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,65 @@ +**The Azure IoT SDKs team wants to hear from you!** + +- [Ask a question](#ask-a-question) +- [File a bug](#file-a-bug) +- [Contribute documentation](#contribute-documentation) +- [Contribute code](#contribute-code) + +# Ask a question +Our team monitors Stack Overflow, especially the [azure-iot-hub](http://stackoverflow.com/questions/tagged/azure-iot-hub) tag. It really is the best place to ask. + +We monitor the Github issues section specifically for bugs found with our SDK, however we will reply to questions asked using Github issues too. + +# File a bug (code or documentation) +That is definitely something we want to hear about. Please open an issue on github, we'll address it as fast as possible. Typically here's the information we're going to ask for to get started: +- What SDK are you using (Node, C, C#, Python, Java?) +- What version of the SDK? +- Do you have a snippet of code that would help us reproduce the bug? +- Do you have logs showing what's happening? + +Our SDK is entirely open-source and we do accept pull-requests if you feel like taking a stab at fixing the bug and maybe adding your name to our commit history :) Please mention +any relevant issue number in the pull request description. + +# Contribute documentation +For simple markdown files, we accept documentation pull requests submitted against the `master` branch, if it's about existing SDK features. +If your PR is about future changes or has changes to the comments in the code itself, we'll treat is as a code change (see the next section). + +# Contribute code +Unlike documentation, we require pull-requests for code to be submitted against the `develop` branch in order to review and run it in our gated build system. We try to maintain a high bar +for code quality and maintainability, we insist on having tests associated with the code, and if necessary, additions/modifications to the requirement documents. + +Also, have you signed the [Contribution License Agreement](https://cla.microsoft.com/) ([CLA](https://cla.microsoft.com/))? A friendly bot will remind you about it when you submit your pull-request. + +If you feel like your contribution is going to be a major effort, you should probably give us a heads-up. We have a lot of items captured in our backlog and we release every two weeks, so before you spend the time, just check with us to make +sure your plans and ours are in sync :) Just open an issue on github and tag it "enhancement" or "feature request" + +## Editing module requirements +We use requirement documents to describe the expected behavior for each code modules. It works as a basis to understand what tests need to be written. + +Each requirement has a unique tag that is re-used in the code comments to identify where it's implemented and where it's tested. To generate these unique identifiers, we used to use a Microsoft Word macro. +We are progressively switching to Markdown though, for which we have no macro, therefore we have to be careful about numbering. + +The following steps describe adding a new requirement in a Word document: + +* Add the requirement text and select it + +![](media/add_requirement/add_requirement_step1.png) + +* Invoke the macro with the selected text + +![](media/add_requirement/add_requirement_step2.png) + +* Select developer id 99 + +![](media/add_requirement/add_requirement_step3.png) + +* Done! + +![](media/add_requirement/add_requirement_step4.png) + +When contributing to markdown requirement docs, you can also use `99` for a developer id, and just increment the last number of the requirement to be unique. + +## Adding new files +If your contribution is not part of an already existed code, you must create a new requirement file and a new unit test project. Our team created a template to help you on it. For the requirements you can copy the [template_requirements.md](https://github.com/Azure/azure-c-shared-utility/blob/develop/devdoc/template_requirements.md) to the appropriate `devdoc` directory and change it to fits your needs. + +For the unit test, copy the directory [template_ut](https://github.com/Azure/azure-c-shared-utility/tree/develop/tests/template_ut) to the appropriate `tests` directory and change it to fits your needs. To include your new test suite in the `cmake`, add your new test suite in `test/CMakeLists.txt` with the command `add_subdirectory(template_ut)`. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000..49255e0a58 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +Microsoft Azure IoT SDKs +Copyright (c) Microsoft Corporation +All rights reserved. +MIT License +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the ""Software""), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/build_all/arduino/build.sh b/build_all/arduino/build.sh index 471f8ce103..22dbfa21ca 100755 --- a/build_all/arduino/build.sh +++ b/build_all/arduino/build.sh @@ -6,7 +6,7 @@ sdk_root="$HOME" openwrt_folder="openwrt" openwrt_sdk_folder="sdk" working_dir=$PWD -iot_dir="azure-iot-sdks" +iot_dir="azure-iot-sdk-c" usage () { diff --git a/build_all/arduino/setup.sh b/build_all/arduino/setup.sh index 1d8dff6569..234b540191 100755 --- a/build_all/arduino/setup.sh +++ b/build_all/arduino/setup.sh @@ -8,8 +8,8 @@ openwrt_sdk_folder="sdk" working_dir=$PWD package_dir="package" -iot_dir="azure-iot-sdks" -iot_repo="https://github.com/Azure/azure-iot-sdks.git" +iot_dir="azure-iot-sdk-c" +iot_repo="https://github.com/Azure/azure-iot-sdk-c.git" iot_makefile="Makefile.iot" usage () diff --git a/build_all/arduino_cc/build.cmd b/build_all/arduino_cc/build.cmd index 0dc5ca8b4e..aa9539f1cd 100644 --- a/build_all/arduino_cc/build.cmd +++ b/build_all/arduino_cc/build.cmd @@ -8,7 +8,7 @@ set current_path=%~dp0 rem // remove trailing slash set current_path=%current_path:~0,-1% -set build_root=%current_path%\..\..\..\.. +set build_root=%current_path%\..\..\.. rem // resolve to fully qualified path for %%i in ("%build_root%") do set build_root=%%~fi diff --git a/build_all/arduino_cc/make_sdk.cmd b/build_all/arduino_cc/make_sdk.cmd index 9aca2700a7..07a03f52a5 100644 --- a/build_all/arduino_cc/make_sdk.cmd +++ b/build_all/arduino_cc/make_sdk.cmd @@ -8,7 +8,7 @@ REM It removes some files we do not need. It currently targets the develop bran REM merged into master. if "%1" equ "" ( - set Work_path=%~dp0..\..\..\..\Work + set Work_path=%~dp0..\..\..\Work ) else ( set Work_path=%1 ) @@ -20,7 +20,7 @@ set AzureIoTHub_path=%Libraries_path%AzureIoTHub\ set SharedUtility_path=%AzureIoTHub_path%src\azure_c_shared_utility\ set Adapters_path=%AzureIoTHub_path%src\adapters\ set sdk_path=%AzureIoTHub_path%src\sdk\ -set AzureIoTSDKs_path=%~dp0..\..\..\ +set AzureIoTSDKs_path=%~dp0..\..\ rem // resolve to fully qualified path for %%i in ("%AzureIoTSDKs_path%") do set AzureIoTSDKs_path=%%~fi @@ -39,22 +39,22 @@ git rev-parse HEAD >> %sdk_path%metadata.txt copy %AzureIoTSDKs_path%LICENSE %AzureIoTHub_path%LICENSE -copy %AzureIoTSDKs_path%c\iothub_client\src\ %sdk_path% -copy %AzureIoTSDKs_path%c\iothub_client\inc\ %sdk_path% -copy %AzureIoTSDKs_path%c\serializer\src\ %sdk_path% -copy %AzureIoTSDKs_path%c\serializer\inc\ %sdk_path% -copy %AzureIoTSDKs_path%c\parson\parson.* %sdk_path% -copy %AzureIoTSDKs_path%c\serializer\samples\simplesample_http\simplesample_http.* %AzureIoTHub_path%examples\simplesample_http +copy %AzureIoTSDKs_path%iothub_client\src\ %sdk_path% +copy %AzureIoTSDKs_path%iothub_client\inc\ %sdk_path% +copy %AzureIoTSDKs_path%serializer\src\ %sdk_path% +copy %AzureIoTSDKs_path%serializer\inc\ %sdk_path% +copy %AzureIoTSDKs_path%parson\parson.* %sdk_path% +copy %AzureIoTSDKs_path%serializer\samples\simplesample_http\simplesample_http.* %AzureIoTHub_path%examples\simplesample_http mkdir %SharedUtility_path% mkdir %Adapters_path% -copy %AzureIoTSDKs_path%c\c-utility\inc\azure_c_shared_utility %SharedUtility_path% -copy %AzureIoTSDKs_path%c\c-utility\src\ %SharedUtility_path% +copy %AzureIoTSDKs_path%c-utility\inc\azure_c_shared_utility %SharedUtility_path% +copy %AzureIoTSDKs_path%c-utility\src\ %SharedUtility_path% -copy %AzureIoTSDKs_path%c\c-utility\adapters\agenttime.c %Adapters_path% -copy %AzureIoTSDKs_path%c\c-utility\adapters\tickcounter_tirtos.c %Adapters_path% -copy %AzureIoTSDKs_path%c\c-utility\adapters\*arduino.* %Adapters_path% -copy %AzureIoTSDKs_path%c\c-utility\adapters\httpapi_compact.c %Adapters_path% +copy %AzureIoTSDKs_path%c-utility\adapters\agenttime.c %Adapters_path% +copy %AzureIoTSDKs_path%c-utility\adapters\tickcounter_tirtos.c %Adapters_path% +copy %AzureIoTSDKs_path%c-utility\adapters\*arduino.* %Adapters_path% +copy %AzureIoTSDKs_path%c-utility\adapters\httpapi_compact.c %Adapters_path% del %sdk_path%*amqp*.* del %sdk_path%*mqtt*.* diff --git a/build_all/packaging/linux/apt-get-release.sh b/build_all/packaging/linux/apt-get-release.sh old mode 100644 new mode 100755 index 0bb6b9e806..ded9175df5 --- a/build_all/packaging/linux/apt-get-release.sh +++ b/build_all/packaging/linux/apt-get-release.sh @@ -3,7 +3,7 @@ # azureiot_folder="azure-iot-sdk" -azureiot_repo="https://github.com/Azure/azure-iot-sdks" +azureiot_repo="https://github.com/Azure/azure-iot-sdk-c" azureiot_c_folder="azure-iot-sdk-c-0.1.0" azureiot_c_zip_folder="azure-iot-sdk-c-0.1.0.tar.gz" azureiot_c_change_file="azure-iot-sdk-c_0.1.0-1_source.changes" diff --git a/build_all/packaging/linux/debian/copyright b/build_all/packaging/linux/debian/copyright index 445d7a835f..3b52344479 100644 --- a/build_all/packaging/linux/debian/copyright +++ b/build_all/packaging/linux/debian/copyright @@ -1,6 +1,6 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: azure-iot-sdk-c -Source: https://github.com/Azure/azure-iot-sdks.git +Source: https://github.com/Azure/azure-iot-sdk-c.git Files: * Copyright: 2015 AzureIoT User diff --git a/build_all/packaging/windows/Microsoft.Azure.IoTHub.AmqpTransport.nuspec b/build_all/packaging/windows/Microsoft.Azure.IoTHub.AmqpTransport.nuspec index 2001e25ffa..4b858c6629 100644 --- a/build_all/packaging/windows/Microsoft.Azure.IoTHub.AmqpTransport.nuspec +++ b/build_all/packaging/windows/Microsoft.Azure.IoTHub.AmqpTransport.nuspec @@ -5,8 +5,8 @@ Microsoft Azure IoTHub AMQP transport Apache Software Foundation, Microsoft Corp Azure-IoT - https://github.com/Azure/azure-iot-sdks/blob/develop/LICENSE - https://github.com/Azure/azure-iot-sdks + https://github.com/Azure/azure-iot-sdk-c/blob/develop/LICENSE + https://github.com/Azure/azure-iot-sdk-c true Microsoft Azure IoTHub AMQP transport http://go.microsoft.com/fwlink/?LinkID=288890 diff --git a/build_all/packaging/windows/Microsoft.Azure.IoTHub.HttpTransport.nuspec b/build_all/packaging/windows/Microsoft.Azure.IoTHub.HttpTransport.nuspec index 34b2b8ba01..e6513a2fa6 100644 --- a/build_all/packaging/windows/Microsoft.Azure.IoTHub.HttpTransport.nuspec +++ b/build_all/packaging/windows/Microsoft.Azure.IoTHub.HttpTransport.nuspec @@ -5,8 +5,8 @@ Microsoft Azure IoTHub HTTP transport Microsoft Corp Azure-IoT - https://github.com/Azure/azure-iot-sdks/blob/develop/LICENSE - https://github.com/Azure/azure-iot-sdks + https://github.com/Azure/azure-iot-sdk-c/blob/develop/LICENSE + https://github.com/Azure/azure-iot-sdk-c true Microsoft Azure IoTHub HTTP transport http://go.microsoft.com/fwlink/?LinkID=288890 diff --git a/build_all/packaging/windows/Microsoft.Azure.IoTHub.IoTHubClient.nuspec b/build_all/packaging/windows/Microsoft.Azure.IoTHub.IoTHubClient.nuspec index 7aaa6e5474..61fb235b41 100644 --- a/build_all/packaging/windows/Microsoft.Azure.IoTHub.IoTHubClient.nuspec +++ b/build_all/packaging/windows/Microsoft.Azure.IoTHub.IoTHubClient.nuspec @@ -5,8 +5,8 @@ Microsoft Azure IoTHub IoTHubClient Microsoft Corp Azure-IoT - https://github.com/Azure/azure-iot-sdks/blob/develop/LICENSE - https://github.com/Azure/azure-iot-sdks + https://github.com/Azure/azure-iot-sdk-c/blob/develop/LICENSE + https://github.com/Azure/azure-iot-sdk-c true Microsoft Azure IoTHub Client http://go.microsoft.com/fwlink/?LinkID=288890 diff --git a/build_all/packaging/windows/Microsoft.Azure.IoTHub.MqttTransport.nuspec b/build_all/packaging/windows/Microsoft.Azure.IoTHub.MqttTransport.nuspec index 651de268a5..ce4976a5a2 100644 --- a/build_all/packaging/windows/Microsoft.Azure.IoTHub.MqttTransport.nuspec +++ b/build_all/packaging/windows/Microsoft.Azure.IoTHub.MqttTransport.nuspec @@ -5,8 +5,8 @@ Microsoft Azure IoTHub MQTT transport Microsoft Corp Azure-IoT - https://github.com/Azure/azure-iot-sdks/blob/develop/LICENSE - https://github.com/Azure/azure-iot-sdks + https://github.com/Azure/azure-iot-sdk-c/blob/develop/LICENSE + https://github.com/Azure/azure-iot-sdk-c true Microsoft Azure IoTHub MQTT transport http://go.microsoft.com/fwlink/?LinkID=288890 diff --git a/build_all/packaging/windows/Microsoft.Azure.IoTHub.Serializer.nuspec b/build_all/packaging/windows/Microsoft.Azure.IoTHub.Serializer.nuspec index 8ff3ebc355..5870cc336c 100644 --- a/build_all/packaging/windows/Microsoft.Azure.IoTHub.Serializer.nuspec +++ b/build_all/packaging/windows/Microsoft.Azure.IoTHub.Serializer.nuspec @@ -5,8 +5,8 @@ Microsoft Azure IoTHub Serializer Microsoft Corp Azure-IoT - https://github.com/Azure/azure-iot-sdks/blob/develop/LICENSE - https://github.com/Azure/azure-iot-sdks + https://github.com/Azure/azure-iot-sdk-c/blob/develop/LICENSE + https://github.com/Azure/azure-iot-sdk-c true Microsoft Azure IoTHub Serializer http://go.microsoft.com/fwlink/?LinkID=288890 diff --git a/jenkins/arduino_cc.cmd b/jenkins/arduino_cc.cmd new file mode 100644 index 0000000000..d939a17c43 --- /dev/null +++ b/jenkins/arduino_cc.cmd @@ -0,0 +1,14 @@ +@REM Copyright (c) Microsoft. All rights reserved. +@REM Licensed under the MIT license. See LICENSE file in the project root for full license information. + +setlocal + +set build-root=%~dp0.. +rem // resolve to fully qualified path +for %%i in ("%build-root%") do set build-root=%%~fi + +REM -- C -- +cd %build-root%\build_all\arduino_cc +call build.cmd %* +if errorlevel 1 goto :eof +cd %build-root% diff --git a/jenkins/arduinoyun_c.sh b/jenkins/arduinoyun_c.sh new file mode 100755 index 0000000000..be8bed2b61 --- /dev/null +++ b/jenkins/arduinoyun_c.sh @@ -0,0 +1,62 @@ +#!/bin/bash +# Copyright (c) Microsoft. All rights reserved. +# Licensed under the MIT license. See LICENSE file in the project root for full license information. + +install_root="$HOME" +build_root=$(cd "$(dirname "$0")/.." && pwd) +cd $build_root + +# ----------------------------------------------------------------------------- +# -- helper subroutines +# ----------------------------------------------------------------------------- +checkExists() { + if hash $1 2>/dev/null; + then + return 1 + else + echo "$1" not found. Please make sure that "$1" is installed and available in the path. + exit 1 + fi +} + +# ----------------------------------------------------------------------------- +# -- Check for environment pre-requisites. This script requires +# -- that the following programs work: +# -- curl uuid g++ make cmake git unzip gawk +# ----------------------------------------------------------------------------- +checkExists curl +checkExists uuid +checkExists g++ +checkExists make +checkExists cmake +checkExists git +checkExists unzip +checkExists gawk + +# ----------------------------------------------------------------------------- +# -- Run the ./setup.sh script to install the OpenWRT SDK +# ----------------------------------------------------------------------------- +if [ ! -d "$install_root/openwrt/sdk" ]; +then + echo ---------- Installing OpenWRT SDK by executing ./setup.sh script ---------- + cd $build_root/build_all/arduino + printf 'y\ny\n' | ./setup.sh +else + echo ---------- OpenWRT SDK is already installed ---------- +fi + +# ----------------------------------------------------------------------------- +# -- Modify serializer/samples/simplesample_http/simplesample_http.c +# ----------------------------------------------------------------------------- +echo ---------- Modifying serializer/samples/simplesample_http/simplesample_http.c file ---------- +cd $build_root +sed -i 's/\[device connection string\]/'$IOTHUB_DEVICE_CONN_STR'/g' serializer/samples/simplesample_http/simplesample_http.c + + +# ----------------------------------------------------------------------------- +# -- Build the SDK +# ----------------------------------------------------------------------------- +echo ---------- Building the SDK by executing build.sh script ---------- +cd $build_root/build_all/arduino +./build.sh +[ $? -eq 0 ] || exit $? diff --git a/jenkins/inteledison_c.sh b/jenkins/inteledison_c.sh new file mode 100755 index 0000000000..ba8c5f2938 --- /dev/null +++ b/jenkins/inteledison_c.sh @@ -0,0 +1,116 @@ +#!/bin/bash +# Copyright (c) Microsoft. All rights reserved. Licensed under the MIT +# license. See LICENSE file in the project root for full license +# information. + +# Tested on Ubuntu version 14.04 + +toolchain_root="/opt/poky-edison" + +install_root="$HOME" +build_root=$(cd "$(dirname "$0")/.." && pwd) + +cd $build_root + +# ----------------------------------------------------------------------------- +# -- helper subroutines +# ----------------------------------------------------------------------------- +checkExists() { + if hash $1 2>/dev/null; + then + return 1 + else + echo "$1" not found. Please make sure that "$1" is installed and available in the path. + exit 1 + fi +} + +# ----------------------------------------------------------------------------- +# -- setup Intel edison Tool chain for cross compilation on Ubuntu +# -- This method is not called in this script and kept only for showing the set of instructions needed to setup the cross compilation tool chain. +# -- Tool chain is already installed on the Jenkin slave. +# -- In future, If slave changes ,run these commands manually on new slave to setup the tool chain. +# ----------------------------------------------------------------------------- +setupIntelEdisonToolChain() { + + mkdir IntelEdisonSdk + cd IntelEdisonSdk + wget http://downloadmirror.intel.com/25028/eng/edison-sdk-linux64-ww25.5-15.zip + unzip edison-sdk-linux64-ww25.5-15.zip + SdkInstallScript=$(ls | grep .sh) + printf '\n' | ./$SdkInstallScript + DirName=$toolchain_root/$(ls $toolchain_root) + EnvFileName=$(DirName)/$(ls $DirName | grep environment) + source $EnvFileName +} + +# ----------------------------------------------------------------------------- +# -- Check for environment pre-requisites. +# -- This script requires that the following programs work: +# -- curl build-essential(g++,gcc,make) cmake git +# ----------------------------------------------------------------------------- +checkExists curl +checkExists g++ +checkExists gcc +checkExists make +checkExists cmake +checkExists git + +# ----------------------------------------------------------------------------- +# -- Check for Intel Edison tool-chain (default directory). +# ----------------------------------------------------------------------------- +if [ ! -d $toolchain_root ]; +then + echo ---------- Intel Edison tool-chain absent ---------- + exit 1 +fi + +# ----------------------------------------------------------------------------- +# -- Set environment variable +# ----------------------------------------------------------------------------- +DirName=$toolchain_root/$(ls $toolchain_root) +cd $DirName +cd $(ls -d */) +cd core2-32-poky-linux +export INTELEDISON_ROOT=$(pwd) + +# ----------------------------------------------------------------------------- +# -- Create toolchain-inteledison.cmake +# ----------------------------------------------------------------------------- +echo ---------- Creating toolchain cmake file ---------- +FILE="$build_root/build_all/linux/toolchain-inteledison.cmake" + +/bin/cat <$FILE +INCLUDE(CMakeForceCompiler) + +SET(CMAKE_SYSTEM_NAME Linux) # this one is important +SET(CMAKE_SYSTEM_VERSION 1) # this one not so much + +# this is the location of the amd64 toolchain targeting the Intel Edison +SET(CMAKE_C_COMPILER ${INTELEDISON_ROOT}/../x86_64-pokysdk-linux/usr/libexec/i586-poky-linux/gcc/i586-poky-linux/4.9.1/gcc) + +# this is the file system root of the target +SET(CMAKE_FIND_ROOT_PATH ${INTELEDISON_ROOT}) + +# search for programs in the build host directories +SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + +# for libraries and headers in the target directories +SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +EOM + +# ----------------------------------------------------------------------------- +# -- Modify iothub_client/samples/iothub_client_sample_http/iothub_client_sample_http.c +# ----------------------------------------------------------------------------- +echo ---------- Modifying iothub_client/samples/iothub_client_sample_http/iothub_client_sample_http.c file ---------- +cd $build_root +sed -i 's/\[device connection string\]/'$IOTHUB_DEVICE_CONN_STR'/g' iothub_client/samples/iothub_client_sample_http/iothub_client_sample_http.c + +# ----------------------------------------------------------------------------- +# -- Build the SDK +# ----------------------------------------------------------------------------- +echo ---------- Building the SDK by executing build.sh script ---------- +cd $build_root/build_all/linux +./build.sh --toolchain-file toolchain-inteledison.cmake --skip-unittests --no-mqtt -cl --sysroot=$INTELEDISON_ROOT +[ $? -eq 0 ] || exit $? diff --git a/jenkins/linux_c.sh b/jenkins/linux_c.sh new file mode 100755 index 0000000000..ab6d806bba --- /dev/null +++ b/jenkins/linux_c.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# Copyright (c) Microsoft. All rights reserved. +# Licensed under the MIT license. See LICENSE file in the project root for full license information. + +build_root=$(cd "$(dirname "$0")/.." && pwd) +cd $build_root + +# -- C -- +./build_all/linux/build.sh --run_valgrind "$@" #-x +[ $? -eq 0 ] || exit $? + diff --git a/jenkins/linux_c_gcc44.sh b/jenkins/linux_c_gcc44.sh new file mode 100755 index 0000000000..719ee9d545 --- /dev/null +++ b/jenkins/linux_c_gcc44.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# Copyright (c) Microsoft. All rights reserved. +# Licensed under the MIT license. See LICENSE file in the project root for full license information. + +build_root=$(cd "$(dirname "$0")/.." && pwd) +cd $build_root + +# -- C -- +./build_all/linux/build.sh --skip-unittests --use-websockets "$@" +[ $? -eq 0 ] || exit $? + diff --git a/jenkins/mbed_c.cmd b/jenkins/mbed_c.cmd new file mode 100644 index 0000000000..460bc1c1c0 --- /dev/null +++ b/jenkins/mbed_c.cmd @@ -0,0 +1,4 @@ +@REM Copyright (c) Microsoft. All rights reserved. +@REM Licensed under the MIT license. See LICENSE file in the project root for full license information. + +call build_all\mbed\build.cmd %* diff --git a/jenkins/raspberrypi_c.sh b/jenkins/raspberrypi_c.sh new file mode 100755 index 0000000000..8981604e03 --- /dev/null +++ b/jenkins/raspberrypi_c.sh @@ -0,0 +1,90 @@ +#!/bin/bash +# Copyright (c) Microsoft. All rights reserved. Licensed under the MIT +# license. See LICENSE file in the project root for full license +# information. + +# Tested on RPi2 debian verion 7.8 + +install_root="$HOME" +build_root=$(cd "$(dirname "$0")/.." && pwd) +cd $build_root + +# ----------------------------------------------------------------------------- +# -- helper subroutines +# ----------------------------------------------------------------------------- +checkExists() { + if hash $1 2>/dev/null; + then + return 1 + else + echo "$1" not found. Please make sure that "$1" is installed and available in the path. + exit 1 + fi +} +# ----------------------------------------------------------------------------- +# -- Check for environment pre-requisites. This script requires -- that +# the following programs work: -- curl build-essential(g++,gcc,make) +# cmake git +# ----------------------------------------------------------------------------- +checkExists curl +checkExists g++ +checkExists gcc +checkExists make +checkExists cmake +checkExists git + +# ----------------------------------------------------------------------------- +# -- Check for RPiTools directory. +# ----------------------------------------------------------------------------- +if [ ! -d "$install_root/RPiTools" ]; +then + echo ---------- Raspberry Pi tool-chain absent ---------- + exit 1 +fi + +# ----------------------------------------------------------------------------- +# -- Set environment variable +# ----------------------------------------------------------------------------- +cd $install_root/RPiTools/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf +export RPI_ROOT=$(pwd) + +# ----------------------------------------------------------------------------- +# -- Create toolchain-rpi.cmake +# ----------------------------------------------------------------------------- +echo ---------- Creating toolchain cmake file ---------- +FILE="$build_root/build_all/linux/toolchain-rpi.cmake" + +/bin/cat <$FILE +INCLUDE(CMakeForceCompiler) + +SET(CMAKE_SYSTEM_NAME Linux) # this one is important +SET(CMAKE_SYSTEM_VERSION 1) # this one not so much + +# this is the location of the amd64 toolchain targeting the Raspberry Pi +SET(CMAKE_C_COMPILER ${RPI_ROOT}/../bin/arm-linux-gnueabihf-gcc) + +# this is the file system root of the target +SET(CMAKE_FIND_ROOT_PATH ${RPI_ROOT}) + +# search for programs in the build host directories +SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + +# for libraries and headers in the target directories +SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +EOM + +# ----------------------------------------------------------------------------- +# -- Modify iothub_client/samples/iothub_client_sample_http/iothub_client_sample_http.c +# ----------------------------------------------------------------------------- +echo ---------- Modifying iothub_client/samples/iothub_client_sample_http/iothub_client_sample_http.c file ---------- +cd $build_root +sed -i 's/\[device connection string\]/'$IOTHUB_DEVICE_CONN_STR'/g' iothub_client/samples/iothub_client_sample_http/iothub_client_sample_http.c + +# ----------------------------------------------------------------------------- +# -- Build the SDK +# ----------------------------------------------------------------------------- +echo ---------- Building the SDK by executing build.sh script ---------- +cd $build_root/build_all/linux +./build.sh --toolchain-file toolchain-rpi.cmake --skip-unittests --no-amqp --no-mqtt -cl --sysroot=$RPI_ROOT +[ $? -eq 0 ] || exit $? diff --git a/jenkins/ti3200_c.cmd b/jenkins/ti3200_c.cmd new file mode 100644 index 0000000000..d43493cad0 --- /dev/null +++ b/jenkins/ti3200_c.cmd @@ -0,0 +1,105 @@ +@REM Copyright (c) Microsoft. All rights reserved. +@REM Licensed under the MIT license. See LICENSE file in the project root for full license information. + +@echo off + +setlocal + +set installers-path=c:\ti +IF [%installers-path%]==[] goto:installerspath-not-set + +set install-root=c:\\ti +if not exist "%install-root%" mkdir %install-root% + +set sdkversion=1.1.0 + +rem // This Script can run for multiple TI SDK versions based on the value of the enviornment variable. +rem // Check for enviornment variable defining CC3200 SDK version. If defined use the SDK version +if defined CC3200_SDK_VERSION set sdkversion=%CC3200_SDK_VERSION% + +set cc3200sdk=CC3200SDK_%sdkversion% + +echo ********** INSTALLING CC3200 SDK ********** +if not exist "%install-root%\%cc3200sdk%" start /wait %installers-path%\CC3200SDK-%sdkversion%-windows-installer.exe --mode unattended --prefix %install-root%\%cc3200sdk% + +echo ********** INSTALLING Tirtos Simplelink ********** +if not exist "%install-root%\tirtos_simplelink_2_14_01_20" start /wait %installers-path%\tirtos_simplelink_setupwin32_2_14_01_20.exe --mode unattended --prefix %install-root% + +echo ********** EXTRACTING ns ********** +if not exist "%install-root%\ns_1_10_00_00_eng" powershell.exe -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('%installers-path%\ns_1_10_00_00_eng.zip', '%install-root%'); }" + +echo ********** INSTALLING TI ARM Compiler ********** +if not exist "%install-root%\ti-cgt-arm_5.2.5" start /wait %installers-path%\ti_cgt_tms470_5.2.5_windows_installer.exe --mode unattended --prefix %install-root% + +set build-root=%~dp0.. +rem // resolve to fully qualified path +for %%i in ("%build-root%") do set build-root=%%~fi + +REM -- C -- +cd /d %build-root%\c\build_all\tirtos + +@echo off +echo ********** UPDATING products.mak ********** +call:DoReplace "c:\\ti\\xdctools_3_31_01_33_core" "%install-root%\\xdctools_3_31_01_33_core" products.mak +call:DoReplace "c:\\ti/tirtos_simplelink_2_14_01_20" "%install-root%/tirtos_simplelink_2_14_01_20" products.mak +call:DoReplace "bios_6_42_02_29" "bios_6_42_02_29" products.mak +call:DoReplace "c:\\ti/ns_1_10_00_00_eng" "%install-root%/ns_1_10_00_00_eng" products.mak +call:DoReplace "c:\\ti/CC3200SDK_1.1.0/cc3200-sdk" "%install-root%/%cc3200sdk%/cc3200-sdk" products.mak +call:DoReplace "c:\\ti/ti-cgt-arm_5.2.5" "%install-root%/ti-cgt-arm_5.2.5" products.mak +call:DoReplace "CC3200SDK_VERSION = 1.1.0" "CC3200SDK_VERSION = %sdkversion%" products.mak + +@echo on +call %install-root%\\xdctools_3_31_01_33_core\\gmake.exe clean +call %install-root%\\xdctools_3_31_01_33_core\\gmake.exe all + +cd /d %build-root%\c\serializer\samples\simplesample_http\tirtos\cc3200 + +@echo off +echo ********** UPDATING %build-root%\c\serializer\samples\simplesample_http\simplesample_http.c ********** +call:DoReplace "[device connection string]" "%DEVICE_CONNECTION_STRING%" %build-root%\c\serializer\samples\simplesample_http\simplesample_http.c + +@echo off +echo ********** UPDATING %build-root%\c\serializer\samples\simplesample_http\tirtos\cc3200\main.c ********** +for /F "tokens=1-4 delims=/ " %%a in ('echo %DATE%') do ( +set month=%%b +set day=%%c +set year=%%d +) +for /F "tokens=1-4 delims=:. " %%a in ('echo %TIME%') do ( +set hour=%%a +set minute=%%b +set second=%%c +) +call:DoReplace "#define DAY 15" "#define DAY %day%" %build-root%\c\serializer\samples\simplesample_http\tirtos\cc3200\main.c +call:DoReplace "#define MONTH 9" "#define MONTH %month%" %build-root%\c\serializer\samples\simplesample_http\tirtos\cc3200\main.c +call:DoReplace "#define YEAR 2015" "#define YEAR %year%" %build-root%\c\serializer\samples\simplesample_http\tirtos\cc3200\main.c +call:DoReplace "#define HOUR 6" "#define HOUR %hour%" %build-root%\c\serializer\samples\simplesample_http\tirtos\cc3200\main.c +call:DoReplace "#define MINUTE 21" "#define MINUTE %minute%" %build-root%\c\serializer\samples\simplesample_http\tirtos\cc3200\main.c +call:DoReplace "#define SECOND 0" "#define SECOND %second%" %build-root%\c\serializer\samples\simplesample_http\tirtos\cc3200\main.c + +echo ********** DOWNLOADING elf2cc32.exe ********** +if not exist "%build-root%\c\serializer\samples\simplesample_http\tirtos\cc3200\tools" mkdir %build-root%\c\serializer\samples\simplesample_http\tirtos\cc3200\tools +powershell.exe -nologo -noprofile -command "& {Add-Type -A 'System.Net'; (new-object System.Net.WebClient).DownloadFile('https://github.com/tisb-vikram/azure-iot-sdks/blob/7da24633b2c4af3bc779998e9950146f061a8a10/c/serializer/samples/simplesample_http/tirtos/cc3200/tools/elf2cc32.exe?raw=true','%build-root%\c\serializer\samples\simplesample_http\tirtos\cc3200\tools\elf2cc32.exe'); }" +if not exist "%install-root%\ns_1_10_00_00_eng\tools" mkdir %install-root%\ns_1_10_00_00_eng\tools +powershell.exe -nologo -noprofile -command "& {Add-Type -A 'System.Net'; (new-object System.Net.WebClient).DownloadFile('https://github.com/tisb-vikram/azure-iot-sdks/blob/7da24633b2c4af3bc779998e9950146f061a8a10/c/serializer/samples/simplesample_http/tirtos/cc3200/tools/elf2cc32.exe?raw=true','%install-root%\ns_1_10_00_00_eng\tools\elf2cc32.exe'); }" + +set PATH=%PATH%;%install-root%\xdctools_3_31_01_33_core;%install-root%\xdctools_3_31_01_33_core\bin + +@echo on +call %install-root%\xdctools_3_31_01_33_core\gmake.exe clean +call %install-root%\xdctools_3_31_01_33_core\gmake.exe all + +@echo off +if errorlevel 1 goto :eof +cd %build-root% +goto:eof + +:DoReplace +echo ^(Get-Content "%3"^).replace^(%1, %2^) ^| Set-Content %3>Rep.ps1 +Powershell.exe -executionpolicy ByPass -File Rep.ps1 +if exist Rep.ps1 del Rep.ps1 +goto:eof + +:installerspath-not-set +echo installers-path variable not set in script +goto:eof diff --git a/jenkins/ubuntu1510_c.sh b/jenkins/ubuntu1510_c.sh new file mode 100755 index 0000000000..462b271583 --- /dev/null +++ b/jenkins/ubuntu1510_c.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# Copyright (c) Microsoft. All rights reserved. +# Licensed under the MIT license. See LICENSE file in the project root for full license information. + +build_root=$(cd "$(dirname "$0")/.." && pwd) +cd $build_root + +# -- C -- +./build_all/linux/build.sh --run_valgrind --run-e2e-tests "$@" #-x +[ $? -eq 0 ] || exit $? + diff --git a/jenkins/windows_c.cmd b/jenkins/windows_c.cmd new file mode 100644 index 0000000000..b9bfa4c8ed --- /dev/null +++ b/jenkins/windows_c.cmd @@ -0,0 +1,14 @@ +@REM Copyright (c) Microsoft. All rights reserved. +@REM Licensed under the MIT license. See LICENSE file in the project root for full license information. + +setlocal + +set build-root=%~dp0.. +rem // resolve to fully qualified path +for %%i in ("%build-root%") do set build-root=%%~fi + +REM -- C -- +cd %build-root%\build_all\windows +call build.cmd --run-e2e-tests --build-traceabilitytool %* +if errorlevel 1 goto :eof +cd %build-root% diff --git a/jenkins/windowsce_c.cmd b/jenkins/windowsce_c.cmd new file mode 100644 index 0000000000..85b4abdbaa --- /dev/null +++ b/jenkins/windowsce_c.cmd @@ -0,0 +1,14 @@ +@REM Copyright (c) Microsoft. All rights reserved. +@REM Licensed under the MIT license. See LICENSE file in the project root for full license information. + +setlocal + +set build-root=%~dp0.. +rem // resolve to fully qualified path +for %%i in ("%build-root%") do set build-root=%%~fi + +REM -- C -- +cd %build-root%\build_all\windowsce +call build.cmd +if errorlevel 1 goto :eof +cd %build-root% diff --git a/thirdpartynotice.txt b/thirdpartynotice.txt new file mode 100644 index 0000000000..9a8222caa0 --- /dev/null +++ b/thirdpartynotice.txt @@ -0,0 +1,1015 @@ + +Third Party Notices for Azure IoT SDKs project + +This project incorporates material from the project(s) listed below (collectively, “Third Party Code”). +Microsoft Corporation is not the original author of the Third Party Code. +The original copyright notice and license, under which Microsoft Corporation received such Third Party Code, +are set out below. This Third Party Code is licensed to you under their original license terms set forth below. +Microsoft Corporation reserves all other rights not expressly granted, whether by implication, estoppel or otherwise. + + Paho Java v1.0.2, obtained from https://github.com/eclipse/paho.mqtt.java + +/* +Eclipse Public License - v 1.0 + +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE + PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR + DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS + AGREEMENT. + +1. DEFINITIONS + +"Contribution" means: + +a) in the case of the initial Contributor, the initial + code and documentation distributed under this Agreement, and + +b) in the case of each subsequent Contributor: + +i) changes to the Program, and + +ii) additions to the Program; + +where such changes and/or additions to the Program + originate from and are distributed by that particular Contributor. A + Contribution 'originates' from a Contributor if it was added to the + Program by such Contributor itself or anyone acting on such + Contributor's behalf. Contributions do not include additions to the + Program which: (i) are separate modules of software distributed in + conjunction with the Program under their own license agreement, and (ii) + are not derivative works of the Program. + +"Contributor" means any person or entity that distributes + the Program. + +"Licensed Patents" mean patent claims licensable by a + Contributor which are necessarily infringed by the use or sale of its + Contribution alone or when combined with the Program. + +"Program" means the Contributions distributed in accordance + with this Agreement. + +"Recipient" means anyone who receives the Program under + this Agreement, including all Contributors. + +2. GRANT OF RIGHTS + +a) Subject to the terms of this Agreement, each + Contributor hereby grants Recipient a non-exclusive, worldwide, + royalty-free copyright license to reproduce, prepare derivative works + of, publicly display, publicly perform, distribute and sublicense the + Contribution of such Contributor, if any, and such derivative works, in + source code and object code form. + +b) Subject to the terms of this Agreement, each + Contributor hereby grants Recipient a non-exclusive, worldwide, + royalty-free patent license under Licensed Patents to make, use, sell, + offer to sell, import and otherwise transfer the Contribution of such + Contributor, if any, in source code and object code form. This patent + license shall apply to the combination of the Contribution and the + Program if, at the time the Contribution is added by the Contributor, + such addition of the Contribution causes such combination to be covered + by the Licensed Patents. The patent license shall not apply to any other + combinations which include the Contribution. No hardware per se is + licensed hereunder. + +c) Recipient understands that although each Contributor + grants the licenses to its Contributions set forth herein, no assurances + are provided by any Contributor that the Program does not infringe the + patent or other intellectual property rights of any other entity. Each + Contributor disclaims any liability to Recipient for claims brought by + any other entity based on infringement of intellectual property rights + or otherwise. As a condition to exercising the rights and licenses + granted hereunder, each Recipient hereby assumes sole responsibility to + secure any other intellectual property rights needed, if any. For + example, if a third party patent license is required to allow Recipient + to distribute the Program, it is Recipient's responsibility to acquire + that license before distributing the Program. + +d) Each Contributor represents that to its knowledge it + has sufficient copyright rights in its Contribution, if any, to grant + the copyright license set forth in this Agreement. + +3. REQUIREMENTS + +A Contributor may choose to distribute the Program in object code + form under its own license agreement, provided that: + +a) it complies with the terms and conditions of this + Agreement; and + +b) its license agreement: + +i) effectively disclaims on behalf of all Contributors + all warranties and conditions, express and implied, including warranties + or conditions of title and non-infringement, and implied warranties or + conditions of merchantability and fitness for a particular purpose; + +ii) effectively excludes on behalf of all Contributors + all liability for damages, including direct, indirect, special, + incidental and consequential damages, such as lost profits; + +iii) states that any provisions which differ from this + Agreement are offered by that Contributor alone and not by any other + party; and + +iv) states that source code for the Program is available + from such Contributor, and informs licensees how to obtain it in a + reasonable manner on or through a medium customarily used for software + exchange. + +When the Program is made available in source code form: + +a) it must be made available under this Agreement; and + +b) a copy of this Agreement must be included with each + copy of the Program. + +Contributors may not remove or alter any copyright notices contained + within the Program. + +Each Contributor must identify itself as the originator of its + Contribution, if any, in a manner that reasonably allows subsequent + Recipients to identify the originator of the Contribution. + +4. COMMERCIAL DISTRIBUTION + +Commercial distributors of software may accept certain + responsibilities with respect to end users, business partners and the + like. While this license is intended to facilitate the commercial use of + the Program, the Contributor who includes the Program in a commercial + product offering should do so in a manner which does not create + potential liability for other Contributors. Therefore, if a Contributor + includes the Program in a commercial product offering, such Contributor + ("Commercial Contributor") hereby agrees to defend and + indemnify every other Contributor ("Indemnified Contributor") + against any losses, damages and costs (collectively "Losses") + arising from claims, lawsuits and other legal actions brought by a third + party against the Indemnified Contributor to the extent caused by the + acts or omissions of such Commercial Contributor in connection with its + distribution of the Program in a commercial product offering. The + obligations in this section do not apply to any claims or Losses + relating to any actual or alleged intellectual property infringement. In + order to qualify, an Indemnified Contributor must: a) promptly notify + the Commercial Contributor in writing of such claim, and b) allow the + Commercial Contributor to control, and cooperate with the Commercial + Contributor in, the defense and any related settlement negotiations. The + Indemnified Contributor may participate in any such claim at its own + expense. + +For example, a Contributor might include the Program in a commercial + product offering, Product X. That Contributor is then a Commercial + Contributor. If that Commercial Contributor then makes performance + claims, or offers warranties related to Product X, those performance + claims and warranties are such Commercial Contributor's responsibility + alone. Under this section, the Commercial Contributor would have to + defend claims against the other Contributors related to those + performance claims and warranties, and if a court requires any other + Contributor to pay any damages as a result, the Commercial Contributor + must pay those damages. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS + PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS + OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, + ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY + OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely + responsible for determining the appropriateness of using and + distributing the Program and assumes all risks associated with its + exercise of rights under this Agreement , including but not limited to + the risks and costs of program errors, compliance with applicable laws, + damage to or loss of data, programs or equipment, and unavailability or + interruption of operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT + NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING + WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR + DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED + HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. GENERAL + +If any provision of this Agreement is invalid or unenforceable under + applicable law, it shall not affect the validity or enforceability of + the remainder of the terms of this Agreement, and without further action + by the parties hereto, such provision shall be reformed to the minimum + extent necessary to make such provision valid and enforceable. + +If Recipient institutes patent litigation against any entity + (including a cross-claim or counterclaim in a lawsuit) alleging that the + Program itself (excluding combinations of the Program with other + software or hardware) infringes such Recipient's patent(s), then such + Recipient's rights granted under Section 2(b) shall terminate as of the + date such litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it + fails to comply with any of the material terms or conditions of this + Agreement and does not cure such failure in a reasonable period of time + after becoming aware of such noncompliance. If all Recipient's rights + under this Agreement terminate, Recipient agrees to cease use and + distribution of the Program as soon as reasonably practicable. However, + Recipient's obligations under this Agreement and any licenses granted by + Recipient relating to the Program shall continue and survive. + +Everyone is permitted to copy and distribute copies of this + Agreement, but in order to avoid inconsistency the Agreement is + copyrighted and may only be modified in the following manner. The + Agreement Steward reserves the right to publish new versions (including + revisions) of this Agreement from time to time. No one other than the + Agreement Steward has the right to modify this Agreement. The Eclipse + Foundation is the initial Agreement Steward. The Eclipse Foundation may + assign the responsibility to serve as the Agreement Steward to a + suitable separate entity. Each new version of the Agreement will be + given a distinguishing version number. The Program (including + Contributions) may always be distributed subject to the version of the + Agreement under which it was received. In addition, after a new version + of the Agreement is published, Contributor may elect to distribute the + Program (including its Contributions) under the new version. Except as + expressly stated in Sections 2(a) and 2(b) above, Recipient receives no + rights or licenses to the intellectual property of any Contributor under + this Agreement, whether expressly, by implication, estoppel or + otherwise. All rights in the Program not expressly granted under this + Agreement are reserved. + +This Agreement is governed by the laws of the State of New York and + the intellectual property laws of the United States of America. No party + to this Agreement will bring a legal action under this Agreement more + than one year after the cause of action arose. Each party waives its + rights to a jury trial in any resulting litigation. + +*/ + + Apache Qpid Proton, obtained from https://github.com/apache/qpid-proton +/* + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + +*/ + + Json.NET v6.0.8, obtained from https://www.nuget.org/packages/Newtonsoft.Json + /* + The MIT License (MIT) + +Copyright (c) 2007 James Newton-King + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + Json.NET v7.0.1, obtained from https://www.nuget.org/packages/Newtonsoft.Json + /* + The MIT License (MIT) + +Copyright (c) 2007 James Newton-King + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + OpenSSL, obtained from https://github.com/openssl/openssl.git + + LICENSE ISSUES + ============== + + The OpenSSL toolkit stays under a dual license, i.e. both the conditions of + the OpenSSL License and the original SSLeay license apply to the toolkit. + See below for the actual license texts. Actually both licenses are BSD-style + Open Source licenses. In case of any license issues related to OpenSSL + please contact openssl-core@openssl.org. + + OpenSSL License + --------------- + +/* ==================================================================== + * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * ==================================================================== + * + * This product includes cryptographic software written by Eric Young + * (eay@cryptsoft.com). This product includes software written by Tim + * Hudson (tjh@cryptsoft.com). + * + */ + + Original SSLeay License + ----------------------- + +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * The implementation was written so as to conform with Netscapes SSL. + * + * This library is free for commercial and non-commercial use as long as + * the following conditions are aheared to. The following conditions + * apply to all code found in this distribution, be it the RC4, RSA, + * lhash, DES, etc., code; not just the SSL code. The SSL documentation + * included with this distribution is covered by the same copyright terms + * except that the holder is Tim Hudson (tjh@cryptsoft.com). + * + * Copyright remains Eric Young's, and as such any Copyright notices in + * the code are not to be removed. + * If this package is used in a product, Eric Young should be given attribution + * as the author of the parts of the library used. + * This can be in the form of a textual message at program startup or + * in documentation (online or textual) provided with the package. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * "This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com)" + * The word 'cryptographic' can be left out if the rouines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licence + * [including the GNU Public Licence.] + */ + + OWIN 1.0, obtained from https://github.com/owin-contrib/owin-hosting/blob/master/LICENSE.txt + /* + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + Google gson version 2.5, obtained from https://github.com/google/gson +/* + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ \ No newline at end of file From 2f93b0df4572db9ccace28e635475edf9c7dacff Mon Sep 17 00:00:00 2001 From: Olivier Bloch Date: Wed, 16 Nov 2016 16:50:29 -0800 Subject: [PATCH 05/13] Updated readmes and other instructions --- CONTRIBUTING.md | 13 ++-- doc/devbox_setup.md | 41 +++++------ doc/mbed_get_started.md | 101 ++++++++++++++++++++++++++ doc/ubuntu_apt-get_sample_setup.md | 98 +++++++++++++++++++++++++ iothub_client/readme.md | 111 +++++++++++++++++++++++++++++ iothub_client/readme.txt | 1 - iothub_client/samples/readme.md | 36 ++++++++++ iothub_service_client/readme.md | 5 ++ readme.md | 110 +++++++++++++++++++++------- 9 files changed, 459 insertions(+), 57 deletions(-) create mode 100644 doc/mbed_get_started.md create mode 100644 doc/ubuntu_apt-get_sample_setup.md create mode 100644 iothub_client/readme.md delete mode 100644 iothub_client/readme.txt create mode 100644 iothub_client/samples/readme.md create mode 100644 iothub_service_client/readme.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 165324750b..123ee59ff7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,12 +12,11 @@ We monitor the Github issues section specifically for bugs found with our SDK, h # File a bug (code or documentation) That is definitely something we want to hear about. Please open an issue on github, we'll address it as fast as possible. Typically here's the information we're going to ask for to get started: -- What SDK are you using (Node, C, C#, Python, Java?) -- What version of the SDK? +- What version of the SDK you are using? - Do you have a snippet of code that would help us reproduce the bug? - Do you have logs showing what's happening? -Our SDK is entirely open-source and we do accept pull-requests if you feel like taking a stab at fixing the bug and maybe adding your name to our commit history :) Please mention +Our SDKs are entirely open-source and we do accept pull-requests if you feel like taking a stab at fixing the bug and maybe adding your name to our commit history :) Please mention any relevant issue number in the pull request description. # Contribute documentation @@ -43,19 +42,19 @@ The following steps describe adding a new requirement in a Word document: * Add the requirement text and select it -![](media/add_requirement/add_requirement_step1.png) +![](https://github.com/azure/azure-iot-sdks/raw/master/media/add_requirement/add_requirement_step1.png) * Invoke the macro with the selected text -![](media/add_requirement/add_requirement_step2.png) +![](https://github.com/azure/azure-iot-sdks/raw/master/media/add_requirement/add_requirement_step2.png) * Select developer id 99 -![](media/add_requirement/add_requirement_step3.png) +![](https://github.com/azure/azure-iot-sdks/raw/master/media/add_requirement/add_requirement_step3.png) * Done! -![](media/add_requirement/add_requirement_step4.png) +![](https://github.com/azure/azure-iot-sdks/raw/master/media/add_requirement/add_requirement_step4.png) When contributing to markdown requirement docs, you can also use `99` for a developer id, and just increment the last number of the requirement to be unique. diff --git a/doc/devbox_setup.md b/doc/devbox_setup.md index fb237a6fc1..c3f63f21d3 100644 --- a/doc/devbox_setup.md +++ b/doc/devbox_setup.md @@ -7,7 +7,7 @@ This document describes how to prepare your development environment to use the * - [Setting up a Windows Embedded Compact 2013 development environment](#windowsce) - [Sample applications](#samplecode) - + ## Setting up a Windows development environment - Install [Visual Studio 2015][visual-studio]. You can use the **Visual Studio Community** Free download if you meet the licensing requirements. @@ -17,17 +17,15 @@ Be sure to include Visual C++ and NuGet Package Manager. - Clone the **latest** available version of this repository (**master** branch) to your local machine with the **recursive** parameter to include submodules. ``` -git clone --recursive https://github.com/Azure/azure-iot-sdks.git +git clone --recursive https://github.com/Azure/azure-iot-sdk-c.git ``` -**recursive** parameter will include other projects (**submodules**) [azure-shared-c-utility], [azure-uamqp-c], [azure-umqtt-c] that **azure-iot-sdks** project has dependence on. +**recursive** parameter will include other projects (**submodules**) [azure-shared-c-utility], [azure-uamqp-c], [azure-umqtt-c] that **azure-iot-sdk-c** project has dependencies on. -C SDK source is located under **c** folder **azure-iot-sdks\\c** - -[Releases of azure-iot-sdks] has list of available **releases**. +[Releases of azure-iot-sdk-c] has list of available **releases**. ### Building the sample applications only For **quickly** testing the sample application of your choice open the corresponding [solution (.sln) file] in VS 2015 IDE. -For example, to build **MQTT sample**, go to c\iothub_client\samples\iothub_client_sample_mqtt\windows and open **iothub_client_sample_mqtt.sln** file in VS 2015. +For example, to build **MQTT sample**, go to iothub_client\samples\iothub_client_sample_mqtt\windows and open **iothub_client_sample_mqtt.sln** file in VS 2015. Build and run the application after replacing `connectionString = "[device connection string]"` with the actual valid device connection string. @@ -39,7 +37,7 @@ For example, you may want to build the latest code available on the **develop** To pull latest code on **develop** branch you can use following command -`git clone -b develop --recursive https://github.com/Azure/azure-iot-sdks.git azure-iot-develop` +`git clone -b develop --recursive https://github.com/Azure/azure-iot-sdk-c.git azure-iot-develop` The following instructions outline how you can build the C SDK (along with samples): @@ -47,10 +45,10 @@ The following instructions outline how you can build the C SDK (along with sampl 2. Open a Developer Command Prompt for VS2015. -4. Go to scripts folder located at **c\\build_all\\windows**. Run the build script **build_client.cmd** or **build.cmd** which will invoke cmake to create solution files which will then be used by msbuild to build the projects +4. Go to scripts folder located at **build_all\\windows**. Run the build script **build_client.cmd** or **build.cmd** which will invoke cmake to create solution files which will then be used by msbuild to build the projects After successful running of the script, you should see cmake folder created under c folder. -For Win32 (default configuration) you should see **c\\cmake\\iotsdk_win32**. For x64, you should see c\cmake\iotsdk_x64. +For Win32 (default configuration) you should see **cmake\\iotsdk_win32**. For x64, you should see cmake\iotsdk_x64. **azure_iot_sdks.sln** created under cmake folder will contain all sub-projects that you can directly open in VS 2015 IDE to build libraries or samples in IDE. @@ -88,7 +86,7 @@ Below are steps to build and install OpenSSL libraries and corresponding DLL's. After completing the above steps make sure OpenSSL libraries and DLL's are in your OpenSSL install location. Now follow below steps to build library and sample using WebSocket -1. Open VS 2015 Developer Command Prompt and go to **\\c\\build_all\\windows** +1. Open VS 2015 Developer Command Prompt and go to **\\build_all\\windows** 2. Set OpenSSLDir and OPENSSL_ROOT_DIR **environment variables** to OpenSSL install location. For example, if your OpenSSL install location is **C:\usr\\local\\ssl**, you will set following @@ -101,7 +99,7 @@ Now enter following command to build sample using websocket This will build C SDK libraries along with **iothub_client_sample_amqp_websockets** sample. - + ## Set up a Linux development environment This section shows you how to set up a development environment for the Azure IoT device SDK for C on [Ubuntu]. [CMake] will create makefiles and [make] tool will use these makefiles to compile the C SDK source code using [gcc] compiler. @@ -116,10 +114,10 @@ Older **gcc** version **4.4.7** support has also been added and tested on 14.04. Clone the latest version of this repository to your Ubuntu machine with the recursive parameter to fetch latest code from **master** branch -`git clone --recursive https://github.com/Azure/azure-iot-sdks.git` +`git clone --recursive https://github.com/Azure/azure-iot-sdk-c.git` > In case, you want to pull latest code on **develop** branch you can use following command -`git clone -b develop --recursive https://github.com/Azure/azure-iot-sdks.git azure-iot-develop` +`git clone -b develop --recursive https://github.com/Azure/azure-iot-sdk-c.git azure-iot-develop` 1. Open a shell and navigate to the folder **c/build_all/linux** in your local copy of the repository. @@ -142,7 +140,7 @@ Below are some of the build **options** you can use `./build.sh -cl -g`: Build **debug** build > Tip: After running `./build.sh` if you want to just build a **particular sample** or library after making changes, you can directly go the corresponding cmake directory and run the [make] command. -For example, to build **mqtt** sample after making changes in it you can directly go to c/cmake/iotsdk_linux/iothub_client/samples/iothub_client_sample_mqtt directory and run `make` command from that directory. +For example, to build **mqtt** sample after making changes in it you can directly go to cmake/iotsdk_linux/iothub_client/samples/iothub_client_sample_mqtt directory and run `make` command from that directory. > Note: Every time you run `build.sh`, it deletes and then recreates the "cmake" folder under c folder. @@ -150,7 +148,7 @@ For example, to build **mqtt** sample after making changes in it you can directl > Note: You will not be able to run the samples until you configure them with a valid IoT Hub device connection string. For more information, see [Run sample on Linux](../../doc/get_started/linux-desktop-c.md). - + ## Set up a Windows Embedded Compact 2013 development environment - Install [Visual Studio 2015][visual-studio]. You can use the free Community Edition if you meet the licensing requirements. @@ -161,7 +159,7 @@ Be sure to include Visual C++ and NuGet Package Manager. - Clone the latest version of this repository to your local machine. Use the **master** branch to ensure you fetch the latest release version. -If you installed a different SDK please check azure-iot-sdks\\c\\build_all\\windowsce\\build.cmd and replace: +If you installed a different SDK please check azure-iot-sdk-c\\build_all\\windowsce\\build.cmd and replace: ``` set SDKNAME=TORADEX_CE800 set PROCESSOR=arm @@ -174,7 +172,7 @@ You can build the Windows samples to verify that your environment is set up corr 1. Open a Visual Studio 2015 Developer command prompt. -2. Navigate to the **c\\build_all\\windowsce** folder in your local copy of the repository. +2. Navigate to the **build_all\\windowsce** folder in your local copy of the repository. 3. Run the following command: @@ -190,20 +188,19 @@ To view the projects and examine the source code, open the **azure_iot_sdks.sln* You can use one of the sample applications as a template to get started when you are creating your own client applications. - + ## Sample applications This repository contains various C sample applications that illustrate how to use the Azure IoT device SDK for C. For more information, see the [Read Me][readme]. [visual-studio]: https://www.visualstudio.com/downloads/ -[readme]: ../readme.md -[device-explorer]: ../../tools/DeviceExplorer/readme.md +[device-explorer]: https://github.com/Azure/azure-iot-sdks/tree/master/tools/DeviceExplorer [toradex-CE8-sdk]:http://docs.toradex.com/102578 [application-builder]:http://www.microsoft.com/download/details.aspx?id=38819 [azure-shared-c-utility]:https://github.com/Azure/azure-c-shared-utility [azure-uamqp-c]:https://github.com/Azure/azure-uamqp-c [azure-umqtt-c]:https://github.com/Azure/azure-umqtt-c -[Releases of azure-iot-sdks]:https://github.com/Azure/azure-iot-sdks/releases +[Releases of azure-iot-sdk-c]:https://github.com/Azure/azure-iot-sdk-c/releases [solution(.sln) file]:https://msdn.microsoft.com/en-us/library/bb165951.aspx [NuGet]:https://www.nuget.org/ [CMake]:https://cmake.org/ diff --git a/doc/mbed_get_started.md b/doc/mbed_get_started.md new file mode 100644 index 0000000000..f7e3ae9953 --- /dev/null +++ b/doc/mbed_get_started.md @@ -0,0 +1,101 @@ +Run a simple C sample on Freescale FRDM-K64F device running mbed +--- + +# Table of Contents + +- [Introduction](#Introduction) +- [Step 1: Prerequisites](#Step-1-Prerequisites) +- [Step 2: Prepare your Device](#Step-2-PrepareDevice) +- [Step 3: Build and Run the Sample](#Step-3-Build) +- [Tips](#tips) + + +# Introduction + +**About this document** + +This document describes the steps for connecting an [mbed-enabled Freescale FRDM-K64F](https://developer.mbed.org/platforms/FRDM-K64F/) device to Azure IoT Hub. This multi-step process includes: +- Configuring Azure IoT Hub +- Registering your IoT device +- Build and deploy Azure IoT SDK on device + + +# Step 1: Prerequisites + +You should have the following items ready before beginning the process: +- Computer with Git client installed and access to the + [azure-iot-sdks](https://github.com/Azure/azure-iot-sdks) GitHub public repository. +- SSH client on your desktop computer, such as [PuTTY](http://www.putty.org/), so you can remotely access the command line on the Freescale FRDM-K64F. +- Required hardware: [mbed-enabled Freescale K64F](http://developer.mbed.org/platforms/IBMEthernetKit). +- [Setup your IoT hub][lnk-setup-iot-hub] +- [Provision your device and get its credentials][lnk-manage-iot-hub] + + +# Step 2: Prepare your Device + +- Connect the board to your network using an Ethernet cable. This step is required, as the sample depends on internet access. + +- Plug the device into your computer using a micro-USB cable. **Be sure to attach the cable to the USB port next to the reset button on the FRDM-K64F device**. + +- Follow the [instructions on the mbed handbook](https://developer.mbed.org/handbook/SerialPC) to set up the serial connection with your device from your development machine. If you are on Windows, install the Windows serial port drivers located [here](http://developer.mbed.org/handbook/Windows-serial-configuration#1-download-the-mbed-windows-serial-port). + + +# Step 3: Build and Run the sample + +## Create mbed project and import the sample code + +- In your web browser, go to the mbed.org [developer site](https://developer.mbed.org/). If you haven't signed up, you will see an option to create a new account (it's free). Otherwise, log in with your account credentials. Then click on **Compiler** in the upper right-hand corner of the page. This should bring you to the Workspace Management interface. + +- Make sure the hardware platform you're using appears in the upper right-hand corner of the window, or click the icon in the right-hand corner to select your hardware platform. + +- Click **Import** on the main menu. Then click the **Click here** to import from URL link next to the mbed globe logo. + + ![][1] + +- In the popup window, enter the link for the sample code https://developer.mbed.org/users/AzureIoTClient/code/iothub_client_sample_amqp/ (note that if you want to try the sample using HTTP instead of AMQP, you can import this other sample: https://developer.mbed.org/users/AzureIoTClient/code/iothub_client_sample_http/ + + ![][2] + +- You can see in the mbed compiler that importing this project imported various libraries. Some are provided and maintained by the Azure IoT team ([azureiot_common](https://developer.mbed.org/users/AzureIoTClient/code/azureiot_common/), [iothub_client](https://developer.mbed.org/users/AzureIoTClient/code/iothub_client/), [iothub_amqp_transport](https://developer.mbed.org/users/AzureIoTClient/code/iothub_amqp_transport/), [iothub_http_transport](https://developer.mbed.org/users/AzureIoTClient/code/iothub_http_transport/), [azure-uamqp-c](https://developer.mbed.org/users/AzureIoTClient/code/azure_uamqp_c/)), while others are third party libraries available in the mbed libraries catalog. + + ![][3] + +- Open iothub_client_sample_amqp/iothub_client_sample_amqp.c, and replace "[device connection string]" with the device connection string you noted [earlier](#Step-1-Prerequisites): + + ![][4] + +- Save the changes. + +## Build and run the program + +- Click **Compile** to build the program. You can safely ignore any warnings, but if the build generates errors, fix them before proceeding. + + ![][5] + +- If the build is successful, a .bin file with the name of your project is generated. Copy the .bin file to the device. Saving the .bin file to the device causes the current terminal session to the device to reset. When it reconnects, reset the terminal again manually, or start a new terminal. This enables the mbed device to reset and start executing the program. + +- Connect to the device using an SSH terminal program, such as PuTTY. You can determine which serial port your device uses by checking the Windows Device Manager: + + ![][6] + +- In PuTTY, click the **Serial** connection type. The device most likely connects at 115200, so enter that value in the **Speed** box. Then click **Open**: **NOTE** Try 9600 if unable to communicate with the board. + + ![][7] + +The program starts executing. You may have to reset the board (press CTRL+Break or press on the board's reset button) if the program does not start automatically when you connect. + +## Monitor device data and send messages + +- See [Manage IoT Hub][lnk-manage-iot-hub] to learn how to observe the messages IoT Hub receives from the application and how to send cloud-to-device messages to the application. + + +[1]: ./media/mbed1.png +[2]: ./media/mbed2.png +[3]: ./media/mbed3.png +[4]: ./media/mbed4.png +[5]: ./media/mbed5.png +[6]: ./media/mbed6.png +[7]: ./media/mbed7.png + +[lnk-setup-iot-hub]: https://aka.ms/howtocreateazureiothub +[lnk-manage-iot-hub]: https://aka.ms/manageiothub diff --git a/doc/ubuntu_apt-get_sample_setup.md b/doc/ubuntu_apt-get_sample_setup.md new file mode 100644 index 0000000000..d38e6e34dc --- /dev/null +++ b/doc/ubuntu_apt-get_sample_setup.md @@ -0,0 +1,98 @@ +# Use apt-get to create a C device client project on Ubuntu + +This document describes how to create a program that uses the *azure-iot-sdk-c-dev* package on Ubuntu versions 15.04 and 15.10. The package contains the binaries you need to build an IoT Hub client application using C. The document describes how to install the package using **apt-get** and then build an application using **CMake**. + +Before you start, make sure you have **CMake**, **g++**, and **gcc** installed on your development machine: + +``` +sudo apt-get install cmake gcc g++ +``` + +## Update and install the azure-iot-sdk-c-dev package on your machine + +Complete the following steps to install the AzureIoT binaries on your development machine: + +1. Add the AzureIoT repository to the machine: + + ``` + sudo add-apt-repository ppa:aziotsdklinux/ppa-azureiot + sudo apt-get update + ``` + +2. Install The azure-iot-sdk-c-dev package + + ``` + sudo apt-get install -y azure-iot-sdk-c-dev + ``` + +## Create and application using CMake + +The following steps outline how you can use CMake to build an IoT Hub client application after you have installed the azure-iot-sdk-c-dev package on your development machine. + +1. Create a CMakeLists.txt file for the application. The example shown here assumes you are using the *serializer* module in your code, that your application uses the AMQP protocol, and that your source code is contained in the files **sample.c**, **sample.h**, and **main.c**. You can add source files by changing the contents of the **sample_application_c_files** and **sample_application_h_files** sets. If you are not using the serializer module, you can omit it from **target_link_libraries**. If you are using a different protocol (such as MQTT) you need to change the content of **target_link_libraries** accordingly. + + ``` + cmake_minimum_required(VERSION 2.8.11) + + set(AZUREIOT_INC_FOLDER ".." "/usr/include/azureiot") + + include_directories(${AZUREIOT_INC_FOLDER}) + + set(sample_application_c_files + ./sample.c + ./main.c + ) + + set(sample_application_h_files + ./sample.h + ) + + add_executable(sample_app ${sample_application_c_files} ${sample_application_h_files}) + + target_link_libraries(sample_app + serializer + iothub_client + iothub_client_amqp_transport + aziotsharedutil + uamqp + pthread + curl + ssl + crypto + ) + ``` + +3. Create a directory that will store the make files that CMake creates and then run the **cmake** and **make** commands as follows: + + ``` + mkdir cmake + cd cmake + cmake ../[Directory that contains your CMakeLists.txt File] + make + ``` + +## Notes + +The Azure IoT client libraries and their dependencies install to the following locations. + +Libraries install in /usr/lib: + +* libiothub_client_amqp_transport.a +* libiothub_client_http_transport.a +* libiothub_client_mqtt_transport.a +* libserializer.a +* libiothub_client.a + +All azure-iot-sdk header files install in /usr/include/azureiotsdk. + +Dependencies install in /usr/lib: + +* libumqtt.a +* libamqp.a +* libaziotsharedutil.a + +To remove the azure-iot-sdk-c-dev package, run the following command: + +``` +sudo apt-get --purge remove azure-iot-sdk-c-dev +``` \ No newline at end of file diff --git a/iothub_client/readme.md b/iothub_client/readme.md new file mode 100644 index 0000000000..678303fdd1 --- /dev/null +++ b/iothub_client/readme.md @@ -0,0 +1,111 @@ +# Microsoft Azure IoT device SDK for C + +This folder contains the following +* The Azure IoT device SDK for C to easily and securely connect devices to the Microsoft Azure IoT Hub service. +* Samples showing how to use the SDK + +## Features + +* Sends event data to Azure IoT based services. +* Maps server commands to device functions. +* Buffers data when the network connection is down. +* Batches messages to improve communication efficiency. +* Supports pluggable transport protocols: HTTPS, AMQP and MQTT. +* Supports pluggable serialization methods. + +The library code: + +* Is written in ANSI C (C99) to maximize code portability and broad platform compatibility. +* Avoids compiler extensions. +* Exposes a platform abstraction layer to isolate OS dependencies (threading and mutual exclusion mechanisms, communications protocol e.g. HTTP). Refer to [porting guide][c-porting-guide] for more information. + +Azure IoT device SDK for C can be used with a broad range of OS platforms and devices. +For a list of tested configurations [click here][device-catalog]. + + +## Using the apt-get packages for Linux devices + +To make it simpler to use the IoT Hub device SDK on Linux, we have created apt-get packages that are published on the Launchpad platform. +At this point you can use the packages on Ubuntu 14.04, 15.04, 15.10, 16.04 using an x86 CPU architecture. + +[Here][apt-get-instructions] you can find a detailed guide on how to install the packages to develop your device application. + +If you are working with a device with a different Linux distribution or with an x64 or ARM CPU, then you will need to compile the SDK following the instructions below. + + +## Using the NuGet packages for Windows devices + +When developing for Windows devices, you can leverage the NuGet packages manager in order to add new references to your projects. +The Windows [samples in this repository][samples] show how to use the Microsoft.Azure.IoTHub.IoTHubClient NuGet package along with its dependencies in your C project. +To install Microsoft Azure IoTHub IoTHubClient, run the following command in the [Package Manager Console](https://docs.nuget.org/docs/start-here/using-the-package-manager-console) in Visual Studio: + + ``` + Install-Package Microsoft.Azure.IoTHub.IoTHubClient + ``` +Once the package is added to your project, you simply can use it's APIs following the [samples][samples] provided in this repository and the [API reference documentation][c-api-reference]. + + +## Using the mbed library + +For developers creating device applications on the [mbed](http://mbed.org) platform, we have a published a library and samples that will get you started in minutes witH Azure IoT Hub. This library and the samples have been tested with the following boards: +* Freescale FRDMK64-F +* Renesas GR-PEACH +* SADE.IO GSM Gateway + +To use the samples and the Azure IoT device SDK library in your mbed applications, follow these steps: +* Prepare your device as instructed by the device manufacturer to connect it to the mbed development environment +* In the [mbed Developer Workspace](https://developer.mbed.org/compiler/) click **Import** on the main menu. Then click the **Click here** to import from URL link next to the mbed globe logo. +* In the popup window, enter the link for the sample code you want to try (you can find Azure IoT Hub samples here: https://developer.mbed.org/users/AzureIoTClient/code/) +* Adapt the code to use the right credentials for your device, and click **Compile** to generate the binary for your board. +* Download the binary to your device and run. + +You can find detailed instructions for each of the tested devices in our [device catalog][device-catalog]: +* [Freescale FRDMK64-F](../doc/mbed_get_started.md) +* [Renesas GR-PEACH](https://catalog.azureiotsuite.com/details?title=GR_Peach-_-Renesas-Electronics-RZA1H-on-board&source=home-page) +* [SADE.IO GSM Gateway](https://catalog.azureiotsuite.com/details?title=SADE-IoT-Cloud-Family-_-GSM-Gateway&source=home-page) + + + +## Using the Arduino IDE library + +If you are developing on Arduino, you can leverage the Azure IoT library available in the Arduino IDE library manager. +You can find the list of supported boards as well as the instructions for using the library on Arduino devices in the [azure-iot-arduino GitHub repository](https://github.com/azure/azure-iot-arduino) directly. + + +## Compiling the device SDK for C + +In order to compile the C SDK, you will need to install a set of tools depending on the platform you are doing your development on and the one you are targeting. You will also need to clone the current repository. +Detailed instructions can be found below for each platforms: + +* [Setting up a Windows development environment](../doc/devbox_setup.md#windows) +* [Setting up a Linux development environment](../doc/devbox_setup.md#linux) +* [Cross compile the C SDK (targeting Raspbian and using Ubuntu as host)](../doc/SDK_cross_compile_example.md) + +## Samples + +The repository contains a set of simple samples that will help you get started. +You can find a list of these samples with instructrions on how to run them [here][samples]. +In addition to the simple samples found in the current repository, you can find detailed instructions for the certified for Azure IoT devices in our online [catalog][device-catalog] + +## Read more + +* [Azure IoT Hub documentation][iot-hub-documentation] +* [Prepare your development environment to use the Azure IoT device SDK for C][devbox-setup] +* [Setup IoT Hub][setup-iothub] +* [Azure IoT device SDK for C tutorial][c-sdk-intro] +* [How to port the C libraries to other OS platforms][c-porting-guide] +* [Cross compilation example][c-cross-compile] +* [C SDKs API reference][c-api-reference] + + +[iot-dev-center]: http://azure.com/iotdev +[iot-hub-documentation]: https://docs.microsoft.com/en-us/azure/iot-hub/ +[device-catalog]: https://catalog.azureiotsuite.com +[devbox-setup]: doc/devbox_setup.md +[setup-iothub]: https://aka.ms/howtocreateazureiothub +[c-sdk-intro]: https://azure.microsoft.com/documentation/articles/iot-hub-device-sdk-c-intro/ +[c-porting-guide]: ../doc/porting_guide.md +[c-cross-compile]: ../doc/SDK_cross_compile_example.md +[c-api-reference]: http://azure.github.io/azure-iot-sdks/c/api_reference/index.html +[apt-get-instructions]: ../doc/ubuntu_apt-get_sample_setup.md +[samples]: /samples/ diff --git a/iothub_client/readme.txt b/iothub_client/readme.txt deleted file mode 100644 index b6885947f4..0000000000 --- a/iothub_client/readme.txt +++ /dev/null @@ -1 +0,0 @@ -This folder contains the iothub C client. \ No newline at end of file diff --git a/iothub_client/samples/readme.md b/iothub_client/samples/readme.md new file mode 100644 index 0000000000..003d3f797b --- /dev/null +++ b/iothub_client/samples/readme.md @@ -0,0 +1,36 @@ +# Samples for the Azure IoT device SDK for C + +This folder contains simple samples showing how to use the various features of the Microsoft Azure IoT Hub service from a device running C code. + +## List of samples + +* Simple send and receive messages: + * iothub_client_sample_mqtt: send and receive messages from a single device over an MQTT connection + * iothub_client_sample_mqtt_websockets: send and receive messages from a single device over an MQTT over WebSockets connection + * iothub_client_sample_amqp: send and receive messages from a single device over an AMQP connection + * iothub_client_sample_amqp_websockets: send and receive messages from a single device over an AMQP over WebSockets connection + * iothub_client_sample_http: send and receive messages from a single device over an HTTP connection + +* Multiplexing send and receive of several devices over a single connection (useful in Gateway scenarios where multiplexing might be needed): + * iothub_client_sample_amqp_shared: send and receive messages from 2 devices over a single AMQP connection + * iothub_ll_client_sample_amqp_shared: send and receive messages from 2 devices over a single AMQP connection using the lower level API set of the SDK + * iothub_client_sample_amqp_websockets_shared: send and receive messages from 2 devices over a single AMQP over Websockets connection + * iothub_client_sample_http_shared: send and receive messages from 2 devices over a single HTTP connection (multiplexing) (useful in Gateway scenarios) + +* Device services samples (Device Twins, Methods, and Device Management): + * iothub_client_sample_device_method: Implements a simple Cloud to Device Direct Method + * iothub_client_sample_mqtt_dm: Shows the implementation of a firmware update of a device (Raspberry Pi 3) + +* Uploading blob to Azure: + * iothub_client_sample_upload_to_blob: Uploads a blob to Azure through IoT Hub + +## How to compile and run the samples + +It is recommended to leverage the library packages when available to run the samples, but sometimes you will need to compile the SDK for/on your device in order to be able to run the samples. +[This documents][devbox-setup] describes in details how to prepare you development environment as well as how to run the samples on Linux, Windows or other platforms. +Additionaly you will need to [have available or to create an instance][lnk-setup-iot-hub] of the Azure IoT Hub services as well as a [device Identity][lnk-manage-iot-hub] created in the service for configuring the samples. + + +[devbox-setup]: ../../doc/devbox_setup.md +[lnk-setup-iot-hub]: https://aka.ms/howtocreateazureiothub +[lnk-manage-iot-hub]: https://aka.ms/manageiothub diff --git a/iothub_service_client/readme.md b/iothub_service_client/readme.md new file mode 100644 index 0000000000..b6a1f88f5a --- /dev/null +++ b/iothub_service_client/readme.md @@ -0,0 +1,5 @@ +# Microsoft Azure IoT service SDK for C + +This folder contains the following +* The Azure IoT service SDK for C to easily and securely manage an instance of the Microsoft Azure IoT Hub service as well as send Cloud to Device messages through IOT Hub. +* Samples showing how to use the SDK \ No newline at end of file diff --git a/readme.md b/readme.md index 2c59abfaaf..852c28b4c1 100644 --- a/readme.md +++ b/readme.md @@ -1,43 +1,86 @@ -# Microsoft Azure IoT device SDK for C +# Microsoft Azure IoT SDKs and libraries for C -The Microsoft Azure IoT device libraries for C contain code that facilitates building devices and applications that connect to and are managed by Azure IoT Hub services. +This repository contains the following: +* Microsoft Azure IoT Hub device SDK for C to connect devices running C code to Azure IoT Hub +* Microsoft Azure IoT Hub service SDK for C to interface with an Azure IoT Hub service instance from a back-end C application +* Serializer library for C to help serialize and deserialize data on your device. -The device library consists of a set of reusable components with abstract interfaces that enable pluggability between stock and custom modules. +The SDKs and library code: +* Is written in ANSI C (C99) to maximize code portability and broad platform compatibility. +* Avoids compiler extensions. +* In the device client SDK, the library exposes a platform abstraction layer to isolate OS dependencies (threading and mutual exclusion mechanisms, communications protocol e.g. HTTP). Refer to our [porting guide][c-porting-guide] for more information. -To meet the wide range of device requirements in the Internet of Things space, the C libraries are provided in source code form to support multiple form factors, operating systems, tools sets, protocols and communications patterns widely in use today. +## Developing applications for Azure IoT +Visit [Azure IoT Dev Center][iot-dev-center] to learn more about developing applications for Azure IoT. -## Features +## How to clone the repository - * Sends event data to Azure IoT based services. - * Maps server commands to device functions. - * Buffers data when the network connection is down. - * Batches messages to improve communication efficiency. - * Supports pluggable transport protocols. HTTPS, AMQP and MQTT are the protocols currently available now. - * Supports pluggable serialization methods. JSON serialization is available now. +The repository is using [GitHub Submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules) for its dependencies. In order to automatically clone these submodules, you need to use the --recursive options as described here: +``` +git clone --recursive https://github.com/Azure/azure-iot-sdks.git +``` -The library code: +## How to use the Azure IoT SDKs for C -* Is written in ANSI C (C99) to maximize code portability and broad platform compatibility. -* Avoids compiler extensions. -* Exposes a platform abstraction layer to isolate OS dependencies (threading and mutual exclusion mechanisms, communications protocol e.g. HTTP). Refer to [porting guide](doc/porting_guide.md) for more information. +* **Using packages**: the simplest way to use the IoT our SDKs is to use the packages when available. The following packages are available: + * On Linux (Ubuntu 14.04, 15.04, 15.10, 16.04): + * [Device SDK on apt-get](./iothub_client/readme.md#aptgetpackage) + * On mbed: + * [Device SDK library on MBED](./iothub_client/readme.md#mbed) + * On Arduino: + * [Device SDK library in the Arduino IDE](./iothub_client/readme.md#arduino) + * On Windows: + * [Device SDK on NuGet](./iothub_client/readme.md#nugetpackage) +* **Compiling the source**: when no package is available for your platform or if you want to modify the SDKs code, or port the SDKs to a new platform, then you can leverage the build environement provided in the repository. + * [Device SDK](./iothub_client/readme.md#compile) + * [Service SDK](./iothub_service_client/readme.md#compile) + + +## OS platforms and hardware compatibility + +The IoT Hub device SDK for C can be used with a broad range of OS platforms and devices. +The minimum requirements are for the device platform to support the following: + +- **Being capable of establishing an IP connection**: only IP-capable devices can communicate directly with Azure IoT Hub. +- **Support TLS**: required to establish a secure communication channel with Azure IoT Hub. +- **Support SHA-256**: necessary to generate the secure token for authenticating the device with the service. +- **Have a Real Time Clock or implement code to connect to an NTP server**: necessary for both establishing the TLS connection and generating the secure token for authentication. +- **Having at least 64KB of RAM**: the memory footprint of the SDK depends on the SDK and protocol used as well as the platform targeted. The smallest footprint is achieved targeting microcontrollers. -Azure IoT device SDK for C can be used with a broad range of OS platforms and devices. For a list of tested configurations [click here](https://catalog.azureiotsuite.com/). +## Porting the Azure IoT device client SDK for C to new platforms -## Application development guides -For information on how to use this library refer to the documents below: +The C SDK is written in ANSI C (C99) to allow for it to run on a wide range of platforms. +In the repository you will find instructions and build tools to compile and run the device client SDK for C on Linux, Windows and microcontroller platforms (refer to the links above for more information on compiling the device client for C). +If you are considering porting the device client SDK for C to a new platform, follow our [porting guide][c-porting-guide] document. -- [Prepare your development environment to use the Azure IoT device SDK for C](doc/devbox_setup.md) -- [Setup IoT Hub](../doc/setup_iothub.md) -- [Provision and manage devices](../doc/manage_iot_hub.md) -- [Azure IoT device SDK for C tutorial](https://azure.microsoft.com/documentation/articles/iot-hub-device-sdk-c-intro/) -- [Setup a Protocol Gateway - (i.e. MQTT)](https://github.com/Azure/azure-iot-protocol-gateway/blob/master/README.md) -- [How to port the C libraries to other OS platforms](doc/porting_guide.md) -- [Cross compilation example](doc/SDK_cross_compile_example.md) -- [C API reference](http://azure.github.io/azure-iot-sdks/c/api_reference/index.html) +## Contribution, feedback and issues -For guides on how to run the sample applications on supported platforms, check out in this [folder](../doc/get_started/). +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](CONTRIBUTING.md). + +## 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](https://ms.portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade). +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](https://docs.microsoft.com/en-us/rest/api/iothub/). + +## Read more + +* [Azure IoT Hub documentation][iot-hub-documentation] +* [Prepare your development environment to use the Azure IoT device SDK for C][devbox-setup] +* [Setup IoT Hub][setup-iothub] +* [Azure IoT device SDK for C tutorial][c-sdk-intro] +* [How to port the C libraries to other OS platforms][c-porting-guide] +* [Cross compilation example][c-cross-compile] +* [C SDKs API reference][c-api-reference] + +--- ## SDK folder structure @@ -96,3 +139,16 @@ Contains tools that are currently used in testing the client libraries: Mocking ### /tools Miscellaneous tools: compilembed, mbed_build, traceabilitytool (checks spec requirements vs code implementation). + +--- +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. + + +[iot-dev-center]: http://azure.com/iotdev +[iot-hub-documentation]: https://docs.microsoft.com/en-us/azure/iot-hub/ +[devbox-setup]: doc/devbox_setup.md +[setup-iothub]: https://aka.ms/howtocreateazureiothub +[c-sdk-intro]: https://azure.microsoft.com/documentation/articles/iot-hub-device-sdk-c-intro/ +[c-porting-guide]: doc/porting_guide.md +[c-cross-compile]: doc/SDK_cross_compile_example.md +[c-api-reference]: http://azure.github.io/azure-iot-sdks/c/api_reference/index.html From db2605692212d4b339d37c146526b24485ff3e5e Mon Sep 17 00:00:00 2001 From: Olivier Bloch Date: Wed, 16 Nov 2016 16:54:13 -0800 Subject: [PATCH 06/13] Fixed Typo in link to git file --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 852c28b4c1..be62be6e42 100644 --- a/readme.md +++ b/readme.md @@ -19,7 +19,7 @@ Visit [Azure IoT Dev Center][iot-dev-center] to learn more about developing appl The repository is using [GitHub Submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules) for its dependencies. In order to automatically clone these submodules, you need to use the --recursive options as described here: ``` -git clone --recursive https://github.com/Azure/azure-iot-sdks.git +git clone --recursive https://github.com/Azure/azure-iot-sdk-c.git ``` ## How to use the Azure IoT SDKs for C From bec29edf81f3a5f5837aac04456460fafd408fb0 Mon Sep 17 00:00:00 2001 From: Olivier Bloch Date: Thu, 17 Nov 2016 08:52:32 -0800 Subject: [PATCH 07/13] Updated device SDK instructions --- doc/devbox_setup.md | 7 +++++- iothub_client/readme.md | 32 +++++++++++------------- iothub_client/samples/readme.md | 28 +++++++++++---------- readme.md | 43 ++++++++++++++------------------- 4 files changed, 53 insertions(+), 57 deletions(-) diff --git a/doc/devbox_setup.md b/doc/devbox_setup.md index c3f63f21d3..968653d3bd 100644 --- a/doc/devbox_setup.md +++ b/doc/devbox_setup.md @@ -191,7 +191,10 @@ You can use one of the sample applications as a template to get started when you ## Sample applications -This repository contains various C sample applications that illustrate how to use the Azure IoT device SDK for C. For more information, see the [Read Me][readme]. +This repository contains various C sample applications that illustrate how to use the Azure IoT device SDK for C: +* [Simple samples for the device SDK][simple_samples] +* [Samples using the serializer library][serializer_samples] + [visual-studio]: https://www.visualstudio.com/downloads/ [device-explorer]: https://github.com/Azure/azure-iot-sdks/tree/master/tools/DeviceExplorer @@ -212,3 +215,5 @@ This repository contains various C sample applications that illustrate how to us [Ubuntu]:http://www.ubuntu.com/desktop [gcc]:https://gcc.gnu.org/ [make]:https://www.gnu.org/software/make/ +[simple_samples]: ../iothub_client/samples/ +[serializer_samples]: ../serializer/samples/ \ No newline at end of file diff --git a/iothub_client/readme.md b/iothub_client/readme.md index 678303fdd1..b26b1f55d7 100644 --- a/iothub_client/readme.md +++ b/iothub_client/readme.md @@ -1,6 +1,6 @@ # Microsoft Azure IoT device SDK for C -This folder contains the following +This folder contains the following: * The Azure IoT device SDK for C to easily and securely connect devices to the Microsoft Azure IoT Hub service. * Samples showing how to use the SDK @@ -9,28 +9,23 @@ This folder contains the following * Sends event data to Azure IoT based services. * Maps server commands to device functions. * Buffers data when the network connection is down. +* Implements configurable retry logic. * Batches messages to improve communication efficiency. * Supports pluggable transport protocols: HTTPS, AMQP and MQTT. * Supports pluggable serialization methods. -The library code: - -* Is written in ANSI C (C99) to maximize code portability and broad platform compatibility. -* Avoids compiler extensions. -* Exposes a platform abstraction layer to isolate OS dependencies (threading and mutual exclusion mechanisms, communications protocol e.g. HTTP). Refer to [porting guide][c-porting-guide] for more information. - Azure IoT device SDK for C can be used with a broad range of OS platforms and devices. For a list of tested configurations [click here][device-catalog]. ## Using the apt-get packages for Linux devices -To make it simpler to use the IoT Hub device SDK on Linux, we have created apt-get packages that are published on the Launchpad platform. -At this point you can use the packages on Ubuntu 14.04, 15.04, 15.10, 16.04 using an x86 CPU architecture. +To make it simpler to use the IoT Hub device SDK on Linux, we have created [apt-get packages][apt-get-packages] that are published on the Launchpad platform. +At this point you can use the packages on Ubuntu 14.04, 15.04, 15.10, 16.04 using the following CPU architectures amd64, arm64, armhf and i386. [Here][apt-get-instructions] you can find a detailed guide on how to install the packages to develop your device application. -If you are working with a device with a different Linux distribution or with an x64 or ARM CPU, then you will need to compile the SDK following the instructions below. +If you are working with a device running a Linux distribution not supporting these packages, then you will need to compile the SDK following the instructions below. ## Using the NuGet packages for Windows devices @@ -47,19 +42,19 @@ Once the package is added to your project, you simply can use it's APIs followin ## Using the mbed library -For developers creating device applications on the [mbed](http://mbed.org) platform, we have a published a library and samples that will get you started in minutes witH Azure IoT Hub. This library and the samples have been tested with the following boards: +For developers creating device applications on the [mbed](http://mbed.org) platform, we have published a library and samples that will get you started in minutes witH Azure IoT Hub. This library and the samples have been tested with the following boards: * Freescale FRDMK64-F * Renesas GR-PEACH * SADE.IO GSM Gateway -To use the samples and the Azure IoT device SDK library in your mbed applications, follow these steps: +To use the samples and the Azure IoT device SDK library in your mbed applications, here are the basic steps: * Prepare your device as instructed by the device manufacturer to connect it to the mbed development environment -* In the [mbed Developer Workspace](https://developer.mbed.org/compiler/) click **Import** on the main menu. Then click the **Click here** to import from URL link next to the mbed globe logo. -* In the popup window, enter the link for the sample code you want to try (you can find Azure IoT Hub samples here: https://developer.mbed.org/users/AzureIoTClient/code/) +* In the [mbed Developer Workspace](https://developer.mbed.org/compiler/) click **Import** on the main menu. Then click the **Click here to import from URL** link next to the mbed globe logo. +* In the popup window, enter the link for the sample code you want to try (you can find Azure IoT Hub samples [here](https://developer.mbed.org/users/AzureIoTClient/code/)). * Adapt the code to use the right credentials for your device, and click **Compile** to generate the binary for your board. * Download the binary to your device and run. -You can find detailed instructions for each of the tested devices in our [device catalog][device-catalog]: +You can find detailed instructions for each of the tested devices in the Azure IoT [device catalog][device-catalog]: * [Freescale FRDMK64-F](../doc/mbed_get_started.md) * [Renesas GR-PEACH](https://catalog.azureiotsuite.com/details?title=GR_Peach-_-Renesas-Electronics-RZA1H-on-board&source=home-page) * [SADE.IO GSM Gateway](https://catalog.azureiotsuite.com/details?title=SADE-IoT-Cloud-Family-_-GSM-Gateway&source=home-page) @@ -79,12 +74,12 @@ Detailed instructions can be found below for each platforms: * [Setting up a Windows development environment](../doc/devbox_setup.md#windows) * [Setting up a Linux development environment](../doc/devbox_setup.md#linux) -* [Cross compile the C SDK (targeting Raspbian and using Ubuntu as host)](../doc/SDK_cross_compile_example.md) +* [Cross compile the C device SDK (targeting Raspbian and using Ubuntu as host)](../doc/SDK_cross_compile_example.md) ## Samples The repository contains a set of simple samples that will help you get started. -You can find a list of these samples with instructrions on how to run them [here][samples]. +You can find a list of these samples with instructions on how to run them [here][samples]. In addition to the simple samples found in the current repository, you can find detailed instructions for the certified for Azure IoT devices in our online [catalog][device-catalog] ## Read more @@ -108,4 +103,5 @@ In addition to the simple samples found in the current repository, you can find [c-cross-compile]: ../doc/SDK_cross_compile_example.md [c-api-reference]: http://azure.github.io/azure-iot-sdks/c/api_reference/index.html [apt-get-instructions]: ../doc/ubuntu_apt-get_sample_setup.md -[samples]: /samples/ +[apt-get-packages]: https://launchpad.net/~aziotsdklinux/+archive/ubuntu/ppa-azureiot +[samples]: ./samples/ diff --git a/iothub_client/samples/readme.md b/iothub_client/samples/readme.md index 003d3f797b..5d3e6e4656 100644 --- a/iothub_client/samples/readme.md +++ b/iothub_client/samples/readme.md @@ -5,30 +5,32 @@ This folder contains simple samples showing how to use the various features of t ## List of samples * Simple send and receive messages: - * iothub_client_sample_mqtt: send and receive messages from a single device over an MQTT connection - * iothub_client_sample_mqtt_websockets: send and receive messages from a single device over an MQTT over WebSockets connection - * iothub_client_sample_amqp: send and receive messages from a single device over an AMQP connection - * iothub_client_sample_amqp_websockets: send and receive messages from a single device over an AMQP over WebSockets connection - * iothub_client_sample_http: send and receive messages from a single device over an HTTP connection + * **iothub_client_sample_mqtt**: send and receive messages from a single device over an MQTT connection + * **iothub_client_sample_mqtt_websockets**: send and receive messages from a single device over an MQTT over WebSockets connection + * **iothub_client_sample_amqp**: send and receive messages from a single device over an AMQP connection + * **iothub_client_sample_amqp_websockets**: send and receive messages from a single device over an AMQP over WebSockets connection + * **iothub_client_sample_http**: send and receive messages from a single device over an HTTP connection * Multiplexing send and receive of several devices over a single connection (useful in Gateway scenarios where multiplexing might be needed): - * iothub_client_sample_amqp_shared: send and receive messages from 2 devices over a single AMQP connection - * iothub_ll_client_sample_amqp_shared: send and receive messages from 2 devices over a single AMQP connection using the lower level API set of the SDK - * iothub_client_sample_amqp_websockets_shared: send and receive messages from 2 devices over a single AMQP over Websockets connection - * iothub_client_sample_http_shared: send and receive messages from 2 devices over a single HTTP connection (multiplexing) (useful in Gateway scenarios) + * **iothub_client_sample_amqp_shared**: send and receive messages from 2 devices over a single AMQP connection + * **iothub_ll_client_sample_amqp_shared**: send and receive messages from 2 devices over a single AMQP connection using the lower level API set of the SDK + * **iothub_client_sample_amqp_websockets_shared**: send and receive messages from 2 devices over a single AMQP over Websockets connection + * **iothub_client_sample_http_shared**: send and receive messages from 2 devices over a single HTTP connection (multiplexing) (useful in Gateway scenarios) * Device services samples (Device Twins, Methods, and Device Management): - * iothub_client_sample_device_method: Implements a simple Cloud to Device Direct Method - * iothub_client_sample_mqtt_dm: Shows the implementation of a firmware update of a device (Raspberry Pi 3) + * **iothub_client_sample_device_method**: Implements a simple Cloud to Device Direct Method + * **iothub_client_sample_mqtt_dm**: Shows the implementation of a firmware update of a device (Raspberry Pi 3) * Uploading blob to Azure: - * iothub_client_sample_upload_to_blob: Uploads a blob to Azure through IoT Hub + * **iothub_client_sample_upload_to_blob**: Uploads a blob to Azure through IoT Hub ## How to compile and run the samples +Prior to running the samples, you will need to have an [instance of Azure IoT Hub][lnk-setup-iot-hub] available and a [device Identity created][lnk-manage-iot-hub] in the hub. + It is recommended to leverage the library packages when available to run the samples, but sometimes you will need to compile the SDK for/on your device in order to be able to run the samples. + [This documents][devbox-setup] describes in details how to prepare you development environment as well as how to run the samples on Linux, Windows or other platforms. -Additionaly you will need to [have available or to create an instance][lnk-setup-iot-hub] of the Azure IoT Hub services as well as a [device Identity][lnk-manage-iot-hub] created in the service for configuring the samples. [devbox-setup]: ../../doc/devbox_setup.md diff --git a/readme.md b/readme.md index be62be6e42..bc83b0effc 100644 --- a/readme.md +++ b/readme.md @@ -1,9 +1,9 @@ # Microsoft Azure IoT SDKs and libraries for C This repository contains the following: -* Microsoft Azure IoT Hub device SDK for C to connect devices running C code to Azure IoT Hub -* Microsoft Azure IoT Hub service SDK for C to interface with an Azure IoT Hub service instance from a back-end C application -* Serializer library for C to help serialize and deserialize data on your device. +* **Microsoft Azure IoT Hub device SDK for C** to connect devices running C code to Azure IoT Hub +* **Microsoft Azure IoT Hub service SDK for C** to interface with an Azure IoT Hub service instance from a back-end C application +* **Serializer library for C** to help serialize and deserialize data on your device. The SDKs and library code: * Is written in ANSI C (C99) to maximize code portability and broad platform compatibility. @@ -12,11 +12,11 @@ The SDKs and library code: ## Developing applications for Azure IoT -Visit [Azure IoT Dev Center][iot-dev-center] to learn more about developing applications for Azure IoT. +Visit [Azure IoT Dev Center][iot-dev-center]{target="_blank"} to learn more about developing applications for Azure IoT. ## How to clone the repository -The repository is using [GitHub Submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules) for its dependencies. In order to automatically clone these submodules, you need to use the --recursive options as described here: +The repository is using [GitHub Submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules){target="_blank"} 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-c.git @@ -24,19 +24,14 @@ git clone --recursive https://github.com/Azure/azure-iot-sdk-c.git ## How to use the Azure IoT SDKs for C -* **Using packages**: the simplest way to use the IoT our SDKs is to use the packages when available. The following packages are available: - * On Linux (Ubuntu 14.04, 15.04, 15.10, 16.04): - * [Device SDK on apt-get](./iothub_client/readme.md#aptgetpackage) - * On mbed: - * [Device SDK library on MBED](./iothub_client/readme.md#mbed) - * On Arduino: - * [Device SDK library in the Arduino IDE](./iothub_client/readme.md#arduino) - * On Windows: - * [Device SDK on NuGet](./iothub_client/readme.md#nugetpackage) -* **Compiling the source**: when no package is available for your platform or if you want to modify the SDKs code, or port the SDKs to a new platform, then you can leverage the build environement provided in the repository. - * [Device SDK](./iothub_client/readme.md#compile) - * [Service SDK](./iothub_service_client/readme.md#compile) - +* **Using packages and libraries**: the simplest way to use the Azure IoT SDKs is to use packages and libraries when available. The following are available: + * On Linux (Ubuntu 14.04, 15.04, 15.10, 16.04): [Device SDK on apt-get](./iothub_client/readme.md#aptgetpackage) + * On mbed: [Device SDK library on MBED](./iothub_client/readme.md#mbed) + * On Arduino: [Device SDK library in the Arduino IDE](./iothub_client/readme.md#arduino) + * On Windows: [Device SDK on NuGet](./iothub_client/readme.md#nugetpackage) +* **Compiling the source code**: when no package or library is available for your platform or if you want to modify the SDKs code, or port the SDKs to a new platform, then you can leverage the build environement provided in the repository. + * [Device SDK](./iothub_client/readme.md#compile) + * [Service SDK](./iothub_service_client/readme.md#compile) ## OS platforms and hardware compatibility @@ -45,7 +40,7 @@ The minimum requirements are for the device platform to support the following: - **Being capable of establishing an IP connection**: only IP-capable devices can communicate directly with Azure IoT Hub. - **Support TLS**: required to establish a secure communication channel with Azure IoT Hub. -- **Support SHA-256**: necessary to generate the secure token for authenticating the device with the service. +- **Support SHA-256** (optional): necessary to generate the secure token for authenticating the device with the service. Different authentication methods are available and not all require SHA-256. - **Have a Real Time Clock or implement code to connect to an NTP server**: necessary for both establishing the TLS connection and generating the secure token for authentication. - **Having at least 64KB of RAM**: the memory footprint of the SDK depends on the SDK and protocol used as well as the platform targeted. The smallest footprint is achieved targeting microcontrollers. @@ -53,7 +48,7 @@ The minimum requirements are for the device platform to support the following: The C SDK is written in ANSI C (C99) to allow for it to run on a wide range of platforms. In the repository you will find instructions and build tools to compile and run the device client SDK for C on Linux, Windows and microcontroller platforms (refer to the links above for more information on compiling the device client for C). -If you are considering porting the device client SDK for C to a new platform, follow our [porting guide][c-porting-guide] document. +If you are considering porting the device client SDK for C to a new platform, check out the [porting guide][c-porting-guide] document. ## Contribution, feedback and issues @@ -84,9 +79,7 @@ Here is what you can expect Microsoft Support to be able to help with: ## SDK folder structure -All C specific resources are located in the **azure-iot-sdks\c** folder. A description of the key directories follows: - -### /c-utility, /uamqp, and /umqtt +### /c-utility, /uamqp, /umqtt, /parson These are git submodules that contain code, such as adapters and protocol implementations, shared with other projects. Note that some of them contain nested submodules. @@ -114,7 +107,7 @@ Contains Azure IoT Hub client components that provide the raw messaging capabili * devdoc: contains requirements, designs notes, manuals. * inc: public include files. * src: client libraries source files. - * samples: contains the send event and receive message samples (with ports for the supported platforms). + * samples: contains simple samples. * tests: unit and end-to-end tests for source code. ### /serializer @@ -125,7 +118,7 @@ Contains libraries that provide modeling and JSON serialization capabilities on * devdoc: contains requirements, designs notes, manuals. * inc: public include files. * src: client libraries source files. - * samples: contains the send event and receive message samples (with ports for the supported platforms). + * samples: contains simple samples. * tests: unit tests and end-to-end tests for source code. ### /iothub_service_client From 7a7af899083afb9b1b4c5f2e90e30c880e3f0834 Mon Sep 17 00:00:00 2001 From: Olivier Bloch Date: Thu, 17 Nov 2016 08:54:43 -0800 Subject: [PATCH 08/13] Removed 'target="_blank"' from Readme.md --- readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index bc83b0effc..07f46a7803 100644 --- a/readme.md +++ b/readme.md @@ -12,11 +12,11 @@ The SDKs and library code: ## Developing applications for Azure IoT -Visit [Azure IoT Dev Center][iot-dev-center]{target="_blank"} to learn more about developing applications for Azure IoT. +Visit [Azure IoT Dev Center][iot-dev-center] to learn more about developing applications for Azure IoT. ## How to clone the repository -The repository is using [GitHub Submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules){target="_blank"} for its dependencies. In order to automatically clone these submodules, you need to use the --recursive option as described here: +The repository is using [GitHub Submodules](https://git-scm.com/book/en/v2/Git-Tools-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-c.git From 369922f8e045d89b0549756d8c2250ab0cf47f37 Mon Sep 17 00:00:00 2001 From: Olivier Bloch Date: Thu, 17 Nov 2016 12:16:10 -0800 Subject: [PATCH 09/13] Updated readmes for service client and serializer --- iothub_service_client/readme.md | 23 +++++++++++++++++++- iothub_service_client/samples/readme.md | 26 +++++++++++++++++++++++ serializer/readme.md | 24 +++++++++++++++++++++ serializer/readme.txt | 18 ---------------- serializer/samples/readme.md | 28 +++++++++++++++++++++++++ 5 files changed, 100 insertions(+), 19 deletions(-) create mode 100644 iothub_service_client/samples/readme.md create mode 100644 serializer/readme.md delete mode 100644 serializer/readme.txt create mode 100644 serializer/samples/readme.md diff --git a/iothub_service_client/readme.md b/iothub_service_client/readme.md index b6a1f88f5a..78ea10c4b8 100644 --- a/iothub_service_client/readme.md +++ b/iothub_service_client/readme.md @@ -2,4 +2,25 @@ This folder contains the following * The Azure IoT service SDK for C to easily and securely manage an instance of the Microsoft Azure IoT Hub service as well as send Cloud to Device messages through IOT Hub. -* Samples showing how to use the SDK \ No newline at end of file +* Samples showing how to use the SDK + +## Features + +* Implements CRUD operations on Azure IoT Hub device registry +* Interact with a Device Twins from a back-end application +* Invoke a Cloud to Device direct Method +* Implements sending a Cloud to Device message + +## Using the service SDK for C + +For using the service SDK for C, you will need to compile the library and the samples. +Instructions on how to setup your development environemnt can be found [here][devbox_setup]. + +## Samples + +The repository contains a set of simple samples that will help you get started. +You can find a list of these samples with instructions on how to run them [here][samples]. + + +[devbox_setup]: ../doc/devbox_setup.md +[samples]: ./samples/ \ No newline at end of file diff --git a/iothub_service_client/samples/readme.md b/iothub_service_client/samples/readme.md new file mode 100644 index 0000000000..d4475ed06f --- /dev/null +++ b/iothub_service_client/samples/readme.md @@ -0,0 +1,26 @@ +# Samples for the Azure IoT service SDK for C + +This folder contains simple samples showing how to use the various features of the Microsoft Azure IoT Hub service from a back-end application running C code. + +## List of samples + +* Simple send of Cloud to Device messages: + * **iothub_messaging_sample**: send Cloud to Device message and monitor feedback + * **iothub_messaging_ll_sample**: send Cloud to Device message and monitor feedback using lower layer API of the SDK + +* Device Registry: + * **iothub_registrymanager_sample**: Shows how to use CRUD operations on the device registry + +* Device services samples (Device Twins, Methods, and Device Management): + * **iothub_devicemethod_sample**: Shows how to invoke a Cloud to Device direct Method from a back-end application + * **iothub_devicetwin_sample**: Shows how to work with device Twins in a back-end application + +## How to compile and run the samples + +Prior to running the samples, you will need to have an [instance of Azure IoT Hub][lnk-setup-iot-hub] available. + +[This documents][devbox-setup] describes in details how to prepare you development environment as well as how to run the samples on Linux, Windows or other platforms. + + +[devbox-setup]: ../../doc/devbox_setup.md +[lnk-setup-iot-hub]: https://aka.ms/howtocreateazureiothub diff --git a/serializer/readme.md b/serializer/readme.md new file mode 100644 index 0000000000..4db846faf0 --- /dev/null +++ b/serializer/readme.md @@ -0,0 +1,24 @@ +# Microsoft Azure IoT serializer library for C + +This folder contains the following +* A helper library for serializing and deserializing data +* Samples showing how to use the serializer library + +## Features +* Format the data you want to send to the Cloud and deserialize data received from the Cloud +* Simply declare a "model" for the device using Macros +* Easily implement Azure IoT Device Twins and Methods features + +## Using the seralizer library for C + +The seralizer library for C is used with the Azure IoT device SDK for which you will find detailed instructions on how to use on Linux, mbed, Windows and other platforms [here][device-sdk]. + +## Samples + +The repository contains a set of simple samples that will help you get started. +You can find a list of these samples with instructions on how to run them [here][samples]. + + +[devbox_setup]: ../doc/devbox_setup.md +[samples]: ./samples/ +[device-sdk]: ../iothub_client/ \ No newline at end of file diff --git a/serializer/readme.txt b/serializer/readme.txt deleted file mode 100644 index 51075e5211..0000000000 --- a/serializer/readme.txt +++ /dev/null @@ -1,18 +0,0 @@ -Azure IoTHub Schema Client -============================== - -The IoTHub Schema client provides extra functionality compared to the IoTHub client: -- Defining a schema for the data that lives on the device (strong typing) -- Uploading the device data -- Process action/messages hooked up to C functions - -For more details about the architecture of this Starter Kit Client, please check the following documents: -serializer\doc\c_agent_design.vsdx - -Here you will find a sample of an implementation for some platforms: -serializer\samples ==> Currently we have a sample with 2 different protocols (AMQP and HTTP) and each sample is implementing for - some platforms. For example, the SimpleSampleHTTP is implemented for Linux, mbed and Windows. -The folder structure for the samples is: -serializer\samples\SimpleSample_\ - -Each folder will have its own Readme file with guideline on how to build and test each sample. \ No newline at end of file diff --git a/serializer/samples/readme.md b/serializer/samples/readme.md new file mode 100644 index 0000000000..0284cfde44 --- /dev/null +++ b/serializer/samples/readme.md @@ -0,0 +1,28 @@ +# Samples for the Azure IoT device SDK for C leveraging the serializer library + +This folder contains simple samples showing how to use the various features of the Microsoft Azure IoT Hub service leveraging the serializer library from a device running C code. + +## List of samples + +* Simple send and receive messages: + * **simplesample_mqtt**: send and receive messages from a single device over an MQTT connection + * **simplesample_amqp**: send and receive messages from a single device over an AMQP connection + * **simplesample_http**: send and receive messages from a single device over an HTTP connection + * **remote_monitoring**: Implements the device code used to connect to an [Azure IoT Suite Remote Monitoring preconfigured solution][remote-monitoring-pcs] + * **temp_sensor_anomaly**: simple sample for an mbed application that collects temperature information from sensors, sends them to Azure IoT Hub and trigger a buzzer when receiving a command from Azure IoT Hub + +* Device services samples (Device Twins, Methods, and Device Management): + * **devicetwin_simplesample**: Implements the device code to utilize the Azure IoT Hub Device Twins feature + +## How to compile and run the samples + +Prior to running the samples, you will need to have an [instance of Azure IoT Hub][lnk-setup-iot-hub] available and a [device Identity created][lnk-manage-iot-hub] in the hub. + +It is recommended to leverage the library packages when available to run the samples, but sometimes you will need to compile the SDK for/on your device in order to be able to run the samples. + +[This documents][devbox-setup] describes in details how to prepare you development environment as well as how to run the samples on Linux, Windows or other platforms. + +[remote-monitoring-pcs]: https://docs.microsoft.com/en-us/azure/iot-suite/iot-suite-remote-monitoring-sample-walkthrough +[devbox-setup]: ../../doc/devbox_setup.md +[lnk-setup-iot-hub]: https://aka.ms/howtocreateazureiothub +[lnk-manage-iot-hub]: https://aka.ms/manageiothub From 7b33eda56bf3927cdd9ce5f3590cb0bd110ea9a8 Mon Sep 17 00:00:00 2001 From: Olivier Bloch Date: Thu, 17 Nov 2016 12:21:55 -0800 Subject: [PATCH 10/13] Fixed devicetwin sample readme --- serializer/samples/devicetwin_simplesample/readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/serializer/samples/devicetwin_simplesample/readme.md b/serializer/samples/devicetwin_simplesample/readme.md index 52c2c00f7f..ef9d6e6062 100644 --- a/serializer/samples/devicetwin_simplesample/readme.md +++ b/serializer/samples/devicetwin_simplesample/readme.md @@ -36,7 +36,7 @@ You should have the following items ready before beginning the process: ## Step 2: Build and Run the sample -1. Start a new instance of Visual Studio 2015. Open the **azure_iot_sdks.sln** solution in the **cmake_win32** folder in your home directory (usually C:\\\\users\\username\\). This was generated by cmake while [preparing your development environment][devbox-setup]as indicated in the prerequisites section. +1. Start a new instance of Visual Studio 2015. Open the **azure_iot_sdks.sln** solution in the **cmake\iotsdk_win32** folder in the curent repository folder. This was generated by cmake while [preparing your development environment][devbox-setup] as indicated in the prerequisites section. 2. In Visual Studio, in **Solution Explorer**, navigate to and open the following file: @@ -70,8 +70,8 @@ To build and run the Device Explorer tool with the Device Twin support: 1. Enter the IoT Hub owner Connection String to setup the tool, then you are all set to use the tool! 1. In the tool search for the Twin tab for the device in order to visualize -[lnk-setup-iot-hub]: ../../../../doc/setup_iothub.md -[lnk-manage-iot-hub]: ../../../../doc/manage_iot_hub.md +[lnk-setup-iot-hub]: https://aka.ms/howtocreateazureiothub +[lnk-manage-iot-hub]: https://aka.ms/manageiothub [devbox-setup]: ../../../doc/devbox_setup.md [lnk-device-twin-intro]: https://azure.microsoft.com/en-us/documentation/articles/iot-hub-devguide-device-twins/ [lnk-device-twin-get-started]: https://azure.microsoft.com/en-us/documentation/articles/iot-hub-node-node-twin-getstarted/ From 58e33243300187c0f426acaaaabe701b3f74f64d Mon Sep 17 00:00:00 2001 From: Olivier Bloch Date: Thu, 17 Nov 2016 12:24:35 -0800 Subject: [PATCH 11/13] FIxed typo in devbox_setup.md --- doc/devbox_setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/devbox_setup.md b/doc/devbox_setup.md index 968653d3bd..54b800aae8 100644 --- a/doc/devbox_setup.md +++ b/doc/devbox_setup.md @@ -88,7 +88,7 @@ After completing the above steps make sure OpenSSL libraries and DLL's are in yo 1. Open VS 2015 Developer Command Prompt and go to **\\build_all\\windows** -2. Set OpenSSLDir and OPENSSL_ROOT_DIR **environment variables** to OpenSSL install location. For example, if your OpenSSL install location is **C:\usr\\local\\ssl**, you will set following +2. Set OpenSSLDir and OPENSSL_ROOT_DIR **environment variables** to OpenSSL install location. For example, if your OpenSSL install location is **C:\\usr\\local\\ssl**, you will set following - set OpenSSLDir=C:\usr\local\ssl - set OPENSSL_ROOT_DIR=C:\usr\local\ssl From 76906dc5fcb38eb3d2c67b670f638ed8965e502d Mon Sep 17 00:00:00 2001 From: Olivier Bloch Date: Tue, 22 Nov 2016 12:37:49 -0800 Subject: [PATCH 12/13] Fixed readmes --- doc/mbed_get_started.md | 2 +- readme.md | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/doc/mbed_get_started.md b/doc/mbed_get_started.md index f7e3ae9953..68819a79db 100644 --- a/doc/mbed_get_started.md +++ b/doc/mbed_get_started.md @@ -24,7 +24,7 @@ This document describes the steps for connecting an [mbed-enabled Freescale FRDM You should have the following items ready before beginning the process: - Computer with Git client installed and access to the - [azure-iot-sdks](https://github.com/Azure/azure-iot-sdks) GitHub public repository. + [azure-iot-sdk-c](https://github.com/Azure/azure-iot-sdk-c) GitHub public repository. - SSH client on your desktop computer, such as [PuTTY](http://www.putty.org/), so you can remotely access the command line on the Freescale FRDM-K64F. - Required hardware: [mbed-enabled Freescale K64F](http://developer.mbed.org/platforms/IBMEthernetKit). - [Setup your IoT hub][lnk-setup-iot-hub] diff --git a/readme.md b/readme.md index 07f46a7803..7ae52fb51d 100644 --- a/readme.md +++ b/readme.md @@ -5,11 +5,13 @@ This repository contains the following: * **Microsoft Azure IoT Hub service SDK for C** to interface with an Azure IoT Hub service instance from a back-end C application * **Serializer library for C** to help serialize and deserialize data on your device. -The SDKs and library code: +The C SDKs and library code: * Is written in ANSI C (C99) to maximize code portability and broad platform compatibility. * Avoids compiler extensions. * In the device client SDK, the library exposes a platform abstraction layer to isolate OS dependencies (threading and mutual exclusion mechanisms, communications protocol e.g. HTTP). Refer to our [porting guide][c-porting-guide] for more information. +To find SDKs in other languages for Azure IoT, please refer to the [azure-iot-sdks][azure-iot-sdks] repository. + ## Developing applications for Azure IoT Visit [Azure IoT Dev Center][iot-dev-center] to learn more about developing applications for Azure IoT. @@ -33,6 +35,15 @@ git clone --recursive https://github.com/Azure/azure-iot-sdk-c.git * [Device SDK](./iothub_client/readme.md#compile) * [Service SDK](./iothub_service_client/readme.md#compile) +The API reference documentation for the C SDKs is [here][c-api-reference]. + +## samples + +In the repository, you will find a set of simple samples that will help you get started: +* [Device SDK samples](./iothub_client/samples/) +* [Service SDK samples](./iothub_service_client/samples/) +* [Serializer library samples](./serializer/samples/) + ## OS platforms and hardware compatibility The IoT Hub device SDK for C can be used with a broad range of OS platforms and devices. From 78d6a0c60b58e3e78b0d64a6e50eff3b08ff119f Mon Sep 17 00:00:00 2001 From: Olivier Bloch Date: Tue, 13 Dec 2016 10:00:33 -0800 Subject: [PATCH 13/13] Fixed bad link --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 7ae52fb51d..01d02fb8f5 100644 --- a/readme.md +++ b/readme.md @@ -147,7 +147,7 @@ Miscellaneous tools: compilembed, mbed_build, traceabilitytool (checks spec requ --- This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. - +[azure-iot-sdks]: https://github.com/azure/azure-iot-sdks [iot-dev-center]: http://azure.com/iotdev [iot-hub-documentation]: https://docs.microsoft.com/en-us/azure/iot-hub/ [devbox-setup]: doc/devbox_setup.md