Could this implementation work to filter messages?


I have been thinking of a way to remove some messages (based on some data from the database).

Node | <- Lorawan -> | Gateway (packet forwarder) | <- UDP -> | Gateway Bridge | <- MQTT -> | Filter Component | <- MQTT -> | Networkserver

The filter component would work like this:

  1. Listen to everything on the mqtt broker
  2. Receives a message
  3. Decode it, to get the devaddr
  4. Make a database request to get the nwk/app-swkey.
  5. Use brocaar/lorawan to ValidateMIC to see if it the devaddr matches the nwk-swkey.

When this is done, I could tie an application to the message. Could this work or should I rethink it?


Please note that multiple DevEUIs can be using the same DevAddr and that you also need to resolve the 16bit FCnt into the full 32bit FCnt value before you are able to decrypt the FRMPayload.

On what exactly are you planning to filter?

A organisation must have approved access to use a gateway. Else the filter component will just throw the message.

Could you elaborate on this? Or is there somewhere I can read up on this?

A good starting point is the LoRaWAN specification: :slight_smile: