Skip to content

Software Gateway 2040 series

Description

It is possible to run the Meshtech Gateway Host software on any PC running Windows, macOS or Linux. Combined with the Raytac MDBT50Q-RX 0040 extender dongle this enables access to the Meshtech network and uplink connectivity to the customer backend. The Meshtech Gateway Host software is distributed as a self-contained dotnet application. It requires specifying the serialport where OS assign Raytac MDBT50Q-RX 0040 before running it.

Platforms

Name Description
Windows Gateway 2041 Built for x64 version Windows
macOS Gateway 2042 Built for x64 version macOS
macOS Gateway 2043 Built for ARM64 version macOS (Apple silicon)
Linux Gateway 2044 Built for x64 version Linux
Linux Gateway 2045 Built for ARM64 version Linux (for example Raspberry Pi OS (64-bit))

Running the Meshtech Gateway Host software

The general steps are similar for all versions, but the details vary slightly. Here are all steps described to get started for each OS.

Windows Gateway 2041

  • Download zip file for Windows Gateway 2041
  • Extract files
  • Find out what number OS assigned Raytac MDBT50Q-RX 0040, in PowerShell or through GUI
    • PowerShell Terminal
      • Get-CimInstance -Class Win32_SerialPort | Select-Object DeviceID, PNPDeviceID. The COM port you want is the one with Nordic Vendor ID "VID_2FE3"
    • GUI
  • Edit data\deviceconfig.json serial.ports.name field to match, typically COMx
  • Run Meshtech.Gateway.exe by double clicking it, or .\Meshtech.Gateway.exe command from Terminal

macOS Gateway 2042

  • Download zip file for macOS Gateway 2042
  • Extract files by double clicking in Finder, or in Terminal unzip macOSGateway_2042_*.zip and move into extracted directory cd macOSGateway_2042
  • Find out what path OS assigned Raytac MDBT50Q-RX 0040 serial port ls /dev/tty.*
    • If you have several entries, you can run ls /dev/tty.* before and after plugging in Raytac MDBT50Q-RX 0040 and see which entry is added
  • Edit data/deviceconfig.json serial.ports.name field to match, typically /dev/tty.usbmodem12345
  • Run Meshtech.Gateway by by Control+click and Open, or ./Meshtech.Gateway command from Terminal. If you start by mouse click, you might have to select run in Terminal the first time you start it

If you run macOS Gateway 2042 on an Apple Silicon Mac, rosetta is required. Run command softwareupdate --install-rosetta to install if not already present.

macOS Gateway 2043

  • Download zip file for macOS Gateway 2043
  • Extract files by double clicking in Finder, or in Terminal unzip macOSGateway_2043_*.zip and move into extracted directory cd macOSGateway_2043
  • Find out what path OS assigned Raytac MDBT50Q-RX 0040 serial port ls /dev/tty.*
    • If you have several entries, you can run ls /dev/tty.* before and after plugging in Raytac MDBT50Q-RX 0040 and see which entry is added
  • Edit data/deviceconfig.json serial.ports.name field to match, typically /dev/tty.usbmodem12345
  • Run Meshtech.Gateway by Control+click and Open, or ./Meshtech.Gateway command from Terminal. If you start by mouse click, you might have to select run in Terminal the first time you start it

Linux Gateway 2044

  • Download zip file for Linux Gateway 2044
  • Extract files: unzip LinuxGateway_2044_*.zip and move into extracted directory cd LinuxGateway_2044
  • Find out what path OS assigned Raytac MDBT50Q-RX 0040 serial port ls /dev/tty*
    • If you have several entries, you can run ls /dev/tty* before and after plugging in Raytac MDBT50Q-RX 0040 and see which entry is added
  • Edit data/deviceconfig.json serial.ports.name field to match, typically /dev/ttyACMx or /dev/ttyUSBx
  • Run ./Meshtech.Gateway command from terminal to start

Linux Gateway 2045

  • Download zip file for Linux Gateway 2045
  • Extract files: unzip LinuxGateway_2045_*.zip and move into extracted directory cd LinuxGateway_2045
  • Find out what path OS assigned Raytac MDBT50Q-RX 0040 serial port ls /dev/tty*
    • If you have several entries, you can run ls /dev/tty* before and after plugging in Raytac MDBT50Q-RX 0040 and see which entry is added
  • Edit data/deviceconfig.json serial.ports.name field to match, typically /dev/ttyACMx or /dev/ttyUSBx
  • Run ./Meshtech.Gateway command from terminal to start

Activating and using Software Gateway

First time starting the gateway, it could take some time for USB BLE adapter firmware upgrade to complete. Progress % will be shown in console during the process. After Upgrade completes and Meshtech Gateway Host is running, you need to Claim, Activate and configure the gateway. This is done through the Meshtech Device Management Portal. To claim a gateway, you need to know the gateway ID, which can be located in data/blemac file after gateway software has started.

Upgrading to new version

There is no automated upgrade process for 2040 Software Gateway. Running a new version is done by downloading new software bundle zip file, extracting that, and starting that instead of old file. If you want to use your existing configuration, you can copy all contents of data/ folder to the new data/ folder before starting Meshtech.Gateway.

Properties

Property Reported Default Value Notes
0x8000 - Model Number Yes -
0x8001 - Firmware Version Yes -
0x8002 - Hardware Version Yes -
0x8003 - MAC Address No -
0x8005 - Production Info Extended No -
0x8007 - Variant Yes -
0x8008 - Public Key No -
0x8009 - Host Public Key No -
0x8010 - Activated No -
0x8020 - Power Source Yes -
0x8101 - Uptime No -
0x8110 - Device Mode Yes 0x02
0x8120 - Firmware Update State Yes
0x8122 - Firmware Update Control -
0x8124 - Start Firmware Broadcast -
0x8125 - Firmware Broadcast State Yes
0x8126 - Firmware Broadcast Control -
0x8201 - Debug No 0x00000000
0x8211 - RSSI Throttling Limit Yes 0x00
0x8212 - Downlink Configuration 2 Yes 0x03000112
0x8220 - Property Throttling Yes 0x00
0x8221 - RSSI Reporting Yes 0x01 (true)
0x8222 - Measurement Reporting Yes 0x01 (true)
0x8223 - Event Reporting Yes 0x01 (true)
0x8228 - Network Mode Yes 0x00
0x8230 - General Advertisement Reporting No 0x000000
0x8250 - Log to Disk Yes 0x00
0x8251 - Log Debug Yes 0x00
0x8252 - Log RX Yes 0x00
0x8253 - Log TX Yes 0x00
0x8254 - Log RX Encrypted Yes 0x00
0x8255 - Log TX Encrypted Yes 0x00
0x8300 - Soft Reset - -
0x8301 - Factory Reset - -
0x8302 - Request Property Reporting - -
0x8304 - Start Downstream Throughput Test - -
0x8305 - Throughput Test Packet Counter No 0x00000000
0x8320 - Destroy Network Below - -
0x8321 - Destroy Network Below Child - -
0x8322 - Network Tree No -
0x8330 - Flush Property Cache -
0x8400 - Performance Counter Reporting Interval Yes 0x0000
0x8401 - Performance Counter Reporting Priority Yes 0x02
0x8410 - Upstream Packets Sent No 0x00000000
0x8411 - Upstream Packets Lost No 0x00000000
0x8412 - Downstream Packets Sent No 0x00000000
0x8413 - Downstream Packets Lost No 0x00000000
0x8850 - EnOcean Config (BETA) Yes 0x0002
0x9000 - Scan Window Yes 0x18 (24 %)
0x9002 - Network Lock Yes 0x00 (0)
0x9020 - Offer RSSI Threshold Yes 0xA6 (-90)
0xFF00 - Scan Mode - - Host internal property

Note

Scan Window range is 5 - 95 %. It is highly recommended to not increase scan-window above 24 % (default). Increases beyond 24 % can negatively affect throughput.

Note

After performing factory-reset (by writing 0x8301 - Factory Reset command property or deleting files in data/ folder) it is necessary to "Clear token" in Device Management before gateway can provision itself if you use same USB BLE adapter. You will also need to activate and send required configuration (typically backend.json) to use it again. Performing factory-reset will close the application, and you will need to start software again.

Note

Performing factory reset of a paired Raytac MDBT50Q-RX 0040 (by pressing button while applying power, then additional button press for 5+sec) will also cause host Software Gateway to factory reset. Performing factory-reset will close the application, and you will need to start software again.

Measurements

Measurement
0x8410 - Upstream Packets Sent
0x8411 - Upstream Packets Lost
0x8412 - Downstream Packets Sent
0x8413 - Downstream Packets Lost

Troubleshooting tips

In Linux you might not have rights to access the serial port from the user starting Meshtech.Gateway. To fix this and give access to current user, sudo usermod -a -G dialout $USER command can be used to add yourself to the dialout group. Logout and log back in for group changes to take effect.