Added device ready function.