A simple IoTHub sample using HTTP as transport

Dependencies:   EthernetInterface NTPClient iothub_client iothub_http_transport mbed-rtos mbed wolfSSL serializer azure_c_shared_utility

This sample showcases the usage of Azure IoT client libraries with the HTTP transport for sending/receiving raw messages from an IoT Hub.

main.cpp

Committer:
AzureIoTClient
Date:
2015-09-15
Revision:
0:a00ac564e057
Child:
3:bca772fcee7e

File content as of revision 0:a00ac564e057:

// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#include <stdio.h>
#include "EthernetInterface.h"
#include "mbed/logging.h"
#include "mbed/mbedtime.h"
#include "simplesample_http.h"

int main(void)
{
	(void)printf("Initializing mbed specific things...\r\n");

	mbed_log_init();
	mbedtime_init();

	EthernetInterface eth;
	if (eth.init() || eth.connect())
	{
		(void)printf("Error initializing EthernetInterface.\r\n");
		return -1;
	}

	simplesample_http_run();
}