PC-Based-MQTT-AdHoc-Mesh-Networking

Connect PCs through MQTT Network using AdHoc Routing Protocol.

Stars
3
Committers
4

PC-Based MQTT AdHoc Mesh Networking

Project Overview

We are a team of four members working on developing a PC-based MQTT AdHoc mesh networking protocol. Our primary goal is to establish a robust messaging system using MQTT and Mosquitto. This project serves as a precursor to implementing the protocol on IoT devices, ensuring that we thoroughly understand the underlying mechanisms and requirements.

Project Goals

  • Understanding Mesh Networking: Before transitioning to IoT devices, we aim to grasp the essentials of mesh networking and the MQTT protocol.
  • Testing and Validation: By implementing and testing the protocol on PCs, we can validate our approach and troubleshoot any issues in a controlled environment.
  • Scalability: Our setup will provide insights into the scalability of the network and its efficiency in message routing.

Why MQTT Mesh Network?

Benefits of MQTT

  • Lightweight Protocol: MQTT is designed for constrained devices and low-bandwidth, high-latency networks. Its lightweight nature makes it ideal for IoT applications.
  • Publish/Subscribe Model: This model allows for efficient message distribution and decouples the producers and consumers of information.
  • Scalability: MQTT can easily scale from small home networks to large industrial applications.

Benefits of Mesh Networking

  • Redundancy: Mesh networks provide multiple paths for data to travel, ensuring reliability and redundancy.
  • Self-Healing: In case of node failures, mesh networks can automatically reconfigure to maintain communication.
  • Scalability: Adding more nodes to a mesh network is straightforward and doesn't require significant changes to the existing infrastructure.

Why AdHoc Routing Protocol?

Advantages of AdHoc Routing

  • Dynamic Topology: AdHoc routing protocols can handle frequent changes in network topology, which is common in IoT environments.
  • On-Demand Routing: Routes are established on an as-needed basis, reducing the overhead of maintaining unused routes.
  • Flexibility: AdHoc protocols are well-suited for scenarios where network infrastructure is unavailable or impractical.

Implementation Details

Architecture

  1. MQTT Broker (Mosquitto): We use Mosquitto as our MQTT broker to facilitate message routing between nodes.
  2. PC Nodes: Each PC in the network acts as a node, capable of sending and receiving messages.
  3. Routing Protocol: We implement a custom AdHoc routing protocol to determine the best path for message delivery.

Message Sending Process

  1. Connection Establishment: Each node establishes a connection with the MQTT broker.
  2. Topic Subscription: Nodes subscribe to relevant topics for message routing.
  3. Message Publishing: Messages are published to the broker, which forwards them to the appropriate nodes based on the routing protocol.

Testing and Validation

  • Simulation: We simulate various network scenarios to test the resilience and efficiency of our protocol.
  • Debugging Tools: We use tools to view and debug routing tables and monitor message flow between nodes.

Future Work

  • Transition to IoT Devices: After validating the protocol on PCs, we plan to implement it on IoT devices.
  • Performance Optimization: We will optimize the protocol for better performance and lower latency.
  • Security Enhancements: Adding security features to ensure secure communication between nodes.

Conclusion

Our PC-Based MQTT AdHoc Mesh Networking project is a significant step towards creating a reliable and scalable messaging system for IoT applications. By thoroughly understanding and validating the protocol on PCs, we ensure a smoother transition to IoT devices in the future.