# (kind of?) hacking the UG56 LoraWAN Gateway

**URL:** <https://discourse.nodered.org/t/kind-of-hacking-the-ug56-lorawan-gateway/99479>\
**Category:** General\
**Created:** [22 October 2025 11:35 UTC](https://discourse.nodered.org/t/kind-of-hacking-the-ug56-lorawan-gateway/99479 "2025-10-22T11:35:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kitori](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@kitori](https://discourse.nodered.org/u/kitori)\
**Post date:** [22 October 2025 11:35 UTC](https://discourse.nodered.org/t/kind-of-hacking-the-ug56-lorawan-gateway/99479/1 "2025-10-22T11:35:41Z")

</div>

Hey folks 🖖 ,

i have this lorawan gateway. [https://www.milesight.com/iot/product/lorawan-gateway/ug56](https://www.milesight.com/iot/product/lorawan-gateway/ug56) for controlling some thermostats.

I use a Raspberry with moquitto and node-red for controlling the devices. Setting the target temperatur, getting the current temperaturs etc. via mqtt. ... Done ✔

* * *

In the gateway, you can install node-red with the Version 3.0.2.  
There are some Lora-specific nodes:

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/c/6cde902377fa861801da290cb0c0840b9c8c265f.png)

And i want to see how they work 🧐  
Especially the "LoRa Output" node, because you can only hardcode the parameters. Passing the variables with msg doesn't work.

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/4/44128bea520e59104df4a77f27ad7552a7b5f2aa.png)

* * *

In the Gateway, you can avtivate ssh, but you can't login with the user root.

But the node RED process runs as the user root 🤪  
 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/e/3ea4a3213c792964e0310140025b61ee349fc425.png)

so i try to find the lora node via node-red

I (ChatGPT 🙈 ) build a simple htmlpage with a websocket connection to look for node red folder and found it here:

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/e/cea524159248c2adb515b8738d45d57eb585417e.png)

The name of the lora package is this: **node-red-contrib-node-library**

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/3/23f13abdcf901a4cbfc1781f872035e4dd4ecb9c.png)

But in the node\_modules folder, there is no module **node-red-contrib-node-library**

I don't want to brick the device ( 💸).  
So i only want to read the filesystem, i don't want to invoke some risky commands.

search results:

* * *

## du

I search the output from `du` for the name, no luck.

* * *

## node

`node -p "require.resolve.paths('node-red-contrib-node-library')"`

```auto
[
  '/node_modules',
  '/.node_modules',
  '/.node_libraries',
  '/usr/lib/node'
]

```

1-3 dont exists, in /usr/lib/node i could not find it

* * *

## /etc/node\_red/data/

cat /etc/node\_red/data/package.json

```auto
{
    "name": "node-red-project",
    "description": "A Node-RED Project",
    "version": "0.0.1",
    "private": true,
    "dependencies": {
        "node-red-contrib-aedes": "~0.13.0",
        "node-red-contrib-buffer-parser": "~3.2.2"
    }
}

```

These are the nodes which i have manually installed

* * *

## /usr/lib/node\_modules/node\_red

`cat /usr/lib/node_modules/node_red/package.json`

```auto
{
    "name": "node-red",
    "version": "3.0.2",
    "description": "Low-code programming for event-driven applications",
    "homepage": "http://nodered.org",
    "license": "Apache-2.0",
    "repository": {
        "type": "git",
        "url": "https://github.com/node-red/node-red.git"
    },
    "main": "lib/red.js",
    "scripts": {
        "start": "node red.js"
    },
    "bin": {
        "node-red": "./red.js",
        "node-red-pi": "bin/node-red-pi"
    },
    "contributors": [
        {
            "name": "Nick O'Leary"
        },
        {
            "name": "Dave Conway-Jones"
        }
    ],
    "keywords": [
        "editor",
        "messaging",
        "iot",
        "flow"
    ],
    "dependencies": {
        "@node-red/editor-api": "3.0.2",
        "@node-red/nodes": "3.0.2",
        "@node-red/runtime": "3.0.2",
        "@node-red/util": "3.0.2",
        "basic-auth": "2.0.1",
        "bcryptjs": "2.4.3",
        "express": "4.18.1",
        "fs-extra": "10.1.0",
        "node-red-admin": "^3.0.0",
        "node-red-contrib-modbus": "^5.25.0",
        "node-red-node-tail": "^0.4.0",
        "nopt": "5.0.0",
        "semver": "7.3.7"
    },
    "optionalDependencies": {
        "bcrypt": "5.0.1"
    },
    "engines": {
        "node": ">=14"
    }
}

```

* * *

## /usr/lib/node\_modules/node\_red/node\_modules

```auto

ls -lah /usr/lib/node_modules/node_red/node_modules

```

--\> No luck

* * *

Has someone an idea how or where to find the node module?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [20 January 2026 11:36 UTC](https://discourse.nodered.org/t/kind-of-hacking-the-ug56-lorawan-gateway/99479/2 "2026-01-20T11:36:19Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
