This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| project:lora_nodes [2018/02/28 10:01] – [Spremi primjer] dp | project:lora_nodes [2018/05/11 10:54] (current) – dp | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== LoRa TTN node setup ====== | ====== LoRa TTN node setup ====== | ||
| + | Osnovni setup za LoRa TTN nodes... za Heltec i TTGO module, al vjerojatno i za druge. | ||
| ===== Arduino i podrška za ESP32 ===== | ===== Arduino i podrška za ESP32 ===== | ||
| Line 47: | Line 48: | ||
| // the bytes. For TTN issued EUIs the last bytes should be 0xD5, 0xB3, | // the bytes. For TTN issued EUIs the last bytes should be 0xD5, 0xB3, | ||
| // 0x70. | // 0x70. | ||
| - | static const u1_t PROGMEM APPEUI[8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0xD5, 0xB3, 0x70 }; | + | static const u1_t PROGMEM APPEUI[8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; |
| void os_getArtEui (u1_t* buf) { | void os_getArtEui (u1_t* buf) { | ||
| memcpy_P(buf, | memcpy_P(buf, | ||
| Line 53: | Line 54: | ||
| | | ||
| // This should also be in little endian format, see above. | // This should also be in little endian format, see above. | ||
| - | static const u1_t PROGMEM DEVEUI[8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xCE, 0x00 }; | + | static const u1_t PROGMEM DEVEUI[8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; |
| void os_getDevEui (u1_t* buf) { | void os_getDevEui (u1_t* buf) { | ||
| memcpy_P(buf, | memcpy_P(buf, | ||
| Line 62: | Line 63: | ||
| // practice, a key taken from ttnctl can be copied as-is. | // practice, a key taken from ttnctl can be copied as-is. | ||
| // The key shown here is the semtech default key. | // The key shown here is the semtech default key. | ||
| - | static const u1_t PROGMEM APPKEY[16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0xB4, 0x09, 0x43, 0xFB, 0x40, 0xB9, 0xA8, 0x6C, 0xD2 }; | + | static const u1_t PROGMEM APPKEY[16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; |
| void os_getDevKey (u1_t* buf) { | void os_getDevKey (u1_t* buf) { | ||
| memcpy_P(buf, | memcpy_P(buf, | ||
| Line 71: | Line 72: | ||
| | | ||
| // LoRaWAN NwkSKey, network session key (msb) | // LoRaWAN NwkSKey, network session key (msb) | ||
| - | static const PROGMEM u1_t NWKSKEY[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2F, 0xB0, 0xBF, 0x76, 0x5E, 0xFA, 0x69, 0xBC, 0xF8, 0x9C }; | + | static const PROGMEM u1_t NWKSKEY[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; |
| | | ||
| // LoRaWAN AppSKey, application session key (msb) | // LoRaWAN AppSKey, application session key (msb) | ||
| - | static const u1_t PROGMEM APPSKEY[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xCA, 0xAA, 0x09, 0xF5, 0xF3, 0xBE, 0x48, 0xA6, 0x1F, 0xE5 }; | + | static const u1_t PROGMEM APPSKEY[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; |
| | | ||
| // LoRaWAN end-device address (DevAddr) | // LoRaWAN end-device address (DevAddr) | ||
| Line 287: | Line 288: | ||
| </ | </ | ||
| - | ==== Koprija | + | ==== Za ABP mode ==== |
| - | + | Za korištenje APB u settinzima devicea na TTNu treba označiti APB te će onda biti prikazani i network session key i app session key (kopiraju se u defaultnom '' | |
| + | |||
| + | ==== Za OTTA mode ==== | ||
| + | OTAA mode (sa joinanjem) se enejbla otkomentiravanjem ''"# | ||
| + | |||
| + | Kopraj | ||
| * Device EUI '' | * Device EUI '' | ||
| * Application EUI '' | * Application EUI '' | ||
| Line 325: | Line 331: | ||
| [[https:// | [[https:// | ||
| + | |||
| + | ===== Random links ===== | ||
| + | * https:// | ||