Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting it to compile Aug 2020 #35

Open
qzzf1w opened this issue Aug 25, 2020 · 2 comments
Open

Getting it to compile Aug 2020 #35

qzzf1w opened this issue Aug 25, 2020 · 2 comments

Comments

@qzzf1w
Copy link

qzzf1w commented Aug 25, 2020

Not an issue.
But hopefully a helping hand

Got this running with PI zero and latest "Raspberry PI OS"

Here are my steps

  1. Use PI Imager
    Raspberry PI OS Full (32-bit)
    Use 8GB 10x MicroSD Card
  2. Overlay
    SSH.
    wpa_supplicant.conf
    instructions here: https://www.tomshardware.com/reviews/raspberry-pi-headless-setup-how-to,6028.html
  3. Connect via putty
    download: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
    address: raspberrypi.local
    uid: pi
    pwd: raspberry
  4. Enable VNC
    sudo raspi-config
    Interfacting Options
    P3 VNC
  5. Install CMAke
    sudo apt-get install cmake
  6. Install GIT
    sudo apt-get install git-core
  7. Fix libssl
    sudo apt-get purge -y libssl-dev
    sudo apt-get install libcurl4-openssl-dev
    sudo apt-get install libssl-dev
  8. Update PI
    sudo apt-get update
    sudo apt-get upgrade
  9. Reboot
    sudo reboot
  10. Connect VNC
    download: https://realvnc.com/en/connect/download/viewer/windows/
    address: raspberrypi.local
    uid: pi
    pwd: raspberry
  11. Run Welcome Wizzard
    • Set Country
    • change password
    • choose default network
    • update software
  12. Restart
  13. Connect via putty
    address: raspberrypi.local
    uid: pi
    pwd: new password
  14. Git the Azure IOT SOurce
    cd ~
    mkdir Source
    cd Source
    git clone --recursive https://github.com/azure/azure-iot-sdk-c.git
  15. Build the Azure IOT Source
    cd azure-iot-sdk-c/build_all/linux
    ./build.sh --no-make
    cd ../../cmake/iotsdk_linux
    make
    sudo make install
    '
  16. Install Sample App Source
    cd ~
    git clone https://github.com/Azure-Samples/iot-hub-c-raspberrypi-client-app.git
    cd ./iot-hub-c-raspberrypi-client-app
  17. Install wiringPI
    sudo apt-get install wiringpi
  18. Install parson
    git clone https://github.com/kgabis/parson.git
    cd ./parson
    mv parson.c parson.h ..
    cd ..
    rm -rf parson
  19. Set the sample "Simulate Data" as required
    sed -i 's/#define SIMULATED_DATA 0/#define SIMULATED_DATA 1/' config.h
  20. Make the sample
    cmake . && make
  21. Run the sample
    sudo ./app 'DEVICE CONNECTION STRING'
@mehmoodn
Copy link

Great update. Thank you!!

@inatale
Copy link

inatale commented Nov 13, 2020

This post helped me a lot. Thanks. I was able to run the sample with real BME280. But also I had to use "apt-get install uuid-dev" because of an error "'uuid/uuid.h file not found" during sdk compilcation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants