Return 0 on error, and also throw 0 if now peripherals found.