Description
The Milesight gateway has a built-in network server, which helps users test the downlink commands used to remotely control the LoRaWAN nodes enabled in the gateway. And the gateway supports sending downlink commands in multiple formats (ASCII/Hex/base64).
Requirement
- Milesight Gateway: UG6x,UG8x
- LoRaWAN Node: Milesight LoRaWAN nodes, third-party nodes supporting the standard LoRaWAN protocol.
Configuration
Step 1. Access the gateway web GUI, go to Network Server > Device , check that the LoRaWAN node status is Enabled , and then copy the EUI of the device that needs to be controlled .
Step 2. Go to Network Server > Packets > Send Data to Device, complete all settings, and click Send.
1. Device EUI: Paste the Device EUI copied in step 1.
2. Type: the type of payload you are going to enter.
3. Payload: The downlink command to control the corresponding device, get it from the user guide or manufacturer of the respective device.
( Note: here is a related online tool used to transform payload formats: https://conv.darkbyte.ru/ )
4. Port: The port on which LoRaWAN devices receive downlinks. You can check this from the user guide of the respective sensor or the manufacturer. For Milesight terminals, the port is 85 by default.
5. Confirmed: When enabled, the gateway will receive a packet of ACK messages from LoRaWAN nodes after successfully sending commands.
Step 3. After sending, the packet records are displayed under Network Server . If the record is gray, it means the downlink message is in the send queue. If the downlink command is sent successfully, the record will be blank and the gateway will receive the ACK packet from the LoRaWAN node.
Note: If the LoRaWAN device type is Class A, only after the device sends the uplink packets can the gateway send the downlinks.
Example configuration:
Change the reporting interval of the Milesight UG65 Gateway EM300-TH sensor.
The original reporting interval of the EM300-TH is 1 min and it is a class A type device.
First, go to the gateway's web GUI, navigate to Network Server > Device, verify that the LoRaWAN node status is enabled, and copy the device EUI from the EM300-TH.
Then go to Network Server > Packets, paste the EUI of the EM300-TH device, fill in all the parameters obtained in the user guide.
After sending the downlink command, we get four downlink packet records:
1. The gray DnCnf message: The downlink command is already queued.
2. The DnCnf type packet: the downlink command has been sent to the sensor.
The ACK type packet: The sensor responds to ACK information from the gateway when it receives a downlink packet.
Check the reporting interval again by ToolBox, the reporting interval value changes to 20 minutes.