{"id":1708,"date":"2019-04-04T00:31:02","date_gmt":"2019-04-04T05:31:02","guid":{"rendered":"http:\/\/kylegabriel.com\/projects\/?p=1708"},"modified":"2021-05-26T14:47:46","modified_gmt":"2021-05-26T19:47:46","slug":"lorawan-tracker-and-mapper","status":"publish","type":"post","link":"https:\/\/kylegabriel.com\/projects\/2019\/04\/lorawan-tracker-and-mapper.html","title":{"rendered":"LoRaWAN Tracker and Mapper"},"content":{"rendered":"\n<p>LoRaWAN is a great long-distance, low-power transmission protocol. One of the questions that often comes up after deploying a gateway and nodes is &#8220;what&#8217;s the greatest distance I can successfully transmit between my gateway and node?&#8221; You could watch your Application traffic on The Things Network as you move to strategic locations and see if packets appear. However, an automated approach to this could save time and allow you to cover more ground. To do this, you&#8217;ll need a node with a GPS to send its location and software to aggregate the received data on a map to show the node transmission locations. This way you can have the node automatically transmit at a rapid interval as you walk, cycle, or drive to various locations.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p><a href=\"https:\/\/ttnmapper.org\/\">TTN Mapper<\/a> is a web-based mapping software that does this from data transmitted to <a href=\"https:\/\/www.thethingsnetwork.org\/\">The Things Network<\/a>. However, the issue with TTN Mapper is it does not update in real-time, requiring up to a day to see if your transmissions were successfully received. This limits it&#8217;s usefulness if you&#8217;re trying to determine transmission distance as you&#8217;re on the move, such as I like to do while driving. To overcome this limitation, I developed mapping software that receives the location data from The Things Network and displays it in real-time on a map in a web browser on your phone, tablet, or computer. This map can even display your current location if you permit location sharing. The backend of the software runs in a docker container and has been successfully built and tested on both a Raspberry Pi and a desktop PC running a 64-bit version of Ubuntu.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"> Features<\/h2>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"alignright is-resized\"><a href=\"https:\/\/kylegabriel.com\/projects\/wp-content\/uploads\/sites\/3\/2019\/08\/TTGO_T_Beam_01.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/kylegabriel.com\/projects\/wp-content\/uploads\/sites\/3\/2019\/08\/TTGO_T_Beam_01.png\" alt=\"\" class=\"wp-image-1717\" width=\"245\" height=\"226\" srcset=\"https:\/\/kylegabriel.com\/projects\/wp-content\/uploads\/sites\/3\/2019\/08\/TTGO_T_Beam_01.png 978w, https:\/\/kylegabriel.com\/projects\/wp-content\/uploads\/sites\/3\/2019\/08\/TTGO_T_Beam_01-300x277.png 300w, https:\/\/kylegabriel.com\/projects\/wp-content\/uploads\/sites\/3\/2019\/08\/TTGO_T_Beam_01-768x709.png 768w\" sizes=\"(max-width: 245px) 100vw, 245px\" \/><\/a><figcaption>The TTGO T-Beam development platform, based on the ESP32, with GPS, WiFi, Bluetooth, LoRaWAN, and an OLED display.<\/figcaption><\/figure><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>Multiple map layers, including topology, streets, and satellite (<a href=\"https:\/\/www.bingmapsportal.com\">Bing API key<\/a> required for satellite)<\/li><li>Automatically acquires new data and adds markers to the map<\/li><li>Tracking tool to use device GPS to place marker of current position (and direction) on map (requires allowing location permission for browser\/phone)<\/li><li>Scale bar on edge of map<\/li><li>SSL\/HTTPS (required for location tracking)<\/li><li>Measuring tool for measure distances between points<\/li><li>Map stays focused on the same point across page refreshes<\/li><li>Clicking gateway or data point markers pops up information about them<\/li><\/ul>\n\n\n\n<p>The hardware I chose for the node was the <a href=\"https:\/\/amzn.to\/3uj8OTO\" data-eafl-id=\"6330\" data-eafl-parsed=\"1\" class=\"eafl-link eafl-link-text eafl-link-direct\" target=\"_blank\" rel=\"nofollow\">TTGO T-Beam with an OLED display<\/a>, which I developed tracking software that works for both TTN Mapper and my TTN Tracker software.<\/p>\n\n\n\n<p>More information, including hardware, code, and setup instructions can be found at the following links:<br><br>TTGO T-Beam TTN Tracker: <a href=\"https:\/\/github.com\/kizniche\/ttgo-tbeam-ttn-tracker\">kizniche\/ttgo-tbeam-ttn-tracker<\/a><br>TTN Web Tracker: <a href=\"https:\/\/github.com\/kizniche\/ttn-tracker\">kizniche\/ttn-tracker<\/a><br><a href=\"https:\/\/kylegabriel.com\/projects\/2019\/03\/outdoor-lorawan-gateway.html\">Outdoor LoRaWAN Gateway<\/a><\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<style type=\"text\/css\">\r\n\t#foogallery-gallery-1856 .fg-image {\r\n        width: 225px;\r\n    }\r\n<\/style>\r\n\t\t\t\t<div class=\"foogallery foogallery-container foogallery-default foogallery-lightbox-foobox fg-gutter-10 fg-center fg-default fg-light fg-border-thin fg-shadow-outline fg-loading-default fg-loaded-fade-in fg-caption-hover fg-hover-fade fg-hover-zoom fg-ready\" id=\"foogallery-gallery-1856\" data-foogallery=\"{&quot;item&quot;:{&quot;showCaptionTitle&quot;:true,&quot;showCaptionDescription&quot;:true},&quot;lazy&quot;:true}\" >\r\n\t<div class=\"fg-item fg-type-image fg-idle\"><figure class=\"fg-item-inner\"><a href=\"https:\/\/kylegabriel.com\/projects\/wp-content\/uploads\/sites\/3\/2019\/08\/Screenshot_TTN_Tracker_01.png\" data-caption-title=\"Web browser view of TTN Tracker with the gateway (blue marker) and points where the tracking node successfully transmitted to the gateway (red marks).\" data-attachment-id=\"1712\" data-type=\"image\" class=\"fg-thumb\"><span class=\"fg-image-wrap\"><img decoding=\"async\" title=\"Web browser view of TTN Tracker with the gateway (blue marker) and points where the tracking node successfully transmitted to the gateway (red marks).\" width=\"225\" height=\"150\" class=\"skip-lazy fg-image\" data-src-fg=\"https:\/\/kylegabriel.com\/projects\/wp-content\/uploads\/sites\/3\/cache\/2019\/08\/Screenshot_TTN_Tracker_01\/2672367904.png\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22225%22%20height%3D%22150%22%20viewBox%3D%220%200%20225%20150%22%3E%3C%2Fsvg%3E\" loading=\"eager\"><\/span><span class=\"fg-image-overlay\"><\/span><\/a><figcaption class=\"fg-caption\"><div class=\"fg-caption-inner\"><div class=\"fg-caption-title\">Web browser view of TTN Tracker with the gateway (blue marker) and points where the tracking node successfully transmitted to the gateway (red marks).<\/div><\/div><\/figcaption><\/figure><div class=\"fg-loader\"><\/div><\/div><div class=\"fg-item fg-type-image fg-idle\"><figure class=\"fg-item-inner\"><a href=\"https:\/\/kylegabriel.com\/projects\/wp-content\/uploads\/sites\/3\/2019\/08\/Screenshot_TTN_Tracker_02.png\" data-caption-title=\"Distance can be measured from any number of points from within the map.\" data-attachment-id=\"1720\" data-type=\"image\" class=\"fg-thumb\"><span class=\"fg-image-wrap\"><img decoding=\"async\" title=\"Distance can be measured from any number of points from within the map.\" width=\"225\" height=\"150\" class=\"skip-lazy fg-image\" data-src-fg=\"https:\/\/kylegabriel.com\/projects\/wp-content\/uploads\/sites\/3\/cache\/2019\/08\/Screenshot_TTN_Tracker_02\/4139299000.png\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22225%22%20height%3D%22150%22%20viewBox%3D%220%200%20225%20150%22%3E%3C%2Fsvg%3E\" loading=\"eager\"><\/span><span class=\"fg-image-overlay\"><\/span><\/a><figcaption class=\"fg-caption\"><div class=\"fg-caption-inner\"><div class=\"fg-caption-title\">Distance can be measured from any number of points from within the map.<\/div><\/div><\/figcaption><\/figure><div class=\"fg-loader\"><\/div><\/div><div class=\"fg-item fg-type-image fg-idle\"><figure class=\"fg-item-inner\"><a href=\"https:\/\/kylegabriel.com\/projects\/wp-content\/uploads\/sites\/3\/2019\/08\/Screenshot_TTN_Tracker_03.png\" data-caption-title=\"Information about both the gateways and the nodes can be viewed by selecting a marker.\" data-attachment-id=\"1724\" data-type=\"image\" class=\"fg-thumb\"><span class=\"fg-image-wrap\"><img decoding=\"async\" title=\"Information about both the gateways and the nodes can be viewed by selecting a marker.\" width=\"225\" height=\"150\" class=\"skip-lazy fg-image\" data-src-fg=\"https:\/\/kylegabriel.com\/projects\/wp-content\/uploads\/sites\/3\/cache\/2019\/08\/Screenshot_TTN_Tracker_03\/1008387593.png\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22225%22%20height%3D%22150%22%20viewBox%3D%220%200%20225%20150%22%3E%3C%2Fsvg%3E\" loading=\"eager\"><\/span><span class=\"fg-image-overlay\"><\/span><\/a><figcaption class=\"fg-caption\"><div class=\"fg-caption-inner\"><div class=\"fg-caption-title\">Information about both the gateways and the nodes can be viewed by selecting a marker.<\/div><\/div><\/figcaption><\/figure><div class=\"fg-loader\"><\/div><\/div><div class=\"fg-item fg-type-image fg-idle\"><figure class=\"fg-item-inner\"><a href=\"https:\/\/kylegabriel.com\/projects\/wp-content\/uploads\/sites\/3\/2019\/08\/Screenshot_TTN_Tracker_04.png\" data-caption-title=\"There are also several map layers to choose from, including topographic and satellite.\" data-attachment-id=\"1726\" data-type=\"image\" class=\"fg-thumb\"><span class=\"fg-image-wrap\"><img decoding=\"async\" title=\"There are also several map layers to choose from, including topographic and satellite.\" width=\"225\" height=\"150\" class=\"skip-lazy fg-image\" data-src-fg=\"https:\/\/kylegabriel.com\/projects\/wp-content\/uploads\/sites\/3\/cache\/2019\/08\/Screenshot_TTN_Tracker_04\/3630397223.png\" src=\"data:image\/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22225%22%20height%3D%22150%22%20viewBox%3D%220%200%20225%20150%22%3E%3C%2Fsvg%3E\" loading=\"eager\"><\/span><span class=\"fg-image-overlay\"><\/span><\/a><figcaption class=\"fg-caption\"><div class=\"fg-caption-inner\"><div class=\"fg-caption-title\">There are also several map layers to choose from, including topographic and satellite.<\/div><\/div><\/figcaption><\/figure><div class=\"fg-loader\"><\/div><\/div><\/div>\r\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Affiliate links<\/strong><\/p>\n\n\n\n<p> I participant in the Amazon Services LLC Associates Program, an  affiliate advertising program designed to provide a means for sites to  earn advertising fees by advertising and linking to Amazon.com, and I  make a commission for sales made through affiliate links posted on this  website.  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>LoRaWAN is a great long-distance, low-power transmission protocol. One of the questions that often comes up after deploying a gateway and nodes is &#8220;what&#8217;s the greatest distance I can successfully transmit between my gateway and node?&#8221; You could watch your Application traffic on The Things Network as you move to strategic locations and see if [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1726,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,22,24,21],"tags":[],"class_list":["post-1708","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-automation","category-lorawan","category-microcontroller","category-wireless"],"_links":{"self":[{"href":"https:\/\/kylegabriel.com\/projects\/wp-json\/wp\/v2\/posts\/1708"}],"collection":[{"href":"https:\/\/kylegabriel.com\/projects\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kylegabriel.com\/projects\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kylegabriel.com\/projects\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kylegabriel.com\/projects\/wp-json\/wp\/v2\/comments?post=1708"}],"version-history":[{"count":0,"href":"https:\/\/kylegabriel.com\/projects\/wp-json\/wp\/v2\/posts\/1708\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kylegabriel.com\/projects\/wp-json\/wp\/v2\/media\/1726"}],"wp:attachment":[{"href":"https:\/\/kylegabriel.com\/projects\/wp-json\/wp\/v2\/media?parent=1708"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kylegabriel.com\/projects\/wp-json\/wp\/v2\/categories?post=1708"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kylegabriel.com\/projects\/wp-json\/wp\/v2\/tags?post=1708"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}