diff --git a/agent/common/main.cc b/agent/common/main.cc
index b211cfb..0454337 100644
--- a/agent/common/main.cc
+++ b/agent/common/main.cc
@@ -42,6 +42,26 @@
         }
     }
 
+    ProbeDeviceCapabilities_();
+    sleep(2);
+    ProbePonIfTechnology_();
+    sleep(2);
+    // Enable all PON interfaces. 
+    for (int i = 0; i < NumPonIf_(); i++) {
+        status = EnablePonIf_(i);
+        if (!status.ok()) {
+            // FIXME - raise alarm to report error in enabling PON
+        }
+    }
+    sleep(2);
+    // Enable all NNI interfaces.
+    for (int i = 0; i < NumNniIf_(); i++) {
+        status = EnableUplinkIf_(i);
+        if (!status.ok()) {
+            // FIXME - raise alarm to report error in enabling PON
+        }
+    }
+
     RunServer();
 
     return 0;
diff --git a/agent/src/core.cc b/agent/src/core.cc
index 4175a7f..37f8b17 100644
--- a/agent/src/core.cc
+++ b/agent/src/core.cc
@@ -354,7 +354,7 @@
 
     // Legacy, device-wide ranges. To be deprecated when adapter
     // is upgraded to support per-interface ranges
-    if (board_technology == "XGPON") {
+    if (board_technology == "XGS-PON") {
         device_info->set_onu_id_start(1);
         device_info->set_onu_id_end(255);
         device_info->set_alloc_id_start(MIN_ALLOC_ID_XGSPON);
@@ -604,17 +604,19 @@
                     bcmolt_device_key key = {.device_id = dev};
                     bcmolt_device_connect oper;
                     bcmolt_device_cfg cfg;
-                    BCM_LOG(INFO, openolt_log_id, "Enable Maple - %d/%d\n", dev, BCM_MAX_DEVS_PER_LINE_CARD);
+                    BCM_LOG(INFO, openolt_log_id, "Enable Maple - %d/%d\n", dev + 1, BCM_MAX_DEVS_PER_LINE_CARD);
                     BCMOLT_OPER_INIT(&oper, device, connect, key);
                     BCMOLT_MSG_FIELD_SET(&oper, inni_config.mode, BCMOLT_INNI_MODE_ALL_10_G_XFI);
-                    BCMOLT_MSG_FIELD_SET (&oper, system_mode, BCMOLT_SYSTEM_MODE_XGPON__2_X);
+                    BCMOLT_MSG_FIELD_SET (&oper, system_mode, BCMOLT_SYSTEM_MODE_XGS__2_X);
                     err = bcmolt_oper_submit(dev_id, &oper.hdr);
                     if (err) 
                         BCM_LOG(ERROR, openolt_log_id, "Enable Maple deivce %d failed\n", dev);
                     bcmos_usleep(200000);
                 }
-                else
+                else {
                     BCM_LOG(ERROR, openolt_log_id, "Maple deivce %d already connected\n", dev);
+                    state.activate();
+                }
             }
             init_stats();
         }
@@ -690,6 +692,7 @@
 
 Status EnablePonIf_(uint32_t intf_id) {
     bcmos_errno err = BCM_ERR_OK; 
+    bcmolt_pon_interface_cfg interface_obj;
     bcmolt_pon_interface_key intf_key = {.pon_ni = (bcmolt_interface)intf_id};
     bcmolt_pon_interface_set_pon_interface_state pon_interface_set_state;
     bcmolt_interface_state state;
@@ -701,9 +704,20 @@
             return Status::OK;
         }
     } 
+    BCMOLT_CFG_INIT(&interface_obj, pon_interface, intf_key);
     BCMOLT_OPER_INIT(&pon_interface_set_state, pon_interface, set_pon_interface_state, intf_key);
+    BCMOLT_MSG_FIELD_SET(&interface_obj, discovery.control, BCMOLT_CONTROL_STATE_ENABLE);
+    BCMOLT_MSG_FIELD_SET(&interface_obj, discovery.interval, 5000);
+    BCMOLT_MSG_FIELD_SET(&interface_obj, discovery.onu_post_discovery_mode,
+        BCMOLT_ONU_POST_DISCOVERY_MODE_ACTIVATE);
     BCMOLT_FIELD_SET(&pon_interface_set_state.data, pon_interface_set_pon_interface_state_data,
         operation, BCMOLT_INTERFACE_OPERATION_ACTIVE_WORKING);
+
+    err = bcmolt_cfg_set(dev_id, &interface_obj.hdr);
+    if (err != BCM_ERR_OK) {
+        BCM_LOG(ERROR, openolt_log_id, "Failed to enable discovery onu: %d\n", intf_id);
+        return bcm_to_grpc_err(err, "Failed to enable discovery onu");
+    }
     err = bcmolt_oper_submit(dev_id, &pon_interface_set_state.hdr);
     if (err != BCM_ERR_OK) {
         BCM_LOG(ERROR, openolt_log_id, "Failed to enable PON interface: %d\n", intf_id);
@@ -790,10 +804,10 @@
             olt_cfg.data.bal_state == BCMOLT_BAL_STATE_BAL_AND_SWITCH_READY 
             ? "up" : "down");
 
-    BCM_LOG(INFO, openolt_log_id, "--------------- version %s object model: %d\n", 
+    BCM_LOG(INFO, openolt_log_id, "version %s object model: %d\n", 
         bal_version.c_str(), BAL_API_VERSION);
 
-    BCM_LOG(INFO, openolt_log_id, "--------------- topology nni:%d pon:%d dev:%d ppd:%d family: %s\n",
+    BCM_LOG(INFO, openolt_log_id, "topology nni:%d pon:%d dev:%d ppd:%d family: %s\n",
             num_of_nni_ports,
             num_of_pon_ports,
             BCM_MAX_DEVS_PER_LINE_CARD,
@@ -825,7 +839,7 @@
             if(err != BCM_ERR_RANGE) BCM_LOG(ERROR, openolt_log_id, "Failed to get PON config: %d\n", intf_id);
         }
         else {
-            if (board_technology == "XGPON") {
+            if (board_technology == "XGS-PON") {
                 switch(interface_obj.data.xgpon_trx.transceiver_type) {
                     case BCMOLT_XGPON_TRX_TYPE_LTH_7222_PC:
                     case BCMOLT_XGPON_TRX_TYPE_WTD_RTXM266_702: 
@@ -834,7 +848,7 @@
                     case BCMOLT_XGPON_TRX_TYPE_LTH_5302_PC: 
                     case BCMOLT_XGPON_TRX_TYPE_LTH_7226_A_PC_PLUS: 
                     case BCMOLT_XGPON_TRX_TYPE_D272RR_SSCB_DM: 
-                        intf_technologies[intf_id] = "XGPON";
+                        intf_technologies[intf_id] = "XGS-PON";
                         break;
                 }
             } else if (board_technology == "GPON") {
@@ -921,30 +935,42 @@
 
 Status ActivateOnu_(uint32_t intf_id, uint32_t onu_id,
     const char *vendor_id, const char *vendor_specific, uint32_t pir) {
-
-    bcmolt_onu_cfg cfg_obj;
-    bcmolt_onu_key key;
+    bcmos_errno err = BCM_ERR_OK;
+    bcmolt_onu_cfg onu_cfg;
+    bcmolt_onu_key onu_key;
     bcmolt_serial_number serial_number; /**< ONU serial number */
     bcmolt_bin_str_36 registration_id; /**< ONU registration ID */
 
-    BCM_LOG(INFO, openolt_log_id,  "Enabling ONU %d on PON %d : vendor id %s, vendor specific %s, pir %d\n",
-        onu_id, intf_id, vendor_id, vendor_specific_to_str(vendor_specific).c_str(), pir);
+    onu_key.onu_id = onu_id;
+    onu_key.pon_ni = intf_id;
+    BCMOLT_CFG_INIT(&onu_cfg, onu, onu_key);
+    BCMOLT_FIELD_SET_PRESENT(&onu_cfg.data, onu_cfg_data, onu_state);
+    err = bcmolt_cfg_get(dev_id, &onu_cfg.hdr);
+    if (err == BCM_ERR_OK) { 
+        if ((onu_cfg.data.onu_state == BCMOLT_ONU_STATE_PROCESSING || 
+             onu_cfg.data.onu_state == BCMOLT_ONU_STATE_ACTIVE) ||
+           (onu_cfg.data.onu_state == BCMOLT_ONU_STATE_INACTIVE &&
+				onu_cfg.data.onu_old_state == BCMOLT_ONU_STATE_NOT_CONFIGURED))
+            return Status::OK;
+    }
 
-    key.onu_id = onu_id;
-    key.pon_ni = intf_id;
-    BCMOLT_CFG_INIT(&cfg_obj, onu, key);
+    BCM_LOG(INFO, openolt_log_id,  "Enabling ONU %d on PON %d : vendor id %s, \
+        vendor specific %s, pir %d\n", onu_id, intf_id, vendor_id, 
+        vendor_specific_to_str(vendor_specific).c_str(), pir);
+
     memcpy(serial_number.vendor_id.arr, vendor_id, 4);
     memcpy(serial_number.vendor_specific.arr, vendor_specific, 4);
-    BCMOLT_MSG_FIELD_SET(&cfg_obj, itu.serial_number, serial_number);
-    BCMOLT_MSG_FIELD_SET(&cfg_obj, itu.auto_learning, BCMOS_TRUE);
-	 /*set burst and data profiles to fec disabled*/
-	 BCMOLT_MSG_FIELD_SET(&cfg_obj, itu.xgpon.ranging_burst_profile, 0);
-	 BCMOLT_MSG_FIELD_SET(&cfg_obj, itu.xgpon.data_burst_profile, 1);
-
-    bcmos_errno err = bcmolt_cfg_set(dev_id, &cfg_obj.hdr);	
-    if (err) {
-        BCM_LOG(ERROR, openolt_log_id, "Failed to enable ONU %d on PON %d\n", onu_id, intf_id);
-        return bcm_to_grpc_err(err, "Failed to enable ONU");
+    BCMOLT_CFG_INIT(&onu_cfg, onu, onu_key);
+    BCMOLT_MSG_FIELD_SET(&onu_cfg, onu_rate, BCMOLT_ONU_RATE_RATE_10G_DS_10G_US);
+    BCMOLT_MSG_FIELD_SET(&onu_cfg, itu.serial_number, serial_number);
+    BCMOLT_MSG_FIELD_SET(&onu_cfg, itu.auto_learning, BCMOS_TRUE);
+    /*set burst and data profiles to fec disabled*/
+    BCMOLT_MSG_FIELD_SET(&onu_cfg, itu.xgpon.ranging_burst_profile, 0);
+    BCMOLT_MSG_FIELD_SET(&onu_cfg, itu.xgpon.data_burst_profile, 1);
+    err = bcmolt_cfg_set(dev_id, &onu_cfg.hdr);	
+    if (err != BCM_ERR_OK) {
+        BCM_LOG(ERROR, openolt_log_id, "Failed to set activate ONU %d on PON %d, err %d\n", onu_id, intf_id, err);
+        return bcm_to_grpc_err(err, "Failed to activate ONU");
     }
 
     return Status::OK;
@@ -952,24 +978,31 @@
 
 Status DeactivateOnu_(uint32_t intf_id, uint32_t onu_id,
     const char *vendor_id, const char *vendor_specific) {
+    bcmos_errno err = BCM_ERR_OK;
+    bcmolt_onu_set_onu_state onu_oper; /* declare main API struct */
+    bcmolt_onu_cfg onu_cfg;
+    bcmolt_onu_key onu_key; /**< Object key. */
+    bcmolt_onu_state onu_state;
 
-    bcmolt_onu_cfg cfg_obj;
-    bcmolt_onu_key key;
-    bcmolt_serial_number serial_number; /**< ONU serial number */
-    bcmolt_bin_str_36 registration_id; /**< ONU registration ID */
-
-    BCM_LOG(INFO, openolt_log_id,  "Deactivating ONU %d on PON %d : vendor id %s, vendor specific %s\n",
-        onu_id, intf_id, vendor_id, vendor_specific_to_str(vendor_specific).c_str());
-
-    key.onu_id= onu_id;
-    key.pon_ni = intf_id;
-    BCMOLT_CFG_INIT(&cfg_obj, onu, key);
-    BCMOLT_MSG_FIELD_SET(&cfg_obj, onu_state, BCMOLT_ONU_STATE_INACTIVE);
-
-    bcmos_errno err = bcmolt_cfg_set(dev_id, &cfg_obj.hdr);	
-    if (err) {
-        BCM_LOG(ERROR, openolt_log_id,  "Failed to deactivate ONU %d on PON %d\n", onu_id, intf_id);
-        return Status(grpc::StatusCode::INTERNAL, "Failed to deactivate ONU");
+    onu_key.onu_id = onu_id;
+    onu_key.pon_ni = intf_id;
+    BCMOLT_CFG_INIT(&onu_cfg, onu, onu_key);
+    BCMOLT_FIELD_SET_PRESENT(&onu_cfg.data, onu_cfg_data, onu_state);
+    err = bcmolt_cfg_get(dev_id, &onu_cfg.hdr);
+    if (err == BCM_ERR_OK) { 
+        switch (onu_state) {
+            case BCMOLT_ONU_OPERATION_ACTIVE:
+                BCMOLT_OPER_INIT(&onu_oper, onu, set_onu_state, onu_key);
+                BCMOLT_FIELD_SET(&onu_oper.data, onu_set_onu_state_data, 
+                    onu_state, BCMOLT_ONU_OPERATION_INACTIVE);
+                err = bcmolt_oper_submit(dev_id, &onu_oper.hdr);
+                if (err != BCM_ERR_OK) {
+                    BCM_LOG(ERROR, openolt_log_id, "Failed to \
+                        deactivate ONU %d on PON %d, err %d\n", onu_id, intf_id, err);
+                    return bcm_to_grpc_err(err, "Failed to deactivate ONU");
+                }
+                break;
+        }
     }
 
     return Status::OK;
diff --git a/agent/src/indications.cc b/agent/src/indications.cc
index 664c79a..ad71cee 100644
--- a/agent/src/indications.cc
+++ b/agent/src/indications.cc
@@ -55,6 +55,10 @@
          state == BCMOLT_ONU_OPERATION_ACTIVE_STANDBY) ? BCMOS_TRUE : BCMOS_FALSE)
 #define ONU_STATE_IF_UP(state) \
        ((state == BCMOLT_ONU_OPERATION_ACTIVE) ? BCMOS_TRUE : BCMOS_FALSE)
+#define ONU_RANGING_STATE_IF_UP(state) \
+       ((state == BCMOLT_RESULT_SUCCESS) ? BCMOS_TRUE : BCMOS_FALSE)
+#define ONU_RANGING_STATE_IF_DOWN(state) \
+       ((state != BCMOLT_RESULT_SUCCESS) ? BCMOS_TRUE : BCMOS_FALSE)
 
 std::string bcmbal_to_grpc_intf_type(bcmolt_interface_type intf_type)
 {
@@ -74,7 +78,6 @@
 
     switch (msg->subgroup) {
         case BCMOLT_DEVICE_AUTO_SUBGROUP_CONNECTION_COMPLETE:
-            ProbeDeviceCapabilities_();
             admin_state = "up";
             olt_ind->set_oper_state("up");
             break;
@@ -90,22 +93,6 @@
     ind.set_allocated_olt_ind(olt_ind);
 
     if (msg->subgroup == BCMOLT_DEVICE_AUTO_SUBGROUP_CONNECTION_COMPLETE) {
-        // Enable all PON interfaces. 
-        for (int i = 0; i < NumPonIf_(); i++) {
-            status = EnablePonIf_(i);
-            if (!status.ok()) {
-                // FIXME - raise alarm to report error in enabling PON
-            }
-        }
-
-        // Enable all NNI interfaces. 
-        for (int i = 0; i < NumNniIf_(); i++) {
-            status = EnableUplinkIf_(i);
-            if (!status.ok()) {
-                // FIXME - raise alarm to report error in enabling PON
-            }
-        }
-
         /* register for omci indication */
         {
             bcmolt_rx_cfg rx_cfg = {};
@@ -115,8 +102,6 @@
             rx_cfg.module = BCMOS_MODULE_ID_OMCI_TRANSPORT;
             bcmolt_ind_subscribe(current_device, &rx_cfg);
         }
-
-        ProbePonIfTechnology_();
         state.activate();
     }
     else {
@@ -168,8 +153,6 @@
             switch (msg->subgroup) {
                 case BCMOLT_PON_INTERFACE_AUTO_SUBGROUP_STATE_CHANGE_COMPLETED:
                 { 
-                    BCM_LOG(INFO, openolt_log_id, "intf indication, intf_id: %d\n",
-                        ((bcmolt_pon_interface_state_change_completed *)msg)->key.pon_ni);
                     bcmolt_pon_interface_key *key = 
                         &((bcmolt_pon_interface_state_change_completed*)msg)->key;
                     bcmolt_pon_interface_state_change_completed_data *data = 
@@ -373,18 +356,19 @@
     switch (msg->obj_type) {
         case BCMOLT_OBJ_ID_ONU:
             switch (msg->subgroup) {
-                case BCMOLT_ONU_AUTO_SUBGROUP_STATE_CHANGE:
+                case BCMOLT_ONU_AUTO_SUBGROUP_RANGING_COMPLETED:
                 {
-                    bcmolt_onu_key *key = &((bcmolt_onu_state_change*)msg)->key;
-                    bcmolt_onu_state_change_data *data = &((bcmolt_onu_state_change*)msg)->data;
+                    bcmolt_onu_key *key = &((bcmolt_onu_ranging_completed*)msg)->key;
+                    bcmolt_onu_ranging_completed_data *data = &((bcmolt_onu_ranging_completed*)msg)->data;
 
-                    BCM_LOG(INFO, openolt_log_id, "onu indication, pon_ni %d, onu_id %d, onu_state %d\n", key->pon_ni, key->onu_id, data->new_onu_state);
+                    BCM_LOG(INFO, openolt_log_id, "onu indication, pon_ni %d, onu_id %d, onu_state %s\n", 
+                        key->pon_ni, key->onu_id, (data->status==BCMOLT_RESULT_SUCCESS)?"up":"down");
 
                     onu_ind->set_intf_id(key->pon_ni);
                     onu_ind->set_onu_id(key->onu_id);
-                    if (ONU_STATE_IF_UP(data->new_onu_state))
+                    if (ONU_RANGING_STATE_IF_UP(data->status))
                         onu_ind->set_oper_state("up");
-                    if (ONU_STATE_IF_DOWN(data->new_onu_state))
+                    if (ONU_RANGING_STATE_IF_DOWN(data->status))
                         onu_ind->set_oper_state("down");
 
                     ind.set_allocated_onu_ind(onu_ind);
@@ -713,17 +697,18 @@
     switch (msg->obj_type) {
         case BCMOLT_OBJ_ID_ONU:
             switch (msg->subgroup) {
-                case BCMOLT_ONU_AUTO_SUBGROUP_ONU_ACTIVATION_COMPLETED:
+                case BCMOLT_ONU_AUTO_SUBGROUP_ONU_DEACTIVATION_COMPLETED:
                 {
                     bcmolt_onu_key *key = &((bcmolt_onu_onu_activation_completed*)msg)->key;
                     bcmolt_onu_onu_activation_completed_data *data = 
                         &((bcmolt_onu_onu_activation_completed*)msg)->data;
 
-                    BCM_LOG(WARNING, openolt_log_id, "onu activation failure indication, intf_id %d, onu_id %d, fail_reason %d\n",
+                    BCM_LOG(INFO, openolt_log_id, "Got onu deactivation, intf_id %d, onu_id %d, fail_reason %d\n",
                         key->pon_ni, key->onu_id, data->fail_reason);
 
                     activation_fail_ind->set_intf_id(key->pon_ni);
                     activation_fail_ind->set_onu_id(key->onu_id);
+                    activation_fail_ind->set_fail_reason(data->fail_reason);
                     alarm_ind->set_allocated_onu_activation_fail_ind(activation_fail_ind);
 
                     ind.set_allocated_alarm_ind(alarm_ind);
@@ -872,7 +857,8 @@
     rx_cfg.obj_type = BCMOLT_OBJ_ID_ONU;
     rx_cfg.rx_cb = OnuIndication;
     rx_cfg.flags = BCMOLT_AUTO_FLAGS_NONE;
-    rx_cfg.subgroup = bcmolt_onu_auto_subgroup_state_change;
+    rx_cfg.subgroup = bcmolt_onu_auto_subgroup_ranging_completed;
+
     rc = bcmolt_ind_subscribe(current_device, &rx_cfg);
     if(rc != BCM_ERR_OK)
         return Status(grpc::StatusCode::INTERNAL, "onu indication subscribe failed");
@@ -942,7 +928,7 @@
     rx_cfg.obj_type = BCMOLT_OBJ_ID_ONU;
     rx_cfg.rx_cb = OnuActivationFailureIndication;
     rx_cfg.flags = BCMOLT_AUTO_FLAGS_NONE;
-    rx_cfg.subgroup = bcmolt_onu_auto_subgroup_onu_activation_completed;
+    rx_cfg.subgroup = bcmolt_onu_auto_subgroup_onu_deactivation_completed;
     rc = bcmolt_ind_subscribe(current_device, &rx_cfg);
     if(rc != BCM_ERR_OK)
         return Status(grpc::StatusCode::INTERNAL, 
diff --git a/agent/src/stats_collection.cc b/agent/src/stats_collection.cc
index e2b3d09..515eb32 100644
--- a/agent/src/stats_collection.cc
+++ b/agent/src/stats_collection.cc
@@ -153,10 +153,10 @@
             {
                 bcmolt_onu_key key;
                 key.pon_ni = (bcmolt_interface)intf_ref.intf_id;
+                BCMOLT_STAT_INIT(&pon_stats, onu, itu_pon_stats, key);
                 BCMOLT_MSG_FIELD_GET(&pon_stats, rx_bytes);
                 BCMOLT_MSG_FIELD_GET(&pon_stats, rx_packets);
                 BCMOLT_MSG_FIELD_GET(&pon_stats, tx_bytes);
-                BCMOLT_STAT_INIT(&pon_stats, onu, itu_pon_stats, key);
 
                 /* call API */
                 err = bcmolt_stat_get((bcmolt_oltid)device_id, &pon_stats.hdr, clear_on_read);
diff --git a/protos/openolt.proto b/protos/openolt.proto
index 81ae2df..f87d8a4 100644
--- a/protos/openolt.proto
+++ b/protos/openolt.proto
@@ -474,6 +474,7 @@
 message OnuActivationFailureIndication {
     fixed32 intf_id = 1;
     fixed32 onu_id = 2;
+    fixed32 fail_reason = 3;
 }
 
 message OnuProcessingErrorIndication {
