{"id":11285,"date":"2016-01-22T13:55:32","date_gmt":"2016-01-22T19:55:32","guid":{"rendered":"http:\/\/www.multitech.net\/developer\/?page_id=11285"},"modified":"2025-12-01T11:09:32","modified_gmt":"2025-12-01T17:09:32","slug":"aep-lora-packet-forwarder","status":"publish","type":"page","link":"https:\/\/www.multitech.net\/developer\/software\/lora\/aep-lora-packet-forwarder\/","title":{"rendered":"Conduit AEP: Convert to Basic Packet Forwarder"},"content":{"rendered":"<p>This section describes using LoRa Packet Forwarder<strong> <\/strong>Mode.<\/p>\n<div class=\"note\">When forwarding packets to another Conduit be sure the receiving end has the firewall opened to receive incoming connections.<\/div>\n<p>On the LoRaWAN &gt; Network Settings page select PACKET FORWARDER Mode. Then click the Manual Configuration link to show the Config Card text boxes to enter global_conf.json file contents. Use the links to examples found below as a staring point for the manually configuring the Packet Forwarder.<\/p>\n<h5>MTAC-003 Packet Forwarder with mPower = 6.0.4 <\/h5>\n<p>Be sure to include indenting spaces in your JSON file.<\/p>\n<ul>\n<li>AP1\n<pre>\r\n        \"com_type\": \"SPI\",\r\n        \"com_path\": \"\/dev\/spidev0.0\",\r\n        \"tmp102\": 72,\r\n        \"sx1261_conf\": {\r\n            \"spi_path\": \"\/dev\/spidev0.1\",\r\n<\/pre>\n<\/li>\n<li>AP2\n<pre>\r\n        \"com_type\": \"SPI\",\r\n        \"com_path\": \"\/dev\/spidev1.0\",\r\n        \"tmp102\": 73,\r\n        \"sx1261_conf\": {\r\n            \"spi_path\": \"\/dev\/spidev1.1\",\r\n<\/pre>\n<\/li>\n<\/ul>\n<h5>Dual Packet Forwarder with mPower = 6.0 <\/h5>\n<p>The work-around used below must be removed. The proper links will be added by the init script.<\/p>\n<h5>Dual Packet Forwarder with mPower = 5.2.1<\/h5>\n<p>Dual packet forwarder with two MTAC-LORA-H cards is possible in the 5.2.1 update. Different Channel Plans and Network Servers can be configured for each card.<br \/>\nThere was an error found in the script to add the spi_device path, adding a &#8220;gateway&#8221; object as shown with the correct path for each accessory port is the current workaround.<\/p>\n<ul>\n<li>In the Config Card 1 and 2 text boxes replace the JSON line\n<pre>\"gateway_conf\": {<\/pre>\n<\/li>\n<li>AP1\n<pre>    \"gateway\": { \"spi_device\": \"\" },\r\n    \"gateway_conf\": {\r\n        \"spi_device\" : \"\/dev\/spidev32766.2\",<\/pre>\n<\/li>\n<li>AP2\n<pre>    \"gateway\": { \"spi_device\": \"\" },\r\n    \"gateway_conf\": {\r\n        \"spi_device\" : \"\/dev\/spidev32765.2\",<\/pre>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h5>Global Config Examples<\/h5>\n<p>If you are using <strong>Cellular as WAN<\/strong>:<\/p>\n<ul>\n<li>Before activating this mode, change the keep alive interval to 1 second within the Packet Forwarder application (keepalive_interval in the config file). This decreases the latency of packets over the radio enough to allow the return packet from the network server to get to the lora radio before its timestamp expires.<\/li>\n<li>Excellent signal strength is also required to keep latency low enough for this mode to work.<\/li>\n<\/ul>\n<p>To activate <strong>LoRa Packet Forwarder<\/strong> Mode:<\/p>\n<ol>\n<li>Under <strong>LoRaWAN &gt; Network Settings<\/strong>,&nbsp; select <strong>PACKET FORWARDER<\/strong>&nbsp; under <strong>Mode<\/strong>. For details, see LoRaWAN Network Settings in the&nbsp;<a href=\"https:\/\/www.multitech.com\/documents\/publications\/software-guides\/s000727--mPower-Edge-Intelligence-Conduit-AEP-software-guide.pdf\">mPower Conduit Software Guide<\/a>.<\/li>\n<li>&nbsp;In the <strong>Config<\/strong> text field, enter the contents of your custom <strong>global_conf.json<\/strong> file.\n<ul>\n<li>Conduit with MTAC-LORA accessory cards:\n<ul>\n<li><a href=\"http:\/\/git.multitech.net\/cgit\/meta-mlinux.git\/tree\/recipes-connectivity\/lora\/lora-packet-forwarder\/global_conf.json.3.0.0.MTAC_LORA_1_5.US915.basic.clksrc0\"><b>US (915 MHz)<\/b><\/a><\/li>\n<li><a href=\"http:\/\/git.multitech.net\/cgit\/meta-mlinux.git\/tree\/recipes-connectivity\/lora\/lora-packet-forwarder\/global_conf.json.3.0.0.MTAC_LORA_1_5.EU868.basic.clksrc0\"><b>Europe (868 MHz)<\/b><\/a><\/li>\n<li><a href=\"http:\/\/git.multitech.net\/cgit\/meta-mlinux.git\/tree\/recipes-connectivity\/lora\/lora-packet-forwarder\/global_conf.json.3.0.0.MTAC_LORA_1_5.AU915.basic.clksrc0\"><b>Australia (915 MHz)<\/b><\/a><\/li>\n<li><a href=\"http:\/\/git.multitech.net\/cgit\/meta-mlinux.git\/tree\/recipes-connectivity\/lora\/lora-packet-forwarder\/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923.basic.clksrc0\"><b>Asia Pacific (923 MHz)<\/b><\/a><\/li>\n<li><a href=\"http:\/\/git.multitech.net\/cgit\/meta-mlinux.git\/tree\/recipes-connectivity\/lora\/lora-packet-forwarder\/global_conf.json.3.0.0.MTAC_LORA_1_5.AS923-LBT.basic.clksrc0\"><b>Asia Pacific with LBT (923 MHz)<\/b><\/a><\/li>\n<li><a href=\"http:\/\/git.multitech.net\/cgit\/meta-mlinux.git\/tree\/recipes-connectivity\/lora\/lora-packet-forwarder\/global_conf.json.3.0.0.MTAC_LORA_1_5.KR920-LBT.basic.clksrc0\"><b>Korea with LBT (920 MHz)<\/b><\/a><\/li>\n<li><a href=\"http:\/\/git.multitech.net\/cgit\/meta-mlinux.git\/tree\/recipes-connectivity\/lora\/lora-packet-forwarder\/global_conf.json.3.0.0.MTAC_LORA_1_5.IN865.basic.clksrc0\"><b>India (865 MHz)<\/b><\/a><\/li>\n<\/ul>\n<\/li>\n<li>Conduit with MTAC-003 accessory cards:\n<ul>\n<li><a href=\"https:\/\/raw.githubusercontent.com\/MultiTechSystems\/multitech-gateway-tx-power-tables\/main\/global_conf.json.MTAC_003_0_0.US915\"><b>US (915 MHz)<\/b><\/a><\/li>\n<li><a href=\"https:\/\/raw.githubusercontent.com\/MultiTechSystems\/multitech-gateway-tx-power-tables\/main\/global_conf.json.MTAC_003_0_0.EU868\"><b>Europe (868 MHz)<\/b><\/a><\/li>\n<li><a href=\"https:\/\/raw.githubusercontent.com\/MultiTechSystems\/multitech-gateway-tx-power-tables\/main\/global_conf.json.MTAC_003_0_0.AU915\"><b>Australia (915 MHz)<\/b><\/a><\/li>\n<li><a href=\"https:\/\/raw.githubusercontent.com\/MultiTechSystems\/multitech-gateway-tx-power-tables\/main\/global_conf.json.MTAC_003_0_0.AS923\"><b>Asia\/Pacific (923 MHz)<\/b><\/a><\/li>\n<li><a href=\"https:\/\/raw.githubusercontent.com\/MultiTechSystems\/multitech-gateway-tx-power-tables\/main\/global_conf.json.MTAC_003_0_0.AS923-LBT\"><b>Asia\/Pacific with LBT (923 MHz)<\/b><\/a><\/li>\n<li><a href=\"https:\/\/raw.githubusercontent.com\/MultiTechSystems\/multitech-gateway-tx-power-tables\/main\/global_conf.json.MTAC_003_0_0.KR920-LBT\"><b>Korea with LBT (920 MHz)<\/b><\/a><\/li>\n<li><a href=\"https:\/\/raw.githubusercontent.com\/MultiTechSystems\/multitech-gateway-tx-power-tables\/main\/global_conf.json.MTAC_003_0_0.IN865\"><b>India (865 MHz)<\/b><\/a><\/li>\n<\/ul>\n<\/li>\n<li>Conduit MTCAP:\n<ul>\n<li><a href=\"http:\/\/git.multitech.net\/cgit\/meta-mlinux.git\/tree\/recipes-connectivity\/lora\/lora-packet-forwarder\/global_conf.json.3.1.0.MTCAP-LORA-1-5.US915.basic\"><b>US (915 MHz)<\/b><\/a><\/li>\n<li><a href=\"http:\/\/git.multitech.net\/cgit\/meta-mlinux.git\/tree\/recipes-connectivity\/lora\/lora-packet-forwarder\/global_conf.json.3.1.0.MTCAP-LORA-1-5.EU868.basic\"><b>Europe (868 MHz)<\/b><\/a><\/li>\n<li><a href=\"http:\/\/git.multitech.net\/cgit\/meta-mlinux.git\/tree\/recipes-connectivity\/lora\/lora-packet-forwarder\/global_conf.json.3.1.0.MTCAP-LORA-1-5.AU915.basic\"><b>Australia (915 MHz)<\/b><\/a><\/li>\n<li><a href=\"http:\/\/git.multitech.net\/cgit\/meta-mlinux.git\/tree\/recipes-connectivity\/lora\/lora-packet-forwarder\/global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923.basic\"><b>Asia Pacific (923 MHz)<\/b><\/a><\/li>\n<li><a href=\"http:\/\/git.multitech.net\/cgit\/meta-mlinux.git\/tree\/recipes-connectivity\/lora\/lora-packet-forwarder\/global_conf.json.3.1.0.MTCAP-LORA-1-5.AS923-LBT.basic\"><b>Asia Pacific with LBT (923 MHz)<\/b><\/a><\/li>\n<li><a href=\"http:\/\/git.multitech.net\/cgit\/meta-mlinux.git\/tree\/recipes-connectivity\/lora\/lora-packet-forwarder\/global_conf.json.3.1.0.MTCAP-LORA-1-5.KR920-LBT.basic\"><b>Korea with LBT (920 MHz)<\/b><\/a><\/li>\n<li><a href=\"http:\/\/git.multitech.net\/cgit\/meta-mlinux.git\/tree\/recipes-connectivity\/lora\/lora-packet-forwarder\/global_conf.json.3.1.0.MTCAP-LORA-1-5.IN865.basic\"><b>India (865 MHz)<\/b><\/a><\/li>\n<\/ul>\n<\/li>\n<li>Conduit MTCAP3:\n<ul>\n<li><a href=\"https:\/\/raw.githubusercontent.com\/MultiTechSystems\/multitech-gateway-tx-power-tables\/main\/global_conf.json.MTCAP3.US915\"><b>US (915 MHz)<\/b><\/a><\/li>\n<li><a href=\"https:\/\/raw.githubusercontent.com\/MultiTechSystems\/multitech-gateway-tx-power-tables\/main\/global_conf.json.MTCAP3.EU868\"><b>Europe (868 MHz)<\/b><\/a><\/li>\n<li><a href=\"https:\/\/raw.githubusercontent.com\/MultiTechSystems\/multitech-gateway-tx-power-tables\/main\/global_conf.json.MTCAP3.AU915\"><b>Australia (915 MHz)<\/b><\/a><\/li>\n<li><a href=\"https:\/\/raw.githubusercontent.com\/MultiTechSystems\/multitech-gateway-tx-power-tables\/main\/global_conf.json.MTCAP3.AS923\"><b>Asia\/Pacific (923 MHz)<\/b><\/a><\/li>\n<li><a href=\"https:\/\/raw.githubusercontent.com\/MultiTechSystems\/multitech-gateway-tx-power-tables\/main\/global_conf.json.MTCAP3.AS923-LBT\"><b>Asia\/Pacific with LBT (923 MHz)<\/b><\/a><\/li>\n<li><a href=\"https:\/\/raw.githubusercontent.com\/MultiTechSystems\/multitech-gateway-tx-power-tables\/main\/global_conf.json.MTCAP3.KR920-LBT\"><b>Korea with LBT (920 MHz)<\/b><\/a><\/li>\n<li><a href=\"https:\/\/raw.githubusercontent.com\/MultiTechSystems\/multitech-gateway-tx-power-tables\/main\/global_conf.json.MTCAP3.IN865\"><b>India (865 MHz)<\/b><\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Verify that the text field contents&nbsp;match the&nbsp;proper json format. Click <strong>Submit<\/strong>.\n<ul>\n<li>&nbsp;The GUI passes the .json file to the packet forwarder application.<\/li>\n<li>&nbsp;If successful,&nbsp;a message displays <strong>LoRa settings successfully updated<\/strong>.<\/li>\n<li>&nbsp;If the format is incorrect, a message displays <strong>Invalid JSON input<\/strong>.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h5>Additional Examples<\/h5>\n<p>More settings are available to the packet forwarder configuration files. Settings for beaconing and LBT are not included in the above examples but are shown in the reference code repo. Please see these examples for addition reference.<br \/>\n<a href=\"https:\/\/github.com\/Lora-net\/packet_forwarder\/tree\/master\/lora_pkt_fwd\/cfg\">Semtech Packet Forwarder Examples<\/a><\/p>\n<p>&nbsp;<\/p>\n<h5>AS923-Japan Settings for Packet Forwarder GUI<\/h5>\n<ul>\n<li>Enable LBT: checked<\/li>\n<li>LBT RSSI Offset: -4 dB<\/li>\n<li>LBT RSSI Target: -80 dBm<\/li>\n<li>ScanTime: 5000 us<\/li>\n<li>Auto LBT Channels: checked<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h5>For Conduits with GNSS module installed<\/h5>\n<h5>AEP &gt;= 1.7.4<\/h5>\n<ol>\n<li>Using the GUI configuration gps will be enabled in packet forwarder modes if the hardware supports it<\/li>\n<li>Using manual mode configuration, set &#8220;gps&#8221;: true in global_conf.json &#8220;gateway_conf&#8221; section<\/li>\n<\/ol>\n<h5>AEP &lt; 1.7.4<\/h5>\n<p>gpsd usage of the GPS is not compatible with lora-packet-forwarder. It is not possible to use the Multitech supplied Lora-Packet-Forwarder with the GNSS port, and GPSD at the same time.<\/p>\n<ol>\n<li>Edit \/etc\/default\/gpsd<\/li>\n<li>Set Enabled=&#8221;no&#8221; and Save<\/li>\n<li>ntpd must be disabled or configured to not use gpsd\n<ul>\n<li>Edit \/etc\/default\/ntpd, set Enabled=&#8221;no&#8221; and Save<\/li>\n<\/ul>\n<p>Or<\/p>\n<ul>\n<li>Edit \/etc\/default\/ntpd, set GPSD_REQUIRED=0 and Save<\/li>\n<li>Configure NTP time server in \/etc\/ntp.conf<\/li>\n<\/ul>\n<\/li>\n<li>Set &#8220;gps_tty_path&#8221;: &#8220;\/dev\/ttyXRUSB2&#8221; in global_conf.json &#8220;gateway_conf&#8221; section<\/li>\n<li>Reboot<\/li>\n<\/ol>\n<h5>For Geolocation v2.1 Conduits IP67<\/h5>\n<ul>\n<li>GPS data is available on \/dev\/gps0 and \/dev\/ttyXRUSB0<\/li>\n<li>GPS antenna should be connected to port 3<\/li>\n<li>Using UI configuration does not require setting the AES key, if MANUAL configuration is used follow the next steps<\/li>\n<li>Generate AES key to unlock the fine timestamp using the hardware chip-id\n<ul>\n<li>\n<pre class=\"brush:shell\">$ sudo \/opt\/lora\/lora-v21-keygen $(sudo \/opt\/lora\/gateway-utils-geo\/chip_id | grep -oe '0x.*' | sed -r 's\/0x\/\/g' | sed 'N;s\/\\\\n\/ \/')<\/pre>\n<\/li>\n<li>When running on command line be sure to use -g option to enable GPS\n<pre class=\"brush:shell\">$ .\/pkt_forwarder -g<\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>Packet Forwarder Configuration Options<\/h2>\n<p>Two sections are available in the configuration: radio settings (SX1301_conf) and server settings (gateway_conf).<\/p>\n<h3>SX1301_conf<\/h3>\n<ul>\n<li>lorawan_public \u2013 set sync word to false: 0x12 or true: 0x34<\/li>\n<li>clksrc \u2013 must be 0 for Multitech gateway hardware<\/li>\n<li>antenna_gain \u2013 configure the installed antenna gain if the network server sends EIRP value with downlinks. The Multitech network server will account for antenna gain before sending tx power to the forwarder.<\/li>\n<\/ul>\n<h4>Radios<\/h4>\n<p>The radio_0 and radio_1 settings configure the two front-end radios on the MTAC cards.<br \/>\nenable \u2013 true if radio is enabled for use<\/p>\n<ul>\n<li>type \u2013 type of radio chip installed SX1257 or SX1255, frequency range differs<\/li>\n<li>freq \u2013 center frequency the radio is configured to listen for packets<\/li>\n<li>tx_enable \u2013 true if radio can be used for transmissions<\/li>\n<li>tx_freq_min \u2013 minimum frequency to be allowed for transmissions<\/li>\n<li>tx_freq_max \u2013 maximum frequency to be allowed for transmissions<\/li>\n<li>rssi_offset \u2013 offset in dBm to adjust the radio RSSI reading<\/li>\n<\/ul>\n<h4>Channels<\/h4>\n<p>Eight channels can be configured to receive LoRa packets using 125 kHz bandwith. These channels are configured in the chan_multiSF_x settings. Each channel has an enable boolean, a selected radio and an intermediate frequency. The channel frequency will freq setting of the radio plus the if setting of the channel.<\/p>\n<ul>\n<li>enable \u2013 true if this channel is enabled for use<\/li>\n<li>radio \u2013 selected radio to listen for packets<\/li>\n<li>if \u2013 intermediate frequency offset applied to the selected radio \u201cfreq\u201d setting<\/li>\n<\/ul>\n<p>Two additional channels can be configured with the chan_Lora_std and chan_FSK settings.<\/p>\n<ul>\n<li>enable \u2013 true if this channel is enabled for use<\/li>\n<li>radio \u2013 selected radio to listen for packets<\/li>\n<li>if \u2013 intermediate frequency offset applied to the selected radio \u201cfreq\u201d setting<\/li>\n<li>bandwidth \u2013 channel bandwidth<\/li>\n<li>spread_factor (LoRa) \u2013 channel spreading factor (7-12)<\/li>\n<li>datarate (FSK) \u2013 channel datarate in bps<\/li>\n<\/ul>\n<h4>Look-up-table (LUT)<\/h4>\n<p>There are sixteen power settings that can be configured, these settings have been selected during calibration for each hardware. The power sent from the network server is looked up in this table by the rf_power setting. The corresponding pa_gain, mix_gain and dig_gain settings are then input into the radio for the transmission. These settings should not be adjusted.<\/p>\n<h3>gateway_conf<\/h3>\n<ul>\n<li>gateway_ID \u2013 gateway identifier sent in each message to the network server<\/li>\n<li>server_address \u2013 address of the network server<\/li>\n<li>serv_port_up \u2013 port for sending uplink packets to the network server<\/li>\n<li>serv_port_down \u2013 port to communicate to receive downlink packet from the network server<\/li>\n<li>keepalive_interval \u2013 interval to ping the network server<\/li>\n<li>stat_interval \u2013 interval to send stat messages to the network server<\/li>\n<li>push_timeout_ms \u2013 socket timeout when publishing messages to the network server<\/li>\n<li>restart_interval \u2013 interval to auto-restart the packet forwarder, set to 0 to disable, default was 600 seconds prior to v4.0.24. Applies to MTAC-LORA-H only.<\/li>\n<li>autoquit_threshold \u2013 number of keepalive messages without response to wait before quitting<\/li>\n<li>forward_crc_valid \u2013 enable to forward valid packets to the network server, default: true<\/li>\n<li>forward_crc_error \u2013 enable to forward CRC failed packets to the network server, default: true. The network server will reject packets with failed CRC, it may not be necessary to forward the packets except for a statistic of local RF quality or to monitor the gateway performance over time. Some random CRC failed packets are expected to be received from random noise.<\/li>\n<li>forward_crc_disabled \u2013 enable to forward packets without CRC enabled to the network server, default: false. LoRaWAN protocol expects uplink packets to have CRC enabled.<\/li>\n<\/ul>\n<p><a title=\"Listen Before Talk\" href=\"https:\/\/www.multitech.net\/developer\/software\/lora\/listen-before-talk\/\">Listen Before Talk configuration<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This section describes using LoRa Packet Forwarder Mode. When forwarding packets to another Conduit be sure the receiving end has the firewall opened to receive incoming connections. On the LoRaWAN &gt; Network Settings page select PACKET FORWARDER Mode. Then click the Manual Configuration link to show the Config Card text boxes to enter global_conf.json file [&hellip;]<\/p>\n","protected":false},"author":1478,"featured_media":0,"parent":8462,"menu_order":4,"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-11285","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/11285","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\/1478"}],"replies":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/comments?post=11285"}],"version-history":[{"count":88,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/11285\/revisions"}],"predecessor-version":[{"id":33982,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/11285\/revisions\/33982"}],"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=11285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}