2012/12/30 Ryan Speers <rmspe...@gmail.com>:
> Hi,
>
> Thanks again for the help with this...
>
> I tried the suggestion, using the below code snippits:
>
>     import usb.core
>     import usb.util
>     import usb.backend.libusb01
>     backend = usb.backend.libusb01.get_backend()
>
>     devs = usb.core.find(backend=backend, find_all=True,
> custom_match=findFromList(vendor, product))
>
> It appears to be a similar/same issue in terms of symptoms. Again, the
> issue seems to be the SECOND read/write operation after I plug a new
> device in -- the first one works.
>
> ~/killerbee/killerbee$ sudo zbid
> Warning: You are using pyUSB 1.x, support is in alpha.
> Dev     Product String  Serial Number
> 3:4     KILLERB001      A50400A01C25
> Found 1 devices.
>
> ~/killerbee/killerbee$ sudo zbdump -f 11 -w test.pcap -i 3:4
> Warning: You are using pyUSB 1.x, support is in alpha.
> Warning: You are using pyUSB 1.x, support is in alpha.
> zbdump: listening on '3:4', link-type DLT_IEEE802_15_4, capture size 127 bytes
> Traceback (most recent call last):
>   File "/usr/local/bin/zbdump", line 100, in <module>
>     packet = kb.pnext()
>   File "/usr/local/lib/python2.7/dist-packages/killerbee/__init__.py",
> line 270, in pnext
>     return self.driver.pnext(timeout)
>   File "/usr/local/lib/python2.7/dist-packages/killerbee/dev_rzusbstick.py",
> line 443, in pnext
>     pdata = self.dev.read(RZ_USB_PACKET_EP, 1, 0, 100)
>   File "/usr/local/lib/python2.7/dist-packages/usb/core.py", line 654, in read
>     self.__get_timeout(timeout)
>   File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb01.py",
> line 483, in bulk_read
>     timeout)
>   File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb01.py",
> line 568, in __read
>     timeout
>   File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb01.py",
> line 384, in _check
>     raise USBError(errmsg, ret)
> usb.core.USBError: [Errno None] Connection timed out
>
> This timeout error happens on the second USB related call within the
> zbdump program. Removing and reinserting the device fixes the issue.
> The same symptom occurs when I import libusb10 and use that
> explicitly. Do you have other ideas for what this could be? Is a
> resource not getting properly released?
>

What about doing a 'reset' call and setting up the device again?

-- 
Best Regards,
Wander Lairson Costa

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to