I added the device connecting and device ready functionality.