Downlink Command

The device supports downlink commands to configure the device. Application port is 85 by default.

General Setting

Item Channel Type Byte Description
Reboot ff 10 1 ff
Wi-Fi ff 42 1 00: disable, 01: enable
Manual system time setting ff 11 4 Timestamp, unit: s
Time Synchronize f9 91 5 Byte 1: 00-Synchronize With Gateway Time, 01-Manual

Byte 2-5: Timestamp, unit: s. If gateway synchronization is selected, this value is 00000000

Debug Log f9 89 2 Byte 1: 00

Byte 2: 02-Error, 04-Debug

Example:
  1. Disable the Wi-Fi.
    ff4200
    Channel Type Value
    ff 42 00: disable
  2. Reboot the device.
    ff10ff

Reset Setting

Item Channel Type Byte Description
Reset Cumulative Count ff 51 1 ff
Enable Reset Cumulative Count on Schedule f9 94 1 00: disable, 01: enable
Reset Cumulative Count on Schedule f9 95 5 Byte 1: 00- Modify, 01-Add, 02-Delete

Byte 2: Reset Schedule Number

Byte 3: Reset Date,
Bit 0: Sunday

Bit 1: Monday

Bit 2: Tuesday

Bit 3: Wednesday

Bit 4: Thursday

Bit 5: Friday

Bit 6: Saturday

Bit 7: 0

Byte 4-5: Reset Time, Unit: min

Example:
  1. Add a new reset schedule: Daily at 20:00.
    f995 01 00 7f b0 04
    Channel Type Value
    f9 95 01: Add

    00: The first reset schedule.

    7f=> 01111111: Everyday.

    b0 04=04 b0=1200min=20h=20:00

People Counting Setting

Item Channel Type Byte Description
Region People Counting ff 50 1 00: disable, 01: enable
Set Detection Region f9 96 3 Byte 1: 00-disable, 01-enable

Byte 2: Detection Area, 00-Mapped Region,01-Non-mapped Region

Byte 3: Reporting Type, 00-Occupancy, 01-Region People Counting

Min. Dwell Time f9 92 3 Byte 1: 01-Enable; 00-Disable

Byte 2-3: Min. Dwell Time, Unit: s, Default: 5

Line Crossing Counting ff 48 1 00: disable, 01: enable
Filter U-turns f9 98 1 00-disable, 01-enable
Enable Schedule Setting f9 97 2 Byte 1: 00-Region People Counting, 01-Line Crossing Counting, 02-People Flow Analysis

Byte 2: 00-disable, 01-enable

Example:
  1. Set a Detection Region: Mapped Region, Reporting Type is Occupancy.
    f996 01 00 00
    Channel Type Value
    f9 96 01: Enable

    00: Mapped Region

    00: Reporting Type is Occupancy

Report Setting

Item Channel Type Byte Description
Reporting Interval ff 03 2 Range: 5~65535, unit: s
Periodic Report Scheme f9 10 1 00: On the Dot

01: From Now On

Reporting Interval (On the Dot) f9 11 1 00: 5min, 01: 10min, 02: 15min, 03: 30min, 04: 1h, 05: 4h, 06: 6h, 07: 8h, 08: 12h
Report by Result Mode ff 45 1 00: Zero and Non-zero

01: Once result changes

Debounce Time ff 46 2 Byte 1: 00-disable, 01-enable

Byte 2: Debounce time, unit: s, default: 2s

Trigger Report f9 3d 1 00: disable, 01: enable
Report with Timestamp f9 93 1 00: disable, 01: enable
Region People Counting Report Regularly ff 43 1 00: disable, 01: enable
Region People Counting Report by Result ff 44 1 00: disable, 01: enable
Example:
  1. Set reporting interval of region counting, line cross counting or people flow analysis as 20 minutes.
    ff03 b004
    Channel Type Value
    ff 03 b0 04 => 04 b0 = 1200s = 20 minutes
  2. Enable bounce time and set time as 2s.
    ff46 01 03
    Channel Type Value
    ff 46 01: enable

    02: Debounce time is 3s

Schedule Setting

Item Channel Type Byte Description
Schedule Setting f9 99 7 Byte 1: 00-Region People Counting, 01-Line Crossing Counting, 02-People Flow Analysis
Byte 2: Weekday,
00-Sunday

01-Monday

02-Tuesday

03-Wednesday

04-Thursday

05-Friday

06-Saturday

Byte 3: 00-Period 1, 01-Period 2, 02-Period 3

Byte 4: Start Hour

Byte 5: Start Minute

Byte 6: End Hour

Byte 7: End Minute

Example:
  1. Set schedule: For region people counting, set the schedule period 1 on Sunday to 08:00–09:00.
    f999 00 00 00 08 00 09 00
    Channel Type Value
    f9 99 00: Region People Counting

    00: Sunday

    00: Period 1

    08: Start Hour

    00: Start Minute

    09: End Hour

    00: End Minute

LoRaWAN® Setting

Modifying the following parameters triggers the device to rejoin the network.

Item Channel Type Byte Description
LoRaWAN® Channel Mask ff 05 3

Byte 1: Channel index range

01: 0-15

02: 16-31

03: 32-47

04: 48-63

05: 64-79

06: 80-95

Byte 2-3: indicate disable or enable via every bit, 0=disable, 1=enable

ADR ff 40 1 00: disable, 01: enable
Application Port ff 41 1

[1-223], Default is 85

LoRa Rejoin Mode f9 85 2

Byte 1: 01-Enable; 00-Disable

Byte 2: The Number of Detection, Range: 4~32

Confirmed Mode ff 04 1 00: disable, 01: enable
Spreading Factor f9 86 1 00-SF12, 01-SF11, 02-SF10, 03-SF9, 04-SF8, 05-SF7
TXPower f9 87 1 Range: 0~14
LoRaWAN® Version f9 8b 1 01: V1.0.2

02: V1.0.3

RX2 Data Rate f9 8c 1 00: DR0 (SF12,125k)

01: DR1 (SF11,125k)

02: DR2 (SF10,125k)

03: DR3 (SF9,125k)

04: DR4 (SF8,125k)

05: DR5 (SF7,125k)

RX2 Frequency f9 8d 4 RX2 Frequency Value
Example:
  1. Set AU915 or US915 channel mask as 8-15.
    ff0501ff00 ff05020000 ff05030000 ff05040000 ff05050000
    Channel Type Value
    ff 05

    01: Channel index 0-15, ff00 => 8-15 is enabled

    02-05: Channel index 16-79, 0000 => all disabled

  2. Set RX2 Frequency as 923.5Mhz.
    f98d e07d0b37
    Channel Type Value
    f9 8d e0 7d 0b 37=> 37 0b 7d e0=923500000=923.5Mhz

Milesight D2D Setting

Item Channel Type Byte Description
Milesight D2D Feature ff 84 1 01-enable, 00-disable
Milesight D2D Key ff 35 8 First 16 digits, last 16 digits are fixed as 0
Milesight D2D Control (Occupied) Settings f9 8e 4 Byte 1: Region Number (00 means region1, 01 means region2, …)

Byte 2: 01-enable, 00-disable

Byte 3-4: D2D control command

Milesight D2D Control (Vacant) Settings f9 90 6 Byte 1: Region Number (00 means region1, 01 means region2, …)

Byte 2: 01-enable, 00-disable

Byte 3-4: D2D control command

Byte 5-6: Intelligent Delay Time, Unit: s, Range: 0~600

Example:
  1. Set D2D Key as 12345678123456780000000000000000.
    ff35 1234567812345678
    Channel Type Value
    ff 35 1234567812345678
  2. Set Milesight D2D Control (Occupied) settings.
    f98e 00 01 1011
    Channel Type Value
    f9 8e 00: Region 1

    01: enable

    1011=>1110: D2D control command.

  3. Set Milesight D2D Control (Vacant) settings.
    f990 02 01 0110 3c00
    Channel Type Value
    f9 90 02: Region 3

    01: enable

    0110=>1001: D2D control command

    3c00=00 3c=>60: Intelligent Delay Time is 60s.