You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(3) |
Nov
(4) |
Dec
|
2008 |
Jan
(1) |
Feb
(5) |
Mar
(2) |
Apr
|
May
(8) |
Jun
(4) |
Jul
|
Aug
|
Sep
(11) |
Oct
|
Nov
|
Dec
(20) |
2009 |
Jan
(16) |
Feb
(7) |
Mar
(9) |
Apr
(4) |
May
(6) |
Jun
(17) |
Jul
(3) |
Aug
(4) |
Sep
(5) |
Oct
(10) |
Nov
(16) |
Dec
|
2010 |
Jan
(22) |
Feb
(18) |
Mar
(9) |
Apr
(102) |
May
(29) |
Jun
(40) |
Jul
(80) |
Aug
(21) |
Sep
(47) |
Oct
(13) |
Nov
(19) |
Dec
(45) |
2011 |
Jan
(82) |
Feb
(20) |
Mar
(47) |
Apr
(25) |
May
(18) |
Jun
(24) |
Jul
(24) |
Aug
(47) |
Sep
(23) |
Oct
(22) |
Nov
(69) |
Dec
(20) |
2012 |
Jan
(56) |
Feb
(42) |
Mar
(43) |
Apr
(27) |
May
(18) |
Jun
(11) |
Jul
(61) |
Aug
(19) |
Sep
(13) |
Oct
(49) |
Nov
(32) |
Dec
(37) |
2013 |
Jan
(46) |
Feb
(14) |
Mar
(13) |
Apr
(20) |
May
(20) |
Jun
(3) |
Jul
(19) |
Aug
(7) |
Sep
(4) |
Oct
(33) |
Nov
(7) |
Dec
(15) |
2014 |
Jan
(5) |
Feb
(21) |
Mar
(3) |
Apr
(3) |
May
(30) |
Jun
(1) |
Jul
(30) |
Aug
(2) |
Sep
(22) |
Oct
(14) |
Nov
(22) |
Dec
(6) |
2015 |
Jan
(7) |
Feb
(4) |
Mar
(16) |
Apr
(9) |
May
(17) |
Jun
(28) |
Jul
(3) |
Aug
(18) |
Sep
(3) |
Oct
|
Nov
(6) |
Dec
(3) |
2016 |
Jan
(15) |
Feb
(18) |
Mar
(12) |
Apr
(14) |
May
(15) |
Jun
(3) |
Jul
(3) |
Aug
(42) |
Sep
(24) |
Oct
(6) |
Nov
(5) |
Dec
(6) |
2017 |
Jan
(6) |
Feb
(2) |
Mar
(12) |
Apr
|
May
(1) |
Jun
(3) |
Jul
(2) |
Aug
(6) |
Sep
|
Oct
(1) |
Nov
(5) |
Dec
(7) |
2018 |
Jan
|
Feb
(9) |
Mar
(7) |
Apr
|
May
(10) |
Jun
(20) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
(20) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(9) |
Dec
|
2020 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
(5) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
(5) |
Oct
|
Nov
(8) |
Dec
(2) |
2021 |
Jan
(16) |
Feb
(1) |
Mar
|
Apr
(9) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
(2) |
Nov
|
Dec
(1) |
2022 |
Jan
|
Feb
(7) |
Mar
|
Apr
(4) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(2) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Prashant P. <pra...@wi...> - 2014-09-14 21:43:13
|
Thank you Wander for reply. I have found the problem. Actually I was creating the USB connection from the main window frame thus it was giving error and required to close the window. Now I have taken the connection code out of the window frame creation class. Thus connection is closing now. Thanks again. -----Original Message----- From: Wander Lairson Costa [mailto:wan...@gm...] Sent: Monday, 15 September 2014 7:46 a.m. To: pyusb-users Subject: Re: [pyusb-users] PyUSB Release USB Device Em 02/09/2014 03:25, "Prashant Patel" <pra...@wi...> escreveu: > > Hi, > > > > I am currently working on PyUSB. As I am new to USB, I don’t know, how can I do the following. > > > > I have successfully connected to my USB Device hardware from Python PyUSB. In the code I required to reset the USB Device hardware. > > Which I did by sending a command to the hardware. Now after hardware reset, I want to release the current USB device from Python PyUSB. > > And then I want to connect again to the USB Device Hardware after it come back from reset. > > > > Please let me know, how can I release the USB Device Connection and interfaces etc so that I can reconnect? > > You have use the dispose_resources from util module: from usb.util import dispose_resource dispose_resources(device) Regards, Wander ------------------------------------------------------------------------------ Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk _______________________________________________ pyusb-users mailing list pyu...@li... https://lists.sourceforge.net/lists/listinfo/pyusb-users |
From: Wander L. C. <wan...@gm...> - 2014-09-14 19:47:57
|
2014-09-08 9:05 GMT-03:00 Setia Budi <boe...@gm...>: > Unfortunately the device has no serial number :( > A few years ago we had a similar problem, we have no other option but implement serial number. -- Best Regards, Wander Lairson Costa |
From: Wander L. C. <wan...@gm...> - 2014-09-14 19:47:07
|
Em 02/09/2014 03:25, "Prashant Patel" <pra...@wi...> escreveu: > > Hi, > > > > I am currently working on PyUSB. As I am new to USB, I don’t know, how can I do the following. > > > > I have successfully connected to my USB Device hardware from Python PyUSB. In the code I required to reset the USB Device hardware. > > Which I did by sending a command to the hardware. Now after hardware reset, I want to release the current USB device from Python PyUSB. > > And then I want to connect again to the USB Device Hardware after it come back from reset. > > > > Please let me know, how can I release the USB Device Connection and interfaces etc so that I can reconnect? > > You have use the dispose_resources from util module: from usb.util import dispose_resource dispose_resources(device) Regards, Wander |
From: Rolf I. <rol...@gm...> - 2014-09-09 20:48:41
|
Hi Wander, > Unfortunately PyUSB hasn't this capability. Hm, okay. Thanks for clearing up! |
From: Wander L. C. <wan...@gm...> - 2014-09-09 20:36:46
|
2014-09-09 16:46 GMT-03:00 Rolf Inator <rol...@gm...>: > Hi list, > Hi, > I wonder if it is possible to sniff USB packets for every USB device (usb.core.find(find_all=True)), beginning with the initial packets like GET_STATUS, GET_DESCRIPTOR and so on by using pyUSB? Similiar to the output that usbmon and Wireshark produces. > Unfortunately PyUSB hasn't this capability. -- Best Regards, Wander Lairson Costa |
From: Rolf I. <rol...@gm...> - 2014-09-09 19:47:06
|
Hi list, I wonder if it is possible to sniff USB packets for every USB device (usb.core.find(find_all=True)), beginning with the initial packets like GET_STATUS, GET_DESCRIPTOR and so on by using pyUSB? Similiar to the output that usbmon and Wireshark produces. Regards, Rolf |
From: Setia B. <boe...@gm...> - 2014-09-08 12:05:35
|
Unfortunately the device has no serial number :( Kind regards, Budi On Mon, Sep 8, 2014 at 9:59 PM, Wander Lairson Costa < wan...@gm...> wrote: > 2014-09-07 22:40 GMT-03:00 Setia Budi <boe...@gm...>: > > Dear all, > > I have further question regarding the use of multiple identical usb > reader. > > > > For example I have two physical USB port on my computer, let's call them > > usb1 and usb2. > > Then I attach two identical usb device to them. Let's call them device1 > and > > device2. > > > > Then I write this Python script > > devices = tuple(usb.core.find(find_all=True, idVendor=0x1, > idProduct=0x2)) > > > > My question is, how to make sure that devices[0] is always refer to the > usb > > device which is connected to usb1 and device[1] is always refer to the > usb > > device attach to usb2. > > I found that there is no consistency every time I call this function: > > usb.core.find(find_all=True, idVendor=0x1, idProduct=0x2) > > > > Anyone could assist me? Thank you :) > > > > If your device has a serial number, you can order the list using that > as the key, so devices will always have the same order. > > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce > Perforce version control. Predictably reliable. > > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > pyusb-users mailing list > pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > |
From: Wander L. C. <wan...@gm...> - 2014-09-08 12:00:08
|
2014-09-07 22:40 GMT-03:00 Setia Budi <boe...@gm...>: > Dear all, > I have further question regarding the use of multiple identical usb reader. > > For example I have two physical USB port on my computer, let's call them > usb1 and usb2. > Then I attach two identical usb device to them. Let's call them device1 and > device2. > > Then I write this Python script > devices = tuple(usb.core.find(find_all=True, idVendor=0x1, idProduct=0x2)) > > My question is, how to make sure that devices[0] is always refer to the usb > device which is connected to usb1 and device[1] is always refer to the usb > device attach to usb2. > I found that there is no consistency every time I call this function: > usb.core.find(find_all=True, idVendor=0x1, idProduct=0x2) > > Anyone could assist me? Thank you :) > If your device has a serial number, you can order the list using that as the key, so devices will always have the same order. |
From: Setia B. <boe...@gm...> - 2014-09-08 01:40:48
|
Dear all, I have further question regarding the use of multiple identical usb reader. For example I have two physical USB port on my computer, let's call them usb1 and usb2. Then I attach two identical usb device to them. Let's call them device1 and device2. Then I write this Python script devices = tuple(usb.core.find(find_all=True, idVendor=0x1, idProduct=0x2)) My question is, how to make sure that devices[0] is always refer to the usb device which is connected to usb1 and device[1] is always refer to the usb device attach to usb2. I found that there is no consistency every time I call this function: usb.core.find(find_all=True, idVendor=0x1, idProduct=0x2) Anyone could assist me? Thank you :) Kind regards, Budi On Fri, Sep 5, 2014 at 4:29 PM, Setia Budi <boe...@gm...> wrote: > It works :) > Thank you for the clue. I do appreciate it :) > > Kind regards, > Budi > > > On Thu, Sep 4, 2014 at 8:40 PM, Wander Lairson Costa < > wan...@gm...> wrote: > >> 2014-09-03 22:49 GMT-03:00 Setia Budi <boe...@gm...>: >> > Dear all, >> > Currently I have been wrote a simple Python script (using PyUSB) to >> > communicate with an RFID reader. It is working well so far. >> > Recently I need to deal with control to RFID reader from a single >> computer. >> > I am aware about this documentation page >> > https://github.com/walac/pyusb/blob/master/docs/tutorial.rst which >> mention >> > about dealing with multiple identical devices, however, I couldn't >> > understand it. >> > Is anyone can help me with some examples to deal with this situation? >> Real >> > example would be very helpful for me :) >> > >> >> If you use usb.core.find(find_all=True, IdVendor=..., idProduct...) >> you will get all devices connected with the idVendor and idProduct >> supplied as an iterator. Each one is connected to a bus and has an >> associated address (just a id number in the bus). >> >> For example, if you have two devices connected and their idVendor and >> idProduct are, respectively, 0x1 and 0x2: >> >> devices = tuple(usb.core.find(find_all=True, idVendor=0x1, idProduct=0x2)) >> >> print devices[0].bus, devices[0].address >> print devices[1].bus, devices[1].address >> >> devices[0].set_configuration() >> devices[1].set_configuration() >> >> Did you get it? >> >> -- >> Best Regards, >> Wander Lairson Costa >> >> >> ------------------------------------------------------------------------------ >> Slashdot TV. >> Video for Nerds. Stuff that matters. >> http://tv.slashdot.org/ >> _______________________________________________ >> pyusb-users mailing list >> pyu...@li... >> https://lists.sourceforge.net/lists/listinfo/pyusb-users >> > > |
From: Setia B. <boe...@gm...> - 2014-09-05 06:29:41
|
It works :) Thank you for the clue. I do appreciate it :) Kind regards, Budi On Thu, Sep 4, 2014 at 8:40 PM, Wander Lairson Costa < wan...@gm...> wrote: > 2014-09-03 22:49 GMT-03:00 Setia Budi <boe...@gm...>: > > Dear all, > > Currently I have been wrote a simple Python script (using PyUSB) to > > communicate with an RFID reader. It is working well so far. > > Recently I need to deal with control to RFID reader from a single > computer. > > I am aware about this documentation page > > https://github.com/walac/pyusb/blob/master/docs/tutorial.rst which > mention > > about dealing with multiple identical devices, however, I couldn't > > understand it. > > Is anyone can help me with some examples to deal with this situation? > Real > > example would be very helpful for me :) > > > > If you use usb.core.find(find_all=True, IdVendor=..., idProduct...) > you will get all devices connected with the idVendor and idProduct > supplied as an iterator. Each one is connected to a bus and has an > associated address (just a id number in the bus). > > For example, if you have two devices connected and their idVendor and > idProduct are, respectively, 0x1 and 0x2: > > devices = tuple(usb.core.find(find_all=True, idVendor=0x1, idProduct=0x2)) > > print devices[0].bus, devices[0].address > print devices[1].bus, devices[1].address > > devices[0].set_configuration() > devices[1].set_configuration() > > Did you get it? > > -- > Best Regards, > Wander Lairson Costa > > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > _______________________________________________ > pyusb-users mailing list > pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > |
From: Wander L. C. <wan...@gm...> - 2014-09-04 10:41:35
|
2014-09-03 22:49 GMT-03:00 Setia Budi <boe...@gm...>: > Dear all, > Currently I have been wrote a simple Python script (using PyUSB) to > communicate with an RFID reader. It is working well so far. > Recently I need to deal with control to RFID reader from a single computer. > I am aware about this documentation page > https://github.com/walac/pyusb/blob/master/docs/tutorial.rst which mention > about dealing with multiple identical devices, however, I couldn't > understand it. > Is anyone can help me with some examples to deal with this situation? Real > example would be very helpful for me :) > If you use usb.core.find(find_all=True, IdVendor=..., idProduct...) you will get all devices connected with the idVendor and idProduct supplied as an iterator. Each one is connected to a bus and has an associated address (just a id number in the bus). For example, if you have two devices connected and their idVendor and idProduct are, respectively, 0x1 and 0x2: devices = tuple(usb.core.find(find_all=True, idVendor=0x1, idProduct=0x2)) print devices[0].bus, devices[0].address print devices[1].bus, devices[1].address devices[0].set_configuration() devices[1].set_configuration() Did you get it? -- Best Regards, Wander Lairson Costa |
From: Wander L. C. <wan...@gm...> - 2014-09-04 10:34:30
|
2014-09-02 11:17 GMT-03:00 Julio Sánchez <jul...@gm...>: > Hi list! > > I'm new here. I would like to help me with this issue. > > Python 2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] on > win32 > Type "copyright", "credits" or "license()" for more information. >>>> import usb >>>> busses = usb.busses() > > Traceback (most recent call last): > File "<pyshell#1>", line 1, in <module> > busses = usb.busses() > File "C:\Python27\usb\legacy.py", line 333, in busses > return (Bus(),) > File "C:\Python27\usb\legacy.py", line 329, in __init__ > self.devices = [Device(d) for d in core.find(find_all=True)] > File "C:\Python27\usb\legacy.py", line 314, in __init__ > self.configurations = [Configuration(c) for c in dev] > File "C:\Python27\usb\core.py", line 723, in __iter__ > yield Configuration(self, i) > File "C:\Python27\usb\core.py", line 419, in __init__ > configuration > File "C:\Python27\usb\backend\libusb10.py", line 471, in > get_configuration_descriptor > config, byref(cfg))) > File "C:\Python27\usb\backend\libusb10.py", line 403, in _check > raise USBError(_str_error[ret], ret, _libusb_errno[ret]) > USBError: [Errno 2] Entity not found > > I have all my code in unix and works fine, but when i tried on windows i > found a lot of problems to run my app. > > Any suggestions? > Hi, Sorry for the delay. What version are you using? There are a lot of fixes for usb legacy on git master [1], you might want to try it. [1] https://github.com/walac/pyusb/tarball/master -- Best Regards, Wander Lairson Costa |
From: Setia B. <boe...@gm...> - 2014-09-04 01:49:41
|
Dear all, Currently I have been wrote a simple Python script (using PyUSB) to communicate with an RFID reader. It is working well so far. Recently I need to deal with control to RFID reader from a single computer. I am aware about this documentation page https://github.com/walac/pyusb/blob/master/docs/tutorial.rst which mention about dealing with multiple identical devices, however, I couldn't understand it. Is anyone can help me with some examples to deal with this situation? Real example would be very helpful for me :) Kind regards, Budi |
From: Julio S. <jul...@gm...> - 2014-09-02 14:17:35
|
Hi list! I'm new here. I would like to help me with this issue. Python 2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> import usb >>> busses = usb.busses() Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> busses = usb.busses() File "C:\Python27\usb\legacy.py", line 333, in busses return (Bus(),) File "C:\Python27\usb\legacy.py", line 329, in __init__ self.devices = [Device(d) for d in core.find(find_all=True)] File "C:\Python27\usb\legacy.py", line 314, in __init__ self.configurations = [Configuration(c) for c in dev] File "C:\Python27\usb\core.py", line 723, in __iter__ yield Configuration(self, i) File "C:\Python27\usb\core.py", line 419, in __init__ configuration File "C:\Python27\usb\backend\libusb10.py", line 471, in get_configuration_descriptor config, byref(cfg))) File "C:\Python27\usb\backend\libusb10.py", line 403, in _check raise USBError(_str_error[ret], ret, _libusb_errno[ret]) USBError: [Errno 2] Entity not found I have all my code in unix and works fine, but when i tried on windows i found a lot of problems to run my app. Any suggestions? Best Regards, -- Fedora <https://fedoraproject.org/wiki/User:Julioalpa> Ambassador <https://fedoraproject.org/wiki/User:Julioalpa> Ushuaia - Tierra del Fuego - Argentina Julio Sánchez |
From: Prashant P. <pra...@wi...> - 2014-09-02 06:24:43
|
Hi, I am currently working on PyUSB. As I am new to USB, I don't know, how can I do the following. I have successfully connected to my USB Device hardware from Python PyUSB. In the code I required to reset the USB Device hardware. Which I did by sending a command to the hardware. Now after hardware reset, I want to release the current USB device from Python PyUSB. And then I want to connect again to the USB Device Hardware after it come back from reset. Please let me know, how can I release the USB Device Connection and interfaces etc so that I can reconnect? Thank you very much in advance. - Prashant |
From: Mailing L. <mym...@gm...> - 2014-08-03 11:08:20
|
Hi, when i try to use the usbtmc lib which uses pyusb i get the following error: Traceback (most recent call last): File "read.py", line 2, in <module> instr=usbtmc.Instrument( 0x0957, 0x1907) File "/usr/local/lib/python2.7/dist-packages/python_usbtmc-0.5-py2.7.egg/usbtmc/usbtmc.py", line 233, in __init__ if self.device.is_kernel_driver_active(0): File "/usr/local/lib/python2.7/dist-packages/usb/core.py", line 992, in is_kernel_driver_active interface) File "/usr/local/lib/python2.7/dist-packages/usb/backend/__init__.py", line 363, in is_kernel_driver_active _not_implemented(self.is_kernel_driver_active) File "/usr/local/lib/python2.7/dist-packages/usb/backend/__init__.py", line 79, in _not_implemented raise NotImplementedError(func.__name__) NotImplementedError: is_kernel_driver_active I use Raspbian and i have installed the latest libusb lib. As i know so far this all should work fine together. Any idea why this function is not implemented and what i can do to fix this? Alex |
From: Wander L. C. <wan...@gm...> - 2014-08-01 23:05:36
|
2014-07-30 15:38 GMT-03:00 Slavko Kocjancic <es...@gm...>: > On 29. 07. 2014 18:51, Wander Lairson Costa wrote: >> Unfortunately, PyUSB doesn't have async support yet :( >> >> >>> Ouch... >>> >>> So what can be done? >>> Direct acess to lubusb? Is it possible to make callback in python?!? >>> Or another library in c is way to go?!? >>> >>> any hint? >>> >> For PyUSB there is nothing to be done on short term, but you can try >> [1]. It is a thin Python wrapper around libusb 1.0. >> >> [1] https://github.com/vpelletier/python-libusb1 >> >> Best Regards, >> Wander Lairson Costa >> > > Ok I managed somehow to work in linux but now I stuck as I can't manage > ro run in windows. > I know that I use python-libusb1 > > https://github.com/vpelletier/python-libusb1 > > and this should work with libusb1.0 (but not libusb-win32). But I don't > know how to test if this is libusb or libusb-win as both dll have same > name? And seems that I use wrong dll (btw it's near impossible to find > precompiled libusb-1.0.dll to be not libusb-win32 type??) > > Does someone have links to working solution? (ie python wrapper to > libusb and correct libusb, to be able to work in linux and win with > async support?) > Sorry for the delay, quite busy week. I think that you will get more helpful info at libusb mailing list. -- Best Regards, Wander Lairson Costa |
From: Wander L. C. <wan...@gm...> - 2014-07-31 18:04:07
|
2014-07-31 14:48 GMT-03:00 Samuel Thurston <sam...@ui...>: > > On 07/30/2014 05:51 PM, Wander Lairson Costa wrote: >> 2014-07-30 15:01 GMT-03:00 Samuel Thurston <sam...@ui...>: >>> Hello all, >>> >>> I'm trying to use pyusb on an embedded yocto linux running on an intel >>> Galileo board. I'm running into problems trying to load the custom >>> backend as specified in the tutorial page. Since there is no compile >>> environment I'm missing ldconfig. When I go to get a handle to the >>> device the "normal way" I get this error: >>> >>> >>> dev = usb.core.find(idVendor = vid, idProduct = pid) >>> Traceback (most recent call last): >>> File "<stdin>", line 1, in <module> >>> File "/usr/lib/python2.7/site-packages/usb/core.py", line 864, in find >>> raise ValueError('No backend available') >>> ValueError: No backend available >>> >>> I located the library to link at /lib/libusb-1.0.so.0 >>> >>> so I tried to use the method described to specify a "find_library" function. >>> >>> >>> >>> >>> >>> backend = usb.backend.libusb1.get_backend(find_library=lambda x: >>> "/lib/libusb-1.0.so.0") >>> Traceback (most recent call last): >>> File "<stdin>", line 1, in <module> >>> TypeError: get_backend() takes no arguments (1 given) >>> >>> >>> I don't really understand the mechanism at play here, so I don't have >>> any ideas for next steps. If anyone can provide some guidance I'd be >>> very grateful. >>> >>> for what it's worth, here's the DATA section from help(usb) >>> >>> DATA >>> __all__ = ['legacy', 'core', 'backend', 'util'] >>> __author__ = 'Wander Lairson Costa' >>> __version__ = '1.0.0b1' >>> >>> >> Hmm, unfortunately this feature is not available on any tagged version >> yet. Could you please test with [1] ? >> >> [1] https://github.com/walac/pyusb/tarball/master >> > That worked perfectly. My only remark is that the tarball is labelled > 1.0.0b1 but the installed version is listed as 1.0.0b2. > That's because I didn't tag b2 yet. > Thanks very much for the fix! > You're welcome. -- Best Regards, Wander Lairson Costa |
From: Samuel T. <sam...@ui...> - 2014-07-31 17:48:34
|
On 07/30/2014 05:51 PM, Wander Lairson Costa wrote: > 2014-07-30 15:01 GMT-03:00 Samuel Thurston <sam...@ui...>: >> Hello all, >> >> I'm trying to use pyusb on an embedded yocto linux running on an intel >> Galileo board. I'm running into problems trying to load the custom >> backend as specified in the tutorial page. Since there is no compile >> environment I'm missing ldconfig. When I go to get a handle to the >> device the "normal way" I get this error: >> >> >>> dev = usb.core.find(idVendor = vid, idProduct = pid) >> Traceback (most recent call last): >> File "<stdin>", line 1, in <module> >> File "/usr/lib/python2.7/site-packages/usb/core.py", line 864, in find >> raise ValueError('No backend available') >> ValueError: No backend available >> >> I located the library to link at /lib/libusb-1.0.so.0 >> >> so I tried to use the method described to specify a "find_library" function. >> >> >> >>> >> >>> backend = usb.backend.libusb1.get_backend(find_library=lambda x: >> "/lib/libusb-1.0.so.0") >> Traceback (most recent call last): >> File "<stdin>", line 1, in <module> >> TypeError: get_backend() takes no arguments (1 given) >> >> >> I don't really understand the mechanism at play here, so I don't have >> any ideas for next steps. If anyone can provide some guidance I'd be >> very grateful. >> >> for what it's worth, here's the DATA section from help(usb) >> >> DATA >> __all__ = ['legacy', 'core', 'backend', 'util'] >> __author__ = 'Wander Lairson Costa' >> __version__ = '1.0.0b1' >> >> > Hmm, unfortunately this feature is not available on any tagged version > yet. Could you please test with [1] ? > > [1] https://github.com/walac/pyusb/tarball/master > That worked perfectly. My only remark is that the tarball is labelled 1.0.0b1 but the installed version is listed as 1.0.0b2. Thanks very much for the fix! |
From: Wander L. C. <wan...@gm...> - 2014-07-30 22:52:13
|
2014-07-30 15:01 GMT-03:00 Samuel Thurston <sam...@ui...>: > Hello all, > > I'm trying to use pyusb on an embedded yocto linux running on an intel > Galileo board. I'm running into problems trying to load the custom > backend as specified in the tutorial page. Since there is no compile > environment I'm missing ldconfig. When I go to get a handle to the > device the "normal way" I get this error: > > >>> dev = usb.core.find(idVendor = vid, idProduct = pid) > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/usr/lib/python2.7/site-packages/usb/core.py", line 864, in find > raise ValueError('No backend available') > ValueError: No backend available > > I located the library to link at /lib/libusb-1.0.so.0 > > so I tried to use the method described to specify a "find_library" function. > > > >>> > >>> backend = usb.backend.libusb1.get_backend(find_library=lambda x: > "/lib/libusb-1.0.so.0") > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > TypeError: get_backend() takes no arguments (1 given) > > > I don't really understand the mechanism at play here, so I don't have > any ideas for next steps. If anyone can provide some guidance I'd be > very grateful. > > for what it's worth, here's the DATA section from help(usb) > > DATA > __all__ = ['legacy', 'core', 'backend', 'util'] > __author__ = 'Wander Lairson Costa' > __version__ = '1.0.0b1' > > Hmm, unfortunately this feature is not available on any tagged version yet. Could you please test with [1] ? [1] https://github.com/walac/pyusb/tarball/master -- Best Regards, Wander Lairson Costa |
From: Slavko K. <es...@gm...> - 2014-07-30 18:38:50
|
On 29. 07. 2014 18:51, Wander Lairson Costa wrote: > Unfortunately, PyUSB doesn't have async support yet :( > > >> Ouch... >> >> So what can be done? >> Direct acess to lubusb? Is it possible to make callback in python?!? >> Or another library in c is way to go?!? >> >> any hint? >> > For PyUSB there is nothing to be done on short term, but you can try > [1]. It is a thin Python wrapper around libusb 1.0. > > [1] https://github.com/vpelletier/python-libusb1 > > Best Regards, > Wander Lairson Costa > Ok I managed somehow to work in linux but now I stuck as I can't manage ro run in windows. I know that I use python-libusb1 https://github.com/vpelletier/python-libusb1 and this should work with libusb1.0 (but not libusb-win32). But I don't know how to test if this is libusb or libusb-win as both dll have same name? And seems that I use wrong dll (btw it's near impossible to find precompiled libusb-1.0.dll to be not libusb-win32 type??) Does someone have links to working solution? (ie python wrapper to libusb and correct libusb, to be able to work in linux and win with async support?) Thanks. |
From: Samuel T. <sam...@ui...> - 2014-07-30 18:14:23
|
Hello all, I'm trying to use pyusb on an embedded yocto linux running on an intel Galileo board. I'm running into problems trying to load the custom backend as specified in the tutorial page. Since there is no compile environment I'm missing ldconfig. When I go to get a handle to the device the "normal way" I get this error: >>> dev = usb.core.find(idVendor = vid, idProduct = pid) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/site-packages/usb/core.py", line 864, in find raise ValueError('No backend available') ValueError: No backend available I located the library to link at /lib/libusb-1.0.so.0 so I tried to use the method described to specify a "find_library" function. >>> >>> backend = usb.backend.libusb1.get_backend(find_library=lambda x: "/lib/libusb-1.0.so.0") Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: get_backend() takes no arguments (1 given) I don't really understand the mechanism at play here, so I don't have any ideas for next steps. If anyone can provide some guidance I'd be very grateful. for what it's worth, here's the DATA section from help(usb) DATA __all__ = ['legacy', 'core', 'backend', 'util'] __author__ = 'Wander Lairson Costa' __version__ = '1.0.0b1' |
From: Slavko K. <es...@gm...> - 2014-07-30 10:23:28
|
On 30. 07. 2014 11:52, Xiaofan Chen wrote: > On Wed, Jul 30, 2014 at 2:45 PM, Slavko Kocjancic <es...@gm...> wrote: >> Hello... >> I try to do some async transfer. The program bellow actualy 'near' work. >> It setup 10 transfers and should print the received bytes in callback. >> The problem is that callback is not done at receive complete! >> In example below I expect callback while sleep comand is executed but >> instead got all callbacks when I close device... >> I know that USBPoller/USBPollerThread has something to do with my >> problem but don't know how to use it. >> >> Here is my test program: >> #*************************************************************** >> import usb1,time >> >> def openUsb(vid,pid,name): >> context = usb1.USBContext() >> for dev in context.getDeviceList(skip_on_error=True): >> if (dev.getVendorID()==vid) & (dev.getProductID()==pid): >> if dev.getProduct()==name: >> return dev.open() >> > It seems to me that you are not using pyusb, but rather python-libusb1. > https://github.com/vpelletier/python-libusb1/blob/master/testUSB1.py > > I am not so sure if people in this list are working with > python-libusb1 or not. > > Yes it is python-libusb1 as libusb doesn't handle async transfer at all. |
From: Xiaofan C. <xia...@gm...> - 2014-07-30 09:52:58
|
On Wed, Jul 30, 2014 at 2:45 PM, Slavko Kocjancic <es...@gm...> wrote: > Hello... > I try to do some async transfer. The program bellow actualy 'near' work. > It setup 10 transfers and should print the received bytes in callback. > The problem is that callback is not done at receive complete! > In example below I expect callback while sleep comand is executed but > instead got all callbacks when I close device... > I know that USBPoller/USBPollerThread has something to do with my > problem but don't know how to use it. > > Here is my test program: > #*************************************************************** > import usb1,time > > def openUsb(vid,pid,name): > context = usb1.USBContext() > for dev in context.getDeviceList(skip_on_error=True): > if (dev.getVendorID()==vid) & (dev.getProductID()==pid): > if dev.getProduct()==name: > return dev.open() > It seems to me that you are not using pyusb, but rather python-libusb1. https://github.com/vpelletier/python-libusb1/blob/master/testUSB1.py I am not so sure if people in this list are working with python-libusb1 or not. -- Xiaofan |
From: Slavko K. <es...@gm...> - 2014-07-30 06:45:52
|
Hello... I try to do some async transfer. The program bellow actualy 'near' work. It setup 10 transfers and should print the received bytes in callback. The problem is that callback is not done at receive complete! In example below I expect callback while sleep comand is executed but instead got all callbacks when I close device... I know that USBPoller/USBPollerThread has something to do with my problem but don't know how to use it. Here is my test program: #*************************************************************** import usb1,time def openUsb(vid,pid,name): context = usb1.USBContext() for dev in context.getDeviceList(skip_on_error=True): if (dev.getVendorID()==vid) & (dev.getProductID()==pid): if dev.getProduct()==name: return dev.open() USBdev=openUsb(0x16d0,0x06ad,'Q_ANALISER') if not USBdev: print "Device not found" exit(0) def callback(transfer): print "Just received %4.0f Bytes" % transfer.getActualLength() transfer=[] for i in range(10): transfer.append(USBdev.getTransfer()) transfer[-1].setControl(160, 3, 0, 0, 4096, callback, None, 1000) transfer[-1].submit() time.sleep(1) print "sleep 1 done." time.sleep(1) print "sleep 2 done." USBdev.close() print "Device closed." #*************************************************************** And this is output. (received length is as expected 1'st frame is 1 as this indicated overrun in my device and other's are actual packets) sleep 1 done. sleep 2 done. Just received 1 Bytes Just received 2870 Bytes Just received 2870 Bytes Just received 2870 Bytes Just received 2870 Bytes Just received 2870 Bytes Just received 2870 Bytes Just received 2870 Bytes Just received 2870 Bytes Just received 2870 Bytes Device closed. ------------------ (program exited with code: 0) Press return to continue |