added retry loop until device is ready
Merge pull request #1 from jankcorn/master

added retry loop until device is ready