Skip to main content
How do I setup Connectors?

Setting up connectors allows you to send data to a server without logic and SDKs installed to devices.

C
Written by Customer-Success
Updated over 7 months ago

By removing complexity from connectivity, Connectors can help you significantly reduce overhead data usage and data costs, auto-provision your fleet, and securely connect your devices with your IoT cloud.

Onomondo provides a range of connector solutions to meet your integration needs.
These include:

  • HTTPS Connector

  • TLS Connector

  • Microsoft Azure IoT

  • AWS IoT Core

Choose the connector that best fits your requirements and seamlessly integrate your systems with our platform.


Before you begin, you need to determine which device will be sending data, what data you want it to send, and where it should be sent. Once you have this information, you can proceed with setting up the Connector by the following four steps in this article.

Step 1: Setting up the device to send data

Make sure your device is connected to the network. Once your device is connected, you need to set it up to generate the desired payload. The payload has to be sent using one of the standard protocols, like TCP or UDP. For simplicity, let's use an example with a JSON payload sent over TCP using Python. This code would be running on your device:

import socket

payload = { "Hello": "There!" }

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('1.2.3.4', 4321))
s.send(payload)
s.close()


This is enough to send the data to your service of choice - the rest happens at Onomondo. Notice that there is no overhead like encryption (e.g. https) included in the payload. With Onomondo, you don't need to do that as the data is sent to Onomondo before it's sent on the Internet, and the encryption is added on our end.


What IP address should I use?

The IP address doesn't matter, because you set the routing rule in the Onomondo platform during the Connector setup. Thanks to this, it's easier to update the destination address without updating your devices. Do not use the IP loopback address, 127.0.0.1. Simply using 1.2.3.4 and port 4321 provided in the example is sufficient. Also, if you avoid using domain names, your device will not need to do a DNS lookup which consumes additional data and may stall the transmission.

Using HTTP: HTTP Severs often check for the correct HOST header in the requests being sent. If it is not set to allow the dummy IP the device is sending (i.e. 1.2.3.4) using TLS connector then it will return a 402 error to the device, which can be seen if the data is being captured by Traffic Monitor. This can be fixed by either:

  • Updating the server to accept the dummy IP

  • Stopping the server from checking the HOST header

  • Adding the correct HOST header on the device

Video demo

In this demo, Jason shows you how to set up a Connector on a SIM, add a passthrough, and change connectors - all in under 5 minutes.

Step 2: Configuring the new Connector

Head over to the Connectors tab in the Onomondo platform and click the 'Add Connector' button to begin the configuration.


Currently, we offer:

  • HTTPS

  • TLS Connector

  • Microsoft Azure IoT

  • AWS IoT Core

The Connector configuration has five sections:

  1. Connector name

  2. Manage access for users

  3. Connector type

  4. Type configuration

  5. Passthrough connection

Once you have named your Connector and added relevant Tags, you will need to pick the Connector type. Each type will allow you to connect to a specific service. Selecting a type will change the fields to fill out in the Type configuration-section. Here, fill in the fields with the information provided from your cloud platform credentials. Once they are filled out, the 'Add' button will be available to create the Connector.

Step 3: Adding the Connector to a SIM

Once you have created a Connector, go to the SIMs tab. Find the SIM(s) you want to attach to the Connector you have created. Click Go to SIM button to display the SIM detail page and click the edit button on the left-hand side of the screen.

Step 4: Adding a Passthrough

An optional addition is setting up a passthrough. This identifies exceptions that the Connector will not pick and send to the HTTPS endpoint specified in the Connector. A couple of examples could be:

Sending a ping - selecting the passthrough for packets with the ICMP protocol



Allowing DNS server lookup - selecting the passthrough for packets with the UDP protocol on port 53


Another server endpoint - used for, for example, updating device firmware. Setting protocol and IP address should be sufficient.


How do I change a Connector?

Once you have created a new Connector, it is very simple to change the Connector assigned to the SIMs. This can be done using the API or from the Onomondo Platform.

How to change Connectors using the Onomondo app

In the Onomondo platform, navigate to the SIMs tab, find the SIM you want to update the connector on and click the 'Go to SIM' button to display the individual SIM page. Click the edit icon to edit the SIM.


Pick the new Connector in the dropdown menu and click 'Save'.


How to change Connectors using the Onomondo API

To change connectors assigned to a SIM, all you need to do is send a PATCH request with a defined SIM ID and the name of the new connector as the data object. Using the example above, the data in the payload will look like this:

{
"connector": "my-azure-connector"
}

If successful, you will receive the response back:

{
"message" : "OK"
}

Don't forget to include the "authorization", containing your unique API Key, and "content-type" in the header of the payload. Using curl as an example:

curl --request POST \
--url https://api.onomondo.com/sims/000002273 \
--header 'Authorization: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data '{ "connector": "my-azure-connector" }'

💡 If you are using Postman, you can directly import the Onomondo API collection from our documentation and send an Update SIM request with little coding.

What do I need to do on the device side?

Absolutely nothing.

That is the huge advantage of using Connectors. After the connector has changed, the data from devices equipped with selected SIMs will instantly start traveling to the new endpoint you have specified during the connector setup.


Still need help? You can contact us at [email protected]

Did this answer your question?