Reading using buf_ptr now, although only lightly tested.
Improved testing ability
Trying to get buf_ptr to restart when device is reopened