From 15514928546651b2a859857d0dcd57cf68f3d124 Mon Sep 17 00:00:00 2001 From: Fabricio Costa Date: Sun, 29 Apr 2018 16:54:33 -0300 Subject: [PATCH] Find by idVendor, avoiding usb.core bugs --- emotiv/epoc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/emotiv/epoc.py b/emotiv/epoc.py index 121aa9a..9f31c8d 100644 --- a/emotiv/epoc.py +++ b/emotiv/epoc.py @@ -196,13 +196,14 @@ def set_channel_mask(self, channel_mask): self.channel_mask = channel_mask def enumerate(self): + """Traverse through USB bus and enumerate EPOC devices.""" if self.method == "dummy": self.endpoint = open("/dev/urandom") self.get_sample = self.__get_sample_dummy return - devices = usb.core.find(find_all=True, custom_match=self._is_epoc) + devices = usb.core.find(idVendor=0x1234, find_all=True, custom_match=self._is_epoc) if not devices: raise EPOCNotPluggedError("Emotiv EPOC not found.")