rsc-dev / loophole

Polar devices Python API and CLI.
MIT License
148 stars 16 forks source link

Polar v650 #19

Open ArsenyMironov opened 5 years ago

ArsenyMironov commented 5 years ago

Hi!

I'm trying to use your software with Polar v650. The list command does see the device, but when I try to connect it I get an error

loophole(no device)>list 0 - Polar V650 (BUEY4HDMAIMVW8OJ)

loophole(no device)>connect 0 Traceback (most recent call last): File "\~/anaconda2/lib/python2.7/site-packages/loophole/main.py", line 300, in main() File "\~/anaconda2/lib/python2.7/site-packages/loophole/main.py", line 293, in main cli.cmdloop(INTRO.format(version)) File "\~/anaconda2/lib/python2.7/cmd.py", line 142, in cmdloop stop = self.onecmd(line) File "\~/anaconda2/lib/python2.7/cmd.py", line 221, in onecmd return func(arg) File "\~/anaconda2/lib/python2.7/site-packages/loophole/main.py", line 116, in do_connect self.device.open() File "\~/anaconda2/lib/python2.7/site-packages/loophole/polar/init.py", line 667, in open self.usb.open(self.usb_device) File "\~/anaconda2/lib/python2.7/site-packages/loophole/polar/init__.py", line 587, in open self.usb.open(usb_device) File "\~/anaconda2/lib/python2.7/site-packages/loophole/polar/init.py", line 502, in open assert self.ep_out_0 is not None AssertionError

Is it possible to solve?

Thanks!

rsc-dev commented 5 years ago

It is hard to tell based on this stack trace. It seems like USB access issue.

edneville commented 4 years ago

I'm getting the same, here's a strace:

timerfd_settime(9, TFD_TIMER_ABSTIME, {it_interval={tv_sec=0, tv_nsec=0}, it_value={tv_sec=10051, tv_nsec=65525000}}, NULL) = 0
ioctl(10, USBDEVFS_SUBMITURB, 0x564355a911b0) = 0
poll([{fd=6, events=POLLIN}, {fd=9, events=POLLIN}, {fd=10, events=POLLOUT}], 3, 60000) = 1 ([{fd=10, revents=POLLOUT}])
ioctl(10, USBDEVFS_REAPURBNDELAY, 0x7ffcb66a2f80) = 0
timerfd_settime(9, 0, {it_interval={tv_sec=0, tv_nsec=0}, it_value={tv_sec=0, tv_nsec=0}}, NULL) = 0
ioctl(10, USBDEVFS_REAPURBNDELAY, 0x7ffcb66a2f80) = -1 EAGAIN (Resource temporarily unavailable)
timerfd_settime(9, TFD_TIMER_ABSTIME, {it_interval={tv_sec=0, tv_nsec=0}, it_value={tv_sec=10051, tv_nsec=65720000}}, NULL) = 0
ioctl(10, USBDEVFS_SUBMITURB, 0x564355a98b70) = 0
poll([{fd=6, events=POLLIN}, {fd=9, events=POLLIN}, {fd=10, events=POLLOUT}], 3, 60000) = 1 ([{fd=10, revents=POLLOUT}])
ioctl(10, USBDEVFS_REAPURBNDELAY, 0x7ffcb66a2f80) = 0
timerfd_settime(9, 0, {it_interval={tv_sec=0, tv_nsec=0}, it_value={tv_sec=0, tv_nsec=0}}, NULL) = 0
ioctl(10, USBDEVFS_REAPURBNDELAY, 0x7ffcb66a2f80) = -1 EAGAIN (Resource temporarily unavailable)
ioctl(10, USBDEVFS_GETDRIVER, 0x7ffcb66a3580) = -1 ENODATA (No data available)
ioctl(10, USBDEVFS_SETCONFIGURATION, 0x7ffcb66a31ac) = 0
write(2, "Traceback (most recent call last"..., 35) = 35

I'm not sure if this will look familiar to you.