Base code for duet module, chardev and user tools