{"id":81,"date":"2025-11-16T11:33:36","date_gmt":"2025-11-16T10:33:36","guid":{"rendered":"https:\/\/www.servo-server.net\/?p=81"},"modified":"2025-11-16T11:50:32","modified_gmt":"2025-11-16T10:50:32","slug":"lorawan-the-things-network-connection","status":"publish","type":"post","link":"https:\/\/www.servo-server.net\/?p=81","title":{"rendered":"LoraWan The Things Network connection"},"content":{"rendered":"\n<p>Just jotting this down for my own reference.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"552\" src=\"https:\/\/www.servo-server.net\/wp-content\/uploads\/2025\/11\/4ee54ab9-3180-4483-8f8c-9b87b072803f-e1763286380471-1024x552.jpg\" alt=\"USB gateway for TTN SX1302\" class=\"wp-image-82\" srcset=\"https:\/\/www.servo-server.net\/wp-content\/uploads\/2025\/11\/4ee54ab9-3180-4483-8f8c-9b87b072803f-e1763286380471-1024x552.jpg 1024w, https:\/\/www.servo-server.net\/wp-content\/uploads\/2025\/11\/4ee54ab9-3180-4483-8f8c-9b87b072803f-e1763286380471-300x162.jpg 300w, https:\/\/www.servo-server.net\/wp-content\/uploads\/2025\/11\/4ee54ab9-3180-4483-8f8c-9b87b072803f-e1763286380471-768x414.jpg 768w, https:\/\/www.servo-server.net\/wp-content\/uploads\/2025\/11\/4ee54ab9-3180-4483-8f8c-9b87b072803f-e1763286380471.jpg 1437w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">USB LoraWan Gateway with GPS\/Support Class B\/SX1302 8ch Concentrator for Linux<\/figcaption><\/figure>\n\n\n\n<p>I keep forgetting how to set up this little piece of hardware in a Docker container using Portainer, so here\u2019s a quick guide for future reference:<\/p>\n\n\n\n<p>Plug USB to the host computer.<\/p>\n\n\n\n<p>Creates 2 &#8220;ports&#8221;: <br>1. \/dev\/ttyACM1<br>2. \/dev\/ttyACM0<\/p>\n\n\n\n<p>Install a new container in portainer. Settings:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"383\" src=\"https:\/\/www.servo-server.net\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-16-105438-1024x383.jpg\" alt=\"Portainer basic settings for the new container Image and Port\" class=\"wp-image-86\" srcset=\"https:\/\/www.servo-server.net\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-16-105438-1024x383.jpg 1024w, https:\/\/www.servo-server.net\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-16-105438-300x112.jpg 300w, https:\/\/www.servo-server.net\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-16-105438-768x288.jpg 768w, https:\/\/www.servo-server.net\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-16-105438-1536x575.jpg 1536w, https:\/\/www.servo-server.net\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-16-105438.jpg 1552w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Portainer basic settings for the new container Image and Port<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"246\" src=\"https:\/\/www.servo-server.net\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-16-105507-1024x246.png\" alt=\"Advanced container settings Runtime &amp; Resources in Portainer\" class=\"wp-image-85\" srcset=\"https:\/\/www.servo-server.net\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-16-105507-1024x246.png 1024w, https:\/\/www.servo-server.net\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-16-105507-300x72.png 300w, https:\/\/www.servo-server.net\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-16-105507-768x185.png 768w, https:\/\/www.servo-server.net\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-16-105507-1536x369.png 1536w, https:\/\/www.servo-server.net\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-16-105507.png 1822w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Advanced container settings Runtime &amp; Resources in Portainer<\/figcaption><\/figure>\n\n\n\n<p>From the host get into the container<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker exec -it lorawan_ubunto \/bin\/bash<\/code><\/pre>\n\n\n\n<p>Do an update and upgrade as root<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt-get update\napt-get upgrade<\/code><\/pre>\n\n\n\n<p>Install Git along with some other necessary packages.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt-get install git\napt-get install minicom\napt-get install make\napt-get install libc6-dev\napt-get install vim\n<\/code><\/pre>\n\n\n\n<p>Go to the \/home directory and retrieve the package forwarder.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/home\ngit clone https:\/\/github.com\/Lora-net\/sx1302_hal<\/code><\/pre>\n\n\n\n<p>Compile the source<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/home\/sx1302_hal\nmake<\/code><\/pre>\n\n\n\n<p>Some error messages might come up. Seems to be not important<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd home\/sx1302_hal\/packet_forwarder\n.\/lora_pkt_fwd -c global_conf.json.sx1250.EU868.USB<\/code><\/pre>\n\n\n\n<p>If everything works as expected, a lot of information will appear on the screen. All we need from that is the device ID.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"611\" height=\"37\" src=\"https:\/\/www.servo-server.net\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-16-111517.jpg\" alt=\"concentrator EUI\" class=\"wp-image-88\" srcset=\"https:\/\/www.servo-server.net\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-16-111517.jpg 611w, https:\/\/www.servo-server.net\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-16-111517-300x18.jpg 300w\" sizes=\"auto, (max-width: 611px) 100vw, 611px\" \/><figcaption class=\"wp-element-caption\">concentrator EUI<\/figcaption><\/figure>\n\n\n\n<p>Edit the global_conf.json.sx1250.EU686.USB file in \/home\/sx1302_hal\/packet_forwarder<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    \"gateway_conf\": {\n        \"gateway_ID\": \"XXXXXXXXX\", \/*<strong>The concentrator EUI<\/strong>*\/\n        \/* change with default server address\/ports *\/\n        \"server_address\": \"eu1.cloud.thethings.network\",<strong> \/*The server address *\/<\/strong>\n        \"serv_port_up\": 1700, <strong>\/*The port*\/<\/strong>\n        \"serv_port_down\": 1700,  <strong>\/*The port*\/<\/strong>\n        \/* adjust the following parameters for your network *\/\n        \"keepalive_interval\": 10,\n        \"stat_interval\": 30,\n        \"push_timeout_ms\": 100,\n        \/* forward only valid packets *\/\n        \"forward_crc_valid\": true,\n        \"forward_crc_error\": false,\n        \"forward_crc_disabled\": false,\n        \/* GPS configuration *\/\n        \"gps_tty_path\": \"\/dev\/ttyACM1\", <strong>\/* The gps device *\/<\/strong>\n        \/* GPS reference coordinates *\/\n        \"ref_latitude\": 0.0,\n        \"ref_longitude\": 0.0,\n        \"ref_altitude\": 0,\n        \/* Beaconing parameters *\/\n        \"beacon_period\": 0,\n        \"beacon_freq_hz\": 869525000,\n        \"beacon_datarate\": 9,\n        \"beacon_bw_hz\": 125000,\n        \"beacon_power\": 14,\n        \"beacon_infodesc\": 0\n    },<\/code><\/pre>\n\n\n\n<p>No need to create the gateway. Already there.  <a href=\"https:\/\/eu1.cloud.thethings.network\/console\/gateways\">https:\/\/eu1.cloud.thethings.network\/console\/gateways<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just jotting this down for my own reference. I keep forgetting how to set up this little piece of hardware in a Docker container using Portainer, so here\u2019s a quick guide for future reference: Plug USB to the host computer. Creates 2 &#8220;ports&#8221;: 1. \/dev\/ttyACM12. \/dev\/ttyACM0 Install a new container in portainer. Settings: From the&hellip;&nbsp;<a href=\"https:\/\/www.servo-server.net\/?p=81\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">LoraWan The Things Network connection<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"categories":[14],"tags":[],"class_list":["post-81","post","type-post","status-publish","format-standard","hentry","category-lorawan-the-things-network"],"_links":{"self":[{"href":"https:\/\/www.servo-server.net\/index.php?rest_route=\/wp\/v2\/posts\/81","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.servo-server.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.servo-server.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.servo-server.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.servo-server.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=81"}],"version-history":[{"count":7,"href":"https:\/\/www.servo-server.net\/index.php?rest_route=\/wp\/v2\/posts\/81\/revisions"}],"predecessor-version":[{"id":94,"href":"https:\/\/www.servo-server.net\/index.php?rest_route=\/wp\/v2\/posts\/81\/revisions\/94"}],"wp:attachment":[{"href":"https:\/\/www.servo-server.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=81"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.servo-server.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=81"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.servo-server.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=81"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}