[REF] change API and add auto-detection of hardware in order to select the right driver