AN: Onboarding a Milesight UG56 Gateway + WS101 Sensor to ThinkLink
Applies to: Milesight UG56 LoRaWAN gateway + WS101 LoRaWAN sensor → a ThinkLink LoRaWAN server (edge TKE or cloud), AS923 band, OTAA join. Scenario: point a third-party gateway at ThinkLink over the standard GWMP/Semtech protocol, whitelist it, register the sensor, and decode its payload with a thing model. Addresses/EUIs/keys below are placeholders — replace at deploy time.
1. Edge (TKE) vs. Cloud — only the connection endpoint differs
ThinkLink runs in two forms, and the onboarding procedure is identical for both — only the connection endpoint (server address + GWMP port) changes. Everything else in this guide — gateway type GWMP, the device profile, the thing model, the device mounting — is the same.
| Deployment | Gateway "Server Address" | Port Up / Down | How to get the address |
|---|---|---|---|
| Edge — TKE (e.g. TKE132) | The TKE's actual LAN IP, e.g. 192.168.1.100 | 1700 / 1700 | From the tke-conf console (see §3) |
| Cloud — ThinkLink | The LNS host/domain of your cloud deployment, e.g. lns.thinklink.example | 1770 / 1770 | Provided with your cloud account |
ThinkLink accepts gateways over two protocols:
GWMP(Semtech UDP) andmqtt_mt. The UG56 in this guide uses GWMP via its Semtech packet forwarder; the GWMP port is1700for edge TKE and1770for cloud ThinkLink. Usemqtt_mtinstead when the gateway reports in the ManThink MQTT format.
2. Architecture
WS101 ─up(LoRaWAN, AS923, OTAA)─▶ UG56 (Packet Forwarder, Semtech) ─GWMP:1700(TKE)/1770(Cloud)─▶ ThinkLink LNS
└─ thing model (ChirpStack decoder) ─▶ telemetry3. Prerequisites
- A Milesight UG56 gateway and a WS101 sensor.
- A running ThinkLink server (edge TKE or cloud) and a management account.
- A PC with network reachability to the gateway and the server.
- A WS101 handheld configurator (or an NFC reader with the Milesight app).
- The WS101
DevEUI(on the device label or read via the handheld) and a 32-hexAppKey.
4. Get the server address
- Cloud: use the LNS address provided with your account; skip to §5.
- Edge (TKE): open the
tke-confconsole athttp://www.thinklink-edge:19091, log in, and record the TKE's running IP (e.g.192.168.1.100). You only need to do this on first deployment or after a network change.
5. Configure the UG56 packet forwarder
Log in to the UG56 Web GUI (default 192.168.1.1) and go to LoRaWAN → Packet Forwarder → General. Add a network server destination ("+"):
| Field | Value |
|---|---|
| Enable | checked |
| Type | Semtech (this is the GWMP protocol) |
| Server Address | the ThinkLink server address from §1/§4 |
| Port Up | the GWMP port for your deployment — TKE 1700, cloud 1770 |
| Port Down | same as Port Up — TKE 1700, cloud 1770 |
Click Save & Apply. The UG56 now forwards all received LoRaWAN packets to ThinkLink over GWMP.
6. Whitelist the UG56 in ThinkLink
In the ThinkLink console go to Gateway Management → Add Gateway, and in the dialog:
| Field | Value |
|---|---|
| Name | any label, e.g. UG56-AS923 |
| EUI | the UG56 Gateway EUI |
| Type | GWMP |
| pin_code | user-defined |
Save. Only whitelisted gateways are accepted.
7. Register the WS101 device profile (OTAA)
Go to O&M → Device Management → LoRaWAN Profile → Add:
| Field | Value |
|---|---|
devEui | the WS101's unique EUI (must match the physical device) |
standard | AS923 |
app_key | a 32-hex application key, e.g. 8888...8888 (keep it safe) |
Other fields (lw_ver, class_mode, …) default from the chosen standard — leave them. Save.
8. Configure the WS101 and join
Using the handheld/NFC configurator, open the WS101 LoRaWAN settings:
| Field | Value |
|---|---|
| App Key | exactly the app_key from §7 |
| Device EUI / App EUI | read from the device; verify against §7 |
| Region | AS923 |
| Join Mode | OTAA |
Write the configuration. The WS101 immediately attempts to join through the UG56. The device LED indicates join status (see the WS101 user guide).
9. Add a thing model (payload decoder)
Get the WS101 LoRaWAN payload decoder from the Milesight user guide or GitHub. In ThinkLink go to Model Management → Thing Model → Add:
| Field | Value |
|---|---|
| Type | ChirpStack (ThinkLink's LoRaWAN core is ChirpStack-based) |
| Name | e.g. WS101_AS923_Decoder |
| Decoder | paste the WS101 payload decoder code |
Save.
10. Add the device and mount the thing model
Go to O&M → Device Management → Device → Add Device:
| Field | Value |
|---|---|
| EUI | the WS101 devEui (must match §7) |
| Name | e.g. WS101_Sensor_AS923 |
| Device Type | LoRaWAN |
After saving, open the device detail page, find Thing Model → Add, and mount WS101_AS923_Decoder. Save.
11. Verify
The WS101 is now connected through the UG56 to ThinkLink, with a thing model decoding its data. Check Real-time Data / Historical Data for incoming telemetry.
12. Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| UG56 cannot reach the server | Wrong address/port; server down; GWMP port blocked | Verify the §1/§4 address and port (TKE 1700 / cloud 1770); ensure that UDP port is open end-to-end |
| WS101 won't join | devEui/app_key mismatch between profile and device | Make profile and device values identical; confirm Region=AS923, Join Mode=OTAA |
| WS101 joins but no data decoded | Thing model not mounted, or wrong decoder | Mount the thing model; verify the decoder matches the WS101 payload; Type must be ChirpStack |
| Intermittent uplinks | Weak signal | Move the WS101 closer to the UG56 |