client: communication with server and device connections