Innovation is the need of the hour when it comes to driving vehicles.

Since ages, drivers are getting the 'context' of the nearby vehicles using mirrors. While much is changed for knowing directions and reaching a new destination using maps, there isn't much change in getting more details of the vehicles driving around you.


Of course, for getting context of other vehicles, data should be transmitted by those vehicles or the sensors in the own vehicle. So some hardware changes will be required in the vehicles. The sensors assumed by this app may come built-in (which is not likely at the moment) or can be fitted externally. The app assumes data from up to 6 sensors per vehicle, as follows

  • 4 sensors sensing distance of other objects from the 4 corners of a vehicle
  • A sensor which gives current speed of the vehicle
  • A sensor which gives the status of brake of the vehicle


I have developed the server side components using C#, .Net and the following Azure components

  • Device Provisioning Service
  • IoT Hub
  • Event Hub
  • Function PowerShell is used to generate certificates for the devices. The devices were registered to the Device Provisioning Service using the Azure portal. A 'Device Provider' app is developed to simulate device contacting the Azure 'Device Provisioning Service' for the first time and getting assigned to the IoT Hub. A 'Sensor Simulator' is developed which continuously generate data for the vehicles registered. The data contains random numbers within an accepted/required range for speed and distance of objects. The app continuously posts the messages to the IoT Hub. An Azure Function scans the messages and converts into a format required for consumption by the UI. It posts the converted message on to another Event Hub. A jQuery UI will be consuming the messages from the Event Hub and displaying nice aid to the driver on his portable device - mobile or tablet. The driver can look at this screen in addition to the mirrors.


Device certificate creation: Only a particular way of creating certificates works with IoT Hub. All other available commands generate certificates but we cannot use them with Device Provisioning Service. Building UI, connecting to event hub, reading messages and showing a nice graphical representation, could not be completed.


  • Original idea which I ran into while driving car
  • Device enrollment to device communication to cloud -- all steps are handled successfully in the application

What's next for Context-full Drive

Building nice angular.js UI Enhancing the device registration to also automate device enrollment Simulate hundreds of devices to get closer to real traffic scenarios

Note: Have given webex recording link also (in addition to YouTube link) in the 'Try it out' section.

Built With

  • .net
  • azure
  • azure-function
  • azure-iot-hub
  • c#
  • event-hub
  • powershell
Share this project: