Conduit mLinux: Convert to Basic Packet Forwarder

For Conduit mLinux models

WARNING: This is only for people who need to disable the on-board LoRa network server for gateway only functionality. Most people should follow the general getting started guide.

These instructions require the following firmware versions or later:

Examples of global_conf.json

Copy one of the following to the /var/config/lora/ directory.

Semtech Demo Server

Use the following settings to forwarder packets to Semtech Demo IOT servers.
• North America Instance:
• Europe Instance:
• China Instance:
• Asia Pacific (excludes China):

"server_address": "",
"serv_port_up": 20000,
"serv_port_down": 20000

Enabling start-up on boot

$ update-rc.d lora-packet-forwarder defaults 80 30

Setting up the Conduit

mLinux >= 3.2.4

  1. /etc/init.d/lora-network-server stop
  2. Edit /etc/defaults/lora-network-server
  3. ENABLED=”no”
  4. Edit /etc/defaults/lora-packet-forwarder
  5. ENABLED=”yes”
  6. Copy global_conf.json to /var/config/lora/ directory
  7. Be sure to set “gateway_id” and server settings.
  8. If you need a value for “gateway_id” the lora card value can be used
    $ mts-io-sysfs show lora/eui
  9. The colon separators must be removed 00:80:00:00:00:00:00:97 => 0080000000000097
  10. /etc/init.d/lora-packet-forwarder start

mLinux < 3.2.4

  1. Install the LoRa mCard. Refer to Installing an mCard Accessory Card.
  2. Attach the LoRa antenna to the LoRa mCard.
  3. Use the power cable to connect power to the Conduit and wait for the Conduit to boot up.
  4. Login to the console and configure the Conduit for internet access over Ethernet or cellular. Refer to Getting Started with mLinux if needed.
  5. Issue these commands on the Conduit:
    $ mkdir /var/config/lora
    $ cp /opt/lora/lora-network-server.conf.sample /var/config/lora/lora-network-server.conf
  6. Edit /var/config/lora/lora-network-server.conf and modify these settings as needed (use vi or nano).
    Field MTAC-LORA-915 (NA) MTAC-LORA-868 (EU)
    lora["frequencyBand"]: “915″ “868″
    lora["channelPlan"]: “US915″ or “AU915″ “EU868″
    lora["frequencySubBand"]: (integer: 1 to 8) Not applicable
    lora["frequencyEU"]: Not applicable default: 869500000
    range: [863500000 - 867500000]
    and [869100000 - 869500000]
    network["public"]: true
  7. Restart the network server. This will generate a configuration file for the packet forwarder.
    $ /etc/init.d/lora-network-server restart
  8. Copy the generated packet forwarder configuration to the config partition.
    $ cp /var/run/lora/1/global_conf.json /var/config/lora/global_conf.json
  9. Edit /var/config/lora/global_conf.json and modify these settings.
    Field Description Example
    gateway_conf["server_address"]: Network IP or URL of your LoRa network server “”
    gateway_conf["serv_port_down"]: The LoRa network server’s downstream UDP port 1700
    gateway_conf["serv_port_up"]: The LoRa network server’s upstream UDP port 1700

    *If you have mLinux firmware version 3.2.4 or greater, skip steps 10-12, and see below for further instructions.

  10. Edit /etc/init.d/lora-network-server as follows :
    • Comment out the Lora network server start code
      # start network server                  
      #start-stop-daemon --start --background --make-pidfile \
      #    --pidfile $net_server_pidfile --exec $net_server -- \
      #    -c $conf_file --lora-eui $lora_eui --lora-path $run_dir --db $conf_db \
      #    --noconsole -l $net_server_log                      
      #sleep 1
    • On line 65, change the -c option for packet forwarder from -c $run_dir to -c $conf_dir
      # start packet forwarder            
      start-stop-daemon --start --background --make-pidfile \
           --pidfile $pkt_fwd_pidfile --exec $pkt_fwd -- \
           -c $conf_dir -l $pkt_fwd_log           
      echo "OK"
    • Comment out the Lora network server stop code
      #start-stop-daemon --stop --quiet --oknodo --pidfile $net_server_pidfile --retry 15
      start-stop-daemon --stop --quiet --oknodo --pidfile $pkt_fwd_pidfile --retry 5
  11. Restart the packet forwarder.
    $ /etc/init.d/lora-network-server restart
  12. For debugging, you can view the packet forwarder log with this command:
    $ tail -f /var/log/lora-pkt-fwd.log

*If you have mLinux firmware version 3.2.4 or greater, continue with steps 13-16 after step 9  from above (If not, stop here after step #12. You are done.)

13. Stop the network server using this command:

$ /etc/init.d/lora-network-server stop

14. Edit /etc/defaults/lora-network-server:


15. Edit /etc/defaults/lora-packet-forwarder:

ENABLED = "yes"

16. Start packet forwarder using this command:

$ /etc/init.d/lora-packet-forwarder start

Setting Up the mDot Using Manual Join

  1. Establish a serial connection to the mDot
    1. Connect your PC to the DB9 serial connector on the UDK
    2. Open a terminal session using an application such as TeraTerm with baud rate 115,200
  2. Issue these commands:
    • AT+NJM=0 (manual join mode)
    • AT+PN=1 (public network mode)
    • AT+FSB=value (915 NA only | value = frequencySubBand from your Conduit)
    • AT+NSK=value (value = Network session key given by your network server operator)
    • AT+DSK=value (value = Data (application) session key for your application)
    • AT+NA=value (value = 4-byte device address)
    • AT&W (save settings)
    • ATZ (restart)
  3. Send data without requesting an ACK:
    • AT+ACK=0
    • AT+SEND=hello world


  • The packet forwarder starts but immediately stops
    • If /var/config/lora/global_conf.json is not in proper json format (extra or missing comma), the packet forwarder cannot run.