changed communication code. split operations into open, close and sendCommand using Android host api sample