https://github.com/martinpitt/umockdev by @martinpitt can be used to mock character devices. It can be used to implement unit-tests for the library without access to the real hardware