diff --git a/device_simulator/bal_stub.c b/device_simulator/bal_stub.c
index 522c56a..78b4823 100644
--- a/device_simulator/bal_stub.c
+++ b/device_simulator/bal_stub.c
@@ -31,7 +31,7 @@
 
 char *voltha_ip_and_port = NULL;
 
-void *stub_thread(void *v) 
+void *stub_thread(void *v)
 {
    int status;
    pthread_mutex_lock(&lock);
@@ -65,7 +65,7 @@
                bal_access_terminal_key__init(&accTermKey);
                accTermKey.has_access_term_id = 1;
                accTermKey.access_term_id = 1;
-               
+
                BalAccessTerminalIndData data;
                memset(&data, 0, sizeof(BalAccessTerminalIndData));
                bal_access_terminal_ind_data__init(&data);
@@ -205,11 +205,12 @@
                BalPacketItuOmciChannelRx balomciresp;
                memset(&balomciresp, 0, sizeof(BalPacketItuOmciChannelRx));
                bal_packet_itu_omci_channel_rx__init(&balomciresp);
-                                              
+
                BalPacketKey balomcirespkey;
                memset(&balomcirespkey, 0, sizeof(BalPacketKey));
-               bal_packet_key__init(&balomcirespkey); 
+               bal_packet_key__init(&balomcirespkey);
                balomciresp.key = &balomcirespkey;
+               balIndCfg.balomciresp = &balomciresp;
 
                BalDest balomcirespkeydest;
                memset(&balomcirespkeydest, 0, sizeof(BalDest));
@@ -245,14 +246,14 @@
    return NULL;
 }
 
-void create_stub_thread() 
+void create_stub_thread()
 {
    pthread_t threadId = 0;
 
    /* create shared queue */
    shared_queue = createQueue();
 
-   pthread_create(&threadId, NULL, stub_thread, NULL);      
+   pthread_create(&threadId, NULL, stub_thread, NULL);
 
 }
 
@@ -276,7 +277,7 @@
       memcpy(temp->device_id, device_id, strlen(device_id));
    }
    temp->next = NULL;
-   return temp; 
+   return temp;
 }
 
 /* The function to add data to shared_queue - Add end of the queue */
@@ -320,7 +321,45 @@
 
 void stub_bal_init(BalInit *bal_init)
 {
-    client = grpc_c_client_init(bal_init->voltha_adapter_ip_port, "bal_client", NULL);
+    char *ip_and_port = NULL;
+    ip_and_port = bal_init->voltha_adapter_ip_port;
+    client = grpc_c_client_init(ip_and_port, "bal_client", NULL);
+}
+
+void stub_bal_stats_get(BalInterfaceStatData *statData)
+{
+    printf("Bal Stub - Get Stats In BalStubs : Got all the statistics\n");
+    statData->has_rx_bytes = 1;
+    statData->has_rx_packets=1;
+    statData->has_rx_ucast_packets=1;
+    statData->has_rx_mcast_packets=1;
+    statData->has_rx_bcast_packets=1;
+    statData->has_rx_error_packets=1;
+    statData->has_rx_unknown_protos=1;
+    statData->has_tx_bytes = 1;
+    statData->has_tx_packets=1;
+    statData->has_tx_ucast_packets=1;
+    statData->has_tx_mcast_packets=1;
+    statData->has_tx_bcast_packets=1;
+    statData->has_tx_error_packets=1;
+    statData->has_rx_crc_errors=1;
+    statData->has_bip_errors=1;
+
+    statData->rx_bytes = 1000;          /**< RFC 2233 */
+    statData->rx_packets = 100;        /**< RFC 1213 ucast + none-ucast */
+    statData->rx_ucast_packets = 5;  /**< RFC 2233 */
+    statData->rx_mcast_packets = 10;  /**< RFC 2233 */
+    statData->rx_bcast_packets = 15;  /**< RFC 2233 */
+    statData->rx_error_packets = 20;  /**< RFC 1213 */
+    statData->rx_unknown_protos = 45; /**< RFC 1213 */
+    statData->tx_bytes = 2000;          /**< RFC 2233 */
+    statData->tx_packets = 190;        /**< RFC 1213 ucast + none-ucast */
+    statData->tx_ucast_packets = 30;  /**< RFC 2233 */
+    statData->tx_mcast_packets = 50;  /**< RFC 2233 */
+    statData->tx_bcast_packets = 80;  /**< RFC 2233 */
+    statData->tx_error_packets = 40;  /**< RFC 1213 */
+    statData->rx_crc_errors = 5;     /**< Received packets with CRC error. */
+    statData->bip_errors = 15;
 }
 
 #endif
diff --git a/device_simulator/voltha_bal_driver.c b/device_simulator/voltha_bal_driver.c
index d919ba3..afdb73e 100755
--- a/device_simulator/voltha_bal_driver.c
+++ b/device_simulator/voltha_bal_driver.c
@@ -31,17 +31,175 @@
 #include "asfvolt16_driver.h"
 #endif
 
+#include <unistd.h>
+#include <sys/reboot.h>
+
 /* Global varibles */
 balCoreIpInfo coreIpPortInfo;
 
 static grpc_c_server_t *test_server;
 
-static void sigint_handler (int x) { 
+static void sigint_handler (int x) {
    grpc_c_server_destroy(test_server);
    exit(0);
 }
 
 /*
+ * This functions gets invoked whenever bal Heartbeat RPC gets called
+ */
+void bal__bal_api_heartbeat_cb(grpc_c_context_t *context)
+{
+   BalHeartbeat *bal_hb;
+   BalErr bal_err;
+
+   /*
+    * Read incoming message into set_cfg
+    */
+   printf("\nRecevied HeartBeat from Adapter\n");
+   if (context->gcc_payload) {
+	context->gcc_stream->read(context, (void **)&bal_hb, 0);
+   }
+
+   printf("Received Heart Beat msg\n");
+
+   bal_err__init(&bal_err);
+
+   bal_err.err= 0;
+
+   /*
+    * Write reply back to the client
+    */
+    if (!context->gcc_stream->write(context, &bal_err, 0)) {
+    } else {
+              printf("Failed to write\n");
+	      exit(1);
+    }
+
+    grpc_c_status_t status;
+    status.gcs_code = 0;
+
+    /*
+     * Finish response for RPC
+     */
+    if (context->gcc_stream->finish(context, &status)) {
+	printf("Failed to write status\n");
+	exit(1);
+    }
+
+    sleep(1);
+    printf("\nSent HeartBeat Response to Adapter\n");
+}
+
+/*
+ * This functions gets invoked whenever Bal reboot gets called
+ */
+void bal__bal_api_reboot_cb(grpc_c_context_t *context)
+{
+   BalReboot *read_device;
+   BalErr bal_err;
+   /*
+    * Read incoming message into get_cfg
+    */
+    if (context->gcc_payload) {
+       context->gcc_stream->read(context, (void **)&read_device, 0);
+    }
+
+   printf("Bal Server - Reboot : ======Entering Function Reboot ==============================\n");
+   printf("Bal Server - Reboot : Device ID is %s\n",read_device->device_id);
+
+   sync();
+   reboot(RB_AUTOBOOT);
+
+   /* system("init 6"); */
+   /*
+    * send it to BAL
+    */
+
+   bal_err__init(&bal_err);
+
+   bal_err.err= 0;
+
+   /*
+    * Write reply back to the client
+    */
+   if (!context->gcc_stream->write(context, &bal_err, 0)) {
+   } else {
+      printf("Bal Server - Reboot Failed to write\n");
+      exit(1);
+   }
+
+   grpc_c_status_t status;
+   status.gcs_code = 0;
+
+    /*
+    * Finish response for RPC
+    */
+    if (context->gcc_stream->finish(context, &status)) {
+        printf("Failed to write status\n");
+        exit(1);
+    }
+}
+
+/*
+ * This functions gets invoked whenever Bal Stats gets called
+ */
+void bal__bal_cfg_stat_get_cb(grpc_c_context_t *context)
+{
+    BalInterfaceKey *read_stats;
+
+    /*
+    * Read incoming message into get_cfg
+    */
+    if (context->gcc_payload) {
+       context->gcc_stream->read(context, (void **)&read_stats, 0);
+    }
+
+    printf("Bal Server - Get Stats :======Entering Function Get Stats ============\n");
+    printf("Bal Server - Get Stats :NNI port is %d\n",read_stats->intf_id);
+
+    BalInterfaceStat get_stats;
+    memset(&get_stats, 0, sizeof(BalInterfaceStat));
+    bal_interface_stat__init(&get_stats);
+
+    BalInterfaceStatData stat_data;
+    memset(&stat_data, 0, sizeof(BalInterfaceStatData));
+    bal_interface_stat_data__init(&stat_data);
+
+#ifndef BAL_STUB
+    /* Interface Type, Interface ID
+       stat_data - Statistics Data */
+    asfvolt16_bal_stats_get(read_stats->intf_type, read_stats->intf_id, &stat_data);
+    printf("Bal Server - Get Stats Not In BalStubs : Got all the statistics\n");
+#else
+    stub_bal_stats_get(&stat_data);
+    printf("Bal Server - Get Stats In BalStubs : Got all the statistics\n");
+#endif
+
+    get_stats.data = &stat_data;
+
+    if (!context->gcc_stream->write(context, &get_stats, 0)) {
+	   printf("Successfully Written Stats\n");
+    } else {
+       printf("Stats Failed to write\n");
+	   exit(1);
+    }
+
+    grpc_c_status_t status;
+    status.gcs_code = 0;
+
+    /*
+    * Finish response for RPC
+    */
+    if (context->gcc_stream->finish(context, &status)) {
+        printf("Failed to write status\n");
+        exit(1);
+    }
+
+    sleep(1);
+    printf("============ Returning from Stats Function============\n");
+}
+
+/*
  * This functions gets invoked whenever bal RPC gets called
  */
 void bal__bal_cfg_get_cb(grpc_c_context_t *context)
@@ -87,16 +245,17 @@
    /*
     * Write reply back to the client
     */
- 
+
    ret_val = context->gcc_stream->write(context, &bal_err, 0);
    if (ret_val != GRPC_C_WRITE_OK) {
       if(ret_val == GRPC_C_WRITE_PENDING) {
-         printf("write is pending, sleep for 10 sec: %d\n", ret_val);
+         printf("write is pending, sleep for 10 sec %d \n", ret_val);
          sleep(10);
       }
       else {
-         printf("Failed to write: %d\n", ret_val);
-         exit(1);
+         printf("Failed to write %d \n", ret_val);
+         printf("write is pending, sleep for 10 sec: %d\n", ret_val);
+         sleep(10);
       }
    }
 
@@ -114,8 +273,8 @@
 #ifdef BAL_STUB
    pthread_mutex_lock(&lock);
 
-   struct QNode *temp = newNode(set_cfg->hdr->obj_type, 
-         BAL_ERRNO__BAL_ERR_OK, 
+   struct QNode *temp = newNode(set_cfg->hdr->obj_type,
+         BAL_ERRNO__BAL_ERR_OK,
          set_cfg->device_id);
 
 /*   if(set_cfg->hdr->has_obj_type)
@@ -125,56 +284,63 @@
       {
          case BAL_OBJ_ID__BAL_OBJ_ID_ACCESS_TERMINAL:
             {
-               printf("\n***************************************************\n");  
+               printf("\n***************************************************\n");
                printf("Received Access Terminal Configuration msg\n");
-               printf("***************************************************\n");  
+               printf("***************************************************\n");
             }
             break;
          case BAL_OBJ_ID__BAL_OBJ_ID_INTERFACE:
             {
-               printf("\n***************************************************\n");  
+               printf("\n***************************************************\n");
                printf("Received PON Interface Configuration msg\n");
-               printf("***************************************************\n");  
+               printf("***************************************************\n");
                temp->intf_id = set_cfg->interface->key->intf_id;
                printf("Pon ID = %d\n", temp->intf_id);
             }
             break;
          case BAL_OBJ_ID__BAL_OBJ_ID_SUBSCRIBER_TERMINAL:
             {
-          printf("\n*****************************************************\n");  
+          printf("\n*****************************************************\n");
           printf("Received ONU Activation msg\n");
-          printf("*****************************************************\n");  
+          printf("*****************************************************\n");
           temp->intf_id = set_cfg->terminal->key->intf_id;
           temp->onu_id = set_cfg->terminal->key->sub_term_id;
           memset(temp->vendor_id, 0, BAL_DEVICE_STR_LEN);
-          memcpy(temp->vendor_id, 
-                set_cfg->terminal->data->serial_number->vendor_id, 
+          memcpy(temp->vendor_id,
+                set_cfg->terminal->data->serial_number->vendor_id,
                 strlen(set_cfg->terminal->data->serial_number->vendor_id));
           memset(temp->vendor_specific, 0, BAL_DEVICE_STR_LEN);
-          memcpy(temp->vendor_specific, 
-                set_cfg->terminal->data->serial_number->vendor_specific, 
+          memcpy(temp->vendor_specific,
+                set_cfg->terminal->data->serial_number->vendor_specific,
                 strlen(set_cfg->terminal->data->serial_number->vendor_specific));
 
             }
             break;
+         case BAL_OBJ_ID__BAL_OBJ_ID_TM_SCHED:
+            {
+          printf("\n*****************************************************\n");
+          printf("Received TM schedule msg\n");
+          printf("*****************************************************\n");
+            }
+            break;
     case BAL_OBJ_ID__BAL_OBJ_ID_PACKET:
        {
           switch(set_cfg->packet->key->packet_send_dest->type)
           {
              case BAL_DEST_TYPE__BAL_DEST_TYPE_ITU_OMCI_CHANNEL:
                 {
-                   printf("\n*****************************************************\n");  
+                   printf("\n*****************************************************\n");
                    printf("Received OMCI msg\n");
-                   printf("*****************************************************\n");  
+                   printf("*****************************************************\n");
                    temp->intf_id = set_cfg->terminal->key->intf_id;
                    temp->onu_id = set_cfg->terminal->key->sub_term_id;
                 }
                 break;
              default:
                 {
-                   ("\n*****************************************************\n");  
+                   ("\n*****************************************************\n");
                    printf("Dest type invalid\n");
-                   printf("*****************************************************\n");  
+                   printf("*****************************************************\n");
                 }
                 break;
           }
@@ -182,9 +348,9 @@
        break;
     default:
        {
-          ("\n*****************************************************\n");  
-          printf("Received Invalid msg\n");
-          printf("*****************************************************\n");  
+          ("\n*****************************************************\n");
+          printf("Received Invalid msg type === %d \n", set_cfg->hdr->obj_type);
+          printf("*****************************************************\n");
                     pthread_mutex_unlock(&lock);
                     return;
        }
@@ -198,19 +364,19 @@
       printf("BALSTUB:Cfg Set recevied without object type");
    } */
    pthread_mutex_unlock(&lock);
-   sleep(2);   
+   sleep(2);
    pthread_cond_signal(&cv);
 /*
    if(BAL_OBJ_ID__BAL_OBJ_ID_INTERFACE == set_cfg->hdr->obj_type)
    {
-      sleep(5); 
-      struct QNode *temp1 = newNode(BAL_OBJ_ID__BAL_OBJ_ID_SUBSCRIBER_TERMINAL, 
-            BAL_ERRNO__BAL_ERR_OK, 
+      sleep(5);
+      struct QNode *temp1 = newNode(BAL_OBJ_ID__BAL_OBJ_ID_SUBSCRIBER_TERMINAL,
+            BAL_ERRNO__BAL_ERR_OK,
             set_cfg->device_id);
       temp1->intf_id = set_cfg->interface->key->intf_id;
       temp1->onu_id = 65535;
       printf("sending _onu_discovery_indiaction\n");
-      enQueue(BAL_OBJ_ID__BAL_OBJ_ID_SUBSCRIBER_TERMINAL, temp1); 
+      enQueue(BAL_OBJ_ID__BAL_OBJ_ID_SUBSCRIBER_TERMINAL, temp1);
       pthread_cond_signal(&cv);
    }
 */
@@ -232,7 +398,7 @@
    BalKey *clear_key;
 
    /*
-    * Read incoming message into clear_key 
+    * Read incoming message into clear_key
     */
    if (context->gcc_payload) {
       context->gcc_stream->read(context, (void **)&clear_key, 0);
@@ -265,9 +431,9 @@
     */
 
 
-   ("\n*****************************************************\n");  
+   ("\n*****************************************************\n");
    printf("Received API Init msg\n");
-   printf("*****************************************************\n");  
+   printf("*****************************************************\n");
 
    bal_err__init(&bal_err);
 
@@ -279,12 +445,13 @@
    ret_val = context->gcc_stream->write(context, &bal_err, 0);
    if (ret_val != GRPC_C_WRITE_OK) {
       if(ret_val == GRPC_C_WRITE_PENDING) {
-         printf("write is pending, sleep for 10 sec: %d\n", ret_val);
+         printf("write is pending, sleep for 10 sec %d \n", ret_val);
          sleep(10);
       }
       else {
-         printf("Failed to write: %d\n", ret_val);
-         exit(1);
+         printf("Failed to write %d \n", ret_val);
+         printf("write is pending, sleep for 10 sec: %d\n", ret_val);
+         sleep(10);
       }
    }
 
@@ -403,53 +570,11 @@
 {
 }
 
-#if 0
-void bal__bal_api_heartbeat_cb(grpc_c_context_t *context)
-{
-   BalHeartbeat *bal_hb;
-   BalErr bal_err;
-
-   /*
-    * Read incoming message into set_cfg
-    */
-   printf("\nRecevied HeartBeat from Adapter\n");
-   if (context->gcc_payload) {
-	context->gcc_stream->read(context, (void **)&bal_hb, 0);
-   }
-
-   printf("Received Heart Beat msg\n");
-
-   bal_err__init(&bal_err);
-
-   bal_err.err= 0;
-
-   /*
-    * Write reply back to the client
-    */
-    if (!context->gcc_stream->write(context, &bal_err, 0)) {
-    } else {
-              printf("Failed to write\n");
-	      exit(1);
-    }
-
-    grpc_c_status_t status;
-    status.gcs_code = 0;
-
-    /*
-     * Finish response for RPC
-     */
-    if (context->gcc_stream->finish(context, &status)) {
-	printf("Failed to write status\n");
-	exit(1);
-    }
-   printf("\nSent HeartBeat Response to Adapter\n");
-}
-#endif
 
 /*
  * Takes socket path as argument
  */
-int main (int argc, char **argv) 
+int main (int argc, char **argv)
 {
    int i = 0;
    grpc_c_server_t *server = NULL;
@@ -483,7 +608,7 @@
    /*
     * Initialize greeter service
     */
-   printf("\nbal_voltha_app running.....\n");
+   printf("\nvoltha_bal_driver running.....\n");
    bal__service_init(test_server);
 
    /*
diff --git a/src/asfvolt16_driver.c b/src/asfvolt16_driver.c
index 1178ff2..24bca9d 100755
--- a/src/asfvolt16_driver.c
+++ b/src/asfvolt16_driver.c
@@ -95,6 +95,12 @@
     cb_cfg.ind_cb_hdlr = (f_bcmbal_ind_handler )bal_omci_data_indication_cb;
     bcmbal_subscribe_ind(0, &cb_cfg);
 
+    /* Bearer Channel Data */
+    cb_cfg.ind_cb_hdlr = (f_bcmbal_ind_handler)bal_packet_data_indication_cb;
+    ind_subgroup = bcmbal_packet_auto_id_bearer_channel_rx;
+    cb_cfg.p_subgroup = &ind_subgroup;
+    err = err ? err : bcmbal_subscribe_ind(access_term_id, &cb_cfg);
+
 #if 0
     /* Access Terminal Operational State Change */
     cb_cfg.ind_cb_hdlr = (f_bcmbal_ind_handler)bal_acc_term_osc_indication_cb;
@@ -166,11 +172,6 @@
     cb_cfg.p_subgroup = &ind_subgroup;
     err = err ? err : bcmbal_subscribe_ind(access_term_id, &cb_cfg);
     
-    /* Bearer Channel Data */
-    cb_cfg.ind_cb_hdlr = (f_bcmbal_ind_handler)bal_packet_data_indication_cb;
-    ind_subgroup = bcmbal_packet_auto_id_bearer_channel_rx;
-    cb_cfg.p_subgroup = &ind_subgroup;
-    err = err ? err : bcmbal_subscribe_ind(access_term_id, &cb_cfg);
     
     /* OAM Channel Data - oam response indication */
     cb_cfg.ind_cb_hdlr = (f_bcmbal_ind_handler)bal_oam_data_indication_cb;
@@ -186,7 +187,7 @@
 /********************************************************************
  *                                                                  *
  *     gRPC service RPC function implementation                     *
- *                                                                  *   
+ *                                                                  *
  ********************************************************************/
 
 /********************************************************************\
@@ -215,7 +216,7 @@
     argv[2] = coreInfo->bal_core_ip_port;
     argv[3] = coreInfo->bal_core_arg2;
     argv[4] = coreInfo->bal_shared_lib_ip_port;
-    int argc = 5; 
+    int argc = 5;
     client = grpc_c_client_init(ip_and_port, "bal_client", NULL);
 
     /* Init BAL */
@@ -237,7 +238,7 @@
     }
 #endif
 
-    /* Register the call back functions to handle any 
+    /* Register the call back functions to handle any
      * indications from the BAL */
     bcmbal_cb_cfg cb_cfg = {};
     uint16_t ind_subgroup;
@@ -282,7 +283,7 @@
  *               1) Access Terminal Cfg                             *
  *               2) Interface(PON & NNI) Cfg                        *
  *               3) Subscriber Terminal (ONU) cfg                   *
- *               4) Flow Cfg                                        *             
+ *               4) Flow Cfg                                        *
  *               5) Group Cfg (In case of Multicast)                *
  ********************************************************************/
 uint32_t asfvolt16_bal_cfg_set(BalCfg *cfg)
@@ -349,7 +350,7 @@
  *               1) Access Terminal Cfg                             *
  *               2) Interface(PON & NNI) Cfg                        *
  *               3) Subscriber Terminal (ONU) cfg                   *
- *               4) Flow Cfg                                        *             
+ *               4) Flow Cfg                                        *
  *               5) Group Cfg (In case of Multicast)                *
  ********************************************************************/
 uint32_t asfvolt16_bal_cfg_clear(BalKey *key)
@@ -419,7 +420,7 @@
  *               1) Access Terminal Cfg                             *
  *               2) Interface(PON & NNI) Cfg                        *
  *               3) Subscriber Terminal (ONU) cfg                   *
- *               4) Flow Cfg                                        *             
+ *               4) Flow Cfg                                        *
  *               5) Group Cfg (In case of Multicast)                *
  ********************************************************************/
 uint32_t asfvolt16_bal_cfg_get(BalKey *key, BalCfg *cfg)
diff --git a/src/bal_indications_hdlr.c b/src/bal_indications_hdlr.c
index 1c34d6e..44c4620 100755
--- a/src/bal_indications_hdlr.c
+++ b/src/bal_indications_hdlr.c
@@ -18,7 +18,7 @@
 
 /*static bcmos_mutex bal_ind_lock; - Need to define bcm independent mutex*/
 /********************************************************************\
- * Function    : bal_acc_term_indication_cb                         * 
+ * Function    : bal_acc_term_indication_cb                         *
  * Description : This function will handle the indications for      *
  *               Access Terminal Indication                         *
  *                                                                  *
@@ -27,7 +27,7 @@
 {
    bcmos_errno result = BCM_ERR_OK;
 
-   if(BCMBAL_OBJ_ID_ACCESS_TERMINAL != obj->obj_type || 
+   if(BCMBAL_OBJ_ID_ACCESS_TERMINAL != obj->obj_type ||
       bcmbal_access_terminal_auto_id_ind != obj->subgroup)
    {
       ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API \'%s\' IND callback (status is %s)\n",
@@ -49,7 +49,6 @@
       balIndCfg.device_id = voltha_device_id;
 
       bcmbal_access_terminal_ind *acc_term_ind = (bcmbal_access_terminal_ind *)obj;
-      
 
       BalAccessTerminalInd acessTermInd;
       memset(&acessTermInd, 0, sizeof(BalAccessTerminalInd));
@@ -61,61 +60,61 @@
       bal_obj__init(&hdr);
       balIndCfg.access_term_ind->hdr = &hdr;
 
-      BalAccessTerminalKey accessTermkey; 
+      BalAccessTerminalKey accessTermkey;
       memset(&accessTermkey, 0, sizeof(BalAccessTerminalKey));
       bal_access_terminal_key__init(&accessTermkey);
-      balIndCfg.access_term_ind->key = &accessTermkey; 
+      balIndCfg.access_term_ind->key = &accessTermkey;
 
-      balIndCfg.access_term_ind->key->has_access_term_id = BAL_GRPC_PRES; 
+      balIndCfg.access_term_ind->key->has_access_term_id = BAL_GRPC_PRES;
       balIndCfg.access_term_ind->key->access_term_id = acc_term_ind->key.access_term_id;
-      
+
       BalAccessTerminalIndData accessTermIndData;
       memset(&accessTermIndData, 0, sizeof(BalAccessTerminalIndData));
       bal_access_terminal_ind_data__init(&accessTermIndData);
-      balIndCfg.access_term_ind->data = &accessTermIndData; 
+      balIndCfg.access_term_ind->data = &accessTermIndData;
 
-      balIndCfg.access_term_ind->data->has_admin_state = BAL_GRPC_PRES; 
-      balIndCfg.access_term_ind->data->admin_state = acc_term_ind->data.admin_state; 
-      balIndCfg.access_term_ind->data->has_oper_status = BAL_GRPC_PRES; 
-      balIndCfg.access_term_ind->data->oper_status = acc_term_ind->data.oper_status; 
-      balIndCfg.access_term_ind->data->has_iwf_mode = BAL_GRPC_PRES; 
-      balIndCfg.access_term_ind->data->iwf_mode = acc_term_ind->data.iwf_mode; 
+      balIndCfg.access_term_ind->data->has_admin_state = BAL_GRPC_PRES;
+      balIndCfg.access_term_ind->data->admin_state = acc_term_ind->data.admin_state;
+      balIndCfg.access_term_ind->data->has_oper_status = BAL_GRPC_PRES;
+      balIndCfg.access_term_ind->data->oper_status = acc_term_ind->data.oper_status;
+      balIndCfg.access_term_ind->data->has_iwf_mode = BAL_GRPC_PRES;
+      balIndCfg.access_term_ind->data->iwf_mode = acc_term_ind->data.iwf_mode;
 
       BalTopology balTop;
       memset(&balTop, 0, sizeof(BalTopology));
       bal_topology__init(&balTop);
-      balIndCfg.access_term_ind->data->topology = &balTop; 
+      balIndCfg.access_term_ind->data->topology = &balTop;
 
-      balIndCfg.access_term_ind->data->topology->has_num_of_nni_ports = BAL_GRPC_PRES; 
-      balIndCfg.access_term_ind->data->topology->num_of_nni_ports = 
-                                            acc_term_ind->data.topology.num_of_nni_ports; 
-      balIndCfg.access_term_ind->data->topology->has_num_of_pon_ports = BAL_GRPC_PRES; 
-      balIndCfg.access_term_ind->data->topology->num_of_pon_ports = 
-                                            acc_term_ind->data.topology.num_of_pon_ports; 
-      balIndCfg.access_term_ind->data->topology->has_num_of_mac_devs = BAL_GRPC_PRES; 
-      balIndCfg.access_term_ind->data->topology->num_of_mac_devs = 
-                                             acc_term_ind->data.topology.num_of_mac_devs; 
-      balIndCfg.access_term_ind->data->topology->has_num_of_pons_per_mac_dev = BAL_GRPC_PRES; 
-      balIndCfg.access_term_ind->data->topology->num_of_pons_per_mac_dev = 
-                                      acc_term_ind->data.topology.num_of_pons_per_mac_dev; 
-      balIndCfg.access_term_ind->data->topology->has_pon_family = BAL_GRPC_PRES; 
-      balIndCfg.access_term_ind->data->topology->pon_family = 
-                                                   acc_term_ind->data.topology.pon_family; 
-      balIndCfg.access_term_ind->data->topology->has_pon_sub_family = BAL_GRPC_PRES; 
-      balIndCfg.access_term_ind->data->topology->pon_sub_family = 
-                                                acc_term_ind->data.topology.pon_sub_family; 
+      balIndCfg.access_term_ind->data->topology->has_num_of_nni_ports = BAL_GRPC_PRES;
+      balIndCfg.access_term_ind->data->topology->num_of_nni_ports =
+                                            acc_term_ind->data.topology.num_of_nni_ports;
+      balIndCfg.access_term_ind->data->topology->has_num_of_pon_ports = BAL_GRPC_PRES;
+      balIndCfg.access_term_ind->data->topology->num_of_pon_ports =
+                                            acc_term_ind->data.topology.num_of_pon_ports;
+      balIndCfg.access_term_ind->data->topology->has_num_of_mac_devs = BAL_GRPC_PRES;
+      balIndCfg.access_term_ind->data->topology->num_of_mac_devs =
+                                             acc_term_ind->data.topology.num_of_mac_devs;
+      balIndCfg.access_term_ind->data->topology->has_num_of_pons_per_mac_dev = BAL_GRPC_PRES;
+      balIndCfg.access_term_ind->data->topology->num_of_pons_per_mac_dev =
+                                      acc_term_ind->data.topology.num_of_pons_per_mac_dev;
+      balIndCfg.access_term_ind->data->topology->has_pon_family = BAL_GRPC_PRES;
+      balIndCfg.access_term_ind->data->topology->pon_family =
+                                                   acc_term_ind->data.topology.pon_family;
+      balIndCfg.access_term_ind->data->topology->has_pon_sub_family = BAL_GRPC_PRES;
+      balIndCfg.access_term_ind->data->topology->pon_sub_family =
+                                                acc_term_ind->data.topology.pon_sub_family;
 
       BalSwVersion balsv;
       memset(&balsv, 0, sizeof(BalSwVersion));
       bal_sw_version__init(&balsv);
-      balIndCfg.access_term_ind->data->sw_version = &balsv; 
+      balIndCfg.access_term_ind->data->sw_version = &balsv;
 
-      balIndCfg.access_term_ind->data->sw_version->has_version_type = BAL_GRPC_PRES; 
-      balIndCfg.access_term_ind->data->sw_version->version_type = 
-                                                acc_term_ind->data.sw_version.version_type; 
-      balIndCfg.access_term_ind->data->sw_version->has_major_rev = BAL_GRPC_PRES; 
-      balIndCfg.access_term_ind->data->sw_version->major_rev = 
-                                                   acc_term_ind->data.sw_version.major_rev; 
+      balIndCfg.access_term_ind->data->sw_version->has_version_type = BAL_GRPC_PRES;
+      balIndCfg.access_term_ind->data->sw_version->version_type =
+                                                acc_term_ind->data.sw_version.version_type;
+      balIndCfg.access_term_ind->data->sw_version->has_major_rev = BAL_GRPC_PRES;
+      balIndCfg.access_term_ind->data->sw_version->major_rev =
+                                                   acc_term_ind->data.sw_version.major_rev;
       balIndCfg.access_term_ind->data->sw_version->has_minor_rev = BAL_GRPC_PRES; 
       balIndCfg.access_term_ind->data->sw_version->minor_rev = 
                                                    acc_term_ind->data.sw_version.minor_rev; 
@@ -1487,6 +1486,8 @@
       /*bcmos_mutex_lock(&bal_ind_lock);-- Need to define bcm independent mutex*/
 
       BalIndications balIndCfg;
+      memset(&balIndCfg, 0, sizeof(BalIndications));
+      bal_indications__init(&balIndCfg);
       balIndCfg.u_case = BAL_INDICATIONS__U_PKT_DATA;
       balIndCfg.has_objtype = BAL_GRPC_PRES;
       balIndCfg.objtype = obj->obj_type;
@@ -1596,6 +1597,7 @@
       balIndCfg.pktdata->data->flow_cookie = rx_channel->data.flow_cookie; 
       balIndCfg.pktdata->data->has_pkt = BAL_GRPC_PRES; 
       balIndCfg.pktdata->data->pkt.len = rx_channel->data.pkt.len;
+      balIndCfg.pktdata->data->pkt.data = (uint8_t *)malloc((balIndCfg.pktdata->data->pkt.len)*sizeof(uint8_t)); 
       memcpy(balIndCfg.pktdata->data->pkt.data,  rx_channel->data.pkt.val, balIndCfg.pktdata->data->pkt.len); 
 
       /*bcmos_mutex_unlock(&bal_ind_lock);-- Need to define bcm independent mutex*/
