{"id":416,"date":"2026-06-11T10:15:52","date_gmt":"2026-06-11T02:15:52","guid":{"rendered":"https:\/\/projectleon.net\/make\/blog\/lorawan-ttn-iot-sensor-connection-farsi\/"},"modified":"2026-06-11T10:15:53","modified_gmt":"2026-06-11T02:15:53","slug":"lorawan-ttn-iot-sensor-connection-farsi","status":"publish","type":"post","link":"https:\/\/projectleon.net\/make\/blog\/lorawan-ttn-iot-sensor-connection-farsi\/","title":{"rendered":"\u0631\u0627\u0647\u0646\u0645\u0627\u06cc LoRaWAN \u0648 TTN: \u0627\u062a\u0635\u0627\u0644 \u0633\u0646\u0633\u0648\u0631 IoT \u0628\u0647 \u0634\u0628\u06a9\u0647 \u0628\u06cc\u200c\u0633\u06cc\u0645 \u0645\u0644\u06cc (\u0641\u0627\u0631\u0633\u06cc)"},"content":{"rendered":"<div class='hero-image-container' style='margin-bottom:28px;border-radius:14px;overflow:hidden;box-shadow:0 4px 18px rgba(0,0,0,0.08)'>\n<img src='https:\/\/projectleon.net\/make\/wp-content\/uploads\/2026\/06\/post35-lorawan-ttn.jpg' alt='LoRaWAN TTN IoT \u0634\u0628\u06a9\u0647 \u0628\u06cc\u200c\u0633\u06cc\u0645' style='width:100%;height:auto;display:block' loading='eager'\/>\n<\/div>\n<div class='beginner-intro' style='background:#f0f7ff;border-right:4px solid #2e5fb6;padding:16px 20px;border-radius:10px;margin-bottom:22px'>\n<h2 style='margin-top:0'>LoRaWAN \u0648 TTN \u06cc\u0639\u0646\u06cc \u0686\u0647\u061f (\u0628\u0631\u0627\u06cc \u0645\u0628\u062a\u062f\u06cc)<\/h2>\n<p><strong>LoRa<\/strong> \u06cc\u06a9 \u062a\u06a9\u0646\u0648\u0644\u0648\u0698\u06cc \u0631\u0627\u062f\u06cc\u0648\u06cc\u06cc \u06a9\u0645\u200c\u0645\u0635\u0631\u0641 \u0628\u0627 \u0628\u0631\u062f \u0628\u0644\u0646\u062f \u0627\u0633\u062a. <strong>LoRaWAN<\/strong> (LoRa Wide Area Network) \u06cc\u06a9 \u067e\u0631\u0648\u062a\u06a9\u0644 \u0634\u0628\u06a9\u0647 \u0627\u0633\u062a \u06a9\u0647 \u0628\u0631 \u067e\u0627\u06cc\u0647 LoRa \u0633\u0627\u062e\u062a\u0647 \u0634\u062f\u0647 \u2014 \u0645\u062b\u0644 \u0631\u0627\u0628\u0637\u0647 Ethernet \u0628\u0627 WiFi. \u0628\u0627 LoRaWAN \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0647\u0632\u0627\u0631\u0627\u0646 \u0633\u0646\u0633\u0648\u0631 \u0631\u0627 \u0628\u0647 \u06cc\u06a9 \u0634\u0628\u06a9\u0647 \u0645\u062a\u0635\u0644 \u06a9\u0631\u062f \u06a9\u0647 \u062f\u0627\u062f\u0647\u200c\u0647\u0627 \u0631\u0627 \u0627\u0632 \u0637\u0631\u06cc\u0642 \u062f\u0631\u0648\u0627\u0632\u0647\u200c\u0647\u0627\u06cc (Gateway) \u0627\u06cc\u0646\u062a\u0631\u0646\u062a\u06cc \u0628\u0647 \u0633\u0631\u0648\u0631 \u0627\u0628\u0631\u06cc \u0645\u06cc\u200c\u0641\u0631\u0633\u062a\u0646\u062f.<\/p>\n<p><strong>TTN<\/strong> (The Things Network) \u06cc\u06a9 \u0634\u0628\u06a9\u0647 LoRaWAN \u0639\u0645\u0648\u0645\u06cc \u0631\u0627\u06cc\u06af\u0627\u0646 \u0627\u0633\u062a \u06a9\u0647 \u062f\u0631 \u0628\u0633\u06cc\u0627\u0631\u06cc \u0627\u0632 \u0634\u0647\u0631\u0647\u0627\u06cc \u062c\u0647\u0627\u0646 Gateway \u062f\u0627\u0631\u062f. \u062d\u062a\u06cc \u0627\u06af\u0631 Gateway \u062f\u0631 \u0634\u0647\u0631 \u0634\u0645\u0627 \u0646\u0628\u0627\u0634\u062f\u060c \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u06cc\u06a9 Gateway \u0627\u0631\u0632\u0627\u0646\u200c\u0642\u06cc\u0645\u062a (\u0645\u062b\u0644 RAK2287) \u0646\u0635\u0628 \u06a9\u0646\u06cc\u062f \u0648 \u0628\u0627 TTN \u0645\u062a\u0635\u0644 \u0634\u0648\u06cc\u062f. <strong>OTAA<\/strong> (Over-The-Air Activation) \u0631\u0648\u0634 \u0627\u0645\u0646\u200c\u062a\u0631 \u0627\u062a\u0635\u0627\u0644 \u0627\u0633\u062a \u2014 \u0647\u0631 \u0628\u0627\u0631 \u06cc\u06a9 \u06a9\u0644\u06cc\u062f \u062c\u062f\u06cc\u062f \u062a\u0648\u0644\u06cc\u062f \u0645\u06cc\u200c\u0634\u0648\u062f.<\/p>\n<p>\u0628\u0631\u0627\u06cc \u067e\u0647\u067e\u0627\u062f \u0648 UGV\u060c LoRaWAN \u0628\u0631\u0627\u06cc \u0627\u0631\u0633\u0627\u0644 Telemetry \u0628\u0647 \u0633\u0631\u0648\u0631 \u0645\u0631\u06a9\u0632\u06cc \u0628\u062f\u0648\u0646 \u0646\u06cc\u0627\u0632 \u0628\u0647 SIM \u0628\u0633\u06cc\u0627\u0631 \u0645\u0646\u0627\u0633\u0628 \u0627\u0633\u062a.<\/p>\n<\/div>\n<div style='border:1px solid #d8d8d8;padding:18px 20px;border-radius:12px;background:#fafafa;margin-bottom:22px'>\n<h2 style='margin-top:0'>\u0645\u062d\u0635\u0648\u0644\u06cc \u06a9\u0647 \u0645\u06cc\u200c\u0633\u0627\u0632\u06cc\u062f<\/h2>\n<p>\u06cc\u06a9 \u0633\u0646\u0633\u0648\u0631 \u062f\u0645\u0627\/\u0631\u0637\u0648\u0628\u062a \u06a9\u0647 \u062f\u0627\u062f\u0647\u200c\u0647\u0627 \u0631\u0627 \u0647\u0631 \u06f5 \u062f\u0642\u06cc\u0642\u0647 \u0627\u0632 \u0637\u0631\u06cc\u0642 LoRaWAN \u0628\u0647 TTN \u0627\u0631\u0633\u0627\u0644 \u0645\u06cc\u200c\u06a9\u0646\u062f.<\/p>\n<ul>\n<li><strong>\u0632\u0645\u0627\u0646 \u0631\u0627\u0647\u200c\u0627\u0646\u062f\u0627\u0632\u06cc:<\/strong> \u06f3 \u062a\u0627 \u06f5 \u0633\u0627\u0639\u062a<\/li>\n<li><strong>\u0647\u0632\u06cc\u0646\u0647:<\/strong> \u06f8\u06f0\u06f0 \u0647\u0632\u0627\u0631 \u062a\u0627 \u06f1.\u06f5 \u0645\u06cc\u0644\u06cc\u0648\u0646 \u062a\u0648\u0645\u0627\u0646<\/li>\n<li><strong>\u0628\u0631\u062f:<\/strong> \u062a\u0627 \u06f1\u06f5 \u06a9\u06cc\u0644\u0648\u0645\u062a\u0631 (\u0628\u0633\u062a\u0647 \u0628\u0647 Gateway)<\/li>\n<\/ul>\n<\/div>\n<p><svg viewBox='0 0 860 230' width='100%' xmlns='http:\/\/www.w3.org\/2000\/svg' style='background:#fff;border:1px solid #e0e0e0;border-radius:12px;margin-bottom:22px'>\n<rect x='30' y='85' width='150' height='70' rx='12' fill='#8bd3dd' stroke='#1f6f78' stroke-width='2'\/>\n<rect x='250' y='85' width='150' height='70' rx='12' fill='#f7d794' stroke='#a06d00' stroke-width='2'\/>\n<rect x='470' y='85' width='150' height='70' rx='12' fill='#b7e4a0' stroke='#3a7a1e' stroke-width='2'\/>\n<rect x='680' y='85' width='150' height='70' rx='12' fill='#e8f4ff' stroke='#3a60c0' stroke-width='2'\/>\n<line x1='180' y1='120' x2='250' y2='120' stroke='#555' stroke-width='2' stroke-dasharray='5,3'\/>\n<line x1='400' y1='120' x2='470' y2='120' stroke='#555' stroke-width='2'\/>\n<line x1='620' y1='120' x2='680' y2='120' stroke='#555' stroke-width='2'\/>\n<text x='105' y='115' text-anchor='middle' font-size='13' font-family='Tahoma'>Node<\/text>\n<text x='105' y='132' text-anchor='middle' font-size='11' font-family='Tahoma'>DHT22+LoRa<\/text>\n<text x='325' y='115' text-anchor='middle' font-size='13' font-family='Tahoma'>Gateway<\/text>\n<text x='325' y='132' text-anchor='middle' font-size='11' font-family='Tahoma'>RAK\/Dragino<\/text>\n<text x='545' y='115' text-anchor='middle' font-size='13' font-family='Tahoma'>TTN Server<\/text>\n<text x='545' y='132' text-anchor='middle' font-size='11' font-family='Tahoma'>\u0627\u0628\u0631 \u0631\u0627\u06cc\u06af\u0627\u0646<\/text>\n<text x='755' y='115' text-anchor='middle' font-size='13' font-family='Tahoma'>Dashboard<\/text>\n<text x='755' y='132' text-anchor='middle' font-size='11' font-family='Tahoma'>Grafana\/Node-RED<\/text>\n<text x='430' y='200' text-anchor='middle' font-size='13' font-family='Tahoma' fill='#888'>LoRaWAN Stack \u2014 Node \u2192 Gateway \u2192 TTN \u2192 Dashboard<\/text>\n<\/svg><\/p>\n<h2>\u0645\u0631\u0627\u062d\u0644 \u062b\u0628\u062a\u200c\u0646\u0627\u0645 \u062f\u0631 TTN<\/h2>\n<pre style='background:#1e1e1e;color:#d4d4d4;padding:16px;border-radius:10px;overflow-x:auto;font-size:13px'><code>\n\/\/ \u06f1. \u062d\u0633\u0627\u0628 \u06a9\u0627\u0631\u0628\u0631\u06cc \u062f\u0631 https:\/\/www.thethingsnetwork.org \u0628\u0633\u0627\u0632\u06cc\u062f\n\/\/ \u06f2. \u06cc\u06a9 Application \u062c\u062f\u06cc\u062f \u0628\u0633\u0627\u0632\u06cc\u062f\n\/\/ \u06f3. \u06cc\u06a9 End Device \u062b\u0628\u062a \u06a9\u0646\u06cc\u062f:\n\/\/    - Brand: HELTEC \/ Dragino \/ RAK \/ \u06cc\u0627 Manual Entry\n\/\/    - Activation Mode: OTAA\n\/\/    - LoRaWAN Version: MAC V1.0.3\n\/\/    - Frequency Plan: EU_863_870 \u06cc\u0627 AS_923 (\u0628\u0633\u062a\u0647 \u0628\u0647 \u0645\u0627\u0698\u0648\u0644)\n\/\/ \u06f4. \u06a9\u0644\u06cc\u062f\u0647\u0627\u06cc \u062a\u0648\u0644\u06cc\u062f\u0634\u062f\u0647 \u0631\u0627 \u06a9\u067e\u06cc \u06a9\u0646\u06cc\u062f:\n\/\/    - Device EUI (deveui) \u2014 \u06f1\u06f6 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 hex\n\/\/    - App EUI (appeui) \u2014 \u06f1\u06f6 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 hex\n\/\/    - App Key (appkey) \u2014 \u06f3\u06f2 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 hex\n<\/code><\/pre>\n<h2>\u06a9\u062f Arduino OTAA \u0628\u0627 LMIC<\/h2>\n<pre style='background:#1e1e1e;color:#d4d4d4;padding:18px;border-radius:10px;overflow-x:auto;font-size:13px'><code class='language-cpp'>\n#include &lt;lmic.h&gt;\n#include &lt;hal\/hal.h&gt;\n#include &lt;DHT.h&gt;\n\n\/\/ \u06a9\u0644\u06cc\u062f\u0647\u0627\u06cc OTAA \u0627\u0632 TTN Console (LSB order)\nstatic const u1_t PROGMEM APPEUI[8] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };\nvoid os_getArtEui(u1_t* buf) { memcpy_P(buf,APPEUI,8); }\nstatic const u1_t PROGMEM DEVEUI[8] = { \/* \u0627\u0632 TTN *\/ };\nvoid os_getDevEui(u1_t* buf) { memcpy_P(buf,DEVEUI,8); }\nstatic const u1_t PROGMEM APPKEY[16] = { \/* \u0627\u0632 TTN *\/ };\nvoid os_getDevKey(u1_t* buf) { memcpy_P(buf,APPKEY,16); }\n\nDHT dht(4, DHT22);\nstatic osjob_t sendjob;\nconst lmic_pinmap lmic_pins = { .nss=10, .rxtx=LMIC_UNUSED_PIN, .rst=9, .dio={2,6,7} };\n\nvoid do_send(osjob_t* j) {\n  float temp = dht.readTemperature();\n  float hum  = dht.readHumidity();\n  uint8_t payload[4];\n  int16_t t100 = (int16_t)(temp * 100);\n  uint16_t h100 = (uint16_t)(hum * 100);\n  payload[0] = t100 >> 8;   payload[1] = t100 & 0xFF;\n  payload[2] = h100 >> 8;   payload[3] = h100 & 0xFF;\n  LMIC_setTxData2(1, payload, sizeof(payload), 0);\n}\n\nvoid onEvent(ev_t ev) {\n  if (ev == EV_JOINED) { LMIC_setAdrMode(0); do_send(&sendjob); }\n  if (ev == EV_TXCOMPLETE) { os_setTimedCallback(&sendjob, os_getTime()+sec2osticks(300), do_send); }\n}\n\nvoid setup() { os_init(); LMIC_reset(); LMIC_startJoining(); dht.begin(); }\nvoid loop()  { os_runloop_once(); }\n<\/code><\/pre>\n<h2>\u0686\u06a9\u200c\u0644\u06cc\u0633\u062a \u0631\u0627\u0647\u200c\u0627\u0646\u062f\u0627\u0632\u06cc<\/h2>\n<table style='width:100%;border-collapse:collapse;margin-bottom:18px'>\n<thead>\n<tr style='background:#e8f0fe'>\n<th style='padding:9px;border:1px solid #ddd;text-align:right'>\u0645\u0631\u062d\u0644\u0647<\/th>\n<th style='padding:9px;border:1px solid #ddd;text-align:right'>\u0648\u0636\u0639\u06cc\u062a<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style='padding:8px;border:1px solid #ddd'>Device \u062f\u0631 TTN \u062b\u0628\u062a \u0634\u062f\u0647\u061f<\/td>\n<td style='padding:8px;border:1px solid #ddd'>\u2610<\/td>\n<\/tr>\n<tr style='background:#fafafa'>\n<td style='padding:8px;border:1px solid #ddd'>\u06a9\u0644\u06cc\u062f\u0647\u0627\u06cc EUI \u0648 AppKey \u062f\u0631 \u06a9\u062f \u0642\u0631\u0627\u0631 \u062f\u0627\u062f\u0647 \u0634\u062f\u0647\u061f<\/td>\n<td style='padding:8px;border:1px solid #ddd'>\u2610<\/td>\n<\/tr>\n<tr>\n<td style='padding:8px;border:1px solid #ddd'>OTAA Join \u0645\u0648\u0641\u0642 \u0628\u0648\u062f\u0647\u061f (Serial: EV_JOINED)<\/td>\n<td style='padding:8px;border:1px solid #ddd'>\u2610<\/td>\n<\/tr>\n<tr style='background:#fafafa'>\n<td style='padding:8px;border:1px solid #ddd'>\u062f\u0627\u062f\u0647 \u062f\u0631 TTN Live Data \u062f\u06cc\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f\u061f<\/td>\n<td style='padding:8px;border:1px solid #ddd'>\u2610<\/td>\n<\/tr>\n<tr>\n<td style='padding:8px;border:1px solid #ddd'>Payload Decoder \u062a\u0646\u0638\u06cc\u0645 \u0634\u062f\u0647\u061f<\/td>\n<td style='padding:8px;border:1px solid #ddd'>\u2610<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><svg viewBox='0 0 860 190' width='100%' xmlns='http:\/\/www.w3.org\/2000\/svg' style='background:#fff;border:1px solid #e0e0e0;border-radius:12px;margin-bottom:22px'>\n<rect x='40' y='60' width='360' height='80' rx='14' fill='#e8f4ff' stroke='#3a60c0' stroke-width='2'\/>\n<rect x='460' y='60' width='360' height='80' rx='14' fill='#b7e4a0' stroke='#3a7a1e' stroke-width='2'\/>\n<text x='220' y='95' text-anchor='middle' font-size='14' font-family='Tahoma'>Node LoRaWAN<\/text>\n<text x='220' y='115' text-anchor='middle' font-size='12' font-family='Tahoma'>\u0647\u0631 \u06f5 \u062f\u0642\u06cc\u0642\u0647 \u2192 \u0627\u0631\u0633\u0627\u0644 \u062f\u0645\u0627\/\u0631\u0637\u0648\u0628\u062a<\/text>\n<text x='640' y='95' text-anchor='middle' font-size='14' font-family='Tahoma'>TTN Dashboard<\/text>\n<text x='640' y='115' text-anchor='middle' font-size='12' font-family='Tahoma'>\u06af\u0631\u0627\u0641 \u0632\u0646\u062f\u0647 \u2014 Node-RED\/Grafana<\/text>\n<text x='430' y='170' text-anchor='middle' font-size='13' font-family='Tahoma' fill='#888'>LoRaWAN OTAA \u2014 \u0627\u0645\u0646\u200c\u062a\u0631\u06cc\u0646 \u0631\u0648\u0634 \u0627\u062a\u0635\u0627\u0644 \u0628\u0647 \u0634\u0628\u06a9\u0647 LoRa<\/text>\n<\/svg><\/p>\n<h2>\u0648\u06cc\u062f\u0626\u0648\u0647\u0627\u06cc \u0622\u0645\u0648\u0632\u0634\u06cc<\/h2>\n<div style='display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:18px;margin:20px 0'>\n<iframe width='100%' height='315' src='https:\/\/www.youtube.com\/embed\/duwUwXt-hs8' title='LoRaWAN TTN OTAA Tutorial' frameborder='0' allow='accelerometer;autoplay;clipboard-write;encrypted-media;gyroscope;picture-in-picture' allowfullscreen><\/iframe><br \/>\n<iframe width='100%' height='315' src='https:\/\/www.youtube.com\/embed\/JAb5kkQQ-k8' title='The Things Network Getting Started' frameborder='0' allow='accelerometer;autoplay;clipboard-write;encrypted-media;gyroscope;picture-in-picture' allowfullscreen><\/iframe>\n<\/div>\n<h2>\u0645\u0646\u0627\u0628\u0639 \u0628\u06cc\u0634\u062a\u0631<\/h2>\n<ul>\n<li><a href='https:\/\/www.aparat.com\/result\/LoRaWAN_TTN_%D8%A2%D9%85%D9%88%D8%B2%D8%B4' target='_blank'>\u0622\u067e\u0627\u0631\u0627\u062a: LoRaWAN TTN \u0641\u0627\u0631\u0633\u06cc<\/a><\/li>\n<li><a href='https:\/\/www.thethingsnetwork.org\/docs\/' target='_blank'>TTN Documentation<\/a><\/li>\n<li><a href='https:\/\/github.com\/mcci-catena\/arduino-lmic' target='_blank'>Arduino LMIC Library<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u0622\u0645\u0648\u0632\u0634 \u0627\u062a\u0635\u0627\u0644 \u0645\u0627\u0698\u0648\u0644 LoRaWAN OTAA \u0628\u0647 The Things Network (TTN)\u061b \u0627\u0631\u0633\u0627\u0644 \u062f\u0627\u062f\u0647 \u0633\u0646\u0633\u0648\u0631 \u062f\u0645\u0627 \u0648 \u0631\u0637\u0648\u0628\u062a \u0628\u0647 \u0627\u0628\u0631\u060c \u062a\u0646\u0638\u06cc\u0645 Device EUI\u060c \u062f\u0631\u06cc\u0627\u0641\u062a Payload.<\/p>\n","protected":false},"author":1,"featured_media":415,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"pagelayer_contact_templates":[],"_pagelayer_content":"","footnotes":""},"categories":[19],"tags":[178,22,158,175,177,176,50,110],"class_list":["post-416","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials-2","tag-abp","tag-esp32","tag-iot","tag-lorawan","tag-otaa","tag-ttn","tag-50","tag-110"],"_links":{"self":[{"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/posts\/416","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/comments?post=416"}],"version-history":[{"count":1,"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/posts\/416\/revisions"}],"predecessor-version":[{"id":417,"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/posts\/416\/revisions\/417"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/media\/415"}],"wp:attachment":[{"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/media?parent=416"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/categories?post=416"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/projectleon.net\/make\/wp-json\/wp\/v2\/tags?post=416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}