{"id":9269,"date":"2015-09-16T08:30:45","date_gmt":"2015-09-16T13:30:45","guid":{"rendered":"http:\/\/www.multitech.net\/developer\/?page_id=9269"},"modified":"2019-01-31T08:37:43","modified_gmt":"2019-01-31T14:37:43","slug":"conduit-mlinux-lora-use-third-party-devices","status":"publish","type":"page","link":"https:\/\/www.multitech.net\/developer\/software\/lora\/conduit-mlinux-lora-communication\/conduit-mlinux-lora-use-third-party-devices\/","title":{"rendered":"Conduit mLinux: LoRa Use With Third-Party Devices"},"content":{"rendered":"<p>The mLinux version of Conduit (MTCDT-xx-210L) supports OTA (over-the-air) joining by third-party LoRa devices as of LoRa Network Server version <strong>0.0.7<\/strong> <em>(If you need to upgrade, refer to <a href='https:\/\/www.multitech.net\/developer\/software\/mlinux\/using-mlinux\/upgrade-lora-server\/' title='Upgrade LoRa Server & Packet Forwarder'>Upgrade LoRa Server & Packet Forwarder<\/a>).<\/em><\/p>\n<h2>mLinux >= 3.3.22, lora-network-server >= 2.0.16<\/h2>\n<h3>Network Server Whitelist<\/h3>\n<p>Add unique device records into the whitelist devices list in lora-network-server.conf. The appeui will be attached to received packets. The class setting will be used to configure the end-device when it joins.<\/p>\n<p>`{&#8220;deveui&#8221;:&#8221;008000000000e19c&#8221;, &#8220;appeui&#8221;:&#8221;008000000000e19c&#8221;, &#8220;appkey&#8221;:&#8221;008000000000e19c008000000000e19c&#8221;, &#8220;class&#8221;:&#8221;C&#8221;}`<\/p>\n<h3>LoRa Query Commands<\/h3>\n<pre>\r\nadmin@mtcdt:~# lora-query -x help\r\nMTS Lora Server Command Help\r\n\r\nCommands:\r\nstats - list current stats\r\n  reset - reset stats for network, gateways and end-devices\r\ngateway - gateway commands\r\n  list - list connected gateways\r\n      format: gateway list [json]\r\n  delete - remove a gateway from the list\r\n      format: device gateway &lt;GW-EUI&gt;\r\ndevice - end-device commands\r\n  add - add a new end-device record\r\n      format: device add &lt;DEV-JSON&gt;\r\n      example: device add '{\"deveui\":\"00-80-00-00-00-00-e1-9c\",\"class\":\"C\"}'\r\n  stats - show end-device statistics\r\n  update - update end-device configuration or session info\r\n      format: device update &lt;DEV-EUI&gt; &lt;FIELD&gt; &lt;VALUE&gt;\r\n      example: device update 00-80-00-00-00-00-e1-9c class C\r\n      fields: class, nskey, dskey, ulc, dlc\r\n      format: device update &lt;DEV-JSON&gt;\r\n      example: device update '{\"deveui\":\"00-80-00-00-00-00-e1-9c\",\"class\":\"C\"}'\r\n      fields: class, name, serial_number, product_id, \r\n              hardware_version, firmware_version, lorawan_version\r\n  delete - delete an end-device configuration, session and packet records\r\n      format: device delete &lt;DEV-EUI&gt;\r\n  config - show configuration for a specific device\r\n  reset - reset end-device session counters\r\n      format: device reset &lt;DEV-EUI&gt;\r\n  list - list end-devices configured in the network server\r\n      format: device list [json | json file &lt;path&gt;]\r\n      example: device list json\r\n      example: device list json file \/tmp\/devices.json\r\n  keygen - generate a unique end-device key using zero-touch settings\r\n      format: device keygen &lt;DEV-EUI&gt; [APP-EUI]\r\nsession - session commands\r\n  add - add a session for a device\r\n      format: session add &lt;DEV-JSON&gt;\r\n      example: session add '{\"deveui\":\"00-80-00-00-00-00-e1-9c\",\r\n        dev_addr\":\"00112233\", \"appeui\":\"00-88-88-88-00-00-e1-9c\",\r\n        \"joineui\":\"00-99-99-99-00-00-e1-9c\",\"net_id\":\"000017\", \r\n        \"app_senc_key\":\"531bd9c5ec5d8ba5ef3b262cebfb3e66\", \r\n        \"fnwk_sint_key\":\"531bd9c5ec5d8ba5ef3b262cebfb3e66\"}'\r\n      fields: deveui, appeui, joineui, dev_addr, net_id, \r\n              app_senc_key, fnwk_sint_key\r\n  delete - remove a device session\r\n      format: session delete &lt;DEV-EUI&gt;\r\n  reset - reset session counters\r\n      format: session reset &lt;DEV-EUI&gt;\r\n  list - show current device sessions\r\n      format: session list [json | json file &lt;path&gt; ]\r\n      example: session list jsonvi \/\r\n      example: session list json file \/tmp\/sessions.json\r\npacket - packet commands\r\n  join - list all validated join packets\r\n      format: packet join [json]\r\n  up - list all validated uplink packets\r\n      format: packet up [json]\r\n  down - list all downlink packets\r\n      format: packet down [json]\r\n  list - list all packets: join, up and down\r\n      format: packet list [json]\r\n  queue - list downlink queue packets to be sent to end-device\r\n      format: packet queue [json]\r\n    add - add a packet to the downlink queue\r\n      format: packet queue add &lt;PACKET-JSON&gt;\r\n      fields: deveui, data, ack, ack_retries, rx_wnd\r\n    delete - delete all downlinks for a specific device\r\n      format: packet queue delete &lt;DEV-EUI&gt;\r\n    delete - delete one downlink for a specific device\r\n      format: packet queue delete &lt;DEV-EUI&gt; <ID>\r\ndatabase - database commands\r\n  backup - backup database to flash memory\r\nconfig - show network server configuration\r\ndebug - change debug level\r\nping - ping the network server command port\r\nhelp - display this help\r\nquit - command network server process to stop\r\n\r\n- add 'json' modifier to request output in json\r\n<\/pre>\n<h2>mLinux < 3.3.22, lora-network-server <= 1.0.43<\/h2>\n<p>&nbsp;<\/p>\n<h3>OTA Join Setup<\/h3>\n<p>Configure the following settings in <code>\/var\/config\/lora\/lora-network-server.conf<\/code>:<\/p>\n<ul>\n<li>Set <strong>network[&#8220;public&#8221;]<\/strong> to true\n<ul>\n<li>This changes the join response time from 1 to 5 seconds and the sync word from 0x12 to 0x34<\/li>\n<li>NOTE: Public mode must also be enabled on mDots in order for them to remain compatible<\/li>\n<\/ul>\n<\/li>\n<li>Set <strong>network[&#8220;eui&#8221;]<\/strong>\u00a0<em><\/em>to an 8 hex byte value.<\/li>\n<li><strong><\/strong>Set <strong>network[&#8220;key&#8221;]<\/strong> to a <em><\/em><em><\/em>16 hex byte value.<\/li>\n<li>Save the file<\/li>\n<li>Restart the Lora network server: <code>\/etc\/init.d\/lora-network-server restart<\/code><\/li>\n<\/ul>\n<p>Third-party LoRa devices should now be able to join the Conduit&#8217;s LoRa network using OTA join. For more information on these settings, refer to <a href='https:\/\/www.multitech.net\/developer\/software\/lora\/conduit-mlinux-lora-communication\/conduit-mlinux-advance-lora-configuration\/' title='Conduit mLinux: Advanced LoRa Configuration'>Conduit mLinux: Advanced LoRa Configuration<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<h3>Manual Join\/Activation by Personalization<\/h3>\n<ul>\n<li>SSH into the Conduit (default IP: <code>192.168.2.1<\/code>, default credentials: <code>root<\/code>\/<code>root<\/code>)\n<pre class=\"brush:text\"># ssh root@192.168.2.1<\/pre>\n<\/li>\n<li>Then run this command to start a LoRa server configuration console\n<pre class=\"brush:text\"># nc -u localhost 6677<\/pre>\n<\/li>\n<li>Add a node like this\n<pre class=\"brush:text\"># node add [DevAddr] [APPEUI] [DEVEUI] [NwkSKey] [AppSKey]<\/pre>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h4>Example:<\/h4>\n<pre class=\"brush:text\"># nc -u localhost 6677\r\nnode add 00000005 0011223344556677 8811223344556677 2b7e151628aed2a6abf7158809cf4f3c 2b7e151628aed2a6abf7158809cf4f3c<\/pre>\n<div class=\"note\"><strong>NOTE (US915)<\/strong>: <em>While this should get your sensors working using personalization, you&#8217;ll only receive, on average, 1 out of 8 sensor transmissions because your third-party device will be randomly transmitting on 1 of 64 channels, but the Conduit can only listen on 8 channels.\u00a0<em>The lora[&#8220;frequencySubBand&#8221;] setting on the LoRa config file<\/em> determines which 8 channels it&#8217;ll listen on (1-8, 9-16, &#8230;).<\/em><\/div>\n<p>&nbsp;<\/p>\n<h3>Troubleshooting<\/h3>\n<p>Use the following troubleshooting steps to either track down issues on your own or include a capture of the responses\/results below in a forum topic or support case.<\/p>\n<ul>\n<li>SSH into the Conduit (default IP: <code>192.168.2.1<\/code>, default credentials: <code>root<\/code>\/<code>root<\/code>)\n<pre class=\"brush:text\"># ssh root@192.168.2.1<\/pre>\n<\/li>\n<li>Go to the <code>\/var\/config\/lora\/<\/code> folder and modify the <code>lora-network-server.conf<\/code> file with the log level set to 100. Save it and issue the following command:\n<pre class=\"brush:text\">\/etc\/init.d\/lora-network-server restart<\/pre>\n<\/li>\n<li>Run your test again, then provide the log: <code>\/var\/log\/lora-network-server.log<\/code><\/li>\n<li>Issue the following command and capture the output:\n<pre class=\"brush:text\">\/opt\/lora\/lora-network-server --version\r\ncat \/etc\/issue<\/pre>\n<\/li>\n<li>What brand is the mote?<\/li>\n<li>What are the mote&#8217;s settings and log output?<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>The mLinux version of Conduit (MTCDT-xx-210L) supports OTA (over-the-air) joining by third-party LoRa devices as of LoRa Network Server version 0.0.7 (If you need to upgrade, refer to ). mLinux >= 3.3.22, lora-network-server >= 2.0.16 Network Server Whitelist Add unique device records into the whitelist devices list in lora-network-server.conf. The appeui will be attached to [&hellip;]<\/p>\n","protected":false},"author":1235,"featured_media":0,"parent":8453,"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-9269","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/9269","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\/1235"}],"replies":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/comments?post=9269"}],"version-history":[{"count":14,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/9269\/revisions"}],"predecessor-version":[{"id":9315,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/9269\/revisions\/9315"}],"up":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/8453"}],"wp:attachment":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/media?parent=9269"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}