Table of Contents:
This feature is to filter the unwanted LoRaWAN packets. Purpose is to save the upstream traffic especially for a 4G cellular connection. If configured, gateway will process filter for below two types of message:
Support Devices:
Filtering rules:
Fport Filters | DevAddr Filter | NwkID Filter | |||
---|---|---|---|---|---|
Level 0 | Do nothing | Level 0 | Do nothing | Level 0 | Do nothing |
Level 1 | Filter only the Fport in the list | Level 1 | Filter only the DevAddr in the list | Level 1 | Filter only the NwkID in the list |
Level 2 | Filter Fport that are not in the database | Level 2 | Filter DevAddr that are not in the database | Level 2 | Filter NWkID that are not in the database |
Check if the filter is running
The Gateway FPort filter will check all the below LoRaWAN messages: Unconfirmed Data Up & Confirmed Data Up.
Important Notice:
If you want to forward only a certain Fport, use level=2 and add the desired fport in the Filter value textbox. Add Filter Value 0 to forward Join requests.
The Gateway DevAddr filter will check all the below LoRaWAN messages: Unconfirmed Data Up & Confirmed Data Up.
Important Notice:
In this case, we set DevAddr Filter Level=1 and add the filter (server | DevAddr | 12664787 ), when the gateway receives a Lorawan packet with DevAddr=12664787, it will be dropped.
The Gateway NwkID filter will check all the below LoRaWAN messages: Unconfirmed Data Up & Confirmed Data Up.
Important Notice:
In this case, we set NwkID Filter Level=0 and add the filter (server | NwkID | 13 ), when the gateway receives a packet that is not NwkID=00000013, it will be dropped.
NwkID is calculated as follows: DevAddr counts shifted right by 25 bits
For example, Devaddr=01CC1907,NwkID= 01CC1907 >> 25 = 0
Devaddr=260B748A,NwkID= 260B748A >> 25 = 13
If user need to set the Secondary LoRaWAN Server Packet Filter, the configuration is similar to that above.
eg:
sqlite3 /etc/lora/devskey "INSERT INTO filter (name, type, value ) VALUES ('server1', 'fport', '1');"
sqlite3 /etc/lora/devskey "INSERT INTO filter (name, type, value ) VALUES ('server1', 'devaddr', '00000000');"
sqlite3 /etc/lora/devskey "SELECT *from filter"
After the configuration is complete, you can enable Logread Debug level on System-->General, return to LoRaWAN-->Semtech UDP, and click "Save&Apply".
Support Devices:
Fport & DevAddr Filter
Check if the filter is running
The Gateway FPort filter will check all the below LoRaWAN message: Unconfirmed Data Up & Confirmed Data Up. If the packet's FPort doesn't match the FPort setting, it will be dropped.
By default , this value is 0 means can upstream all packets with any FPort. We can set to other FPort so specify only one FPort works.
In case we set the FPort filter to 45, and the End Node send a packet with Fport other than 45, it will be dropped.
Gateway will use a DevAddr mask to check if the Unconfirmed Data Up & Confirmed Data Up packets match the mask . If not, gateway will drop it.
This screenshot shows packets is dropped if DevAddr mask doesn't match.