CONTENTS

Description

Milesight LoRaWAN gateways can set up multi-gateway architecture by Gateway Fleet function, which can make different gateway failover each other and extend signal cover range, while make one sensor roam in multiple gateways. One gateway (called controller gateway) can be used as the network server, and other gateways (called agent gateways) will only be used as packet forwarders, and transmit all data packets to master gateway.

You can also refer to this video tutorial to know the steps:



Requirement

  • Milesight Controller LoRaWAN Gateway: 1 × UG56/UG65/UG67
  • Milesight Agent LoRaWAN Gateway: Any Milesight Gateway 

Note: make sure that the Controller Gateway has a public IP or is reachable for other gateways.


Configuration

Agent Gateway Settings

Step 1. ensure the network can reach the master gateway.

Step 2Access to the web GUI, copy the Gateway ID, and disable Embedded NS

Step 3. add a new destination to forward data packet to network server of Controller Gateway.

Type: Remote Embedded NS

Server Address: The IP address of Controller Gateway

Port: 18883


Controller Gateway Settings

Step 1. Access to the web GUI, go to Packet Forwarder > General to enable Embedded NS, and enable the Network server on Network Server> General page, click Save & Apply.

Note: if the platform mode is also enabled, follow next chapter.


Step 2. Go to Network Server > Gateway Fleet to add an agent gateways by typing gateway ID and customize the name.

Then the agent gateway will connect to the controller gateway.


Step 3. Add other agent gateways to controller gateway via the same steps. One controller gateway can add 100 agent gateways at most.

Then if we make one sensor activate in Controller Gateway, when this sensor was moved to the zone out of signal coverage of controller gateway but in the signal range of agent gateways, the Controller Gateway can also receive this sensor data packets.


Controller Gateway Settings when Milesight IoT Cloud is Enabled

When platform mode is enabled, the Gateway Fleet page will not able to edit. Please follow below steps.


Step 1: enquire the HTTP API token referring to article How to test Milesight Gateway HTTP API.

Step 2: use HTTP API to add the agent gateway. Please follow the details from HTTP API document.

Method 1: via API Tool (example: Postman)


Method 2: via curl tool

Open a Linux environment to type below command to execute below command:

curl -H "Authorization:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJsb3JhLWFwcC1zZXJ2ZXIiLCJleHAiOjE3MTQxOTcxNTksImlzcyI6ImxvcmEtYXBwLXNlcnZlciIsIm5iZiI6MTcxNDExMDc1OSwic3ViIjoidXNlciIsInVzZXJuYW1lIjoiYWRtaW4ifQ.29eih5rgVXH0Te6W_4jRyD_lfZyFwyUAS0fL0J3hmyw"  -X POST --data '{"mac":"24E124FFFEF8E234","name":"test_ug63","latitude":0,"longitude":0,"altitude":0,"description":"test","organizationID":1,"ping":false,"networkServerID":1,"gatewayProfileID":""}' http://192.168.22.111/api/gateways

You can also open the Windows Command Prompt to execute below command:

curl -H "Authorization:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJsb3JhLWFwcC1zZXJ2ZXIiLCJleHAiOjE3MTY0NTA4MjMsImlzcyI6ImxvcmEtYXBwLXNlcnZlciIsIm5iZiI6MTcxNjM2NDQyMywic3ViIjoidXNlciIsInVzZXJuYW1lIjoiYWRtaW4ifQ.cNyqnkX22m6kBcsU9bJe8OC8zELLcRwF08dmV1F6vBg" -X POST --data "{\"mac\":\"24E124FFFEF8E234\",\"name\":\"test_ug63\",\"latitude\":0,\"longitude\":0,\"altitude\":0,\"description\":\"test\",\"organizationID\":1,\"ping\":false,\"networkServerID\":1,\"gatewayProfileID\":\"\"}" http://192.168.22.111/api/gateways

After adding Agent Gateways to this Controller Gateway, all data will also be forwarded to Milesight IoT Cloud platform.


---END---