MultiConnect Conduit LoRa-to-GPRS Gateway

MultiConnect® Conduit™ is a programmable gateway with an open development environment to enable machine-to-machine (M2M) connectivity using various wireless interfaces, including GPRS, 3G, 4G and LoRa.

Requirements

Setting up the Hardware

Install the LoRa mCard

  • Disconnect power to the gateway.
  • At the back of the housing, determine where you want to install the accessory card. You can install the card in either the AP1 or AP2 port. Remove the port cover and retain the screw.
  • Slide the card into the opening and push until you feel the card connector seat in the internal connector.
  • Use a small screwdriver to attach the card bracket to the housing with the screw from the port cover.
  • Attach the LoRa antenna to the LoRa mCard.

Install a SIM card (optional)

  • At the front of the Conduit housing, remove the screw that secures the nameplate to the Conduit and remove the nameplate.
  • Locate the SIM card holder in the upper right corner of the opening. If a SIM card is installed and needs to be removed, slide it out of the SIM card hold.
  • Gently push the new SIM card into SIM card holder face up with the cut corner to the right and the SIM contacts facing toward the Conduit’s interior.
  • If not installing a battery or micro SD card, reattach the MultiTech nameplate to the Conduit using the screw removed in before step.

To install a Micro SD card or a battery, please refer to MultiTech’s website.

Setting up the Ethernet connection

Connect the Ethernet cable between the MultiConnect Conduit and your PC, then connect the power cord and wait for the Status LED to begin blinking.

  • Open an Internet browser and type the default address for the device: http://192.168.2.1. When the login page appears type the default user name (“admin”) and default password (“admin”).
  • Go to Setup and click on Network Interfaces:
  • Click on the pencil to edit eth0:
  • Change the Type to LAN and Mode to DHCP Client:

Setting up the LoRa Radio

  • Go back to Setup and click on Lora Network Server:
  • Set the desired Lora network name, Frequency Sub-Band and Passphrase.

Setting up a Mobile connection (optional)

To enable your Conduit gateway to access the Internet through a mobile interface:

  • Go to Cellular > Cellular Configuration to display the Cellular Configuration window.
  • Check the “Enabled” box to enable it.
  • Enter the APN provided by your mobile operator in the field located in the Modem Configuration section of the window:
  • Click on “Submit”.

Setting up Node-RED

Node-RED allows you to create your own programming functions to handle the gateway data by using a simple and visual interface. We’ll use it to relay the LoRa data to the Ubidots cloud, being able to see the LoRa devices in your Ubidots account.

To connect Node-RED to Ubidots click on “Apps” then “Node-RED”.

A new login page will appear; use the default “admin” user and “admin” password used for the main Conduit interface.

  • Click on the upper right corner button, select Import and then Clipboard.
  • Inside of the blank square paste the code on the right column of this guide, titled “Text to import”.

Import this code snippet to Node-RED

[{"id":"23666640.f89f6a","type":"tcp out","host":"translate.ubidots.com","port":"9012","beserver":"client","base64":false,"end":true,"name":"","x":624,"y":271,"z":"fd59daf8.04e3e","wires":[]},{"id":"b54266ab.fe579","type":"debug","name":"","active":true,"console":"false","complete":"true","x":648,"y":180,"z":"fd59daf8.04e3e","wires":[]},{"id":"72c3c42f.26c294","type":"function","name":"Function Ubidots","func":"var TOKEN = \"{Assign_your_Ubidots_Token}\";\nvar VARIABLES = [\"var-1\", \"var-2\", \"var-3\"];\nvar USER_AGENT = \"mDot/1.0\";\nvar payload  = msg.payload;\nvar values = payload.split(\",\");\nvar last_index = values.length - 1;\n\nif (last_index > 2 || last_index < 0) {\n    return null;\n}\n\nvar data = {};\ndata.payload = USER_AGENT + \"|POST|\" + TOKEN + \"|lora:my-lora-device=>\";\n\nfor (i = 0; i <= last_index - 1; i++){\n   data.payload += VARIABLES[i] + \":\" + values[i] + \",\";\n}\n\ndata.payload += VARIABLES[last_index] + \":\" + values[last_index]\ndata.payload += \"|end\";\nreturn data;","outputs":1,"noerr":0,"x":380,"y":179,"z":"fd59daf8.04e3e","wires":[["23666640.f89f6a","b54266ab.fe579"]]},{"id":"47bd1557.66acec","type":"lora in","name":"","datatype":"utf8","x":189,"y":182,"z":"fd59daf8.04e3e","wires":[["72c3c42f.26c294"]]}]
  • Click on Ok to place the block diagram in your Node-RED project.
  • Now you will see something like this:
  • Double click on label named Function Ubidots and you’ll see a code snippet. In this code, change “TOKEN” for your Ubidots account token.

Sending data from your LoRa devices to the Conduit Gateway

The variables are defined into the "VARIABLES" array in the Ubidots function provided above. In order of this, you will be able to send values to Ubidots following the format below: 

value-1,value-2,value-3

IMPORTANT NOTE: The mDot device lets you to send a packet with 11 bytes as limit; please ensure that the total number of the bytes of the package do not exceed 11, the library does not make any check of byte size.  

Result

After doing this tutorial, your gateway should be ready to receive data through the LoRa interface and forward it to your Ubidots account.

This tutorial has been tested with the LoRa mDot Modules from MultiTech. Check out the device tutorials here:

Did this answer your question?