in Internet of Things, IoT Hub, Microsoft Azure

This post describes how to communicate to Azure IoT Hub from Raspbian Jessie Python 2.7 on a Raspberry pi 3.

At Sogeti we are working on a great project, called miniature smart living room. Microsoft Azure is one of the cloud platforms we integrated in the solution. In this post I’ll describe how we enabled the bidirectional communication between a Raspberry pi 3 and the Azure IoT Hub. Please let me know if you are missing steps, then I can update the post.

  1. Write raspbian Jessie on sd card https://www.raspberrypi.org/documentation/installation/installing-images/README.md
  2. Connect your raspberry to a screen and move on with step 3. Or work headless and move on to step 2.1.
  • 2.1 Share your internet connection
  • 2.2 Connect your raspberry with your PC with a UTP cable
  • 2.3 Find your raspberry IP with arp -a in cmd
  • 2.4 Connect to you raspberry with ssh, default credentials u:pi p:raspberry (I use WinSCP and Putty)
  1. Update stuff sudo apt-get update
  2. Upgrade stuff sudo apt-get upgrade
  3. Configure wifi (or keep using the UTP cable and move on to step 6), navigate to network config sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
  4. Enter settings at bottom of file, after connected to wifi you can find the ip address on the router network={ ssid=”ssid” psk=”password” }

 

Followed this instruction: https://github.com/Azure/azure-iot-sdks/blob/master/c/doc/devbox_setup.md

  1. Install cmake sudo apt-get install cmake
  2. Clone repo git clone –recursive https://github.com/Azure/azure-iot-sdks.git
  3. Run script sudo ./setup.sh in c/build_all/linux
  4. Run script sudo ./build.sh in c/build_all/linux

ERROR: first time error missing CMakeLists.txt in a subdirectory.

Solution: Removed azure-iot-sdks directory, cloned again and run setup and build with sudo. Worked. So maybe it was because of the sudo, maybe the first clone was not completed (submodules stuff).

 

Followed this instruction: https://github.com/Azure/azure-iot-sdks/blob/master/doc/get_started/python-devbox-setup.md

  1. Run script sudo ./setup.sh in python/build_all/linux
  2. Run script sudo ./build.sh in python/build_all/linux
  3. Find iothub_client in python/device/samples

ERROR: after 100% costs a lot of time, ends with some makefile recipe error.

Solution: https://www.bitpi.co/2015/02/11/how-to-change-raspberry-pis-swapfile-size-on-rasbian/

 

Followed this instruction: https://github.com/Azure/azure-iot-sdks/blob/master/doc/get_started/python-run-sample.md

  1. Install nodejs npm sudo apt-get install nodejs npm
  2. Update stuff sudo apt-get update
  3. Upgrade stuff sudo apt-get upgrade
  4. Update npm sudo npm install -g npm
  5. Install iothub-explorer sudo npm install -g iothub-explorer
  6. Register device iothub-explorer “<iothub-connection-string>” create <device-name> –connection-string
  7. Open python/device/samples/iothub_client_sample_amqp.py nano iothub_client_sample_amqp.py
  8. Replace [device connection string] with the connection string for your device
  9. Run the script python iothub_client_sample_amqp.py

Write a Comment

Comment

Webmentions

  • DMPK Services

    … [Trackback]

    […] Read More here|Read More|Read More Infos here|Here you can find 547 more Infos|Infos to that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • snmptn 2018 kedokteran unpad

    … [Trackback]

    […] Find More on|Find More|Find More Infos here|Here you can find 71297 additional Infos|Infos on that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • snmptn 2018 teknologi pangan unpad

    … [Trackback]

    […] Find More on|Find More|Find More Informations here|Here you can find 82701 more Informations|Informations on that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • Christ Gospel Church Cult

    … [Trackback]

    […] Find More on|Find More|Read More Infos here|There you will find 3608 additional Infos|Informations to that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • Agen Judi Bola

    … [Trackback]

    […] Find More on|Find More|Read More Informations here|There you will find 72979 additional Informations|Informations on that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • togel hk

    … [Trackback]

    […] Read More here|Read More|Read More Infos here|Here you will find 91502 more Infos|Informations on that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • Bdsm chat

    … [Trackback]

    […] Find More on|Find More|Read More Informations here|Here you will find 76570 additional Informations|Infos on that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • description

    … [Trackback]

    […] Read More here|Read More|Read More Informations here|There you will find 692 more Informations|Informations to that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • jayne herring

    … [Trackback]

    […] Read More on|Read More|Read More Infos here|There you can find 88339 more Infos|Informations on that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • Attorney St George

    … [Trackback]

    […] Read More here|Read More|Read More Infos here|Here you will find 62343 additional Infos|Informations on that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • Buying a home in St George

    … [Trackback]

    […] Find More here|Find More|Read More Infos here|There you can find 5084 more Infos|Infos to that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • situs judi poker

    … [Trackback]

    […] Read More on|Read More|Find More Infos here|Here you will find 30398 additional Infos|Infos to that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • julbo sunglasses review

    … [Trackback]

    […] Read More on|Read More|Find More Informations here|Here you will find 33333 additional Informations|Informations to that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • Topper

    … [Trackback]

    […] Find More here|Find More|Find More Informations here|There you will find 3923 more Informations|Infos to that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • Aws Engineer X

    … [Trackback]

    […] Find More here|Find More|Read More Informations here|Here you can find 58462 additional Informations|Informations on that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • Corporate Event Management Company

    … [Trackback]

    […] Find More on|Find More|Read More Informations here|There you will find 8992 more Informations|Infos to that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • try this web-site

    … [Trackback]

    […] Read More on|Read More|Read More Infos here|Here you can find 36843 additional Infos|Infos to that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • Art of Conquest Cheats

    … [Trackback]

    […] Find More on|Find More|Find More Informations here|Here you can find 14702 additional Informations|Informations to that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • agen poker online indonesia

    … [Trackback]

    […] Read More on|Read More|Read More Informations here|There you can find 38798 more Informations|Informations to that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • hip hop instrumentals

    … [Trackback]

    […] Find More on|Find More|Read More Infos here|There you can find 77428 more Infos|Informations on that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • agen judi bola

    … [Trackback]

    […] Read More here|Read More|Read More Infos here|Here you will find 8313 more Infos|Infos to that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • iraqi Laws

    … [Trackback]

    […] Find More here|Find More|Find More Infos here|There you will find 68192 additional Infos|Infos on that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • Diyala Arts

    … [Trackback]

    […] Read More here|Read More|Read More Infos here|There you will find 67011 additional Infos|Infos on that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • cell phone protection cases

    … [Trackback]

    […] Read More here|Read More|Find More Infos here|There you will find 20983 additional Infos|Informations to that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • florists in winter haven fl

    … [Trackback]

    […] Read More here|Read More|Read More Infos here|There you can find 37992 additional Infos|Infos to that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • cittadinanza americana

    … [Trackback]

    […] Read More here|Read More|Read More Infos here|Here you will find 29256 more Infos|Informations to that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • http://www.192168101.com

    … [Trackback]

    […] Read More on|Read More|Find More Infos here|Here you can find 9709 more Infos|Infos to that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • apotheke potenzmittel

    … [Trackback]

    […] Find More here|Find More|Read More Infos here|Here you can find 40837 more Infos|Informations to that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • nursing test banks

    … [Trackback]

    […] Find More here|Find More|Find More Infos here|There you can find 22760 more Infos|Infos to that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • giveaways

    … [Trackback]

    […] Find More here|Find More|Read More Informations here|There you will find 97464 additional Informations|Informations on that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • beste potenzmittel

    … [Trackback]

    […] Read More here|Read More|Read More Infos here|Here you will find 28722 more Infos|Informations to that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • agen bola

    … [Trackback]

    […] Find More on|Find More|Find More Informations here|Here you can find 22099 additional Informations|Informations to that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • masini inghetata pret

    … [Trackback]

    […] Read More here|Read More|Find More Infos here|There you will find 93833 additional Infos|Informations on that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • Marketing

    … [Trackback]

    […] Find More on|Find More|Find More Informations here|There you can find 1397 additional Informations|Informations to that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • apple store

    … [Trackback]

    […] Find More here|Find More|Find More Infos here|Here you can find 91303 additional Infos|Informations on that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • camping and hiking equipment

    … [Trackback]

    […] Read More on|Read More|Find More Informations here|There you will find 9747 more Informations|Infos to that Topic: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • My Homepage

    … [Trackback]

    […] Read More Infos here: chrisdenarend.com/azure-iot-hub-raspberry-pi-3/ […]

  • Azure IoT Hub from Raspberry Pi 3

    […] Originally published on http://iottopic.com […]