Azure / azure-iot-sdk-c

A C99 SDK for connecting devices to Microsoft Azure IoT services
https://azure.github.io/azure-iot-sdk-c
Other
587 stars 739 forks source link

Create a 5 minute quick start #401

Closed idavis closed 5 years ago

idavis commented 6 years ago

Description of the issue:

Getting up and going with the SDK takes a long time. A five minute quick start would lower the barrier to entry and help get people excited to use the SDK.

yzhong94 commented 6 years ago

This is part of our MVC plan.

samanaz commented 6 years ago

yzhong94 what do you mean by that?

I am a beginner and I would like to find a simple instruction to cross compile between windows (Visual Studio 2017) and Raspberry but there is no good instructions outside at all. It has been more than four weeks that I even could not run a simple demo.

Thanks to Microsoft there is no Tutorial about that. Not on Microsoft Virtual Academy. Not on Linda which is purchased by Microsoft. Not on on Channel 9. Not on Linkedin Academy which is the new version of Linda.

I am not sure why Microsoft needs so many teaching channels and on none of them there is tutorial about it.

yzhong94 commented 6 years ago

@samanaz I'm sorry about the experience you've been through. MVC is our internal code name for minimum viable content, which is a new wave of docs to clarify some of these. In the meantime, have you see our cross-compile guide for raspberry pi? Are you using Stretch for Raspbian?

markrad commented 6 years ago

Hi @samanaz,

I'm not sure if cross compiling the Azure IoT SDK for any Linux based system is viable with Windows and Visual Studio. It may be possible but I have not tried it. The document that @yzhong94 indicated in her above comment will require that you use Linux to cross compile. If you don't have a LInux environment available then you can install one in a Hyper-V machine or any other virtual machine host. You might also be able to cross compile in the Linux subsystem for Windows. I have done this successfully on occasion. See here for further information.

Another alternative available to you is to use a docker image. I recently posted a dockerfile that cross compiles our SDK along with all of the prerequisite components for a MIPS32 based device. You can find this here: https://github.com/Azure/azure-iot-sdk-c/issues/484#issuecomment-394497509. In general though, you will not need to cross compile OpenSSL, curl or uuid for the Raspberry Pi because you can acquire those binaries from the device itself as shown in the referenced article.

One question though, what operating system are you running on your Raspberry Pi? My comments assume you are running Raspbian or another Linux distro. If you are running Windows IoT Core then we can help you with that too.

Mark Radbourne MSFT

samanaz commented 6 years ago

Hi Markrad,

Thanks so much for informing me about this. But why in no article it is mentioned. Microsoft is saying that we should be able to cross compile with Visual Studio 2017 latest version.

Do you think it is possible to use an Ubuntu as host machine with Visual Studio Code, and the Raspberry as a gust to cross compile? I can easily spin up my Hyper-V and install an Ubuntu.

I still think Microsoft needs to use its teaching channels and websites to teach people like me. Linda has been a great teaching platform and I could educate myself with that many good skills. But I am seeing from the time that it is purchased by Microsoft seems to be stopped and no new subject is found on that. But Why?

I love Microsoft and I have been with Microsoft from Server 2000 until now that I am using Azure AD and Intune. But sometimes they do strange things. Please tell them we need good and constant teaching methods. Customers need to learn technologies otherwise they cannot use it.

Thanks again and I really appreciate it.

Kind regards, Saman

samanaz commented 6 years ago

@yzhong94

Hi, Thanks so much for your reply. I have not tried that because I was thinking that it is possible to do that with Windows 10 and Visual Studio 2017. Apparently as @markrad mentioned it is not possible to do it with Windows 10 and Visual Studio 2017.

I am going to test that with Ubuntu and Visual Studio Code as a host machine and Raspberry as a guest. Please let me know if this setup is not going to work,

I will follow the instruction that is mentioned in your comment and I will let you know how it goes.

Thanks so much for your help.

Kind regards, Sam

samanaz commented 6 years ago

@markrad

I forget to mention yes I use Raspbian.

markrad commented 6 years ago

Hi @samanaz,

Yes you can build the SDK for a Raspberry Pi on an Ubuntu VM. The document mentioned above found here describes the steps to do just that.

By the way, the Raspberry Pi running Raspbian is powerful enough to compile the SDK on it. The cross compile that targets the Raspbian is simply an example to assist other customers that are targeting machines that are not capable of compiling the SDK on the device.

Mark Radbourne MSFT

yzhong94 commented 6 years ago

Here is the doc for 5min quickstart: https://docs.microsoft.com/en-us/azure/iot-hub/quickstart-send-telemetry-c

I will leave issue open as there is unfinished question around RaspPi

massand commented 5 years ago

@yzhong94 I believe @markrad has pointing out the latest docs for Raspberry Pi

az-iot-builder-01 commented 5 years ago

@samanaz, thank you for your contribution to our open-sourced project! Please help us improve by filling out this 2-minute customer satisfaction survey