{"id":33635,"date":"2024-05-28T09:53:12","date_gmt":"2024-05-28T14:53:12","guid":{"rendered":"https:\/\/www.multitech.net\/developer\/?page_id=33635"},"modified":"2024-05-28T09:55:30","modified_gmt":"2024-05-28T14:55:30","slug":"packet-filtering","status":"publish","type":"page","link":"https:\/\/www.multitech.net\/developer\/software\/lora\/packet-filtering\/","title":{"rendered":"Packet Filtering"},"content":{"rendered":"<h3>Embedded LNS<\/h3>\n<p>With embedded LNS all packets are filtered so only known devices (DevEUI, AppKey) are processed, unknown device packets are dropped.<\/p>\n<h3>Packet Forwarders<\/h3>\n<p>When using packet forwarders, Semtech UDP, Basic Station or others, there are a few options for packet filters.<\/p>\n<p>Only the Join Request uplink contains the DevEUI, so only Join Requests COULD\u00a0be filtered by OUI. However, DevEUI filters have not been included in the Basic Station protocol, instead JoinEUI filters are provided. If a DevEUI filter was available the network management would be more complicated, deploying a sensor would require an update to the gateway configuration to allow the end-device to work. Normally it is the Join Request or Uplink being received is the signal used by the network to know which gateways are available to be used as downlink paths.<\/p>\n<p>Sensor data is sent in Uplink packets.\u00a0 Uplink packets have the following fields DevAddr, FCnt, FCtrl, FPort, Data, MIC. The DevAddr is assigned by the network, the first 7 bit are a NetID that can be used to identify\/filter for a specific network. Each network provider has a LoRa Alliance assigned NetID. We have NetID 0x17 assigned to Multitech by the alliance as part of our membership, although it is not specifically used in our network with the embedded network server.\u00a0<\/p>\n<p>A packet forwarder gateway does not know which DevAddr is assigned to a specific device DevEUI, having such a list would complicate the gateway software and mobile devices would not be possible on public networks. LoRaWAN has designed the gateway to LNS protocol to be as stateless as possible, i.e. no device lists or session info available at the gateway to validate uplink packets or author downlink packets.<\/p>\n<h4>Packet Fields<\/h4>\n<ul>\n<li>Join Request \u2013 DevEUI, JoinEUI<\/li>\n<li>Uplink \u2013 DevAddr (assigned by network in encrypted join accept)\n<ul>\n<li>First 7 bits of the DevAddr are part of NetID assigned by LoRa Alliance to identify a network provider to be used for\u00a0filtering packets.<\/li>\n<\/ul>\n<\/li>\n<p>The\u00a0gateway\u00a0does not know which DevAddr that is assigned to a DevEUI as it is encrypted in the Join Accept packet.<br \/>\nA dynamic list of DevEUIs and DevAddrs to\u00a0filter\u00a0would need a Basic Station protocol message to communicate to each\u00a0gateway.<br \/>\nThis has not been designed in by the LoRaWAN network providers as a needed feature for the public networks, probably since they setup peer networking to other providers, so gathering the most packets is in the interest of their business.<\/p>\n<p>\u00a0<br \/>\n\u00a0<br \/>\nBelow is the current status of\u00a0gateway\u00a0forwarder features,\u00a0filtering is available in our current firmware.<br \/>\n\u00a0<\/p>\n<h4>UDP Packet Forwarder<\/h4>\n<p>No\u00a0filters currently implemented, unless ChirpStack bridge is used (see below)<br \/>\n\u00a0<\/p>\n<h4>Basic Station<\/h4>\n<p>JoinEUI\u00a0filter\u00a0configurable by network in router config message,\u00a0filter\u00a0join requests on the JoinEUI field<br \/>\nNetID\u00a0filter\u00a0configurable by network in router config message,\u00a0filter\u00a0on the first 7 bits of the DevAddr field in each uplink<br \/>\nAWS Basic Station configuration provides these parameters to\u00a0filter\u00a0join requests on JoinEUI and uplinks on NetID<\/p>\n<p><a href=\"https:\/\/www.multitech.net\/developer\/wp-content\/uploads\/2024\/05\/AWS-packet-filter.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.multitech.net\/developer\/wp-content\/uploads\/2024\/05\/AWS-packet-filter-300x109.png\" alt=\"\" width=\"300\" height=\"109\" class=\"alignnone size-medium wp-image-33636\" srcset=\"https:\/\/www.multitech.net\/developer\/wp-content\/uploads\/2024\/05\/AWS-packet-filter-300x109.png 300w, https:\/\/www.multitech.net\/developer\/wp-content\/uploads\/2024\/05\/AWS-packet-filter-1024x371.png 1024w, https:\/\/www.multitech.net\/developer\/wp-content\/uploads\/2024\/05\/AWS-packet-filter-768x279.png 768w, https:\/\/www.multitech.net\/developer\/wp-content\/uploads\/2024\/05\/AWS-packet-filter.png 1089w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<h4>Chirpstack Bridge<\/h4>\n<p>JoinEUI\u00a0filter\u00a0configurable by network in router config message,\u00a0filter\u00a0join requests on the JoinEUI field<br \/>\nNetID\u00a0filter\u00a0configurable by network in router config message,\u00a0filter\u00a0on the first 7 bits of the DevAddr field in each uplink<br \/>\nChirpStack bridge configuration provides these parameters to\u00a0filter\u00a0join requests on JoinEUI and uplinks on NetID<br \/>\nIf the bridge is installed on the\u00a0gateway\u00a0the\u00a0filter\u00a0options are available to configure.<\/p>\n<p><a href=\"https:\/\/www.multitech.net\/developer\/wp-content\/uploads\/2024\/05\/chirpstack-packet-filter.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.multitech.net\/developer\/wp-content\/uploads\/2024\/05\/chirpstack-packet-filter-300x147.png\" alt=\"\" width=\"300\" height=\"147\" class=\"alignnone size-medium wp-image-33637\" srcset=\"https:\/\/www.multitech.net\/developer\/wp-content\/uploads\/2024\/05\/chirpstack-packet-filter-300x147.png 300w, https:\/\/www.multitech.net\/developer\/wp-content\/uploads\/2024\/05\/chirpstack-packet-filter-768x376.png 768w, https:\/\/www.multitech.net\/developer\/wp-content\/uploads\/2024\/05\/chirpstack-packet-filter.png 988w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Embedded LNS With embedded LNS all packets are filtered so only known devices (DevEUI, AppKey) are processed, unknown device packets are dropped. Packet Forwarders When using packet forwarders, Semtech UDP, Basic Station or others, there are a few options for packet filters. Only the Join Request uplink contains the DevEUI, so only Join Requests COULD\u00a0be [&hellip;]<\/p>\n","protected":false},"author":1337,"featured_media":0,"parent":8462,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-33635","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/33635","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/users\/1337"}],"replies":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/comments?post=33635"}],"version-history":[{"count":5,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/33635\/revisions"}],"predecessor-version":[{"id":33642,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/33635\/revisions\/33642"}],"up":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/8462"}],"wp:attachment":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/media?parent=33635"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}