arm studio build

Dependencies:   libxDot-mbed5

Revision:
17:74d60177c6b6
Parent:
14:fc836a5a5d2f
Child:
18:d95e1a2c4303
--- a/src/multicast.cpp	Sun Jan 20 15:19:57 2019 +0000
+++ b/src/multicast.cpp	Fri Jan 25 01:46:26 2019 +0000
@@ -26,11 +26,11 @@
 uint8_t frags_size = 0;          //size of each frag to be sent
 uint32_t frag_missd = 0;
 //========================================================================================================
-//save_OTAA_session
-// save OTAA session parameters
+// save_OTAA_session session parameters
 //========================================================================================================
 void save_OTAA_session_keys()
 {
+    printf("\r\n saving OTAA session keys --------------------------------- \r\n"); 
     netwrk_address_OTAA = dot->getNetworkAddress();
     logInfo(" OTAA devAddr %s", mts::Text::bin2hexString(netwrk_address_OTAA).c_str());      
     netwrk_session_key_OTAA = dot->getNetworkSessionKey();
@@ -54,10 +54,12 @@
          printf("\r\n cannot change radio class unless already joined");
          return false;  //don't switch if not joined
      }    
+    printf("\r\n switching to class C \r\n"); 
     downcounter_OTAA = dot->getDownLinkCounter(); //save frame counters before switching
     upcounter_OTAA = dot->getUpLinkCounter();
     
-    dot->setDownLinkCounter(0);//do all nodes need to reset, else reject packts with high DownlinkCounter values?
+    dot->setUpLinkCounter(0);  
+    dot->setDownLinkCounter(0);
     
 //load ABP keys into arrays    
     std::vector<uint8_t> dev_adr;
@@ -98,6 +100,7 @@
     }        
  } //if Class C
  else{   //change back to OTAA
+    printf("\r\n switching to class A \r\n"); 
     printf("\r\nchanging network address to OTAA device address %s\r\n", mts::Text::bin2hexString(netwrk_address_OTAA).c_str());
     if (dot->setNetworkAddress(netwrk_address_OTAA) != mDot::MDOT_OK) {
     printf("\r\nfailed to set network device address to %s", mts::Text::bin2hexString(netwrk_address_OTAA).c_str());