LoRa on Multitech with Semtech mote

Dependencies:   LoRaWAN-lib SX1272Lib lib_gps lib_mma8451q lib_mpl3115a2 mbed

Fork of LoRaWAN-NAMote72-Application-Demo_Multitech by Nagaraj Krishnamurthy

Files at this revision

API Documentation at this revision

Comitter:
nagarajkmurthy
Date:
Wed Jan 18 12:55:33 2017 +0000
Parent:
17:dc702fef0775
Commit message:
LoRa on Multitech using Semtech mote

Changed in this revision

app/Comissioning.h Show annotated file Show diff for this revision Revisions of this file
app/Config.h Show annotated file Show diff for this revision Revisions of this file
app/LoRaEventProc.cpp Show annotated file Show diff for this revision Revisions of this file
app/main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/app/Comissioning.h	Wed Nov 09 06:59:01 2016 +0000
+++ b/app/Comissioning.h	Wed Jan 18 12:55:33 2017 +0000
@@ -71,7 +71,7 @@
 /*!
  * AES encryption/decryption cipher application session key
  */
-#define LORAWAN_APPSKEY                             { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C }
+#define LORAWAN_APPSKEY                             { 0x7f, 0x64, 0x7f, 0x78, 0x5e, 0x34, 0x4b, 0x21, 0x1a, 0xf0, 0x17, 0x94, 0x35, 0x4d, 0x7e, 0x53 }
 
 #endif
 
--- a/app/Config.h	Wed Nov 09 06:59:01 2016 +0000
+++ b/app/Config.h	Wed Jan 18 12:55:33 2017 +0000
@@ -33,12 +33,12 @@
 /*!
  * Join requests trials periodicity. It is the time between RX1/RX2 and next TX
  */
-#define OVER_THE_AIR_ACTIVATION_DUTYCYCLE           5000000  // value in us
+#define OVER_THE_AIR_ACTIVATION_DUTYCYCLE           2*5000000  // value in us
 
 /*!
  * Defines the application data transmission periodicity. It is the time between RX1/RX2 and next TX
  */
-#define APP_TX_DUTYCYCLE                            5000000  // value in us
+#define APP_TX_DUTYCYCLE                            2*5000000  // value in us
 
 /*!
  * LoRaWAN confirmed messages
--- a/app/LoRaEventProc.cpp	Wed Nov 09 06:59:01 2016 +0000
+++ b/app/LoRaEventProc.cpp	Wed Jan 18 12:55:33 2017 +0000
@@ -63,7 +63,7 @@
             *  Read GPS coordinates
             *  Appends 8 Bytes (3 bytes longitude, 3 bytes latitude, 2 bytes altitude) to TX buffer
             */
-            LoRaApp.ApplicationCall( AppGps );            
+            //LoRaApp.ApplicationCall( AppGps );            
 
             /*!
             *  Read Accelerometer
--- a/app/main.cpp	Wed Nov 09 06:59:01 2016 +0000
+++ b/app/main.cpp	Wed Jan 18 12:55:33 2017 +0000
@@ -120,10 +120,16 @@
 
     // Initialize Device state
     DeviceState = DEVICE_STATE_INIT;
-
+    volatile int tmp1 = 9000;
+    volatile int tmp2=0;
     while( 1 )
     {       
-        Gps.service( );     
+        Gps.service( );   
+        //while(tmp1-- !=0)
+        //{
+        //    tmp2=tmp1/3;
+        //}  
+        //tmp1=9000;
         if( IsNetworkJoinedStatusUpdate == true )
         {
             IsNetworkJoinedStatusUpdate = false;
@@ -182,7 +188,7 @@
 
                 // Execute Join event
                 JoinEvent( );
-
+                //DeviceState = DEVICE_STATE_SEND;
                 DeviceState = DEVICE_STATE_SLEEP;
 
 #else                                           // ABP
@@ -190,7 +196,7 @@
 
                 DeviceState = DEVICE_STATE_SEND;
 #endif
-                IsNetworkJoinedStatusUpdate = true;
+                //IsNetworkJoinedStatusUpdate = true;
                 break;
             }
             case DEVICE_STATE_SEND: