---
title: "How to Connect a mcGateway to Ubidots over MQTT – Fast and Secure IoT Integration with W5500"
url: "https://maker.wiznet.io/scott/projects/connect-a-mcgateway-with-ubidots-over-mqtt/"
markdown_url: "https://maker.wiznet.io/scott/projects/connect-a-mcgateway-with-ubidots-over-mqtt/md"
type: "UCC: User Created Content"
author: "Isabel Lopez"
author_url: "https://help.ubidots.com/en/articles/596901-connect-a-mcgateway-with-ubidots-over-mqtt"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "Isabel Lopez"
original_url: "https://help.ubidots.com/en/articles/596901-connect-a-mcgateway-with-ubidots-over-mqtt"
published: "2022-11-30"
language: "en"
tags: ["MQTT"]
hardware: ["WIZnet W5500"]
likes: 3
views: 5848
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# How to Connect a mcGateway to Ubidots over MQTT – Fast and Secure IoT Integration with W5500

> Learn to setup your mcGateway to be able to send data to the Ubidots cloud over MQTT.

Original author: Isabel Lopez (source: https://help.ubidots.com/en/articles/596901-connect-a-mcgateway-with-ubidots-over-mqtt)

## Components

- **WIZnet W5500** x 1 ([docs](https://docs.wiznet.io/Product/Chip/Ethernet/W5500))
- Software: **Ubidots** ([docs](https://ubidots.com/docs/))

WIZnet parts: W5500 ([Datasheet](https://docs.wiznet.io/Product/Chip/Ethernet/W5500/datasheet?utm_source=maker&utm_medium=project&utm_campaign=w5500), [product hub](https://maker.wiznet.io/products/w5500/))

## Article

Are you looking for a fast and reliable way to connect your IoT devices to the cloud? If you’re using mcThings devices such as **mcGateway** and **mcModule**, this guide will show you how to set up seamless communication with **Ubidots** using the MQTT protocol.

At the heart of this setup lies the **WIZnet W5500 Ethernet controller**, which ensures deterministic, low-latency connectivity. Let’s explore how this integration works and why the W5500 makes all the difference in your IoT applications.

---

## 🚀 What is mcGateway?

The **mcGateway** is a compact IoT hub that connects mcModules (wireless sensor nodes) to cloud platforms like Ubidots. It collects data from remote mcModules using **mcAir**, a low-power RF protocol, and relays the data to the cloud over Ethernet via MQTT.

One of the key components inside mcGateway is the **W5500 Ethernet chip**, which delivers hardware-level TCP/IP processing and consistent network performance.

---

## 🌐 Why W5500 is the Key to Reliable Ethernet IoT

The **W5500** by WIZnet is a hardwired Ethernet controller optimized for embedded applications. Here’s why it’s ideal for gateways like the mcGateway:

- **Deterministic performance**: Unlike software stacks, the W5500 handles network layers in silicon, ensuring real-time response with minimal jitter.

- **Built-in TCP/IP stack**: Supports essential protocols like TCP, UDP, ICMP, ARP, and more—right out of the box.

- **Eight simultaneous sockets**: Allows for multiple concurrent data streams without data collision.

- **Low power consumption**: Perfect for energy-conscious, always-on devices.

- **Easy integration**: Communicates via SPI interface, simplifying MCU interfacing.

When real-time responsiveness and reliability matter, W5500 ensures your gateway stays efficient and robust—especially in industrial or remote sensor networks.

---

## 🛠️ What You Need

Before starting, prepare the following components:

- mcGateway

- mcModule

- mcDongle

- mcStudio IDE

- mcOTA tool for firmware updates

- Ubidots account

- Micro-USB and Ethernet cables

- Internet connectivity via LAN

---

## 🔧 Step-by-Step Guide to Connect mcGateway to Ubidots

### 1. Update Firmware

Use the mcDongle and mcOTA desktop tool to update your mcGateway and mcModule with the latest firmware. This step ensures compatibility and stability.

### 2. Connect and Configure mcGateway

- Open mcStudio IDE.

- Navigate to `Tools > Devices`, then select your mcGateway.

- Click **Connect Gateway**.

- Once connected, open the **Gateway Config** window.

### 3. Enter Ubidots MQTT Settings

In the configuration window, fill in the following fields:

- **Time Zone**: Select based on your region

- **MQTT Server**: `industrial.api.ubidots.com`

- **Port**: `1883`

- **Username**: Your Ubidots **TOKEN**

- **Password**: Same **TOKEN**

- **Client ID**: A unique name for your gateway (e.g., `mcGateway_01`)

Click **Save to Gateway** to apply the settings.

---

## 📡 Communication via mcAir

The mcGateway wirelessly receives data from mcModules via mcAir, a proprietary, energy-efficient RF protocol. The collected data is then forwarded to Ubidots via Ethernet and MQTT. Thanks to the W5500’s performance, this process is quick and reliable, even in noisy industrial environments.

---

## 📊 Visualize Sensor Data in Ubidots

Once the data is in Ubidots:

- Create new **Devices** and **Variables**

- Visualize live data with custom dashboards

- Trigger alerts and actions using the **Events** engine

This gives you a real-time, cloud-based monitoring and control solution without complex infrastructure.

---

## ✅ Summary

- The **mcGateway + W5500** combination provides low-latency, deterministic, and energy-efficient Ethernet communication.

- It connects your sensors to Ubidots using the **MQTT protocol**, widely adopted in IoT for lightweight and fast messaging.

- The W5500 simplifies development and enhances reliability, making it an excellent fit for professional and industrial IoT solutions.

---

## ❓ Frequently Asked Questions (FAQs)

**Q1: Why use Ethernet and not Wi-Fi for mcGateway?A:** Ethernet is more reliable and predictable, especially in industrial or critical applications. W5500 guarantees minimal jitter and consistent performance, which Wi-Fi can’t always offer.

**Q2: Can I use another MQTT broker instead of Ubidots?A:** Yes, the mcGateway can be configured to connect to any MQTT broker by simply changing the server and port settings in the gateway config.

**Q3: Is the communication secure?A:** The default setup uses unencrypted MQTT over port 1883. For security, use the device within a protected LAN or add a VPN layer externally.

**Q4: How many devices can a single mcGateway support?A:** You can typically connect dozens of mcModules to a single mcGateway, depending on data frequency and application load.

**Q5: Where can I get more information?A:** You can check [Ubidots Help Center](https://help.ubidots.com/) or mcThings documentation for detailed guides and technical support.

---

Looking to build a robust IoT project? Pair the powerful **W5500 Ethernet controller** with mcGateway and Ubidots to create a scalable, fast, and stable cloud-connected solution.

---

Source: https://maker.wiznet.io/scott/projects/connect-a-mcgateway-with-ubidots-over-mqtt/
