@@ -2,6 +2,7 @@ package concentratord
2
2
3
3
import (
4
4
"context"
5
+ "encoding/base64"
5
6
"sync"
6
7
"time"
7
8
@@ -12,6 +13,7 @@ import (
12
13
13
14
"github.com/brocaar/chirpstack-gateway-bridge/internal/backend/events"
14
15
"github.com/brocaar/chirpstack-gateway-bridge/internal/config"
16
+ "github.com/brocaar/chirpstack-gateway-bridge/internal/filters"
15
17
"github.com/brocaar/lorawan"
16
18
"github.com/chirpstack/chirpstack/api/go/v4/gw"
17
19
)
@@ -323,12 +325,18 @@ func (b *Backend) handleUplinkFrame(bb []byte) error {
323
325
return errors .Wrap (err , "protobuf unmarshal error" )
324
326
}
325
327
326
- log .WithFields (log.Fields {
327
- "uplink_id" : pl .GetRxInfo ().GetUplinkId (),
328
- }).Info ("backend/concentratord: uplink event received" )
328
+ if filters .MatchFilters (pl .PhyPayload ) {
329
+ log .WithFields (log.Fields {
330
+ "uplink_id" : pl .GetRxInfo ().GetUplinkId (),
331
+ }).Info ("backend/concentratord: uplink event received" )
329
332
330
- if b .uplinkFrameFunc != nil {
331
- b .uplinkFrameFunc (& pl )
333
+ if b .uplinkFrameFunc != nil {
334
+ b .uplinkFrameFunc (& pl )
335
+ }
336
+ } else {
337
+ log .WithFields (log.Fields {
338
+ "data_base64" : base64 .StdEncoding .EncodeToString (pl .PhyPayload ),
339
+ }).Debug ("backend/concentratord: uplink event dropped because of configured filters" )
332
340
}
333
341
334
342
return nil
0 commit comments