diff --git a/device_simulator/device_simulator/Makefile.am b/device_simulator/device_simulator/Makefile.am
new file mode 100644
index 0000000..2708c69
--- /dev/null
+++ b/device_simulator/device_simulator/Makefile.am
@@ -0,0 +1,60 @@
+bin_PROGRAMS = bal_server
+
+.PHONY = 
+
+HOSTPROG=yes
+
+DEFS += -DBAL_STUB
+
+bal_server_SOURCES = \
+    bal_server.c \
+    bal_stub.c \
+    grpc-c.h \
+    bal_errno.grpc-c.h bal_indications.grpc-c.h bal_model_types.grpc-c.h \
+    bal_obj.grpc-c.h bal.grpc-c.h bal_model_ids.grpc-c.h \
+    bal_msg_type.grpc-c.h bal_osmsg.grpc-c.h asfvolt16_driver.h \
+    bal.grpc-c.service.c \
+    bal_errno.grpc-c.c bal_indications.grpc-c.c \
+    bal_model_types.grpc-c.c bal_obj.grpc-c.c \
+    bal_errno.grpc-c.service.c bal_indications.grpc-c.service.c \
+    bal_model_types.grpc-c.service.c bal_obj.grpc-c.service.c \
+    bal.grpc-c.c bal_model_ids.grpc-c.c \
+    bal_msg_type.grpc-c.c bal_osmsg.grpc-c.c \
+    bal_model_ids.grpc-c.service.c \
+    bal_msg_type.grpc-c.service.c bal_osmsg.grpc-c.service.c
+
+replace:
+$(shell find . -type f \( -name '*.h' -o -name '*.c' \) -a -exec sed -i -e 's/bal_obj.proto.h/bal_obj.grpc-c.h/g' {} + )
+$(shell find . -type f \( -name '*.h' -o -name '*.c' \) -a -exec sed -i -e 's/bal_model_types.proto.h/bal_model_types.grpc-c.h/g' {} + )
+$(shell find . -type f \( -name '*.h' -o -name '*.c' \) -a -exec sed -i -e 's/bal_errno.proto.h/bal_errno.grpc-c.h/g' {} + )
+$(shell find . -type f \( -name '*.h' -o -name '*.c' \) -a -exec sed -i -e 's/bal_msg_type.proto.h/bal_msg_type.grpc-c.h/g' {} + )
+$(shell find . -type f \( -name '*.h' -o -name '*.c' \) -a -exec sed -i -e 's/bal_osmsg.proto.h/bal_osmsg.grpc-c.h/g' {} + )
+$(shell find . -type f \( -name '*.h' -o -name '*.c' \) -a -exec sed -i -e 's/bal_model_ids.proto.h/bal_model_ids.grpc-c.h/g' {} + )
+$(shell find . -type f \( -name '*.h' -o -name '*.c' \) -a -exec sed -i -e 's/bal.proto.h/bal.grpc-c.h/g' {} + )
+  
+autoGenrate:
+	protoc -I ${srcdir} --grpc-c_out=. --plugin=protoc-gen-grpc-c=../compiler/protoc-gen-grpc-c ${srcdir}/bal_errno.proto ${srcdir}/bal_model_ids.proto ${srcdir}/bal_msg_type.proto ${srcdir}/bal_osmsg.proto ${srcdir}/bal_indications.proto ${srcdir}/bal_model_types.proto ${srcdir}/bal_obj.proto ${srcdir}/bal.proto $(replace)
+
+LDADD = \
+    ../lib/libgrpc-c.la \
+    /usr/local/lib/libgrpc.a \
+    /usr/local/lib/libgpr.a \
+    /usr/local/lib/libprotobuf-c.a \
+    -lssl \
+    -lcrypto \
+    -lz \
+    -lpthread
+
+EXTRA_bal_server_DEPENDENCIES=
+
+LIBS = -lrt -lm
+
+AM_CFLAGS = \
+    -I. \
+    -I${srcdir}/../lib/h/ \
+    -I${srcdir}/../third_party/protobuf-c \
+    -I${srcdir}/../third_party/grpc/include 
+
+clean_all: clean
+
+all:bal_server$(EXEEXT)
diff --git a/device_simulator/device_simulator/README.md b/device_simulator/device_simulator/README.md
new file mode 100644
index 0000000..118c254
--- /dev/null
+++ b/device_simulator/device_simulator/README.md
@@ -0,0 +1,85 @@
+GRPC_C INTEGRATION WITH BAL
+
+ This is a executable(bal_server), which will recevie asfvolt16 adapter grpc-c messages and call respective device stub.
+ It will send recevied responses/asynchronous indications from Device stub to Adapter.
+
+GETTING STARTED
+
+prerequisites to install grpc
+   - sudo apt-get install build-essential libxml2-dev libgeos++-dev libpq-dev libbz2-dev libtool automake openssl libssl-dev golang-goprotobuf-dev
+
+
+INSTALLATION
+
+steps to install grpc
+   - Download as zip "grpc", "grpc-c", "protobuf" and "protobuf-c" from "https://github.com/opennetworkinglab/asfvolt16-driver/tree/master/third_party"
+   - place downloaded protobuf folder at grpc/thirdparty
+   - place downloaded protobuf-c folder at grpc-c/thirdparty 
+   - cd grpc/thirdparty/protobuf
+     ./autogen.sh
+     ./configure
+     make
+     sudo make install
+   - cd grpc/
+     make 
+     sudo make install
+
+steps to install grpc-c 
+   - cd grpc-c/thirdparty/protobuf-c
+     ./autogen.sh
+     ./configure
+     export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/protobuf 
+     export LD_LIBRARY_PATH=/usr/local/lib
+     make
+     sudo make install
+   
+Apply grpc-c patch 
+   - cd grpc-c/ 
+     Patch 1:
+     Apply patch in following link for grpc-c/lib - "https://github.com/Juniper/grpc-c/commit/353b40cd920cd749ed6cf71f8df17f1d5cf2c89d"
+     Note:
+        (This patch is having very few changes in two files(grpc-c/lib/client.c, grpc-c/lib/service.c. 
+         Download these two files from above link and replace at grpc-c/lib or merge these changes manually.)       
+     Patch 2:
+     Apply patch in service.c.patch and client.c.patch 
+     cp Makefile.am examples/
+     cp bal_server.c grpc-c/examples/
+     cp bal_stub.c grpc-c/examples/
+     cp bal_stub.h grpc-c/examples/
+     autoreconf --install
+     mkdir build && cd build
+     ../configure
+     make
+     sudo make install
+   
+To obtain proto files - Have a repo sync of opencord code base
+     cp opencord/incubator/voltha/voltha/adapters/asfvolt16_olt/protos/* examples/
+
+To autogenerate code from proto files
+     make autoGenrate
+       
+Build bal_server
+     make clean_all
+     make V=0 
+
+The ultimate executable bal_server can be found under ~/grpc-c/build/examples/.libs/
+
+USAGE
+    ./bal_server test
+
+CONTRIBUTING
+     <TBD>
+ 
+VERSIONING
+     <TBD>
+
+AUTHORS
+     Radisys Adapter Team
+
+Licence
+     <TBD>
+
+Acknowledgments
+     <TBD>
+  
+
diff --git a/device_simulator/device_simulator/bal_server.c b/device_simulator/device_simulator/bal_server.c
new file mode 100644
index 0000000..ede77e5
--- /dev/null
+++ b/device_simulator/device_simulator/bal_server.c
@@ -0,0 +1,274 @@
+/*
+ * Copyright (c) 2016, Juniper Networks, Inc.
+ * All rights reserved.
+ */
+
+#include <signal.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/time.h>
+#include "bal_msg_type.grpc-c.h"
+#include "bal_osmsg.grpc-c.h"
+#include "bal_model_ids.grpc-c.h"
+#include "bal_obj.grpc-c.h"
+#include "bal_model_types.grpc-c.h"
+#include "bal_errno.grpc-c.h"
+#include "bal.grpc-c.h"
+
+#ifdef BAL_STUB
+#include "bal_stub.h"
+#endif
+
+static grpc_c_server_t *test_server;
+
+static void sigint_handler (int x) { 
+        grpc_c_server_destroy(test_server);
+        exit(0);
+}
+
+/*
+ * This functions gets invoked whenever bal RPC gets called
+ */
+void bal__bal_cfg_get_cb(grpc_c_context_t *context)
+{
+        BalCfg *get_cfg;
+
+        /*
+         * Read incoming message into get_cfg
+         */
+        if (context->gcc_payload) {
+                context->gcc_stream->read(context, (void **)&get_cfg, 0);
+        }
+}
+
+/*
+ * This functions gets invoked whenever bal RPC gets called
+ */
+void bal__bal_cfg_set_cb(grpc_c_context_t *context)
+{
+        BalCfg *set_cfg;
+        BalErr bal_err;
+
+        /*
+         * Read incoming message into set_cfg
+         */
+        if (context->gcc_payload) {
+                context->gcc_stream->read(context, (void **)&set_cfg, 0);
+        }
+
+        /*
+         * 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("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);
+        }
+
+#ifdef BAL_STUB
+        pthread_mutex_lock(&lock);
+        if(set_cfg->hdr->has_obj_type)
+        {
+                enQueue(set_cfg->hdr->obj_type, BAL_ERRNO__BAL_ERR_OK);
+                switch(set_cfg->hdr->obj_type)
+                {
+                        case BAL_OBJ_ID__BAL_OBJ_ID_ACCESS_TERMINAL:
+                                {
+                                        printf("\n***************************************************\n");  
+                                        printf("Received Access Terminal Configuration msg\n");
+                                        printf("***************************************************\n");  
+                                }
+                                break;
+                        case BAL_OBJ_ID__BAL_OBJ_ID_INTERFACE:
+                                {
+                                        printf("\n***************************************************\n");  
+                                        printf("Received PON Interface Configuration msg\n");
+                                        printf("***************************************************\n");  
+                                }
+                                break;
+                        case BAL_OBJ_ID__BAL_OBJ_ID_SUBSCRIBER_TERMINAL:
+                                {
+                                        printf("\n*****************************************************\n");  
+                                        printf("Received ONU Activation msg\n");
+                                        printf("*****************************************************\n");  
+                                }
+                        default:
+                                break;
+                }
+        }
+        else
+        {
+                printf("BALSTUB:Cfg Set recevied without object type");
+        }
+        pthread_mutex_unlock(&lock);
+        sleep(2);   
+        pthread_cond_signal(&cv);
+        if(BAL_OBJ_ID__BAL_OBJ_ID_INTERFACE == set_cfg->hdr->obj_type)
+        {
+                sleep(5); 
+                enQueue(BAL_OBJ_ID__BAL_OBJ_ID_SUBSCRIBER_TERMINAL, BAL_ERRNO__BAL_ERR_OK);
+                pthread_cond_signal(&cv);
+        }
+#endif
+}
+
+
+/*
+ * This functions gets invoked whenever bal clear RPC gets called
+ */
+void bal__bal_cfg_clear_cb(grpc_c_context_t *context)
+{
+        BalKey *clear_key;
+
+        /*
+         * Read incoming message into clear_key 
+         */
+        if (context->gcc_payload) {
+                context->gcc_stream->read(context, (void **)&clear_key, 0);
+        }
+
+}
+
+
+/*
+ * This functions gets invoked whenever bal Init RPC gets called
+ */
+void bal__bal_api_init_cb(grpc_c_context_t *context)
+{
+        BalInit *bal_init;
+
+        /*
+         * Read incoming message into set_cfg
+         */
+        if (context->gcc_payload) {
+                context->gcc_stream->read(context, (void **)&bal_init, 0);
+        }
+
+}
+
+
+/*
+ * This functions gets invoked whenever bal finish RPC gets called
+ */
+void bal__bal_api_finish_cb(grpc_c_context_t *context)
+{
+#if 0
+        void *finish_init;
+
+        /*
+         * Read incoming message into set_cfg
+         */
+        if (context->gcc_payload) {
+                context->gcc_stream->read(context, (void **)&finish_init);
+        }
+#endif
+}
+
+
+/*
+ * This functions gets invoked whenever bal finish RPC gets called
+ */
+void bal_ind__bal_ind_info_cb(grpc_c_context_t *context)
+{
+#if 0
+        void *finish_init;
+
+        /*
+         * Read incoming message into set_cfg
+         */
+        if (context->gcc_payload) {
+                context->gcc_stream->read(context, (void **)&finish_init);
+        }
+#endif
+}
+
+
+/*
+ * This functions gets invoked whenever bal RPC gets called
+ */
+void bal__bal_omci_msg_cb(grpc_c_context_t *context)
+{
+        char *omci_msg;
+
+        /*
+         * Read incoming message into omci_msg
+         */
+        if (context->gcc_payload) {
+                context->gcc_stream->read(context, (void **)&omci_msg, 0);
+        }
+}
+
+/*
+ * Takes socket path as argument
+ */
+int main (int argc, char **argv) 
+{
+        int i = 0;
+        grpc_c_server_t *server = NULL;
+
+        printf("*************\n");
+        printf("BAL STUB\n");
+        printf("*************\n");
+        if (argc < 2) {
+                fprintf(stderr, "Missing socket path argument\n");
+                exit(1);
+        }
+
+        signal(SIGINT, sigint_handler);
+        /*
+         * Initialize grpc-c library to be used with vanilla gRPC
+         */
+        grpc_c_init(GRPC_THREADS, NULL);
+
+        /*
+         * Create server object
+         */
+        test_server = grpc_c_server_create("172.24.150.117:50060"); 
+        if (test_server == NULL) {
+                printf("Failed to create server\n");
+                exit(1);
+        }
+
+        /*
+         * Initialize greeter service
+         */
+        printf("\nCreating a test server\n");
+        bal__service_init(test_server);
+
+        /*
+         * Start server
+         */
+        grpc_c_server_start(test_server);
+
+#ifdef BAL_STUB
+        printf("\nCreating a stub thread\n");
+        create_stub_thread();
+#endif
+
+        /*
+         * Blocks server to wait to completion
+         */
+        grpc_c_server_wait(test_server);
+
+        bal__service_init(server);
+
+}
diff --git a/device_simulator/device_simulator/bal_stub.c b/device_simulator/device_simulator/bal_stub.c
new file mode 100644
index 0000000..adebd0a
--- /dev/null
+++ b/device_simulator/device_simulator/bal_stub.c
@@ -0,0 +1,194 @@
+#ifdef BAL_STUB
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <signal.h>
+#include "bal_stub.h"
+#include "bal_msg_type.grpc-c.h"
+#include "bal_osmsg.grpc-c.h"
+#include "bal_model_ids.grpc-c.h"
+#include "bal_obj.grpc-c.h"
+#include "bal_model_types.grpc-c.h"
+#include "bal_errno.grpc-c.h"
+#include "bal_indications.grpc-c.h"
+#include "bal.grpc-c.h"
+
+void *stub_thread(void *v) 
+{
+   int status;
+   grpc_c_client_t *client = grpc_c_client_init("172.24.150.114:60001", "bal_client", NULL);
+   pthread_mutex_lock(&lock);
+   pthread_cond_wait(&cv, &lock);
+   while(NULL != shared_queue->front)
+   {
+      BalObjId prevObjType;
+      struct QNode *front = deQueue(shared_queue);
+      /* prepare and send rpc response */
+      BalIndications balIndCfg;
+      memset(&balIndCfg, 0, sizeof(BalIndications));
+      bal_indications__init(&balIndCfg);
+      BalObjInd bal_obj_ind;
+      memset(&bal_obj_ind, 0, sizeof(BalObjInd));
+      bal_obj_ind__init(&bal_obj_ind);
+      balIndCfg.u_case = BAL_INDICATIONS__U_BAL_OBJ_INFO;
+      balIndCfg.balobjinfo = &bal_obj_ind;
+      balIndCfg.balobjinfo->has_objtype = 1;
+      balIndCfg.balobjinfo->objtype = front->obj_type;
+      balIndCfg.balobjinfo->has_status = 1;
+      balIndCfg.balobjinfo->status = front->status;
+      char keystr;
+      balIndCfg.balobjinfo->keystr = &keystr;
+      switch(front->obj_type)
+      {
+         case BAL_OBJ_ID__BAL_OBJ_ID_ACCESS_TERMINAL:
+            {
+               printf("***************************************************\n");
+               printf("Successful Indication sent for ACCESS_TERMINAL\n");
+               printf("***************************************************\n");
+               balIndCfg.balobjinfo->u_case = BAL_OBJ_IND__U__NOT_SET;
+               prevObjType = front->obj_type;
+            }
+            break;
+         case BAL_OBJ_ID__BAL_OBJ_ID_INTERFACE:
+            {
+               printf("***************************************************\n");
+               printf("Successful Indication sent for PON INTERFACE UP\n");
+               printf("***************************************************\n");
+               balIndCfg.balobjinfo->u_case = BAL_OBJ_IND__U__NOT_SET;
+               prevObjType = front->obj_type;
+            }
+            break;
+         case BAL_OBJ_ID__BAL_OBJ_ID_SUBSCRIBER_TERMINAL:
+            {
+               BalOnuDiscoveryInfo onuDiscoveryInfo;
+               memset(&onuDiscoveryInfo, 0, sizeof(BalOnuDiscoveryInfo));
+               bal_onu_discovery_info__init(&onuDiscoveryInfo);
+               balIndCfg.balobjinfo->onudiscoveryinfo = &onuDiscoveryInfo;
+               balIndCfg.balobjinfo->u_case = BAL_OBJ_IND__U_ONU_DISCOVERY_INFO;
+               BalSerialNumber serial_number;
+               memset(&serial_number, 0, sizeof(BalSerialNumber));
+               bal_serial_number__init(&serial_number);
+               balIndCfg.balobjinfo->onudiscoveryinfo->serial_number = &serial_number;
+               char vendor_id[20];
+               memset(&vendor_id, 0, 20);
+               strcpy(vendor_id,"4252434D");
+               balIndCfg.balobjinfo->onudiscoveryinfo->serial_number->vendor_id = vendor_id;
+               char vendor_specific[20];
+               memset(&vendor_specific, 0, 20);
+               strcpy(vendor_specific,"12345678");
+               balIndCfg.balobjinfo->onudiscoveryinfo->serial_number->vendor_specific = vendor_specific;
+               if(BAL_OBJ_ID__BAL_OBJ_ID_INTERFACE == prevObjType)
+               {
+                  balIndCfg.balobjinfo->onudiscoveryinfo->has_admin_state = 1;
+                  balIndCfg.balobjinfo->onudiscoveryinfo->admin_state = BAL_STATE__BAL_STATE_DOWN;
+                  balIndCfg.balobjinfo->onudiscoveryinfo->has_oper_status = 1;
+                  balIndCfg.balobjinfo->onudiscoveryinfo->oper_status = BAL_STATUS__BAL_STATUS_DOWN;
+                  printf("\n***************************************************\n");
+                  printf("Sending ONU discovery message\n");
+                  printf("***************************************************\n");
+               }
+               else
+               {
+                  balIndCfg.balobjinfo->onudiscoveryinfo->has_admin_state = 1;
+                  balIndCfg.balobjinfo->onudiscoveryinfo->admin_state = BAL_STATE__BAL_STATE_UP;
+                  balIndCfg.balobjinfo->onudiscoveryinfo->has_oper_status = 1;
+                  balIndCfg.balobjinfo->onudiscoveryinfo->oper_status = BAL_STATUS__BAL_STATUS_UP;
+                  printf("***************************************************\n");
+                  printf("ONU Activation Successful\n");
+                  printf("***************************************************\n");
+               }
+               prevObjType = front->obj_type;
+            }
+            break;
+         case BAL_OBJ_ID__BAL_OBJ_ID_PACKET:
+            {
+               balIndCfg.balobjinfo->u_case = BAL_OBJ_IND__U_PKT_DATA;
+            }
+            break;
+         default:
+            {
+               balIndCfg.balobjinfo->u_case = BAL_OBJ_IND__U__NOT_SET;
+               prevObjType = front->obj_type;
+            }
+            break;
+      }
+      BalErr *output;
+      status = bal_ind__bal_ind_info(client, NULL, &balIndCfg, &output, NULL, 0);
+      free(front);
+      pthread_mutex_unlock(&lock);
+      pthread_mutex_lock(&lock);
+      pthread_cond_wait(&cv, &lock);
+   }
+   return NULL;
+}
+
+void create_stub_thread() 
+{
+   pthread_t threadId = 0;
+
+   /* create shared queue */
+   shared_queue = createQueue();
+
+   pthread_create(&threadId, NULL, stub_thread, NULL);      
+
+}
+
+/* A utility function to create an empty queue */
+bal_queue *createQueue()
+{
+   shared_queue = (struct Queue*)malloc(sizeof(struct Queue));
+   shared_queue->front = shared_queue->rear = NULL;
+   return shared_queue;
+}
+
+/* A utility function to create a new linked list node */
+struct QNode* newNode(int objKey, int status)
+{
+   struct QNode *temp = (struct QNode*)malloc(sizeof(struct QNode));
+   temp->obj_type = objKey;
+   temp->status = status;
+   temp->next = NULL;
+   return temp; 
+}
+
+/* The function to add data to shared_queue - Add end of the queue */
+void enQueue(int objKey, int status)
+{
+   /* Create a new LL node */
+   struct QNode *temp = newNode(objKey, status);
+
+   /* If queue is empty, then new node is front and rear both */
+   if (shared_queue->rear == NULL)
+   {
+      shared_queue->front = shared_queue->rear = temp;
+      return;
+   }
+
+   /* Add the new node at the end of queue and change rear */
+   shared_queue->rear->next = temp;
+   shared_queue->rear = temp;
+}
+
+/* Function to remove data from shared_queue - FIFO */
+struct QNode *deQueue()
+{
+   /* If queue is empty, return NULL */
+   if (shared_queue->front == NULL)
+   {
+      return NULL;
+   }
+
+   /* Store previous front and move front one node ahead */
+   struct QNode *temp = shared_queue->front;
+   shared_queue->front = shared_queue->front->next;
+
+   /* If front becomes NULL, then change rear also as NULL */
+   if (shared_queue->front == NULL)
+   {
+      shared_queue->rear = NULL;
+   }
+
+   return temp;
+}
+
+#endif
diff --git a/device_simulator/device_simulator/bal_stub.h b/device_simulator/device_simulator/bal_stub.h
new file mode 100644
index 0000000..0bd30de
--- /dev/null
+++ b/device_simulator/device_simulator/bal_stub.h
@@ -0,0 +1,34 @@
+
+/* Global definations */
+pthread_cond_t cv;
+pthread_mutex_t lock;
+
+#define IND_USR_DAT_LEN  8
+#define IND_USR_DAT_VAL  "brcmOLT"
+#define BALCLIENT        "bal_client"
+#define BALSERVER        "bal_server"
+
+/* A linked list (LL) node to store a queue entry */
+struct QNode
+{
+   int obj_type;
+   int status;
+   struct QNode *next;
+};
+
+ 
+/* The queue, front stores the front node of LL and rear stores ths
+  last node of LL */
+typedef struct Queue
+{
+   struct QNode *front, *rear;
+}bal_queue;
+
+/* shared queue */
+bal_queue *shared_queue;
+
+void create_stub_thread(); 
+bal_queue *createQueue();
+struct QNode* newNode(int objKey, int status);
+void enQueue(int objKey, int status);
+struct QNode *deQueue();
diff --git a/device_simulator/device_simulator/client.c.patch b/device_simulator/device_simulator/client.c.patch
new file mode 100644
index 0000000..7de4dd1
--- /dev/null
+++ b/device_simulator/device_simulator/client.c.patch
@@ -0,0 +1,37 @@
+*** grpc-c_orig/lib/client.c 2017-07-03 16:52:30.467488835 +0530
+--- grpc-c/lib/client.c	2017-07-12 15:34:28.904950001 +0530
+***************
+*** 134,141 ****
+      }
+  
+      bzero(buf, BUFSIZ);
+!     snprintf_safe(buf, sizeof(buf), "%s%s", PATH_GRPC_C_DAEMON_SOCK, 
+! 		  server_name);
+      if (buf[0] == '\0') {
+  	return NULL;
+      }
+--- 134,141 ----
+      }
+  
+      bzero(buf, BUFSIZ);
+!     /*snprintf_safe(buf, sizeof(buf), "%s%s", PATH_GRPC_C_DAEMON_SOCK, server_name);*/
+!     snprintf_safe(buf, sizeof(buf), "%s", server_name);
+      if (buf[0] == '\0') {
+  	return NULL;
+      }
+***************
+*** 1039,1049 ****
+--- 1039,1051 ----
+      gpr_timespec tout;
+      grpc_c_context_t *context;
+  
++ #if 0
+      if (context == NULL) {
+  	gpr_log(GPR_ERROR, "Invalid context pointer provided");
+  	rc = GRPC_C_FAIL;
+  	goto cleanup;
+      }
++ #endif
+  
+      context = gc_client_prepare_ops(client, mdarray, 1, input, NULL, 
+  				    client_streaming, server_streaming, NULL, 
diff --git a/device_simulator/device_simulator/service.c.patch b/device_simulator/device_simulator/service.c.patch
new file mode 100644
index 0000000..da8ebd8
--- /dev/null
+++ b/device_simulator/device_simulator/service.c.patch
@@ -0,0 +1,20 @@
+*** grpc-c_orig/lib/service.c     2017-07-03 16:52:38.239488835 +0530
+--- grpc-c/lib/service.c	2017-07-12 15:34:43.408198001 +0530
+***************
+*** 1224,1230 ****
+  	return NULL;
+      }
+  
+!     snprintf_safe(buf, sizeof(buf), "%s%s", PATH_GRPC_C_DAEMON_SOCK, name);
+  
+      if (buf[0] == '\0') {
+  	return NULL;
+--- 1224,1231 ----
+  	return NULL;
+      }
+  
+!     /*snprintf_safe(buf, sizeof(buf), "%s%s", PATH_GRPC_C_DAEMON_SOCK, name);*/
+!     snprintf_safe(buf, sizeof(buf), "%s", name);
+  
+      if (buf[0] == '\0') {
+  	return NULL;
