User Tools

Site Tools


project:lora_nodes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
project:lora_nodes [2018/02/28 10:01] – [Spremi primjer] dpproject: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, 0xD50xB30x70 };+  static const u1_t PROGMEM APPEUI[8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x000x000x00 };
   void os_getArtEui (u1_t* buf) {   void os_getArtEui (u1_t* buf) {
     memcpy_P(buf, APPEUI, 8);     memcpy_P(buf, APPEUI, 8);
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, DEVEUI, 8);     memcpy_P(buf, DEVEUI, 8);
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, 0x210xB40x090x430xFB0x400xB90xA80x6C0xD2 };+  static const u1_t PROGMEM APPKEY[16] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x000x000x000x000x000x000x000x000x000x00 };
   void os_getDevKey (u1_t* buf) {   void os_getDevKey (u1_t* buf) {
     memcpy_P(buf, APPKEY, 16);     memcpy_P(buf, APPKEY, 16);
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, 0x2F0xB00xBF0x760x5E0xFA0x690xBC0xF80x9C };+  static const PROGMEM u1_t NWKSKEY[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x000x000x000x000x000x000x000x000x000x00 };
      
   // LoRaWAN AppSKey, application session key (msb)   // LoRaWAN AppSKey, application session key (msb)
-  static const u1_t PROGMEM APPSKEY[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xCA0xAA0x090xF50xF30xBE0x480xA60x1F0xE5 };+  static const u1_t PROGMEM APPSKEY[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x000x000x000x000x000x000x000x000x000x00 };
      
   // LoRaWAN end-device address (DevAddr)   // LoRaWAN end-device address (DevAddr)
Line 287: Line 288:
 </file> </file>
  
-==== Koprija EUI i ključeve s TTN konzole u kod ==== +==== 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 ''msb'' formatu), te device id (kopira se direktno kao broj). U TTN konzoli da ideš na ABP join i pod settings treba maknuti najdoljnju kvačicu ''Frame Counter Checks''
 + 
 +==== Za OTTA mode ==== 
 +OTAA mode (sa joinanjem) se enejbla otkomentiravanjem ''"#define USE_JOINING"'' 
 + 
 +Kopraj EUI i ključeve s TTN konzole u kod:
   * Device EUI ''lsb''   * Device EUI ''lsb''
   * Application EUI ''lsb''   * Application EUI ''lsb''
Line 325: Line 331:
  
 [[https://play.google.com/store/apps/details?id=com.jpmeijers.ttnmapper&hl=en|TTN mapper]] android aplikacija pomoću koje se može upariti telefon s GPS-om i LoRa node, kako bi se moglo testirati i mapirati pokrivenost mreže. [[https://play.google.com/store/apps/details?id=com.jpmeijers.ttnmapper&hl=en|TTN mapper]] android aplikacija pomoću koje se može upariti telefon s GPS-om i LoRa node, kako bi se moglo testirati i mapirati pokrivenost mreže.
 +
 +===== Random links =====
 +  * https://lcd-web.nl/ttngenerator/
  
project/lora_nodes.1519808469.txt.gz · Last modified: by dp