throw 0 if no peripherals found.