Skip to content

Add filter for non lorawan packet #70

@steph10200

Description

@steph10200

Hi,

Following this post on my chirpstack support question

It would be interesting to be able to add a filter on the mqtt forwarder to eliminate at the source (on the gateway) packets that do not correspond to lorawan frames.

eg :

kerlink lorafwd sent to mqtt-forwarder invalid packets :

2025-10-21T18:48:28.313205+00:00 klk-wiis-0840F3 lorafwd[1554]: <4> Invalid PHY payload size 
2025-10-21T18:48:28.314194+00:00 klk-wiis-0840F3 lorafwd[1554]: <6> Uplink message (C14E) sent 
2025-10-21T18:48:28.317337+00:00 klk-wiis-0840F3 lorafwd[1554]: <6> Uplink message (C14E) acknowledged in 3.79914 ms 

and mqtt forward this packet "invalid PHY" ( but also another )

2025-10-21T18:48:31.412347+00:00 klk-wiis-0840F3 chirpstack-mqtt-forwarder[1459]: PUSH_DATA received, random_token: 20417, remote: 127.0.0.1:55334 
2025-10-21T18:48:31.412422+00:00 klk-wiis-0840F3 chirpstack-mqtt-forwarder[1459]: Sending PUSH_ACK, random_token: 20417 remote: 127.0.0.1:55334 
2025-10-21T18:48:31.412754+00:00 klk-wiis-0840F3 chirpstack-mqtt-forwarder[1459]: Sending uplink event, uplink_id: 3565471015, topic: eu868/gateway/7076ff00560840f3/event/up 
2025-10-21T18:48:31.414452+00:00 klk-wiis-0840F3 chirpstack-mqtt-forwarder[1459]: Publish. Topic = eu868/gateway/7076ff00560840f3/event/up, Pkid = 0, Payload Size = 97

The filter on the devaddr is not sufficient because the packets still pass. This creates huge MQTT traffic and unnecessary processing load on the central ChirpStack server and also a significant volume of data on the mobile network connection (since the gateway is connected via LTE).

-- Steph --

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions