Azure-Samples / iot-hub-c-raspberrypi-client-app

Application collects weather data from a BME280 sensor and sends it to IoT hub, also take actions according to cloud-to-device message, device management.
https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-raspberry-pi-kit-c-get-started
MIT License
36 stars 34 forks source link

fixes MicrosoftDocs/azure-docs#76421 #38

Closed wesmc7777 closed 3 years ago

wesmc7777 commented 3 years ago

This fixes two issues as mentioned in Microsoft Docs/Azure-docs#76421. A summary is as follows...

There are two problems with the setup.sh script that are causing customer problems:

  1. Using the latest version of Raspberry Pi OS with desktop we don't appear to need to install the specific 1.02 version of libssl-dev anymore. In fact this fails and causes a cascade of other failures. Which follow...

    • Install of libssl1.0-dev fails then no openssl components are installed. These are necessary to build the IoT C SDK.
    • CMake is not installed. You have to install manually before building and installing the C IoT SDK.
    • Without the IoT C SDK built and installed you end up with xlogging.h missing as mentioned in Git Hub issue 22.
  2. The wiringPi repo referenced in the script is no longer available. When this fails we still change to the parent directory of the repo folder here and end up placing parson.h and parson.c there instead of the repo folder where they belong. A fix for this can be...

    git clone https://github.com/WiringPi/WiringPi
    cd ./WiringPi
    ./build
    cd ..

    With this change, parson.h and parson.c should be placed in the correct repo folder by the script. We also get a working version of WiringPi and I have verified this script update against the latest Raspberry Pi OS with desktop image released May 7th 2021.

wesmc7777 commented 3 years ago

@SLdragon can you review and merge this?

wesmc7777 commented 3 years ago

Also fixes MicrosoftDocs/azure-docs#53585

wesmc7777 commented 3 years ago

@Alberto-Vega can you review and merge this PR? I'm not sure who owns this repo

SLdragon commented 3 years ago

Thanks, but seems I do not have permission to merge this pull request. @Alberto-Vega, @yuwzho, can you help merge this pull request?