Merge pull request #52 from janekm/master

Device needs to be opened before being accessed for read/write.