added device connection function to service