Uses browser-serialport if running as a chrome application.