device gateway use protocbuf