{"id":5499,"date":"2023-08-17T14:04:18","date_gmt":"2023-08-17T14:04:18","guid":{"rendered":"https:\/\/lora.vsb.cz\/?page_id=5499"},"modified":"2025-08-14T09:29:25","modified_gmt":"2025-08-14T09:29:25","slug":"868-mhz-rak5146-spi-lora-basics-station","status":"publish","type":"page","link":"https:\/\/lora.vsb.cz\/index.php\/868-mhz-rak5146-spi-lora-basics-station\/","title":{"rendered":"868 MHz RAK5146 SPI &#8211; LoRa Basics Station"},"content":{"rendered":"<table style=\"height: 66px;\" width=\"356\">\n<tbody>\n<tr>\n<td style=\"text-align: left; min-width: 100px;\" width=\"10%\"><strong>TTN version:<\/strong><\/td>\n<td><strong><span style=\"color: #008000;\">TTNv3 \/ TTS SANDBOX<\/span><\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left; min-width: 100px;\" width=\"10%\"><strong>Frequency:<\/strong><\/td>\n<td>Europe 863-870 MHz (SF9 for RX2 &#8211; recommended)<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left; min-width: 100px;\" width=\"10%\"><strong>Classes:<\/strong><\/td>\n<td><strong><span style=\"color: #008000;\">Ready for LoRaWAN Classes A, B and C<\/span><\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left; min-width: 100px;\" width=\"10%\"><strong>Using Docker:<\/strong><\/td>\n<td>Yes<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left; min-width: 100px;\" width=\"10%\"><strong>Last updated:<\/strong><\/td>\n<td>July 20, 2025<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>This article provides instructions for making <strong>LoRa Basics Station<\/strong> using <strong>Raspberry Pi 3 or 4 <\/strong>and <strong>RAK5146 PiHAT Kit for LoRaWAN<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5503 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT1.png\" alt=\"Rak Kit\" width=\"799\" height=\"272\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT1.png 3769w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT1-300x102.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT1-1024x349.png 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT1-768x261.png 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT1-1536x523.png 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT1-2048x697.png 2048w\" sizes=\"auto, (max-width: 799px) 100vw, 799px\" \/><\/p>\n<p><span style=\"color: #ff6600;\">Note<\/span>: The <strong>RAK5146 <\/strong>with <strong>GPS<\/strong>\u00a0is required to support\u00a0<strong>Class B<\/strong>\u00a0end devices.<\/p>\n<p>&nbsp;<\/p>\n<h2><span style=\"color: #189bd6;\"><strong>Prepare<\/strong><\/span><\/h2>\n<ul>\n<li>Raspberry Pi 3 or 4<\/li>\n<li>Raspberry Pi Power Supply<\/li>\n<li>microSD card<\/li>\n<li><a href=\"https:\/\/store.rakwireless.com\/products\/rak5146-kit?variant=41577988161734\" target=\"_blank\" rel=\"noopener\">RAK5146 PiHAT Kit for LoRaWAN (EU868, With GPS)<\/a><\/li>\n<li>PC<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2><strong><span style=\"color: #800000;\">RAK5146 PiHAT Kit for LoRaWAN<\/span><\/strong><\/h2>\n<p>The <strong>RAK5146 Kit<\/strong> consists of a <strong>RAK5146 SPI module<\/strong> powered by Semtech\u2019s SX1303 baseband processor, a <strong>RAK5146\/RAK2287 Pi HAT<\/strong>, and all the accessories you need. The Pi HAT is compatible with Raspberry Pi single-board computers (SBC) and others with the Pi 40-pin connector header.<\/p>\n<p>&nbsp;<\/p>\n<h6><strong>RAK5146 Gateway Concentrator Module for LoRaWAN<\/strong><\/h6>\n<p>The RAK5146 is an LPWAN Concentrator Module with mini-PCIe form factor based on Semtech SX1303. It can be used in any embedded platform offering a free mini-PCIe slot with SPI\/USB connection. Furthermore, ZOE- M8Q GPS chip is integrated onboard for precise time synchronization.<strong><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5639 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT2-e1691496898433.webp\" alt=\"RAK5146 Gateway Concentrator Module for LoRaWAN\" width=\"250\" height=\"219\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT2-e1691496898433.webp 1301w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT2-e1691496898433-300x262.webp 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT2-e1691496898433-1024x895.webp 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT2-e1691496898433-768x671.webp 768w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/strong><\/p>\n<p>This module is an exceptional, complete, and cost-efficient gateway solution offering up to 10 programmable parallel demodulation paths, 8 x 8 channel LoRa packet detectors, 8 x SF5-SF12 LoRa demodulators, and 8 x SF5-SF10 LoRa demodulators. It is capable of detecting an uninterrupted combination of packets at 8 different spreading factors and 10 channels with continuous demodulation of up to 16 packets. This product is best for smart metering fixed networks and Internet-of-Things (IoT) applications.<\/p>\n<p>For more information on <strong>RAK5146 Gateway Concentrator Module for LoRaWAN<\/strong>, see:<\/p>\n<ul>\n<li><strong><a href=\"https:\/\/store.rakwireless.com\/products\/wislink-concentrator-module-sx1303-rak5146-lorawan?variant=39667784908998\" target=\"_blank\" rel=\"noopener\">RAK5146 Gateway Concentrator Module for LoRaWAN, SX1303 LoRa Core (SPI, GPS, non LBT)<\/a><\/strong><\/li>\n<li><a href=\"https:\/\/docs.rakwireless.com\/Product-Categories\/WisLink\/RAK5146\/Overview\/\" target=\"_blank\" rel=\"noopener\"><strong>RAK5146 WisLink LPWAN Concentrator<\/strong><\/a><\/li>\n<li><strong><a href=\"https:\/\/docs.rakwireless.com\/Product-Categories\/WisLink\/RAK5146\/Datasheet\/\" target=\"_blank\" rel=\"noopener\">RAK5146 WisLink LPWAN Concentrator Datasheet<\/a><\/strong><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h6><strong>RAK2287\/RAK5146 Pi HAT<\/strong><\/h6>\n<p>RAK2287\/R\u0410\u041a5146 Pi HAT is a converter board with a Raspberry Pi form factor that enables the RAK2287 SPI or RAK5146 SPI LPWAN concentrator modules to be mounted on the top of the Raspberry Pi. It integrates one 40-pin female Pi HAT connector and one mini PCIe connector.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5640 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT3-e1691497625338.webp\" alt=\"RAK2287\/RAK5146 Pi HAT\" width=\"250\" height=\"227\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT3-e1691497625338.webp 765w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT3-e1691497625338-300x273.webp 300w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/p>\n<p>For more information on <strong>RAK2287\/RAK5146 Pi HAT<\/strong>, see:<\/p>\n<ul>\n<li><a href=\"https:\/\/store.rakwireless.com\/products\/rak2287-pi-hat\" target=\"_blank\" rel=\"noopener\"><strong>RAK2287\/RAK5146 Pi HAT<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/docs.rakwireless.com\/Product-Categories\/WisHat\/RAK2287-RAK5146-Pi-HAT\/Overview\/\" target=\"_blank\" rel=\"noopener\"><strong>RAK2287\/RAK5146 Pi HAT<\/strong><\/a><\/li>\n<li><strong><a href=\"https:\/\/docs.rakwireless.com\/Product-Categories\/WisHat\/RAK2287-RAK5146-Pi-HAT\/Datasheet\/\" target=\"_blank\" rel=\"noopener\">RAK2287\/RAK5146 Pi HAT Datasheet<\/a><\/strong><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2 id=\"assembly\"><strong><span style=\"color: #800000;\">Assembly<\/span><\/strong><\/h2>\n<ol>\n<li>Prepare all the components.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5514 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_assembly_1.png\" alt=\"RAK5146_KIT_assembly_1\" width=\"500\" height=\"404\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_assembly_1.png 3336w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_assembly_1-300x242.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_assembly_1-1024x827.png 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_assembly_1-768x620.png 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_assembly_1-1536x1241.png 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_assembly_1-2048x1654.png 2048w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/li>\n<li>Insert the <strong>LoRa Concentrator Module<\/strong> into the mini-PCIe slot on the <strong>RAK5146\/RAK2287 Pi HAT<\/strong> and screw it in place with the <strong>two smaller screws from the package<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5519 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_assembly_2.png\" alt=\"RAK5146_KIT_assembly_2\" width=\"299\" height=\"269\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_assembly_2.png 1993w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_assembly_2-300x269.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_assembly_2-1024x919.png 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_assembly_2-768x689.png 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_assembly_2-1536x1378.png 1536w\" sizes=\"auto, (max-width: 299px) 100vw, 299px\" \/><\/li>\n<li>Screw the <strong>spacers<\/strong> into the four mounting holes on the <strong>Raspberry Pi<\/strong> as shown in the following image.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5523 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_assembly_3.jpg\" alt=\"RAK5146_KIT_assembly_3\" width=\"301\" height=\"189\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_assembly_3.jpg 1783w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_assembly_3-300x189.jpg 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_assembly_3-1024x644.jpg 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_assembly_3-768x483.jpg 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_assembly_3-1536x967.jpg 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_assembly_3-436x272.jpg 436w\" sizes=\"auto, (max-width: 301px) 100vw, 301px\" \/><\/li>\n<li>Connect the <strong>RAK5146\/RAK2287 Pi HAT<\/strong> to the <strong>GPIO on the Raspberry Pi<\/strong> and screw it to the spacer posts with the <strong>four larger screws from the package<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5529 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_assembly_4.png\" alt=\"RAK5146_KIT_assembly_4\" width=\"299\" height=\"188\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_assembly_4.png 2052w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_assembly_4-300x189.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_assembly_4-1024x644.png 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_assembly_4-768x483.png 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_assembly_4-1536x966.png 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_assembly_4-2048x1287.png 2048w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_assembly_4-436x272.png 436w\" sizes=\"auto, (max-width: 299px) 100vw, 299px\" \/><\/li>\n<li>Finally, connect the <strong>LoRa antenna<\/strong> and the <strong>GPS antenna<\/strong> to the <strong>LoRa Concentrator Module<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5503 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT1.png\" alt=\"Rak Kit\" width=\"500\" height=\"170\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT1.png 3769w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT1-300x102.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT1-1024x349.png 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT1-768x261.png 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT1-1536x523.png 1536w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT1-2048x697.png 2048w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h2><strong><span style=\"color: #800000;\">Raspberry Pi OS setup<\/span><\/strong><\/h2>\n<ol>\n<li>From\u00a0<strong><a href=\"https:\/\/www.raspberrypi.com\/software\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.raspberrypi.com\/software\/<\/a><\/strong>\u00a0download\u00a0<strong>Raspberry Pi Imager<\/strong>\u00a0and install it.<\/li>\n<li>Insert the microSD card into the computer.<\/li>\n<li>Run\u00a0<strong>Raspberry Pi Imager<\/strong>.<\/li>\n<li>Click on\u00a0<strong>CHOOSE OS<\/strong>.<\/li>\n<li>Click on\u00a0<strong>Raspberry Pi OS (other)<\/strong>.<\/li>\n<li>Click on\u00a0<strong>Raspberry Pi OS Lite (32-bit)<\/strong>.<\/li>\n<li>Click on\u00a0<strong>CHOOSE STORAGE<\/strong>.<\/li>\n<li>Select the inserted microSD card on which you want to install Raspberry Pi OS.<\/li>\n<li>Click on <strong>Next<\/strong>.<\/li>\n<li>Would you like to apply OS customisation settings? &#8211; <strong>EDIT SETTINGS<\/strong>.<\/li>\n<li><strong>Set hostname<\/strong>.<\/li>\n<li><strong>Set username and password<\/strong>. (<span style=\"color: #ff6600;\">we recommend a 17-digit password containing lower and upper case letters, numbers and symbols<\/span>)<\/li>\n<li>If you will use WiFi \u2013\u00a0<strong>Configure wireless LAN<\/strong>. (<span style=\"color: #ff6600;\">optional<\/span>)<\/li>\n<li><strong>Set locale settings<\/strong>.<\/li>\n<li>Click on tab <strong>SERVICES<\/strong>.<\/li>\n<li>If you will be connecting remotely via SSH \u2013<strong>\u00a0Enable SSH<\/strong>\u00a0\u2013\u00a0<strong>Use password authentication<\/strong>. (<span style=\"color: #ff6600;\">optional<\/span>)<\/li>\n<li>Click on\u00a0<strong>SAVE<\/strong>.<\/li>\n<li>Click on <strong>YES<\/strong>.<\/li>\n<li>Click on\u00a0<strong>YES<\/strong>.<\/li>\n<li>Click on\u00a0<strong>CONTINUE<\/strong>.<\/li>\n<li>Insert the microSD card into the Raspberry Pi.<\/li>\n<li>Turn on the Raspberry Pi.<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h6><strong>Remote connection via SSH (optional)<\/strong><\/h6>\n<ol>\n<li>Connect to your router and find the IP address of your Raspberry Pi.<\/li>\n<li>From a Windows PC, you can connect using\u00a0<strong>Command Prompt<\/strong>\u00a0(CMD) or\u00a0<strong><a href=\"https:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/latest.html\" target=\"_blank\" rel=\"noopener\">PuTTY<\/a><\/strong>.<\/li>\n<li>On Windows PC open\u00a0<strong>Command Prompt<\/strong>\u00a0(CMD).<\/li>\n<li>Type\u00a0<code class=\" prettyprinted\"><strong><span class=\"pln\">ssh\u00a0<\/span><span class=\"pun\">-<\/span><span class=\"pln\">p\u00a0<\/span><em><span class=\"pln\">port\u00a0<\/span><\/em><em><span class=\"pln\">username<\/span><\/em><span class=\"pln\">@<\/span><em><span class=\"pln\">IP<\/span><\/em><\/strong><em><span class=\"pln\">_<\/span><\/em><strong><em><span class=\"pln\">Address<\/span><\/em><\/strong><\/code>\u00a0(for example: ssh -p 22 loravsb@192.168.1.120).<\/li>\n<li>Type your password.<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h6><strong>Post-installation steps<\/strong><\/h6>\n<ol>\n<li>Update, upgrade and reboot Raspberry Pi. This will ensure that any security vulnerabilities are patched:\n<pre>$ sudo apt update\r\n$ sudo apt full-upgrade\r\n$ sudo reboot<\/pre>\n<\/li>\n<li>Connect again via SSH.<\/li>\n<li>Use a different port for SSH and disable root login.\u00a0First, open the SSH configuration file with a text editor:\n<pre>$ sudo nano \/etc\/ssh\/sshd_config\r\n<\/pre>\n<\/li>\n<li>Locate the line with <code>Port 22<\/code> and change it to the desired port number (for example, change the port to 2222). Locate the line with <code>PermitRootLogin<\/code> and change its value to <code>no<\/code> (this will disable root login via SSH):\n<pre><span class=\"hljs-keyword\">Port 2222\r\nPermitRootLogin no<\/span>\r\n\r\n<\/pre>\n<\/li>\n<li>Save the changes and exit the text editor.<\/li>\n<li>Restart the SSH service to apply the changes:\n<pre>$ sudo systemctl restart ssh\r\n<\/pre>\n<\/li>\n<li>Log out and connect again via SSH on the new port.<\/li>\n<li>Install and configure the built-in firewall, ufw, to limit incoming network connections. In the <code>sudo ufw limit 2222\/tcp<\/code> rule, change port 2222 to port you have chose for SSH above.\n<pre>$ sudo apt install ufw\r\n$ sudo ufw <span class=\"hljs-keyword\">default<\/span> deny incoming\r\n$ sudo ufw limit 2222\/tcp<span class=\"hljs-number\">\r\n$ sudo ufw enable<\/span>\r\n<\/pre>\n<p><span style=\"color: #ff6600;\">Note: Firewall rules will have no effect on ports opened by Docker.<\/span><\/li>\n<li>Reboot Raspberry Pi:\n<pre>$ sudo reboot<\/pre>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h6><strong>Docker<\/strong><\/h6>\n<ol>\n<li>Connect again via SSH.<\/li>\n<li>Install the latest Docker version using the convenience script provided by docker:\n<pre>$ curl -fsSL https:\/\/get.docker.com -o get-docker.sh\r\n$ sudo sh get-docker.sh\r\n$ sudo groupadd docker\r\n$ sudo usermod -aG docker $USER\r\n$ newgrp docker\r\n$ sudo systemctl enable docker.service\r\n$ sudo systemctl enable containerd.service<\/pre>\n<\/li>\n<\/ol>\n<p>For more information on Docker installation, see <strong><a href=\"https:\/\/docs.docker.com\/engine\/install\/\" target=\"_blank\" rel=\"noopener\">https:\/\/docs.docker.com\/engine\/install\/<\/a><\/strong>.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong><span style=\"color: #800000;\">LoRa Basics Station setup<\/span><\/strong><\/h2>\n<ol>\n<li>First, get the <strong>Gateway EUI<\/strong> by running the following command:\n<pre>$ cat \/sys\/class\/net\/eth0\/address | awk -F\\: '{print toupper($1$2$3\"FFFE\"$4$5$6)}'<\/pre>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h4><strong>The Things Stack<\/strong><\/h4>\n<ol>\n<li><a href=\"https:\/\/www.thethingsnetwork.org\/login?next=\/\" target=\"_blank\" rel=\"noopener\"><strong>Create an account<\/strong><\/a>\u00a0on The Things Network if you don\u2019t have one.<\/li>\n<li><strong>Login<\/strong>\u00a0on\u00a0<strong><a href=\"https:\/\/www.thethingsnetwork.org\/login?next=\/\" target=\"_blank\" rel=\"noopener\">The Things Network<\/a><\/strong>.<\/li>\n<li>Click on your username and choose\u00a0<strong>Console<\/strong>.<\/li>\n<li>Select a network cluster.<\/li>\n<li><strong>Go to gateways<\/strong>.<\/li>\n<li>Click on button\u00a0<strong>+ Register gateway<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8823 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2025\/07\/RAK5146_KIT_LBS_2_3.png\" alt=\"\" width=\"667\" height=\"61\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2025\/07\/RAK5146_KIT_LBS_2_3.png 1233w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2025\/07\/RAK5146_KIT_LBS_2_3-300x27.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2025\/07\/RAK5146_KIT_LBS_2_3-1024x93.png 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2025\/07\/RAK5146_KIT_LBS_2_3-768x70.png 768w\" sizes=\"auto, (max-width: 667px) 100vw, 667px\" \/><\/li>\n<li>Write the previously detected <strong>Gateway EUI<\/strong> in the <strong>Gateway EUI field<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5544 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_3.png\" alt=\"RAK5146_KIT_LBS_3\" width=\"401\" height=\"244\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_3.png 693w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_3-300x183.png 300w\" sizes=\"auto, (max-width: 401px) 100vw, 401px\" \/><\/li>\n<li>Click on button\u00a0<strong>Confirm<\/strong>.<\/li>\n<li>Write something into <strong>Gateway ID<\/strong>.<\/li>\n<li>Write something into <strong>Gateway name<\/strong>.<\/li>\n<li>Frequency plan \u2013 <strong>Europe 863-870 MHz (SF9 for RX2 \u2013 recommended)<\/strong><\/li>\n<li>Click on button <strong>Register gateway<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5548 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_4.png\" alt=\"RAK5146_KIT_LBS_4\" width=\"400\" height=\"514\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_4.png 611w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_4-233x300.png 233w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<li>In <strong>API keys<\/strong> click on button <strong>+Add API key<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8824 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2025\/07\/RAK5146_KIT_LBS_5_3.png\" alt=\"\" width=\"602\" height=\"222\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2025\/07\/RAK5146_KIT_LBS_5_3.png 1229w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2025\/07\/RAK5146_KIT_LBS_5_3-300x111.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2025\/07\/RAK5146_KIT_LBS_5_3-1024x378.png 1024w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2025\/07\/RAK5146_KIT_LBS_5_3-768x284.png 768w\" sizes=\"auto, (max-width: 602px) 100vw, 602px\" \/><\/li>\n<li>Write something into <strong>Name<\/strong>.<\/li>\n<li>Click on <strong>Grant individual rights<\/strong>.<\/li>\n<li>Select <strong>Link as Gateway to a Gateway Server for traffic exchange, i.e. write uplink and read downlink<\/strong>.<\/li>\n<li>Click on button <strong>Create API key<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5626\" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_6-e1691494233842.png\" alt=\"RAK5146_KIT_LBS_6\" width=\"400\" height=\"546\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_6-e1691494233842.png 606w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_6-e1691494233842-220x300.png 220w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<li>Click the <strong>Copy to clipboard<\/strong> button and <strong>paste the key<\/strong> into some text document for future use.<\/li>\n<li>Click on button <strong>I have copied the key<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5559 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_7.png\" alt=\"RAK5146_KIT_LBS_7\" width=\"400\" height=\"357\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_7.png 928w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_7-300x267.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_7-768x684.png 768w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h4><strong>Raspberry Pi&#8217;s Interfaces<\/strong><\/h4>\n<ol>\n<li>Run the following command to configure the Raspberry Pi&#8217;s Interfaces:\n<pre>$ sudo raspi-config<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5569 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_8.png\" alt=\"RAK5146_KIT_LBS_8\" width=\"401\" height=\"201\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_8.png 947w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_8-300x150.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_8-768x384.png 768w\" sizes=\"auto, (max-width: 401px) 100vw, 401px\" \/><\/li>\n<li>In <strong>3 Interface Options<\/strong> -&gt; <strong>I4 SPI<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5570 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_9.png\" alt=\"RAK5146_KIT_LBS_9\" width=\"400\" height=\"204\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_9.png 952w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_9-300x153.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_9-768x392.png 768w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<li>Would you like the SPI interface to be enabled? -&gt; <strong>Yes<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5578 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_10.png\" alt=\"RAK5146_KIT_LBS_10\" width=\"400\" height=\"279\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_10.png 785w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_10-300x209.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_10-768x536.png 768w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<li><strong>Ok<\/strong>.<\/li>\n<li>In <strong>3 Interface Options<\/strong> -&gt; <strong>I5 I2C<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5580 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_11.png\" alt=\"RAK5146_KIT_LBS_11\" width=\"400\" height=\"206\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_11.png 971w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_11-300x154.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_11-768x395.png 768w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<li>Would you like the ARM I2C interface to be enabled? -&gt; <strong>Yes<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5583 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_12.png\" alt=\"RAK5146_KIT_LBS_12\" width=\"400\" height=\"285\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_12.png 784w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_12-300x214.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_12-768x548.png 768w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<li><strong>Ok<\/strong>.<\/li>\n<li>In <strong>3 Interface Options<\/strong> -&gt; <strong>I6 Serial Port<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5586 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_13.png\" alt=\"RAK5146_KIT_LBS_13\" width=\"400\" height=\"209\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_13.png 988w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_13-300x157.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_13-768x402.png 768w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<li>Would you like a login shell to be accessible over serial? -&gt; <strong>No<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5588 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_14.png\" alt=\"RAK5146_KIT_LBS_14\" width=\"400\" height=\"283\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_14.png 783w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_14-300x212.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_14-768x543.png 768w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<li>Would you like the serial port hardware to be enabled? -&gt; <strong>Yes<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5589 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_15.png\" alt=\"RAK5146_KIT_LBS_15\" width=\"400\" height=\"284\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_15.png 794w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_15-300x213.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_15-768x546.png 768w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<li><strong>Ok<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5590 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_16.png\" alt=\"RAK5146_KIT_LBS_16\" width=\"400\" height=\"285\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_16.png 785w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_16-300x214.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_16-768x547.png 768w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<li><strong>Finish<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5591 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_17.png\" alt=\"RAK5146_KIT_LBS_17\" width=\"400\" height=\"210\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_17.png 981w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_17-300x157.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_17-768x403.png 768w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_17-720x380.png 720w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<li>Would you like to reboot now? -&gt; <strong>Yes<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5592 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_18.png\" alt=\"RAK5146_KIT_LBS_18\" width=\"400\" height=\"283\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_18.png 783w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_18-300x212.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/08\/RAK5146_KIT_LBS_18-768x543.png 768w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h4><strong>LoRa Basics Station<\/strong><\/h4>\n<ol>\n<li>Connect again via SSH.<\/li>\n<li>Run this command to create and edit the <strong>docker-compose.yml<\/strong> file:\n<pre>$ sudo nano docker-compose.yml<\/pre>\n<\/li>\n<li>Copy and paste the configuration below into your <strong>docker-compose.yml<\/strong> file. Copy and paste the <strong>API key<\/strong> you got previously saved to the <strong>TC_KEY<\/strong> variable.\n<pre>version: '2.0'\r\nservices:\r\n  basicstation:\r\n      image: xoseperez\/basicstation:latest\r\n      container_name: basicstation\r\n      restart: unless-stopped\r\n      privileged: true\r\n      network_mode: host        # Required to read main interface MAC instead of virtual one\r\n      environment:\r\n        MODEL: \"RAK5146\"\r\n        TC_KEY: \"NNSXS....\"     # Copy here your API key from the TTS\r\n        USE_LIBGPIOD: 1<\/pre>\n<\/li>\n<li>Run this command to pull the image from the Docker Hub:\n<pre>$ sudo docker compose pull<\/pre>\n<\/li>\n<li>Now, you can start it <strong>running in the background<\/strong> with the following command:\n<pre>$ sudo docker compose up -d<\/pre>\n<\/li>\n<li>Finaly, check that the gateway status is <strong>Connected<\/strong> in the <strong>TTS console<\/strong>.<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>For more information on <strong>LoRa Basics\u2122 Station for Docker<\/strong>, see:<\/p>\n<ul>\n<li><strong><a href=\"https:\/\/github.com\/RAKWireless\/basicstation\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/RAKWireless\/basicstation<\/a><\/strong><\/li>\n<li><a href=\"https:\/\/hub.docker.com\/r\/xoseperez\/basicstation\" target=\"_blank\" rel=\"noopener\"><strong>https:\/\/hub.docker.com\/r\/xoseperez\/basicstation<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/news.rakwireless.com\/basics-station-on-rak-wisgate-developer-gateways\/\" target=\"_blank\" rel=\"noopener\"><strong>https:\/\/news.rakwireless.com\/basics-station-on-rak-wisgate-developer-gateways\/<\/strong><\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>TTN version: TTNv3 \/ TTS SANDBOX Frequency: Europe 863-870 MHz (SF9 for RX2 &#8211; recommended) Classes: Ready for LoRaWAN Classes A, B and C Using Docker: Yes Last updated: July 20, 2025 This article provides instructions for making LoRa Basics Station using Raspberry Pi 3 or 4 and RAK5146 PiHAT Kit for LoRaWAN. Note: The [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-5499","page","type-page","status-publish","hentry","post"],"_links":{"self":[{"href":"https:\/\/lora.vsb.cz\/index.php\/wp-json\/wp\/v2\/pages\/5499","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lora.vsb.cz\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/lora.vsb.cz\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/lora.vsb.cz\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/lora.vsb.cz\/index.php\/wp-json\/wp\/v2\/comments?post=5499"}],"version-history":[{"count":120,"href":"https:\/\/lora.vsb.cz\/index.php\/wp-json\/wp\/v2\/pages\/5499\/revisions"}],"predecessor-version":[{"id":8917,"href":"https:\/\/lora.vsb.cz\/index.php\/wp-json\/wp\/v2\/pages\/5499\/revisions\/8917"}],"wp:attachment":[{"href":"https:\/\/lora.vsb.cz\/index.php\/wp-json\/wp\/v2\/media?parent=5499"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}