Implementing SNMP v3.0 to MQTT on ARMxy with ThingsBoard Gateway
Categories

Implementing SNMP v3.0 to MQTT on ARMxy with ThingsBoard Gateway

ARMxy embedded hardware, integrated with ThingsBoard IoT Gateway, enables SNMP v3.0 data collection and reliable forwarding to MQTT, providing an efficient and stable protocol adaptation solution for industrial IoT projects.
Implementing SNMP v3.0 to MQTT on ARMxy with ThingsBoard Gateway
Case Details

1. Overview

The core function of the ThingsBoard IoT Gateway SNMP connector is to collect data from SNMP devices and upload it to the ThingsBoard platform. It should be noted that the SNMP connector itself does not directly support SNMP v3 to MQTT protocol conversion. However, this can be achieved indirectly via ThingsBoard’s ecosystem mechanism of “SNMP data collection + internal forwarding.”

If SNMP v3 security features are required, authentication and encryption parameters must be correctly configured.

This practical test is conducted on the BL410 hardware platform, which features an ARM architecture, providing stable performance and strong compatibility. Test results show that BL410 fully supports SNMP v3.0 to MQTT forwarding, and all ARMxy series hardware from BEILAI can be adapted to similar projects, offering flexible hardware options.

2. Prerequisites

  • Basic environment: Python 3.8 or above installed, and ThingsBoard Gateway successfully deployed on BL410;
  • Test device: SNMP v3 local simulation agent (snmpd) set up on BL410 to replace real SNMP devices;
  • MQTT client: MQTTX or mosquitto_sub installed for verifying MQTT data forwarding;
  • SNMP test tool: To verify network reachability of SNMP v3 devices;
  • ThingsBoard service: Running properly as the MQTT message receiver.

3. Guide 

Step 1: Set up SNMP v3 simulation agent (snmpd)

    1. Install the snmpd tool and related dependencies using the following command:
    sudo apt update && sudo apt install -y snmpd snmp


    2. Configure SNMP v3 User (Key step: Create an SNMP v3 user with authentication and encryption)
    Execute the following command to create an SNMP v3 user, specifying SHA as the authentication protocol, AES as the encryption protocol, and setting the corresponding keys:
    sudo net-snmp-config --create-snmpv3-user -a SHA -A "AuthPass123!" -x AES -X "PrivPass123!"  snmpv3user

    3. Modify the snmpd configuration file
    Edit sudo nano /etc/snmp/snmpd.conf, comment out the existing default configurations, and add the following content:



    4. Restart snmpd and enable it to start on boot
    sudo systemctl restart snmpd
    sudo systemctl enable snmpd

    5. Verify SNMP v3 access
    Execute the following command to check whether the SNMP v3 agent is working properly. If the system description information is returned, the configuration is successful:
    snmpget -v3 -l authPriv -u snmpv3user -a SHA -A "AuthPass123!" -x AES -X "PrivPass123!" 127.0.0.1 1.3.6.1.2.1.1.1.0



    Step 2: Install MQTT Client (for Forwarding Verification)
    Leave a message
    FirstName*
    LastName*
    Email*
    Message*
    Code*
    Verification Code
    We use Cookie to improve your online experience. By continuing browsing this website, we assume you agree our use of Cookie.