{"id":4039,"date":"2023-02-22T10:42:21","date_gmt":"2023-02-22T10:42:21","guid":{"rendered":"https:\/\/lora.vsb.cz\/?page_id=4039"},"modified":"2024-12-15T10:37:51","modified_gmt":"2024-12-15T10:37:51","slug":"downlink-reception-and-cayenne-lpp-decoding","status":"publish","type":"page","link":"https:\/\/lora.vsb.cz\/index.php\/downlink-reception-and-cayenne-lpp-decoding\/","title":{"rendered":"Downlink reception and Cayenne LPP decoding"},"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>Board:<\/strong><\/td>\n<td>Adafruit Feather M0<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left; min-width: 100px;\" width=\"10%\"><strong>Activation:<\/strong><\/td>\n<td>OTAA \/ ABP<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left; min-width: 100px;\" width=\"10%\"><strong>Device Class:<\/strong><\/td>\n<td>Class A<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left; min-width: 100px;\" width=\"10%\"><strong>Last revision:<\/strong><\/td>\n<td>December 14, 2024<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>This article provides instructions for <strong>downlink reception<\/strong> and <strong>Cayenne LPP format decoding<\/strong> using <strong>Adafruit Feather M0 RFM95 LoRa Radio<\/strong>. If you haven\u2019t set up Adafruit Feather M0 yet, check out our<strong>\u00a0<a href=\"http:\/\/lora.vsb.cz\/index.php\/adafruit-feather-m0\/\" target=\"_blank\" rel=\"noopener\">Adafruit Feather M0 tutorial<\/a><\/strong>.<\/p>\n<p>&nbsp;<\/p>\n<h2><span style=\"color: #189bd6;\"><strong>Prepare<\/strong><\/span><\/h2>\n<ul>\n<li>Adafruit Feather M0 with RFM95 LoRa Radio &#8211; 900 MHz<\/li>\n<li>1x wire<\/li>\n<li>breadboard (optional)<\/li>\n<li>PC + micro USB cable<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2><strong><span style=\"color: #800000;\">Fair Use Policy<\/span><\/strong><\/h2>\n<h6><strong>The <a href=\"https:\/\/www.thethingsnetwork.org\/docs\/lorawan\/duty-cycle\/#fair-use-policy\" target=\"_blank\" rel=\"noopener\">TTN documentation<\/a> says about Fair Use Policy:<\/strong><\/h6>\n<p>On The Things Network\u2019s public community network a\u00a0<strong>Fair Use Policy<\/strong>\u00a0applies which limits the\u00a0uplink airtime\u00a0to\u00a030 seconds per day (24 hours) per node\u00a0and the\u00a0<strong>downlink messages<\/strong>\u00a0to\u00a0<strong>10 messages per day (24 hours) per node<\/strong>. If you use a private network, these limits do not apply, but you still have to be compliant with the governmental and LoRaWAN limits.<\/p>\n<p><span style=\"color: #ff0000;\">Note: Don&#8217;t send more than 10 downlinks per day per node.<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2><strong><span style=\"color: #800000;\">Downlinks &#8211; <\/span><\/strong><strong><span style=\"color: #800000;\">Device Class A<\/span><\/strong><\/h2>\n<p>End-devices of Class A allow for bi-directional communications whereby each end-device\u2019s uplink transmission is followed by two short downlink receive windows. The transmission slot scheduled by the end-device is based on its own communication needs with a small variation based on a random time basis (ALOHA-type of protocol). This Class A operation is the lowest power end-device system for applications that only require downlink communication from the server shortly after the end-device has sent an uplink transmission. Downlink communications from the server at any other time will have to wait until the next scheduled uplink.<\/p>\n<p>See the <a href=\"https:\/\/www.thethingsnetwork.org\/docs\/lorawan\/classes\/\" target=\"_blank\" rel=\"noopener\"><strong>documentation<\/strong><\/a> for more information on device classes.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong><span style=\"color: #800000;\">Assembly<\/span><\/strong><\/h2>\n<p>Wire up the <strong>Adafruit Feather M0&#8217;s IO1 pin<\/strong> with <strong>pin 6<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2232 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/06\/AFM0_Assembly.png\" alt=\"Adafruit Feather M0 assembly\" width=\"350\" height=\"265\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/06\/AFM0_Assembly.png 600w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2022\/06\/AFM0_Assembly-300x227.png 300w\" sizes=\"auto, (max-width: 350px) 100vw, 350px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2><span style=\"color: #800000;\"><strong>Printing decoded downlinks to Serial Monitor<\/strong><\/span><\/h2>\n<ol>\n<li>Copy and paste one of the programs bellow (based on your chosen activation method, <strong>OTAA<\/strong> or <strong>ABP<\/strong>) into your Arduino IDE:\n<ul>\n<li><a href=\"https:\/\/github.com\/OndrejKnebl\/TTNv3-LoRaVSB\/blob\/main\/Receiving_and_decoding_downlinks\/OTAA_Receiving_and_decoding_downlinks\/OTAA_Receiving_and_decoding_downlinks.ino\" target=\"_blank\" rel=\"noopener\"><strong>OTAA_Receiving_and_decoding_downlinks<\/strong><\/a>\n<ul>\n<li>In OTAA program replace <strong>APPEUI<\/strong>,\u00a0<strong>DEVEUI<\/strong>\u00a0and\u00a0<strong>APPKEY<\/strong>\u00a0with keys in TTS. Keys are in\u00a0<strong>TTS -&gt; Applications -&gt; YourAppName -&gt; YourEndDeviceName -&gt; Overview -&gt; Activation information<\/strong>.<\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/github.com\/OndrejKnebl\/TTNv3-LoRaVSB\/blob\/main\/Receiving_and_decoding_downlinks\/ABP_Receiving_and_decoding_downlinks\/ABP_Receiving_and_decoding_downlinks.ino\" target=\"_blank\" rel=\"noopener\"><strong>ABP_Receiving_and_decoding_downlinks<\/strong><\/a>\n<ul>\n<li>In ABP program replace\u00a0<strong>NWKSKEY<\/strong>,\u00a0<strong>APPSKEY<\/strong>\u00a0and\u00a0<strong>DEVADDR<\/strong>\u00a0with keys of your end device registred in TTS. Keys are in\u00a0<strong>TTS -&gt; Applications -&gt; YourAppName -&gt; YourEndDeviceName -&gt; Overview -&gt; Session information<\/strong>.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Connect Adafruit Feather M0 using micro USB cable to your computer.<\/li>\n<li>In Arduino IDE click on\u00a0<strong>Upload<\/strong> button to upload program to your Adafruit Feather M0.<\/li>\n<li><span style=\"color: #000000;\">In Arduino IDE click on <strong>Serial Monitor <\/strong>button.<\/span><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h2><span style=\"color: #800000;\"><strong>Sending downlink from TTS<\/strong><\/span><\/h2>\n<ol>\n<li>In <strong>TTS -&gt; Applications -&gt; YourAppName -&gt; YourEndDeviceName -&gt; Messaging -&gt; Downlink <\/strong>write<strong> 010001<\/strong> to<strong> Payload<\/strong> field (channel 01, type 00 (Digital Input), value 01).<\/li>\n<li>Click on button <strong>Schedule downlink<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8404 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2024\/12\/TTS_Downlink_Schedule.png\" alt=\"\" width=\"650\" height=\"472\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2024\/12\/TTS_Downlink_Schedule.png 953w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2024\/12\/TTS_Downlink_Schedule-300x218.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2024\/12\/TTS_Downlink_Schedule-768x558.png 768w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/li>\n<li>After sending the uplink and receiving the downlink by Feather, you should see the following in <strong>Serial Monitor<\/strong>:<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-4082 \" src=\"http:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/02\/tts_downlink_decoded.png\" alt=\"\" width=\"649\" height=\"380\" srcset=\"https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/02\/tts_downlink_decoded.png 892w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/02\/tts_downlink_decoded-300x176.png 300w, https:\/\/lora.vsb.cz\/wp-content\/uploads\/2023\/02\/tts_downlink_decoded-768x449.png 768w\" sizes=\"auto, (max-width: 649px) 100vw, 649px\" \/><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h2><span style=\"color: #800000;\"><strong>Sending downlinks in a different way<\/strong><\/span><\/h2>\n<p>If you want to send downlinks in a different way, continue with the following tutorials:<\/p>\n<ul>\n<li><strong><a href=\"https:\/\/lora.vsb.cz\/index.php\/sending-downlinks-via-tts-using-a-python-script\" target=\"_blank\" rel=\"noopener\">Sending downlinks via TTS using a Python script<\/a><\/strong><\/li>\n<li><strong><a href=\"https:\/\/lora.vsb.cz\/index.php\/grafana-panel-plugin-for-sending-downlinks\/\" target=\"_blank\" rel=\"noopener\">Grafana panel plugin (for sending downlinks)<\/a><\/strong><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>TTN version: TTNv3 \/ TTS SANDBOX Board: Adafruit Feather M0 Activation: OTAA \/ ABP Device Class: Class A Last revision: December 14, 2024 This article provides instructions for downlink reception and Cayenne LPP format decoding using Adafruit Feather M0 RFM95 LoRa Radio. If you haven\u2019t set up Adafruit Feather M0 yet, check out our\u00a0Adafruit Feather [&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-4039","page","type-page","status-publish","hentry","post"],"_links":{"self":[{"href":"https:\/\/lora.vsb.cz\/index.php\/wp-json\/wp\/v2\/pages\/4039","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=4039"}],"version-history":[{"count":39,"href":"https:\/\/lora.vsb.cz\/index.php\/wp-json\/wp\/v2\/pages\/4039\/revisions"}],"predecessor-version":[{"id":8423,"href":"https:\/\/lora.vsb.cz\/index.php\/wp-json\/wp\/v2\/pages\/4039\/revisions\/8423"}],"wp:attachment":[{"href":"https:\/\/lora.vsb.cz\/index.php\/wp-json\/wp\/v2\/media?parent=4039"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}