{"id":88,"date":"2018-12-28T15:08:17","date_gmt":"2018-12-28T05:38:17","guid":{"rendered":"https:\/\/sighmon.com\/says\/?p=88"},"modified":"2019-01-04T18:09:00","modified_gmt":"2019-01-04T08:39:00","slug":"connecting-to-the-things-network","status":"publish","type":"post","link":"https:\/\/sighmon.com\/says\/connecting-to-the-things-network\/","title":{"rendered":"Connecting to The Things Network"},"content":{"rendered":"\n<p>Out of the box The Things Uno has all the code on it to get started. All I needed to do was plug it into my laptop and open a serial monitor in the Arduino IDE at 9600 baud.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/sighmon.com\/says\/wp-content\/uploads\/2018\/12\/the-things-uno-1024x768.jpg\" alt=\"\" class=\"wp-image-90\" srcset=\"https:\/\/sighmon.com\/says\/wp-content\/uploads\/2018\/12\/the-things-uno-1024x768.jpg 1024w, https:\/\/sighmon.com\/says\/wp-content\/uploads\/2018\/12\/the-things-uno-300x225.jpg 300w, https:\/\/sighmon.com\/says\/wp-content\/uploads\/2018\/12\/the-things-uno-768x576.jpg 768w, https:\/\/sighmon.com\/says\/wp-content\/uploads\/2018\/12\/the-things-uno-1568x1176.jpg 1568w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>The Things Uno &#8211; out of the box it Just Works&#x2122;&#xfe0f;<\/figcaption><\/figure>\n\n\n\n<p>Green lights flashed, and its status printed to the console. Happy days.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>-- STATUS\nEUI: &lt;eui>\nBattery: 3253\nAppEUI: 0000000000000000\nDevEUI: &lt;devEui>\nData Rate: 3\nRX Delay 1: 1000\nRX Delay 2: 2000<\/code><\/pre>\n\n\n\n<p>I followed the <a href=\"https:\/\/www.thethingsnetwork.org\/docs\/devices\/uno\/quick-start.html\">Uno Quick Start<\/a> guide (which is really great), updated my Arduino IDE, added TheThingsNetwork library, setup my Application, added my device to the application, copied the appEui &amp; appKey to my example sketch and uploaded it.<\/p>\n\n\n\n<p>Everything looked happy, but then &#x1f614; <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>-- STATUS\nEUI: &lt;eui>\nBattery: 3253\nAppEUI: 0000000000000000\nDevEUI: &lt;devEui>\nData Rate: 3\nRX Delay 1: 1000\nRX Delay 2: 2000\n-- JOIN\nModel: RN2903\nVersion: 0.9.5\nSending: mac set deveui &lt;devEui>\nSending: mac set adr off\nSending: mac set deveui &lt;devEui>\nSending: mac set appeui &lt;appID>\nSending: mac set appkey &lt;secret>\nSending: mac save \n&lt;snip>\nSending: mac set pwridx 5\nSending: mac set retx 7\nSending: mac set dr 3\nSending: mac join otaa \nJoin not accepted: denied\nCheck your coverage, keys and backend status.<\/code><\/pre>\n\n\n\n<p><em>Join not accepted: denied. Check your coverage, keys and backend status.<\/em><\/p>\n\n\n\n<p>Double checking the sample code and keys didn&#8217;t find any bugs, so it was time to look at <a href=\"https:\/\/ttnmapper.org\">The Things Network Mapper<\/a> to see if I was actually in range here at Port Willunga.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"651\" src=\"https:\/\/sighmon.com\/says\/wp-content\/uploads\/2018\/12\/port-willunga-ttn-1024x651.jpg\" alt=\"\" class=\"wp-image-89\" srcset=\"https:\/\/sighmon.com\/says\/wp-content\/uploads\/2018\/12\/port-willunga-ttn-1024x651.jpg 1024w, https:\/\/sighmon.com\/says\/wp-content\/uploads\/2018\/12\/port-willunga-ttn-300x191.jpg 300w, https:\/\/sighmon.com\/says\/wp-content\/uploads\/2018\/12\/port-willunga-ttn-768x489.jpg 768w, https:\/\/sighmon.com\/says\/wp-content\/uploads\/2018\/12\/port-willunga-ttn-1568x997.jpg 1568w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>December 2018, Port Willunga is out of range.<\/figcaption><\/figure>\n\n\n\n<p>Bummer. ~22.8km away from the nearest gateway, and the theoretical range of LoRaWAN is ~15km.<\/p>\n\n\n\n<p>So I&#8217;ll take a break from connecting to the network and get back to getting <a href=\"https:\/\/www.thethingsnetwork.org\/docs\/devices\/uno\/\">The Things Uno<\/a> talking to the <a href=\"https:\/\/www.atlas-scientific.com\/product_pages\/kits\/ec_k1_0_kit.html\">Atlas Scientific Water Conductivity<\/a> sensor. Then when that&#8217;s all sorted, I&#8217;ll take a little drive down the coast and connect that way.<\/p>\n\n\n\n<p>I really love the setup process of The Things Network &#8211; straight forward guide, and sample code that all works perfectly. &#x1f60a; <\/p>\n\n\n\n<p><em>Update<\/em>: Once I reached Adelaide CBD I plugged in The Things Uno again in the hope it would connect to the many close gateways&#8230; but unfortunately I had the same problem.<\/p>\n\n\n\n<p>A quick chat in the #Adelaide channel on <a href=\"https:\/\/thethingsnetwork.slack.com\">thethingsnetwork.slack.com<\/a> and Andrew noticed that my Uno&#8217;s LoRaWAN firmware on the Microchip RN2903  is running old firmware (Version 0.9.5), and apparently it needs to be running Version 1.0.3 to connect.<\/p>\n\n\n\n<p>Follow along as I grapple with <a href=\"https:\/\/sighmon.com\/says\/upgrading-the-things-uno-rn2903-firmware\/\">upgrading the firmware<\/a>&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Out of the box The Things Uno has all the code on it to get started. All I needed to do was plug it into my laptop and open a serial monitor in the Arduino IDE at 9600 baud. Green lights flashed, and its status printed to the console. Happy days. I followed the Uno &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/sighmon.com\/says\/connecting-to-the-things-network\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Connecting to The Things Network&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":90,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,9],"tags":[11,20,19,18,17],"class_list":["post-88","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino","category-sensors","tag-arduino","tag-port-willunga","tag-the-things-network","tag-ttn","tag-uno","entry"],"_links":{"self":[{"href":"https:\/\/sighmon.com\/says\/wp-json\/wp\/v2\/posts\/88","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sighmon.com\/says\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sighmon.com\/says\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sighmon.com\/says\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sighmon.com\/says\/wp-json\/wp\/v2\/comments?post=88"}],"version-history":[{"count":4,"href":"https:\/\/sighmon.com\/says\/wp-json\/wp\/v2\/posts\/88\/revisions"}],"predecessor-version":[{"id":138,"href":"https:\/\/sighmon.com\/says\/wp-json\/wp\/v2\/posts\/88\/revisions\/138"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sighmon.com\/says\/wp-json\/wp\/v2\/media\/90"}],"wp:attachment":[{"href":"https:\/\/sighmon.com\/says\/wp-json\/wp\/v2\/media?parent=88"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sighmon.com\/says\/wp-json\/wp\/v2\/categories?post=88"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sighmon.com\/says\/wp-json\/wp\/v2\/tags?post=88"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}