SORACOM Developers

Getting Started

Use Microsoft Azure Event Hubs Adapter to send data

This guide explains to send data from your ioT devices securely to Microsoft Azure Event Hubs data streaming service using the SORACOM Funnel Event Hubs adapter.

What is SORACOM Funnel

SORACOM Funnel is a cloud resource adapter that sends your IoT device data directly to specified cloud services. Unlike SORACOM Beam, which uses generic protocols to send data, SORACOM Funnel allows you to specify a specific cloud service and ingest data quickly with minimum configuration.

Configuration Steps

  1. Microsoft Azure Configuration
    • Resource Group Configuration
    • Event Hubs Creation and Configuration
  2. SORACOM Platform Configuration
    • Credential configuration
    • Funnel Configuration
    • SIM Group Configuration
  3. Configuration testing
    • Sending data
    • Verification on Event Hubs

Microsoft Azure Configuration

To prepare Microsoft Azure Event Hubs to receive your data:

  1. Create a Resource Group
  2. Create and Configure Event Hubs

Create a Resource Group

  1. Sign in to the Microsoft Azure Portal and click Create a resource
  2. In the search box, type in “Resource Group”
  3. Once you see Resource Group in the auto populate list, click Resource Group and click Add

funnel

funnel

Create and Configure Event Hubs

funnel

funnel

funnel

funnel

SORACOM Platform Configuration

To connect to Azure using Soracom Funnel:

  1. Register your Azure credentials
  2. Configure Funnel
  3. Add your Soracom SIM to a Group that has Funnel configured

Register Azure Credentials

  1. Sign in to the SORACOM User Console, click Menu on the left top and choose Security

funnel

Click Credentials and Register a credential set

Enter below and click Register

funnel

Configure Funnel

Once your credentials are registered, you are ready to  configure Funnel.

Once the group is configured, you will see it in the Soracom Console on the Groups page

funnel

Click your Group name, expand SORACOM Funnel, and click the slider bar displaying OFF

funnel

The slider will switch to ON and you should now be able to input the value. Enter the information as shown below and click Save

funnel

Add your Soracom SIM to the group you configured for Funnel

To start using Funnel, add your Soracom Air SIM to the group you just configured. Click Menu and select SIM Management

funnel

Select the Air SIM by checking the box and select Change Group Select the group you configured for Funnel.

Send the data to Funnel Endpoint

Send your request to the Funnel endpoint below:

Send over TCP Example

$ nc funnel.soracom.io 23080
{"message":"Hello SORACOM Funnel via TCP!"} [Enter]
200
[Ctrl+C]

Send over UDP Example

$ nc -u funnel.soracom.io 23080
{"message":"Hello SORACOM Funnel via UDP!"} [Enter]
200
[Ctrl+C]

Send over HTTP Example

~$ curl -vX POST http://funnel.soracom.io -d '{"message":"Hello SORACOM Funnel via HTTP!"}' -H Content-Type:application/json
* Rebuilt URL to: http://funnel.soracom.io/
*   Trying 100.127.65.43...
* Connected to funnel.soracom.io (100.127.65.43) port 80 (#0)
> POST / HTTP/1.1
> Host: funnel.soracom.io
> User-Agent: curl/7.43.0
> Accept: */*
> Content-Type:application/json
> Content-Length: 44
>
* upload completely sent off: 44 out of 44 bytes
< HTTP/1.1 204 No Content
< Date: Thu, 14 Jan 2016 17:18:46 GMT
< Connection: keep-alive
<
* Connection #0 to host funnel.soracom.io left intact

Test to make sure the data is sent

You can confirm data transmission using the Azure Event Hub Message graph. If your Event Hub receives any messages, the counter counts up and a graph will be displayed.

funnel

As you see in this guide, you do not need to install the Azure SDK or load credentials on your IoT devices to transmit data. All you need to do is to configure your credential set and resource URL on the SORACOM Platform and your devices will be able to send data straight to your preferred cloud service using light protocols like HTTP, UDP and Raw TCP.

Getting Started

SORACOM Air for Cellular

SORACOM Air for Sigfox

SORACOM Beam

SORACOM Canal/Direct/Door

SORACOM Endorse

SORACOM Funnel

SORACOM Gate

SORACOM Harvest

SORACOM Inventory

SORACOM Junction

SORACOM Krypton

SORACOM Lagoon

Service Detail

Developer Tools

pagetop