[pyusb-users] Please join me in congratulating Robert Wlodarczyk as the new PyUSB maintainer

2017-11-10 Thread Wander Lairson Costa
Hi there all,

Good news for the PyUSB users. As you know, I can't commit to PyUSB
maintainership anymore and recently I started to look for a new
maintainer.

Well, the day has come, Robert volunteered to become the new maintainer!!!

First of all, I would like to say thank you to the community for the
patience and for understanding my personal issues.

Taking this decision wasn't easy, PyUSB started when I was still an
undergraduate student, 12 years ago. At that time, I never had made a
single contribution to an open source project and created PyUSB only
because nobody had done it yet. The intention was just to have a tool
to write quick prototypes for USB hardware I was responsible to write
the device drivers to.

I remember my thought at the time I decided to open source it: "Well,
6 billion people out there, there must be someone with the same
problem as mine, let me put this horrible code in SourceForge and make
his/er life less painful". The project just became popular at levels I
was not expecting.

But time passes and life moves on, I am not writing USB device drivers
anymore and my free time to commit to the project is just not enough,
given the user base size.

Now I would like to say thank you to Robert for stepping in as the
maintainer. I am pretty sure PyUSB will be in good hands and he is
going to do a fantastic job.

With this news, I moved the PyUSB repo to a new location [1]. PyUSB
now is an organization. Hopefully, this will make easier for more
people to become project maintainers. We are handling further details
in short future.

Last but not least, although Robert from this day is the person
responsible to drive the project development, I am not washing my
hands, I offered him my support in this transition for whatever
assistance he needs. Also, I shared my thoughts on areas PyUSB needs
the most attention, and I even might submit a patch or two as a
contributor in the future.

Well, that's it. Congratulations Robert, you are officially the PyUSB
owner, have fun :)

-- 
Best Regards,
Wander Lairson Costa

[1] https://github.com/pyusb/pyusb

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


[pyusb-users] Looking for a new maintainer

2017-10-05 Thread Wander Lairson Costa
Hi there all,

A few months I sent a message explaining why PyUSB has been steady for
such a long time. Although my health has strongly improved since then,
things are still ongoing, I don't have time to work as a maintainer
anymore and as such, I am looking a volunteer to take the leadership
of the project.

That said, I don't intend to be a complete strange in the project, I
still intend to participate as an occasional contributor, I just can't
handle the burden of being a maintainer of the project. This has not
only have to do with my health issues but also because I am working
with stuff unrelated to the project nowadays.

I am going to update website and README soon with this new information.

-- 
Best Regards,
Wander Lairson Costa

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Errors on Windows 10 (Tried making an issue on github but no response after almost a month)

2017-08-03 Thread Wander Lairson Costa
2017-08-03 17:29 GMT-03:00 Bill Gaylord :
> Okay. I did not really find the mailing list till now.
>

I think I have to be more explicit on advertising mailing list, some
users have complained about that in the past.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Errors on Windows 10 (Tried making an issue on github but no response after almost a month)

2017-08-03 Thread Wander Lairson Costa
Hi,

Sorry for the delay, I posted a response in the issue. Bear in mind
that request assistance through github issues, possibility I am the
only person who will see your question, in mailing list, otherwise, a
lot of people that potentially had similar problems may help :)

2017-08-03 16:32 GMT-03:00 Bill Gaylord :
> So I am having odd errors on Windows 10 using python 2.7 64-bit.
>
> I will just link to the github issue that the dev seems to ignore...
>
> https://github.com/walac/pyusb/issues/186
>
>
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>



-- 
Best Regards,
Wander Lairson Costa

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


[pyusb-users] PyUSB backlog

2017-06-18 Thread Wander Lairson Costa
Hi there all,

I just would like to let you know why pyusb development has been
stalled for a while. As you might know, I develop pyusb in my free
time.

This year things has been quite busy in work, not in terms the work
hours, but on concentration energy. I work for Mozilla and I was on
the team responsible to Migrate OSX Firefox automated tests to
Taskcluster [1]. This was a very hard project that devoted my full
attention.

Besides that, (and even more important) a couple of years ago I found
out I suffer from GAD [2] and Depression, and have been treating it
through medication and therapy since then. For the last past year
things got really worse, so all energy I had left was canalized to
keep up with my main job, leaving almost nothing for side projects.

As you might know, mental disorders are not fully understood by
medicine and treatment takes time to have effects, and it is a role
coaster in terms of progress. So you might expect a large variance in
development speed ratio.

I am so sorry for all you who is impacted by unsolved issues and slow
responses. I hope July or August slowly come back to work on PyUSB.

Finally, I intend to continue pyusb development within my health
capacity, but this a project belonging to OSS/Free Software (pick
whatever you prefer), so, if there is someone with more time
volunteering to lead the project, I am willing to step away as main
maintainer for the sake of project.

 [1] https://docs.taskcluster.net
 [2] https://en.wikipedia.org/wiki/Generalized_anxiety_disorder

-- 
Best Regards,
Wander Lairson Costa

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] usb.core.USBError: [Errno 110] Operation timed out

2017-03-22 Thread Wander Lairson Costa
Hi Eddie,

This looks like a firmware problem, at least most cases end up being a
firmware bug.

2017-03-18 20:43 GMT-03:00 Eddie A. Goble :
> Hello all:
>
> I am using a Raspberry PI 3 in attempts to control my Owi Robotic Arm via
> USB with Python scripting.  I am intermittently getting a "Operation timed
> out" error which halts the code.  75% of the time the program runs from
> start to finish with no problems.  Any ideas on how I can mitigate this?  Is
> there a way to increase the timeout threshold?  Many thanks in advance.
>
> Error:
>
> Traceback (most recent call last):
>
>   File "arm2.py", line 59, in 
>
> MoveArm("ShoulderUp",4.2)
>
>   File "arm2.py", line 47, in MoveArm
>
> RoboArm.ctrl_transfer(0x40,6,0x100,0,ArmCmd,3)
>
>   File "build/bdist.linux-armv7l/egg/usb/core.py", line 711, in
> ctrl_transfer
>
>   File "build/bdist.linux-armv7l/egg/usb/backend/libusb1.py", line 836, in
> ctrl_transfer
>
>   File "build/bdist.linux-armv7l/egg/usb/backend/libusb1.py", line 571, in
> _check
>
> usb.core.USBError: [Errno 110] Operation timed out
>
>
> From my Python script:
>
> import usb.core, usb.util, time, sys
>
> RoboArm = usb.core.find(idVendor=0x1267, idProduct=0x000)
>
> if RoboArm is None:
>
> raise ValueError("Arm not found")
>
> Duration=1
>
> def MoveArm(ArmCmd,Duration):
>
> if ArmCmd == "Base+":
>
> print "M5-%s : Rotate base clockwise" % Duration
>
> ArmCmd=[0,1,0]
>
> elif ArmCmd == "Base-":
>
> print "M5+%s : Rotate base counter clockwise" % Duration
>
> ArmCmd=[0,2,0]
>
> elif ArmCmd == "ShoulderDown":
>
> print "M4-%s : Shoulder down" % Duration
>
> ArmCmd=[64,0,0]
>
> elif ArmCmd == "ShoulderUp":
>
> print "M4+%s : Shoulder up" % Duration
>
> ArmCmd=[128,0,0]
>
> elif ArmCmd == "ElbowDown":
>
> print "M3-%s : Elbow down" % Duration
>
> ArmCmd=[16,0,0]
>
> elif ArmCmd == "ElbowUp":
>
> print "M3+%s : Elbow up" % Duration
>
> ArmCmd=[32,0,0]
>
> elif ArmCmd == "WristDown":
>
> print "M2-%s : Wrist down" % Duration
>
> ArmCmd=[4,0,0]
>
> elif ArmCmd == "WristUp":
>
> print "M2+%s : Wrist up" % Duration
>
> ArmCmd=[8,0,0]
>
> elif ArmCmd == "GripClose":
>
> print "M1-%s : Grip close" % Duration
>
> ArmCmd=[2,0,0]
>
> elif ArmCmd == "GripOpen":
>
> print "M1+%s : Grip open" % Duration
>
> ArmCmd=[1,0,0]
>
> elif ArmCmd == "LightOff":
>
> print "L1-%s : Light off" % Duration
>
> ArmCmd=[0,0,1]
>
> elif ArmCmd == "LightOn":
>
> print "L1+%s : Light on" % Duration
>
> ArmCmd=[0,0,0]
>
> else:
>
> print "Unknown command"
>
> sys.exit()
>
>
> RoboArm.ctrl_transfer(0x40,6,0x100,0,ArmCmd,3)
>
> time.sleep(Duration)
>
> ArmCmd=[0,0,0]
>
> RoboArm.ctrl_transfer(0x40,6,0x100,0,ArmCmd,3)
>
>
> #MoveArm("ShoulderUp",.1)
>
> #sys.exit()
>
>
> MoveArm("Base+",7.7)
>
> MoveArm("ShoulderDown",4)
>
> MoveArm("ElbowDown",1)
>
> MoveArm("ElbowUp",1)
>
> MoveArm("ShoulderUp",4.2)
>
> MoveArm("Base-",8.4)
>
> sys.exit()
>
> Eddie A Goble
>
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>



-- 
Best Regards,
Wander Lairson Costa

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] libusb error

2017-01-26 Thread Wander Lairson Costa
Where is libusb installed?

2017-01-26 8:57 GMT-02:00 sred...@libero.it :
> Dear Sirs,
>
> I have tried to use pyusb module and I have used a script in order to test
> it, but the script terminates with an error:
>
> 2017-01-26 07:46:41,662 ERROR:usb.libloader:'Libusb 1' could not be found
> 2017-01-26 07:46:41,685 ERROR:usb.backend.libusb1:Error loading libusb 1.0
> backend
> 2017-01-26 07:46:41,795 ERROR:usb.libloader:'OpenUSB library' could not be
> found
> 2017-01-26 07:46:41,804 ERROR:usb.backend.openusb:Error loading OpenUSB
> backend
> 2017-01-26 07:46:42,098 ERROR:usb.libloader:'Libusb 0' could not be found
> 2017-01-26 07:46:42,108 ERROR:usb.backend.libusb0:Error loading libusb 0.1
> backend
> Traceback (most recent call last):
>   File "./usbtest.py", line 13, in 
> dev = usb.core.find(find_all=True)
>   File
> "/root/Buildroot/output/target/usr/lib/python3.4/site-packages/usb/core.py",
> line 1263, in find
> usb.core.NoBackendError: No backend available
>
>
> libusb is already installed on the system, but it seems that it is not seen
> by the module.
>
> How can I fix this problem?
>
> Thanking you in advance,
>
> Simone Rossi
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___________
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>



-- 
Best Regards,
Wander Lairson Costa

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Please help to change libusb project website in README.rst

2017-01-14 Thread Wander Lairson Costa
Sorry for the delay.
Done: 
https://github.com/walac/pyusb/commit/fd253184035aff49f2cc4cf2e9f29778b29657bc

2017-01-12 7:44 GMT-02:00 Xiaofan Chen :
> https://github.com/walac/pyusb/blob/master/README.rst
>
> The above file still points to the old "libusb.org" website. The
> current libusb project website is "libusb.info". Thanks.
>
> Ref: 
> https://github.com/libusb/libusb/wiki/FAQ#libusborg_libusbxorg_and_libusbinfo
>
> --
> Xiaofan
>
> --
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today. http://sdm.link/xeonphi
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users



-- 
Best Regards,
Wander Lairson Costa

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Finally found: the installed library

2016-10-11 Thread Wander Lairson Costa
Hi Hermann,

Thanks for digging on this. I didn't have free time to update docs yet, but
will do.

2016-10-11 6:27 GMT-03:00 Hermann Hamann :

> Hi,
> The use of the pyusb0 service is a bit troublesome, because you have to
> specify the desired library by hand.
> I always had the dream of automatically use the installed library.
> Well, here is how.
> You must know the Vid and Pid of your device. With that you can look up
> the registry for the installed service.
> If it is winusb you need not care.
> If it is pyusb0 then you get the device descriptor and extract the device
> name.
> With it you go to the driverstore and scan the filerepository directory
> for a directory file name
> that starts with the device name.
> Then you walk under this tree until you find a dll name.
> This is the installed library.
> Was not so hard.
> I want to thank Xiaofan for his encouraging advice to dig deeper in this
> registry thingens.
> Now there is no more any need to pick a wrong library.
>
>
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>
>


-- 
Best Regards,
Wander Lairson Costa
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Windows Installation Guide -1

2016-09-23 Thread Wander Lairson Costa
It feels like your problem was more about pyusb dependencies than
pyusb itself. Windows is a pain, because the way it works. Maybe the
solution is just an updated README file with more detaild instructions
about dependencies installation.

2016-09-23 4:18 GMT-03:00 Hermann Hamann :
> Hi,
>
> To install or to not install, that is the question.
>
> I was recently bitten by some lethal errors using pyusb. These were not in
> the pyusb code but came from lower layers as a consequence of misusing them.
> The following correspondence with the maintenance crew was unsuccessful
> because the service aspect was not realized.
> It turned out that the errors were a consequence of different installation
> requirements of the  different services.
> I confess guilty of having too long ignored the features of the winusb
> service.
> I have learned that DLLs need not be installed with winusb.
> I have learned too that DLLs must be installed with the libusb0 service and
> the installed library must be used.
> And it was the hard way to learn (using an apparently widely unknown
> technique called testing).
> And that installation requirement is what you still have to learn!
> I have enough logfiles to prove that.
> This has consequences for the structure of pyusb, the features that can
> safely be provided, and the necessary restrictions that must be documented.
> The good news is that for winusb served devices no changes are required.
> Well, to proceed with my work on the installation guide, I need a formal
> agreement of the service thesis because that will dominate the bugfix
> procedure.
> Who ever objects to this thesis should talk now or be silent for ever.
> I agree [ ] I disagree [ ]
>
>
> --
>
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>



-- 
Best Regards,
Wander Lairson Costa

--
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Windows Installation Guide

2016-09-18 Thread Wander Lairson Costa
2016-09-14 8:05 GMT-03:00 Hermann Hamann :
> Hi,
> I am preparing an Installation Guide for my DSO program.
> I do not want to do obsolete or redundant work.
> Therfore I ask the following:
> * Are there plans for a new version of pyusb1 in the near future?

Maybe a minor bug fix version, but not big changes.

> * Are there plans for a Windows Installation Guide?

If you find the information in readme not enough, we can talk about
improving it, a pull request is very welcome :)

> Sincerely Hermann
>
>
> --
>
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>



-- 
Best Regards,
Wander Lairson Costa

--
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] pyusb1 picks wrong driver on Windows

2016-08-13 Thread Wander Lairson Costa
Hi,

PyUSB relies on ctypes for finding libraries, which relies on Windows
library search policy, if it finds libusb1 first, then that's what it
assumes as the backend. backend parameter was designed for cases like
yours, when the default backend discovery policy doesn't apply.
Anyway, you code may be helpful to improve the search code, would you
mind opening a issue?

2016-08-13 4:34 GMT-03:00 Hermann Hamann :
> Dear maintainers,
> my client and I have the same USB-Device. I have written a program for it.
> It runs fine on both Linux systems. It runs fine on my Windows but crashes
> on my client's.
> Both have installed the driver with inf-wizard and the system control shows
> libusb0.dll on
> both machines.
>
> However, pyusb1 does not care about it; there is no single line related to
> the registry in the code.
> Instead pyusb started searching with pyusb1 backend and finds some libusb1
> in some private direcory
> of some other device. And crashed.
>
> This is not acceptable.
> I have written a demo to fetch the correct service from the registry, it
> follows here:
> -
> from __future__ import print_function
> # call this only on Windows
> try:
> from _winreg import *
> except:
> from winreg import *
> def getService(vid,pid):
> vidpid = r"\VID_%04x&PID_%04x" % (vid,pid)
> path = r"SYSTEM\ControlSet002\ENUM\USB" + vidpid
> key = OpenKey(HKEY_LOCAL_MACHINE,path,0,KEY_READ)
> try:
> i = 0
> enumkey = EnumKey(key,i)
> i = i + 1
> except Exception as message:
> pass # print("enumkey",message)
>
> newkey = OpenKeyEx(key,enumkey,0,KEY_READ)
> service,Size = QueryValueEx(newkey,"Service")
> return service
> if __name__ == "__main__":
> print ("service for 0x5656 0x0834 is",getService(0x5656,0x0834))
> -
> The output is
> "service for 0x5656 0x0834 is libusb0"
>
> I am aware of the backend=xxx switches and the findlibrary hooks.
> They are useful to override defaults in special cases.
>
> However this does not answer the question which defaults are appropiate in
> the normal case.
> On Windows the registry entry is the most appropriate default.
>
> I hope this can help you to amend pyusb1 (which is a great tool anyway).
>
> Sincerely Hermann Hamann
>
>
>
> --
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. http://sdm.link/zohodev2dev
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>



-- 
Best Regards,
Wander Lairson Costa

--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. http://sdm.link/zohodev2dev
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] no end to no backend?

2016-08-02 Thread Wander Lairson Costa
2016-08-02 6:18 GMT-03:00 Hermann Hamann :
> Hello dear maintainers,
> Google finds now about 5 hits on "no backend". So it is time to make an
> end to this problem.
>
> The Problem is two missing lines in the (excellent!) tutorial:
>
> ---
> If you encounter "no backend found" messages on Windows (re-)install a
> driver for your device
> using infwizard from Sourceforge. Otherwise you will fail.
> ---
>
> This info would have saved me a month of fruitless poking around.
>

Hi,

in the readme, either libusb or libusb-win32 are dependencies for
PyUSB, and in their respectives sites you find the indo for the
installation. Maybe this should be explicit in PyUSB readme file.

--
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Bus number

2016-07-02 Thread Wander Lairson Costa
Hi,

I don't know if libusb provides this feature, better to ask in their
mailing list. But you may try through Windows Setup API.

2016-06-20 4:03 GMT-03:00 Igor Bezenchuk :
> Hi,
> I am trying to figure out BDF{Bus;Device;Function} of host with pyusb in
> windows? I get bus value from libusb which is usually a number from
> 1..n(depeanding on number of USB hosts. This is a problem for me because I
> want to identify them based upon their PCIe address. Is there a way to link
> pcie address(BDF) to libusb bus number?
>
> --
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning
> reports. http://sdm.link/zohomanageengine
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>



-- 
Best Regards,
Wander Lairson Costa

--
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] USB topology

2016-05-12 Thread Wander Lairson Costa
2016-05-12 11:40 GMT-03:00 Nicolas Pinault :
> Hi,
>
> Is it possible to retrieve USB bus topology with PyUSB ?
>

Yes, you will need to use the Device object "port_number" and "bus" properties.

>
> Regards,
> Nicolas
>
> --
> Nicolas PINAULT
> R&D electronics engineer
> nico...@aaton.com
>
> AATON-Digital
> 38000 Grenoble - France
> Tel +33 4 7642 9550
>
> http://www.aaton.com
> http://www.transvideo.eu
> French Technologies for Film and Digital Cinematography
>
> Follow us on Twitter
> @Aaton_Digital
> @Transvideo_HD
>
> Like us on Facebook
> https://www.facebook.com/AatonDigital
>
>
> --
> Mobile security can be enabling, not merely restricting. Employees who
> bring their own devices (BYOD) to work are irked by the imposition of MDM
> restrictions. Mobile Device Manager Plus allows you to control only the
> apps on BYO-devices by containerizing them, leaving personal data untouched!
> https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>



-- 
Best Regards,
Wander Lairson Costa

--
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Issue finding backend when exe created with pyinstaller 3.1.1

2016-05-10 Thread Wander Lairson Costa
One way to investigate what's going on is to set the PYUSB_DEBUG=debug
environment variable.

2016-05-09 11:53 GMT-03:00 Jay Newens :
> I have been having issues getting my program to run as an exe using packager
> pyinstaller version 3.1.1. There is a version 3.2 but it has other issues so
> I cannot use it. My program checks the status of the Zebra KR403 printer and
> my program works fine in my Python 2.7.9 environment, PYUsb 1.0.0, on
> Windows 7,  but when I create the exe it does not work. Pyinstaller 2.1
> works ok but my other parts of my program have been updated and I cannot use
> it any longer, the list of problems there is too long.
>
>
>
> This is how I set up the backend in my code in my python environment:
>
>
>
> import usb
>
> import usb.core
>
> import usb.util
>
> import usb.backend.libusb10 as libusb10
>
> import sys
>
> import requests
>
> dev = usb.core.find(idVendor= int(VID), idProduct= int(PID),
> backend=libusb10.get_backend())
>
>
>
> After creating my exe, when I run it from the command prompt I get the
> following:
>
>
>
> Traceback (most recent call last):
>
>   File "", line 184, in 
>
>   File "usb\core.py", line 846, in find
>
> ValueError: No backend available
>
> ZebraKR403PaperStatus2.2 returned -1
>
>
>
> I understand that this could be an issue with pyinstaller and I will report
> the same issue there. Does anyone else have this issue or have a solution?
>
>
>
> Thanks in advance:
>
>
>
> Jay
>
>
>
>
>
>
>
>
>
>
>
>
> --
> Find and fix application performance issues faster with Applications Manager
> Applications Manager provides deep performance insights into multiple tiers
> of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>



-- 
Best Regards,
Wander Lairson Costa

--
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


[pyusb-users] [Released] PyUSB 1.0.0 (stable)

2016-04-30 Thread Wander Lairson Costa
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi there,

I am proud to announce that the stable version is finally out! Many
thanks to all of you who has contributed to this milestone.

- --
Best Regards,
Wander Lairson Costa

-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEcBAEBAgAGBQJXJTsuAAoJEAhMVYRULhV0vCMH/R9iBMISphJVi4JDx1bjydeP
KlaFRRTzHHhJ3nybPNVEbdW/wSZYymY+Mj3rCA8xowVXaGF37ozG/ghIKPQBO8gx
FjlwzK02gbX5KI41UMMjKs++6Iq5megzYYaA3NEPf92bg17a2bSDLrMeecSreOjd
UoA0Hr692YPAx5aKpX1y3Jvj3PUlCE6qhRY8wnIVtpiG6co5tAt8n5Cras+wsbHo
x3kx6t3iX4t+qeqed6k4FMiGmZ205uiv+FaySu2CAwTLgEsCKMdym4xA6f08bwb9
DX1mMlqSfJdVnhndsBuf7ZGx6v8aUZ5Q9hIZSdJjCI+N4FCKzeDYyZNcPyQQgts=
=jPxu
-END PGP SIGNATURE-

--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Trying to write to OUT EP Bulk on Win10

2016-03-08 Thread Wander Lairson Costa
Hi,

I think you may find the answer for your question in libusb mailing list.

2016-03-08 7:32 GMT-08:00 Igor Bezenchuk :

> I am Interested in generating random bulk traffic with libusb and pyusb to
> different bulk devices(i.e Flash drives etc...) ep buffers and check data
> integrity.
> I used this code:
>
> import usb.core
> # I used Gensys usb to sd card reader
> dev = usb.core.find(idVendor=0x05E3 , idProduct=0x0746)
> if dev is None:
> raise ValueError('Device not found')
> for cfg in dev:
> for i in cfg:
> for e in i:
> print e.bmAttributes
> print e.bEndpointAddress
> print ""
> #if you find OUT EP
> if(e.bEndpointAddress == 2):
> e.write(0x00)
> e.write(0x01)
>
>
> and I got this error:
> "raise NotImplementedError(_strerror(ret))
> NotImplementedError: Operation not supported or unimplemented on this
> platform"
>
> pyusb does enumerate device and it's endpoints correctly but it fails to
> write to them.
> as I saw in other posts this issue is well known in windows, my question
> is there any way to go around this to write to device's EP in Windows
> without installing custom driver with Zadig?
>
>
>
>
>
>
>
>
> --
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://makebettercode.com/inteldaal-eval
> ___________
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>
>


-- 
Best Regards,
Wander Lairson Costa
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://makebettercode.com/inteldaal-eval___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


[pyusb-users] [Released] PyUSB Release Candidate 1 (finally) is out

2016-02-11 Thread Wander Lairson Costa
Hello there,

First release candidate of PyUSB 1.0 is released. If no serious bug is
found in the next 60 days, stable version will finally be released.

-- 
Best Regards,
Wander Lairson Costa

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] [Release Candidate] Call for help

2016-02-02 Thread Wander Lairson Costa
Just clone it from github

2016-02-02 13:41 GMT-02:00 Jay Newens :
> Where can I get the files for this release candidate to test with my system?
>
> Jay
>
> -Original Message-
> From: Wander Lairson Costa [mailto:wander.lair...@gmail.com]
> Sent: Saturday, January 30, 2016 06:27
> To: pyusb-users
> Subject: [pyusb-users] [Release Candidate] Call for help
>
> Hi there,
>
> I was about to release the first release candidate, but just found out
> my test board died. As I don't know when/if I can recover it, could
> you please guys clone the latest code and report if everything works
> with your apps?
>
> Thanks a lot!
>
> --
> Best Regards,
> Wander Lairson Costa
>
> 
> --
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>
>
> --
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users



-- 
Best Regards,
Wander Lairson Costa

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


[pyusb-users] [Release Candidate] Call for help

2016-01-30 Thread Wander Lairson Costa
Hi there,

I was about to release the first release candidate, but just found out
my test board died. As I don't know when/if I can recover it, could
you please guys clone the latest code and report if everything works
with your apps?

Thanks a lot!

-- 
Best Regards,
Wander Lairson Costa

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] detach kernel driver

2015-08-16 Thread Wander Lairson Costa
2015-08-09 22:07 GMT-03:00 UNIVERSAL PHONE :
> Hi!!
>
>
> after: "dev.detach_kernel_driver(interface)"
>
>
> i have this error:
>
> usb.core.USBError: could not detach kernel driver from interface 0: No data
> available.
>

What Operating System and libusb version are you using?



-- 
Best Regards,
Wander Lairson Costa

--
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Connection Timed Out

2015-08-16 Thread Wander Lairson Costa
2015-08-11 11:35 GMT-03:00 Johannes Roth :
> Hello,
>
> As a pyusb beginner I'm making my first steps while trying to talk to a
> CY7C68013A USB controller, which in turn should talk to my AD9959.
>
> After some work and usb-sniffing the windows drivers, I'm stuck now, as
> I'm getting time outs. The problem seems to be with with either reading
> or writing (the error is the same). I can read the config, interfaces
> and endpoints from the controller and when trying to read/write from the
> wrong endpoint, it comes up with sensible errors, but not when I'm
> trying to read/write to a proper endpoint. Here's a simple example:
>
> import usb.core
> dev = usb.core.find(idVendor = 0x0456, idProduct = 0xee24)
> cfg = dev[0]
> intf = cfg[(0,1)]
> dev.set_configuration(cfg)
> dev.set_interface_altsetting(interface = 0, alternate_setting = 1)
> usb.util.claim_interface(dev, intf)
> dev.write(0x01,'\x0F\x01')
>
> results in
>
> Traceback (most recent call last):
>File "", line 1, in 
>File "/usr/local/lib/python2.7/dist-packages/usb/core.py", line 878,`
> in write
>  self.__get_timeout(timeout)
>File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb0.py",
> line 479, in bulk_write
>  data, timeout)
>File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb0.py",
> line 550, in __write
>  timeout
>File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb0.py",
> line 379, in _check
>  raise USBError(errmsg, ret)
> usb.core.USBError: [Errno None] Connection timed out
>

This seems to be a device specific issue. However, your code can be simpler:

import usb.core
dev = usb.core.find(idVendor = 0x0456, idProduct = 0xee24)
dev.set_configuration()
dev.set_interface_altsetting(interface = 0, alternate_setting = 1)
dev.write(0x01,'\x0F\x01')

> I'm struggeling to understand why I'm getting the time out and sadly
> can't make any sense of the Google results I'm getting. Any help for a
> beginner is much appreciated!
>
> Cheers,
> Johannes
>
> ----------
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users



-- 
Best Regards,
Wander Lairson Costa

--
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Bug found and patched in util.py

2015-08-09 Thread Wander Lairson Costa
2015-08-08 22:18 GMT-03:00 Paul Cornelius :
> OK I see.
>
> I thought I had the latest release (1.0.0.a2), which I got from
> sourceforge.  I got to there by following the link on
> http://walac.github.io/pyusb/.  Also I searched exhaustively for anyone
> reporting this bug before diving into the pyusb internals. What did I do
> wrong?
>

The point is that this change was not released yet. When you find a
bug, it is better to check against git HEAD to see if it happens in
the latest code.

> Thanks,
> Paul Cornelius
>
> On 8/8/2015 12:00 PM, Wander Lairson Costa wrote:
>> Hi,
>>
>> Notice the code the get_string has changed:
>> https://github.com/walac/pyusb/blob/master/usb/util.py#L295-L340
>>
>> 2015-08-08 1:14 GMT-03:00 Paul Cornelius :
>>> I found a bug in usb.util.py in the function get_string.  This function was
>>> failing with an "Overflow" error on my Windows 8.1 machine, using Python 3.3
>>> and libusb-1.0.
>>>
>>> If this function is called with the default value for langid (None), it
>>> first makes a call to get_descriptor to obtain a list of languages supported
>>> by the device.  This second parameter of this function call is the size of
>>> the reply buffer, which was equal to 1024.  But a comment in the libusb-1.0
>>> source (descriptor.c, function libusb_get_string_descriptor_ascii) reads: /*
>>> Some devices choke on size > 255 */.
>>>
>>> And it seems to be true.  When I changed the get_descriptor function call to
>>> reduce the buffer size parameter to 255 the error disappeared.  I also
>>> thought it would be good to limit the size of any buffer passed to
>>> get_string.  My modified function now reads as follows:
>>>
>>> def get_string(dev, length, index, langid = None):
>>>  r"""Retrieve a string descriptor from the device.
>>>
>>>  dev is the Device object to which the request will be
>>>  sent to.
>>>
>>>  length is the length of string in number of characters.
>>>
>>>  index is the string descriptor index and langid is the Language
>>>  ID of the descriptor. If langid is omitted, the string descriptor
>>>  of the first Language ID will be returned.
>>>
>>>  The return value is the unicode string present in the descriptor.
>>>  """
>>>  from usb.control import get_descriptor
>>>  if langid is None:
>>>  # Asking for the zero'th index is special - it returns a string
>>>  # descriptor that contains all the language IDs supported by the 
>>> device.
>>>  # Typically there aren't many - often only one. The language IDs are 16
>>>  # bit numbers, and they start at the third byte in the descriptor. See
>>>  # USB 2.0 specification section 9.6.7 for more information.
>>>  #
>>>  # Note from libusb 1.0 sources (descriptor.c)
>>>  buf = get_descriptor(
>>>  dev,
>>>  255,
>>>  DESC_TYPE_STRING,
>>>  0
>>>  )
>>>  assert len(buf) >= 4
>>>  langid = buf[2] | (buf[3] << 8)
>>>
>>>  lenstr = length * 2 + 2
>>>  if lenstr > 255:
>>>  raise ValueError("String buffer length too long")
>>>  buf = get_descriptor(
>>>  dev,
>>>  length * 2 + 2, # string is utf16 + 2 bytes of the
>>> descriptor
>>>  DESC_TYPE_STRING,
>>>  index,
>>>          langid
>>>  )
>>>  return buf[2:].tostring().decode('utf-16-le')
>>>
>>> Paul Cornelius
>>>
>>> --
>>>
>>> ___
>>> pyusb-users mailing list
>>> pyusb-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>>>
>>
>>
>
>
> --
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users



-- 
Best Regards,
Wander Lairson Costa

--
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Bug found and patched in util.py

2015-08-08 Thread Wander Lairson Costa
Hi,

Notice the code the get_string has changed:
https://github.com/walac/pyusb/blob/master/usb/util.py#L295-L340

2015-08-08 1:14 GMT-03:00 Paul Cornelius :
> I found a bug in usb.util.py in the function get_string.  This function was
> failing with an "Overflow" error on my Windows 8.1 machine, using Python 3.3
> and libusb-1.0.
>
> If this function is called with the default value for langid (None), it
> first makes a call to get_descriptor to obtain a list of languages supported
> by the device.  This second parameter of this function call is the size of
> the reply buffer, which was equal to 1024.  But a comment in the libusb-1.0
> source (descriptor.c, function libusb_get_string_descriptor_ascii) reads: /*
> Some devices choke on size > 255 */.
>
> And it seems to be true.  When I changed the get_descriptor function call to
> reduce the buffer size parameter to 255 the error disappeared.  I also
> thought it would be good to limit the size of any buffer passed to
> get_string.  My modified function now reads as follows:
>
> def get_string(dev, length, index, langid = None):
> r"""Retrieve a string descriptor from the device.
>
> dev is the Device object to which the request will be
> sent to.
>
> length is the length of string in number of characters.
>
> index is the string descriptor index and langid is the Language
> ID of the descriptor. If langid is omitted, the string descriptor
> of the first Language ID will be returned.
>
> The return value is the unicode string present in the descriptor.
> """
> from usb.control import get_descriptor
> if langid is None:
> # Asking for the zero'th index is special - it returns a string
> # descriptor that contains all the language IDs supported by the device.
> # Typically there aren't many - often only one. The language IDs are 16
> # bit numbers, and they start at the third byte in the descriptor. See
> # USB 2.0 specification section 9.6.7 for more information.
> #
> # Note from libusb 1.0 sources (descriptor.c)
> buf = get_descriptor(
> dev,
> 255,
> DESC_TYPE_STRING,
> 0
> )
> assert len(buf) >= 4
> langid = buf[2] | (buf[3] << 8)
>
> lenstr = length * 2 + 2
> if lenstr > 255:
> raise ValueError("String buffer length too long")
> buf = get_descriptor(
> dev,
> length * 2 + 2, # string is utf16 + 2 bytes of the
> descriptor
> DESC_TYPE_STRING,
> index,
> langid
> )
> return buf[2:].tostring().decode('utf-16-le')
>
> Paul Cornelius
>
> ----------
>
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>



-- 
Best Regards,
Wander Lairson Costa

--
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Change suggestion

2015-06-18 Thread Wander Lairson Costa
2015-06-17 5:11 GMT-03:00 Hermann Hamann :
>
> I want to suggest a small change to pyusb to improve speed.
> Currently you can only provide an array.array buffer to put the USB data
> into.
> I use the multiprocessing feature and the final destination of the USB data
> is a mmap.mmap
> Object. I would like to specify this as a receive buffer to save a pickle
> and
> unpickle operation.
> It is not so difficult to use the pyapi.PyObject_GetBuffer function to
> retrieve address and length
> of any buffer protocol compliant object.
> So this array restriction should be lifted, I assume there are more users
> who would
> appreciate this change. I would not like to distribute my software with a
> modified pyusb.
> Sincerely
> Hermann Hamann
>
> Here follows the modifications I made:
> -
> # in backend1.py, similar for other backends
> from ctypes import *
> from struct import unpack
> getBuffer = pythonapi.PyObject_GetBuffer
> getBuffer.argtypes = [py_object, c_void_p, c_int]
> view = create_string_buffer(11*sizeof(int))
> def getBufferInfo(someObject):
> pointer_to_sO = py_object(someObject)
> result = getBuffer(pointer_to_sO,view,1) # flag writeable
> ### this call can raise an Exception. However this would be a
> consequence
> ### of an invalid caller, so no recovery is possible and simply let it
> ### crash, the message is helpful.
>
> if result != 0 : return None,None
>
> bufadr,objadr,buflen,itemsize,readonly,ndim,bformat,shape,strides,\
>   suboffsets,internal =  unpack("11I",view)
>
> result = pythonapi.PyBuffer_Release(string_buffer)
> return (bufadr,buflen)
>
> # and some lines later
> def __read(self, fn, dev_handle, ep, intf, buff, timeout):
> ###  changed address, length = buff.buffer_info()
> address,length = getBufferInfo(buff)
> ##length *= buff.itemsize changed
>
> --
> # in core.py
> if isinstance(size_or_buffer,int):
>

Hi,

Could you please open a Pull Request or, if you are not willing to
supply a patch, an issue detailing your proposal?



-- 
Best Regards,
Wander Lairson Costa

--
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Not implemented error on is_kernel_driver_active

2015-06-13 Thread Wander Lairson Costa
2015-06-13 8:33 GMT-03:00 Matthias Grabowski :
> hey guys,
>

Hi, so what's going on here is a chain of unfortunate events.

> i got it now, thanks :) The log follows below, it seems that pyusb was
> unable to load the propper backend? when installing i did all the steps
> in the documentation:
> sudo apt-get install python libusb-1.0-0
> sudo python setup.py install
>
> Both run fine.
>
> Heres the Log dump:
> 2015-06-12 16:38:05,805 ERROR:usb.backend.libusb1:Error loading libusb
> 1.0 backend
> Traceback (most recent call last):
>   File
> "/usr/local/lib/python3.2/dist-packages/pyusb-1.0.0b2-py3.2.egg/usb/backend/libusb1.py",
> line 880, in get_backend
> _setup_prototypes(_lib)
>   File
> "/usr/local/lib/python3.2/dist-packages/pyusb-1.0.0b2-py3.2.egg/usb/backend/libusb1.py",
> line 453, in _setup_prototypes
> lib.libusb_strerror.argtypes = [c_uint]
>   File "/usr/lib/python3.2/ctypes/__init__.py", line 366, in __getattr__
> func = self.__getitem__(name)
>   File "/usr/lib/python3.2/ctypes/__init__.py", line 371, in __getitem__
> func = self._FuncPtr((name_or_ordinal, self))
> AttributeError: /lib/arm-linux-gnueabihf/libusb-1.0.so.0: undefined
> symbol: libusb_strerror

So, you have a pretty old libusb 1.0 version installed, which does not
implement libusb_strerror yet. I solved this issue recently in PyUSB,
either upgrading libusb 1.0 or using git version of PyUSB must solve
the problem

> 2015-06-12 16:38:06,407 ERROR:usb.libloader:'OpenUSB library' could not
> be found
> 2015-06-12 16:38:06,408 ERROR:usb.backend.openusb:Error loading OpenUSB
> backend
> 2015-06-12 16:38:06,439 INFO:usb.core:find(): using backend
> "usb.backend.libusb0"

But you have libusb 0.1 installed, so PyUSB goes for it

> 2015-06-12 16:38:06,441
> DEBUG:usb.backend.libusb0:_LibUSB.enumerate_devices()
> 2015-06-12 16:38:06,444
> DEBUG:usb.backend.libusb0:_LibUSB.get_device_descriptor( object at 0x150dc60>)
> 2015-06-12 16:38:06,446
> DEBUG:usb.backend.libusb0:_LibUSB.get_device_descriptor( object at 0x151c4e0>)
> 2015-06-12 16:38:06,447
> DEBUG:usb.backend.libusb0:_LibUSB.get_configuration_descriptor( object at 0x151c4e0>, 0)
> 2015-06-12 16:38:06,449
> DEBUG:usb.backend.libusb0:_LibUSB.get_interface_descriptor( object at 0x151c4e0>, 0, 0, 0)
> 2015-06-12 16:38:06,450
> DEBUG:usb.backend.libusb0:_LibUSB.get_configuration_descriptor( object at 0x151c4e0>, 0)
> 2015-06-12 16:38:06,452
> DEBUG:usb.backend.libusb0:_LibUSB.get_endpoint_descriptor( object at 0x151c4e0>, 1, 0, 0, 0)
> 2015-06-12 16:38:06,453
> DEBUG:usb.backend.libusb0:_LibUSB.get_interface_descriptor( object at 0x151c4e0>, 0, 0, 0)
> 2015-06-12 16:38:06,453
> DEBUG:usb.backend.libusb0:_LibUSB.get_configuration_descriptor( object at 0x151c4e0>, 0)
> 2015-06-12 16:38:06,455
> DEBUG:usb.backend.libusb0:_LibUSB.open_device( object at 0x151c4e0>)
> 2015-06-12 16:38:06,514
> DEBUG:usb.backend.libusb0:_LibUSB.close_device(22698048)
>
> And from the console when i run my script:
> Traceback (most recent call last):
>   File "testusb.py", line 65, in 
> if dev.is_kernel_driver_active(0):
>   File
> "/usr/local/lib/python3.2/dist-packages/pyusb-1.0.0b2-py3.2.egg/usb/core.py",
> line 992, in is_kernel_driver_active
> interface)
>   File
> "/usr/local/lib/python3.2/dist-packages/pyusb-1.0.0b2-py3.2.egg/usb/backend/__init__.py",
> line 363, in is_kernel_driver_active
> _not_implemented(self.is_kernel_driver_active)
>   File
> "/usr/local/lib/python3.2/dist-packages/pyusb-1.0.0b2-py3.2.egg/usb/backend/__init__.py",
> line 79, in _not_implemented
> raise NotImplementedError(func.__name__)
> NotImplementedError: is_kernel_driver_active
>

But libusb 0.1 does not implement is_kernel_driver_active function...

> matt
>


-- 
Best Regards,
Wander Lairson Costa

--
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Not implemented error on is_kernel_driver_active

2015-06-12 Thread Wander Lairson Costa
2015-06-12 11:15 GMT-03:00 Matthias Grabowski :
> I don't know what you want me to do with
> export PYUSB_DEBUG=debug
>

This is an environment variable to define before running your script.
You can also define inside your Python code before you import the
pyusb modules. If you need further details, you might want to give a
look in the tutorial [1]

[1] https://github.com/walac/pyusb/blob/master/docs/tutorial.rst

>
> Am 12. Juni 2015 15:36:52 MESZ, schrieb Wander Lairson Costa
> :
>>
>> 2015-06-12 9:20 GMT-03:00 Matthias Grabowski :
>>>
>>>  Hello guys,
>>>
>>>  I'm new to this mailing list, pyusb and Linux in general. So sorry, if
>>> some
>>>  of my questions may be a little stupid. I know my way around python,
>>> though.
>>>
>>>  Anyways, I got a raspberry pi with raspbian installed and I'm writing a
>>>  python script to read data from an air quality sensor that identifies
>>> itself
>>>  as a HID to the OS. When I try to read or write data to/from the device
>>> I
>>>  get a USBError:
>>>  Could not claim interface 0: device or resource busy.
>>>
>>>  I think that happens because the os attaches a kernel driver to the
>>> device.
>>>  Correct?
>>>
>>>  In that case I found some code that tries to claim the interface:
>>>  if dev.is_kernel_driver_active (0):
>>>  dev.detach_kernel_driver(0)
>>>
>>>
>>> usb.util.claim_interface (dev, 0)
>>>
>>>  But there I get a NotImplementedError. Why? Whats wrong and what can I
>>> do?
>>
>>
>>
>> Hi,
>>
>> Could you please run with logs (export PYUSB_DEBUG=debug) and post the
>> result?
>>
>
> --
>
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>



-- 
Best Regards,
Wander Lairson Costa

--
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Not implemented error on is_kernel_driver_active

2015-06-12 Thread Wander Lairson Costa
2015-06-12 9:20 GMT-03:00 Matthias Grabowski :
> Hello guys,
>
> I'm new to this mailing list, pyusb and Linux in general. So sorry, if some
> of my questions may be a little stupid. I know my way around python, though.
>
> Anyways, I got a raspberry pi with raspbian installed and I'm writing a
> python script to read data from an air quality sensor that identifies itself
> as a HID to the OS. When I try to read or write data to/from the device I
> get a USBError:
> Could not claim interface 0: device or resource busy.
>
> I think that happens because the os attaches a kernel driver to the device.
> Correct?
>
> In that case I found some code that tries to claim the interface:
> if dev.is_kernel_driver_active (0):
> dev.detach_kernel_driver(0)
>
> usb.util.claim_interface (dev, 0)
>
> But there I get a NotImplementedError. Why? Whats wrong and what can I do?
>

Hi,

Could you please run with logs (export PYUSB_DEBUG=debug) and post the result?


-- 
Best Regards,
Wander Lairson Costa

--
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] question

2015-06-11 Thread Wander Lairson Costa
2015-06-11 16:44 GMT-03:00 Jay Newens :
> I am using pyusb in my Python 2.7 environment getting the status of the
> Zebra KR403 printer and having good success on a Windows 7 64 bit PC. Now I
> am ready to test this on my target machine. I have created my executable
> program with py2exe and tested the exe on my development PC and it works
> fine but when I move it to my target PC I get a message “No Backend
> Available” when it gets to the “dev = usb.core.find(idVendor=int(VID),
> idProduct=int(PID))” part of my code. I convert the hex to an integer here
> but when using the hex value I get the same issue on my target PC, even with
> hex value, both hex and converting to integer work fine on the development
> PC so I do not think the issue is here.
>

PyUSB on Windows depends either of libusb 1.0 or libusb-win32.
Contrary to the unices version, libusb on Windows needs to attach as a
device driver. You can use zadig to install libusb (or libusb-win32)
driver for your device. libusb uses the WinUSB driver (which is
shipped with Windows). If you want to redistribute your software to
users, you will have to provide a driver package to the user
(basically writing an inf file and ship the binaries). However, giving
details on how to do that is out of scope of this mailing list. OSR
[1] can be helpful here

[1] http://www.osronline.com/

>
>
> Traceback (most recent call last):
>
>   File "ZebraKR403PaperStatus1.0.py", line 98, in 
>
>   File "usb\core.pyc", line 846, in find
>
> ValueError: No backend available
>
>
>
> I am not sure what is causing the issue. It seems as though there is a
> missing dll or something that is required to make this work and it did not
> make it to my target PC. Any suggestions or ideas what I may be missing
> would be greatly appreciated.
>
>
>
>
>
> Jay
>
>
>
>
>
>
>
>
>
>
>
>
> --
>
> ___________
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>



-- 
Best Regards,
Wander Lairson Costa

--
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] (no subject)

2015-06-10 Thread Wander Lairson Costa
2015-06-09 6:34 GMT-03:00 UNIVERSAL PHONE :
>> Message: 1
>> Date: Sun, 31 May 2015 11:46:07 -0300
>> From: Wander Lairson Costa 
>> Subject: Re: [pyusb-users] (no subject)
>> To: pyusb-users 
>> Message-ID:
>>
>> 
>> Content-Type: text/plain; charset=UTF-8
>>
>> 2015-05-30 9:42 GMT-03:00 UNIVERSAL PHONE :
>> > Hi,
>> >
>> >
>> > this is my program:
>> >
>> > import usb.util
>> > import usb.core
>> > import sys
>> >
>> > dev=usb.core.find()
>> > dev.set_configuration()
>> >
>> > this is the error message:
>> >
>> > usb.core.USBError:could not set config 1: Device or resource busy
>> >
>> >
>> >
>> > What's wrong with my program ?
>> >
>>
>> What Operating System are you using?
>>
>
>   --- I'm running SUSE LINUX ENTERPRISE DESKTOP 12
>

The problem must be you have a driver attached to your device. You can
find examples on how to detach the driver from the device in other
messages in this mailing list.


-- 
Best Regards,
Wander Lairson Costa

--
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] USBError: Operation timed out

2015-06-06 Thread Wander Lairson Costa
>>   Transfer TypeBulk
>>   Synch Type   None
>>   Usage Type   Data
>> wMaxPacketSize 0x0040  1x 64 bytes
>> bInterval   0
>> Device Status: 0x0001
>>   Self Powered
>>
>>
>> On Sat, May 30, 2015 at 5:05 AM, Karl Palsson  wrote:
>>>
>>>
>>> I'm pretty sure you're not actually sending the request that the manual
>>> says.
>>>
>>> Caleb Mayfield  wrote:
>>> >  I am new to using Python and PyUSB. I am trying to write a program to
>>> > communicate with a 3M Quest SoundPro sound meter. Because I'm new, I'm
>>> > starting simple. The vendor was gracious enough to send me the manual
>>> > they
>>> > have on the commands for the unit. Right now all I'm trying to do is
>>> > request the serial number and read the response. I just need to get
>>> > communication between a Raspberry Pi and the device working. I have
>>> > used
>>> > the software on a Windows 7 machine along with a USB sniffer to verify
>>> > the
>>> > commands and endpoint address were correct.
>>> >
>>> > This is the program;
>>> >
>>> > import usb.core
>>> >
>>> > import usb.util
>>> >
>>> > import sys
>>> >
>>> > dev = usb.core.find(idVendor=0x130c, idProduct=0x0001)
>>> >
>>> > if dev is None:
>>> >
>>> > raise ValueError('Device not found')
>>> >
>>> > dev.set_configuration()
>>> >
>>> > print "Connected to " + str(dev)
>>> >
>>> > QS = '0x51,0x53,0x0D'   #Call for Serial number
>>> >
>>> > dev.write(0x02,QS,0,0)
>>>
>>> I don't believe this is really right, you're probably meant to send the
>>> three bytes, 0x51, 0x53, 0xd, not the 14 bytes, 0, x,5,1,,,0,x,5,3.
>>>
>>> You probably just want to do something like...
>>>
>>> dev.write(0x02, "QS\r", 0, 0)
>>>
>>>
>>> If you can share the manual, You can probably get more correct help than
>>> my asumptions. :)
>>>
>>> Cheers,
>>> Karl P
>>>
>>>
>>> --
>>>
>>> ___
>>> pyusb-users mailing list
>>> pyusb-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>>>
>>
>>
>>
>> --
>> Caleb Mayfield
>>
>> James 1:19-20
>
>
>
>
> --
> Caleb Mayfield
>
> James 1:19-20
>
> --
>
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>



-- 
Best Regards,
Wander Lairson Costa

--
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] (no subject)

2015-05-31 Thread Wander Lairson Costa
2015-05-30 9:42 GMT-03:00 UNIVERSAL PHONE :
> Hi,
>
>
> this is my program:
>
> import usb.util
> import usb.core
> import sys
>
> dev=usb.core.find()
> dev.set_configuration()
>
> this is the error message:
>
> usb.core.USBError:could not set config 1: Device or resource busy
>
>
>
> What's wrong with my program ?
>

What Operating System are you using?


-- 
Best Regards,
Wander Lairson Costa

--
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] pyusb on Windows

2015-05-28 Thread Wander Lairson Costa
2015-05-27 18:12 GMT-03:00 UNIVERSAL PHONE :
> Hi,
>
>
>
> When i used pyusb with Python on Windows (i have installed libusb1-1.4.0), i
> have this error:
>
>
> ValueError: No backend available
>
>
>
> What must i do ?
>
> So on libusb-1.0.19 version, there are no "setup.py" file ??
>
>

libusb Windows binaries can be found at libusb website [1]

For libusb support, however, I recommend the libusb mailing list.

[1] http://libusb.info/

>
> Thks
>
> --
>
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>



-- 
Best Regards,
Wander Lairson Costa

--
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Windows

2015-05-27 Thread Wander Lairson Costa
2015-05-27 6:35 GMT-03:00 UNIVERSAL PHONE :
> Hi!!!
>
>
>
> Can i use pyUSB on a Windows OS with python ?
>
>

You need either libusb [1] or libusb-win32 [2] installed first. Then
inside PyUSB source directory, type:
python setup.py install

Now just look at the tutorial [3] to learn how to use the API.

[1] http://www.libusb.info

[2] http://libusb-win32.sourceforge.net

[3] https://github.com/walac/pyusb/blob/master/docs/tutorial.rst

>
>
> Thks
>
> --
>
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>



-- 
Best Regards,
Wander Lairson Costa

--
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] List device

2015-05-25 Thread Wander Lairson Costa
2015-05-25 13:20 GMT-03:00 UNIVERSAL PHONE :
> How to list USB device ?
>

You can use the find function to discover your USB device. You might
want to read to tutorial [1] to discover the find function
capabilities.

[1] https://github.com/walac/pyusb/blob/master/docs/tutorial.rst


-- 
Best Regards,
Wander Lairson Costa

--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] How to handle Solaris's strange library location?

2015-05-02 Thread Wander Lairson Costa
2015-05-01 21:17 GMT-03:00 Chapman Flack :
> 2015-04-28 11:16:13 Wander Lairson Costa :
>>> Should that name just be added to the big list o' names already
>>> in libusb0.py _load_library()? Or check for sys.platform == 'sunos5'
>>> and define a different _load_library that knows the right path? Or
>>> some other approach?
>
>> Sorry, you commented this in the patch and I completely forgot
>> to answer it. I think the simplest solution would be to add it
>> to the list of candidates.
>
> Looking more closely, it wouldn't need added to the candidate list,
> because it's called libusb.so and "usb" is already a candidate. It
> would be found if it were in a more usual directory, but not in
> /usr/sfw/lib. I was working on Solaris 10; possibly Solaris 11 has
> moved it to solve that problem, as
> https://www.mail-archive.com/opensolaris-arc@mail.opensolaris.org/msg13077.html
> suggests.
>

This probably fixes the issue, but PyUSB needs to be fixed for Solaris
10 too (I think).

>> He doesn't necessarily need to rewrite the app in C, but he
>> can write a faster backend. I am not worried about optimization
>> right now, but guessing common paths seems like a smart and simple
>> optimization.
>
> I looked more at where the external processes he complained of get run,
> and sure enough, it's in ctypes.util.find_library. It /unconditionally/
> tries to run expensive stuff like gcc or objdump to "find" your argument,
> even if you pass a full path. (oh yes, another thing that wasn't working:
> the /usr/sfw/bin/gcc on solaris actually does know to look in /usr/sfw/lib,
> but it uses the Solaris ld. The ctypes.util.find_library code assumes GNU ld
> with a -t option to write all the found file names as it sees them, but -t
> to solaris ld means something else altogether.)
>

Well, maybe the issue lies on ctypes, and we could patch it to find
libraries in Solaris. I am not versed on Solaris, so what I am saying
might be bs.

> I don't really feel like also writing patches for ctypes, but I think it
> probably would be a good optimization here to just try a few common
> full paths before falling back to the ctypes.util.find_library. It might
> just plain work better, in addition to solving the whole startup delay
> issue that made that blogger think he had to port everything to C. :)
>

IMO, This kind of optimization should live in cypes, because all
applications using it will benefit of faster startup times. If Python
guys are not interested, I am.

> I'll think about how a patch would look
>

I think a dictionary indexed by sys.platform, whose contents is a list
of well known directories to try load libusb from. This code should
live in the libloader module.


-- 
Best Regards,
Wander Lairson Costa

--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] what's the goal for earliest Python supported?

2015-05-02 Thread Wander Lairson Costa
2015-05-01 21:25 GMT-03:00 Chapman Flack :
> README.rst says >= 2.4, _interop.py says >= 2.3.
>

The initial goal for PyUSB was >= 2.3, but it turned out to be
infeasible. That code comes from that time, and it was never updated.

> Would you accept a patch that changed _interop to 2.4 and
> deleted the sorted() and groupby() alternative code?
> Or one that changed README to 2.3?
>

A patch cleaning things is more than welcome :D

> Just minor housekeeping, but happened to notice it.
>

--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] How to handle Solaris's strange library location?

2015-04-28 Thread Wander Lairson Costa
2015-04-27 22:01 GMT-03:00 Chapman Flack :
> Hi,
>

Hi,

> I recently sent a patch so the ctypes structures would have
> the right sizes on Solaris (thanks for merging!), but I was
> not sure what would be the best way for the libusb0 backend
> to handle the strange location of the shared object on Solaris.
> It's /usr/sfw/lib/libusb.so.1
>
> Should that name just be added to the big list o' names already
> in libusb0.py _load_library()? Or check for sys.platform == 'sunos5'
> and define a different _load_library that knows the right path? Or
> some other approach?
>

Sorry, you commented this in the patch and I completely forgot to answer it.
I think the simplest solution would be to add it to the list of candidates.

> I also recently saw this blog post here:
> http://emergent.unpythonic.net/01330399156
>
> where somebody wrote a C port of a Python script that was
> using pyusb because it was too slow. The post says that the
> compiler, objdump, and ldconfig were getting run when the Python
> script started up. I don't see that when I run it (same script,
> but I modified it to pass a find_library lambda that just returns
> the Solaris library path). So maybe the only time those expensive
> external processes get run are during the library search? In that
> case, maybe it's good to hardcode the path when known ... or fall
> back to the expensive way if the hardcoded path isn't found.
>

He doesn't necessarily need to rewrite the app in C, but he can write
a faster backend.
I am not worried about optimization right now, but guessing common
paths seems like a smart and simple optimization.

> -Chap
>
> --
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users



-- 
Best Regards,
Wander Lairson Costa

--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] a dream of uniform serial-usb handling...

2015-04-21 Thread Wander Lairson Costa
Hi,

I am not very versed into pyserial and ftdi stuff. One question comes
to my mind is: what's the advantage of moving stuff from pyserial to
pyusb?
I have an idea of providing an usb.classes package, which would ship
modules for each USB standard class. But I didn't elaborate onto this
yet, it is currently only a vague idea. This might be what you want
here.

2015-04-19 8:31 GMT-03:00 Emmanuel Blot :
> On Sun, Apr 19, 2015 at 2:53 AM, Chapman Flack  wrote:
>>> Reactions? Does my dream make sense to other pyusb-users readers?
>
> Hi,
>
> A quick note about the licensing scheme of pyftdi (and friends).
> Some parts are LGPL-licensed because I've initially developed cftdi on
> top of libftdi - a Python-to-C wrapper for libftdi, and used an API
> which is very close to libftdi, which is released as LGPL.
>
> At that time, I've been in touch with one of the authors of libftdi to
> ask whether I could use the same API (and some part of the code,
> although ported from C to Python) with a MIT-style license. To be
> honnest, LGPL is quite hard to master, LGPL with Python is - for me -
> nearly impossible to understand. For instance, what is "static
> linking" or "dynamic linking" in Python's world?
>
> Anyway, LGPL in this case was so fuzzy to interpret, and because I had
> no time to dig into the licensing "mess" I chose to keep the same
> license as libftdi.
>
> >From my point of view, I used to be in favor of GPL-like licenses as a
> hobbyist, but as a profesionnel developer, this license scheme keeps
> giving me headaches, even after some dedicated training...
>
> I always release new code under MIT / BSD 3 clauses. I wish I could
> release pyftdi under MIT license as well, if somebody who master
> licensing issues can tell whether it could collide or not with the
> distant roots of pyftdi, that is libftdi.
>
> To sum up: I have no objection to move to MIT license the whole pyftdi
> package, I just do no want to deal with this licensing nightmare. Any
> advice on this topic is very welcome.
>
> Cheers,
> Manu
>
> --
> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
> Develop your own process in accordance with the BPMN 2 standard
> Learn Process modeling best practices with Bonita BPM through live exercises
> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users



-- 
Best Regards,
Wander Lairson Costa

--
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Question About Waiting for Prompts for the USB Device

2015-03-29 Thread Wander Lairson Costa
2015-03-29 12:42 GMT-03:00 Kyle Dotter :
> Currently I have a program that takes the serial number from an android
> phone automatically and saves it to a certain list. However, I don't want
> this process to be automated. There's an android app being written to go
> with this program and we want there to be a button that the user has to
> press in order for it to continue with the program.  I'm confused about how
> I am actually receiving messages from the phone, however. I've looked at the
> tutorial and I'm wondering if it'd be as easy as just having a read command?
> Something like
>
> message = 
> if message = 
> 
>
> Is this doable? I'm not the best with python and this usb communication

Hi,

If you are talking about the USB serial number, the device object has
a property called 'serial_number' that returns what you want.

>
> --
> Dive into the World of Parallel Programming The Go Parallel Website,
> sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for
> all
> things parallel software development, from weekly thought leadership blogs
> to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>



-- 
Best Regards,
Wander Lairson Costa

--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Fwd: My Python source code and another's C code

2015-02-01 Thread Wander Lairson Costa
r));;
> }
> else {
> fprintf(stderr,"OK\n");
> }
>
> // Now that it's opened, I can free the list of all devices
> libusb_free_device_list(devs, 1); // Documentation says to get rid of
> the list
>   // Once I have the device I need
> fprintf(stderr,"Released the device list\n");
>
> // Now I have to check to see if the kernal using udev has attached
> // a driver to the device.  If it has, it has to be detached so I can
> // use the device.
>
> if(libusb_kernel_driver_active(weatherStation.handle, 0) == 1) {
> //find out if kernel driver is attached
> fprintf(stderr,"Kernal driver active\n");
> if(libusb_detach_kernel_driver(weatherStation.handle, 0) == 0)
> //detach it
> fprintf(stderr,"Kernel Driver Detached!\n");
> }
>
> int activeConfig;
> err =libusb_get_configuration   (weatherStation.handle, &activeConfig);
> if (err){
> fprintf(stderr,"Can't get current active configuration, %s\n",
> libusb_strerror(err));;
> exit(1);
> }
> fprintf(stderr,"Currently active configuration is %d\n", activeConfig);
>
> if(activeConfig != 1){
> err = libusb_set_configuration  (weatherStation.handle, 1);
> if (err){
> fprintf(stderr,"Cannot set configuration, %s\n",
> libusb_strerror(err));;
> exit(1);
> }
> fprintf(stderr,"Just did the set configuration\n");
> }
>
> err = libusb_claim_interface(weatherStation.handle, 0); //claim
> interface 0 (the first) of device (mine had jsut 1)
> if(err) {
> fprintf(stderr,"Cannot claim interface, %s\n",
> libusb_strerror(err));
> exit(1);
> }
> fprintf(stderr,"Claimed Interface\n");
> fprintf(stderr,"Number of configurations:
> %d\n",deviceDesc.bNumConfigurations);
> struct libusb_config_descriptor *config;
> libusb_get_config_descriptor(weatherStation.device, 0, &config);
> fprintf(stderr,"Number of Interfaces:
> %d\n",(int)config->bNumInterfaces);
>
> // I know, the device only has one interface, but I wanted this code
> // to serve as a reference for some future hack into some other device,
> // so I put this loop to show the other interfaces that may
> // be there.  And, like most of this module, I stole the ideas from
> // somewhere, but I can't remember where (I guess it's google overload)
>
> const struct libusb_interface *inter;
> const struct libusb_interface_descriptor *interdesc;
> const struct libusb_endpoint_descriptor *epdesc;
> int i, j, k;
> for(i=0; i<(int)config->bNumInterfaces; i++) {
> inter = &config->interface[i];
> fprintf(stderr,"Number of alternate settings: %d\n",
> inter->num_altsetting);
> for(j=0; j < inter->num_altsetting; j++) {
> interdesc = &inter->altsetting[j];
> fprintf(stderr,"Interface Number: %d\n",
> (int)interdesc->bInterfaceNumber);
> fprintf(stderr,"Number of endpoints: %d\n",
> (int)interdesc->bNumEndpoints);
> for(k=0; k < (int)interdesc->bNumEndpoints; k++) {
> epdesc = &interdesc->endpoint[k];
> fprintf(stderr,"Descriptor Type:
> %d\n",(int)epdesc->bDescriptorType);
> fprintf(stderr,"Endpoint Address:
> 0x%0.2X\n",(int)epdesc->bEndpointAddress);
> // Below is how to tell which direction the
> // endpoint is supposed to work.  It's the high order bit
> // in the endpoint address.  I guess they wanted to hide
> it.
> fprintf(stderr," Direction is ");
> if ((int)epdesc->bEndpointAddress & LIBUSB_ENDPOINT_IN !=
> 0)
> fprintf(stderr," In (device to host)");
> else
> fprintf(stderr," Out (host to device)");
> fprintf(stderr,"\n");
> }
> }
> }
> fprintf(stderr,"trying clear halt on endpoint %X ... ",
> (int)epdesc->bEndpointAddress);
> //err = libusb_clear_halt(weatherStation.handle,
> (int)epdesc->bEndpointAddress);
> if (err){
> fprintf(stderr,"clear halt crapped, %s  SHUCKS\n",
> libusb_strerror(err));;
> closeUpAndLeave();
> }
> else {
> fprintf(stderr,"OK\n");
> }
>
> // So, for the weather station we now know it has one endpoint and it
> is set to
> // send data to the host.  Now we can experiment with that.
> //
> // I don't want to just hang up and read the reports as fast as I can,
> so
> // I'll space them out a bit.  It's weather, and it doesn't change
> very fast.
>
> int tickcounter= 0;
> while(1){
> sleep(1);
> if(tickcounter++ % 10 == 0){
> getit(1, noisy);
> }
> if(tickcounter % 30 == 0){
> getit(2, noisy);
> }
> if (tickcounter % 15 == 0){
> showit();
> }
> }
> }"
>
>
>
>
>
> --
> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
> GigeNET is offering a free month of service with a new server in Ashburn.
> Choose from 2 high performing configs, both with 100TB of bandwidth.
> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
> http://p.sf.net/sfu/gigenet
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>
>


-- 
Best Regards,
Wander Lairson Costa
--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Fwd: My Python source code and another's C code

2015-01-28 Thread Wander Lairson Costa
ntation says to get rid of
> the list
>   // Once I have the device I need
> fprintf(stderr,"Released the device list\n");
>
> // Now I have to check to see if the kernal using udev has attached
> // a driver to the device.  If it has, it has to be detached so I can
> // use the device.
>
> if(libusb_kernel_driver_active(weatherStation.handle, 0) == 1) {
> //find out if kernel driver is attached
> fprintf(stderr,"Kernal driver active\n");
> if(libusb_detach_kernel_driver(weatherStation.handle, 0) == 0)
> //detach it
> fprintf(stderr,"Kernel Driver Detached!\n");
> }
>
> int activeConfig;
> err =libusb_get_configuration   (weatherStation.handle, &activeConfig);
> if (err){
> fprintf(stderr,"Can't get current active configuration, %s\n",
> libusb_strerror(err));;
> exit(1);
> }
> fprintf(stderr,"Currently active configuration is %d\n", activeConfig);
>
> if(activeConfig != 1){
> err = libusb_set_configuration  (weatherStation.handle, 1);
> if (err){
> fprintf(stderr,"Cannot set configuration, %s\n",
> libusb_strerror(err));;
> exit(1);
> }
> fprintf(stderr,"Just did the set configuration\n");
> }
>
> err = libusb_claim_interface(weatherStation.handle, 0); //claim
> interface 0 (the first) of device (mine had jsut 1)
> if(err) {
> fprintf(stderr,"Cannot claim interface, %s\n",
> libusb_strerror(err));
> exit(1);
> }
> fprintf(stderr,"Claimed Interface\n");
> fprintf(stderr,"Number of configurations:
> %d\n",deviceDesc.bNumConfigurations);
> struct libusb_config_descriptor *config;
> libusb_get_config_descriptor(weatherStation.device, 0, &config);
> fprintf(stderr,"Number of Interfaces:
> %d\n",(int)config->bNumInterfaces);
>
> // I know, the device only has one interface, but I wanted this code
> // to serve as a reference for some future hack into some other device,
> // so I put this loop to show the other interfaces that may
> // be there.  And, like most of this module, I stole the ideas from
> // somewhere, but I can't remember where (I guess it's google overload)
>
> const struct libusb_interface *inter;
> const struct libusb_interface_descriptor *interdesc;
> const struct libusb_endpoint_descriptor *epdesc;
> int i, j, k;
> for(i=0; i<(int)config->bNumInterfaces; i++) {
> inter = &config->interface[i];
> fprintf(stderr,"Number of alternate settings: %d\n",
> inter->num_altsetting);
> for(j=0; j < inter->num_altsetting; j++) {
> interdesc = &inter->altsetting[j];
> fprintf(stderr,"Interface Number: %d\n",
> (int)interdesc->bInterfaceNumber);
> fprintf(stderr,"Number of endpoints: %d\n",
> (int)interdesc->bNumEndpoints);
> for(k=0; k < (int)interdesc->bNumEndpoints; k++) {
> epdesc = &interdesc->endpoint[k];
> fprintf(stderr,"Descriptor Type:
> %d\n",(int)epdesc->bDescriptorType);
> fprintf(stderr,"Endpoint Address:
> 0x%0.2X\n",(int)epdesc->bEndpointAddress);
> // Below is how to tell which direction the
> // endpoint is supposed to work.  It's the high order bit
> // in the endpoint address.  I guess they wanted to hide
> it.
> fprintf(stderr," Direction is ");
> if ((int)epdesc->bEndpointAddress & LIBUSB_ENDPOINT_IN !=
> 0)
> fprintf(stderr," In (device to host)");
> else
> fprintf(stderr," Out (host to device)");
> fprintf(stderr,"\n");
> }
> }
> }
> fprintf(stderr,"trying clear halt on endpoint %X ... ",
> (int)epdesc->bEndpointAddress);
> //err = libusb_clear_halt(weatherStation.handle,
> (int)epdesc->bEndpointAddress);
> if (err){
> fprintf(stderr,"clear halt crapped, %s  SHUCKS\n",
> libusb_strerror(err));;
> closeUpAndLeave();
> }
> else {
> fprintf(stderr,"OK\n");
> }
>
> // So, for the weather station we now know it has one endpoint and it
> is set to
> // send data to the host.  Now we can experiment with that.
> //
> // I don't want to just hang up and read the reports as fast as I can,
> so
> // I'll space them out a bit.  It's weather, and it doesn't change
> very fast.
>
> int tickcounter= 0;
> while(1){
> sleep(1);
> if(tickcounter++ % 10 == 0){
> getit(1, noisy);
> }
> if(tickcounter % 30 == 0){
> getit(2, noisy);
> }
> if (tickcounter % 15 == 0){
> showit();
> }
> }
> }"
>
>
>
>
>
> --
> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
> GigeNET is offering a free month of service with a new server in Ashburn.
> Choose from 2 high performing configs, both with 100TB of bandwidth.
> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
> http://p.sf.net/sfu/gigenet
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>
>


-- 
Best Regards,
Wander Lairson Costa
--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] PyUSB problems

2015-01-13 Thread Wander Lairson Costa
Hi,

Could you please post the C and Python source codes?

2015-01-12 10:09 GMT-02:00 Gerry :
> I have just reinstalled Pyusb on my Raspberry Pi.  When I try to run the
> application I have created I get the following error messages:
> "Traceback (most recent call last):
>File "gsbwx.py", line 61, in 
>  d1 = device.read(endpoint.bEndpointAddress, endpoint.wMaxPacketSize)
>File "/usr/local/lib/python3.2/dist-packages/usb/core.py", line 918,
> in read
>  self.__get_timeout(timeout))
>File "/usr/local/lib/python3.2/dist-packages/usb/backend/libusb0.py",
> line 507, in intr_read
>  timeout)
>File "/usr/local/lib/python3.2/dist-packages/usb/backend/libusb0.py",
> line 562, in __read
>  timeout
>File "/usr/local/lib/python3.2/dist-packages/usb/backend/libusb0.py",
> line 380, in _check
>  raise USBError(errmsg, ret)
> usb.core.USBError: [Errno None] b'No error'"
>
> I have included the following import statements in my code
> "import sys
> import usb.core
> import usb.backend.libusb1
> import usb.util"
>
> and all of the error messages are pointing to "libusb0.py" not
> "libusb1.py" as in my import statements.
>
>
> I am trying to read an Acurite weather station.  I have also tried this
> on another computer system and also could not read the device. I have a
> program that is written in C and it can read the device so I don't know
> why Python can't read it.
>
> Any suggestions on how to fix the problem will greatly appreciated.
>
> I sent the above message on Jan 11.  I am now getting the following errors:
>
> "Traceback (most recent call last):
>File "gsbwx.py", line 62, in 
>  d1 = device.read(endpoint.bEndpointAddress, endpoint.wMaxPacketSize)
>File "/usr/local/lib/python2.7/dist-packages/usb/core.py", line 905,
> in read
>  intf, ep = self._ctx.setup_request(self, endpoint)
>File "/usr/local/lib/python2.7/dist-packages/usb/core.py", line 190,
> in setup_request
>  self.managed_claim_interface(device, intf)
>File "/usr/local/lib/python2.7/dist-packages/usb/core.py", line 146,
> in managed_claim_interface
>  self.backend.claim_interface(self.handle, i)
>File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb0.py",
> line 468, in claim_interface
>  _check(_lib.usb_claim_interface(dev_handle, intf))
>File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb0.py",
> line 380, in _check
>  raise USBError(errmsg, ret)
> usb.core.USBError: [Errno None] could not claim interface 0: Device or
> resource busy
>
> Any ideas on why this is NOT WORKING??? Are there any other modules that
> work with Python and USB???
>
> Thanks,
>
> Gerry
>
> --
> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
> GigeNET is offering a free month of service with a new server in Ashburn.
> Choose from 2 high performing configs, both with 100TB of bandwidth.
> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
> vanity: www.gigenet.com
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users



-- 
Best Regards,
Wander Lairson Costa

--
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Help with writing a driver for USB HID device.

2014-12-29 Thread Wander Lairson Costa
2014-11-13 12:14 GMT-02:00 Anatoly Verkhovsky :
> Hi,
>

Hi, sorry for the delay, but I was out most of the month.

> I'm writing a driver for a device.  It was originally using MDB ICP, but now
> it ships with a USB to MDB bridge, why they have chosen to do it as HID
> rather then USB Serial i have no idea.  So behind the usb there is a simple
> serial protocol.
>

[snip]

> Here is the gist of my code:
>
> dev = usb.core.find(idVendor=0x155d, idProduct=0x0002)
> # check and remove kernel driver
> dev.set_configuration()
> dev.reset()

iirc, reset is problematic in Windows (maybe a should log a warning
for this), what if you remove it?

> # bmRequestType, bRequest are taken from SnoopyPro trace.
> res = dev.ctrl_transfer(0x22, 0x9, 0, 0, [0x02, 0x85, 0x0a], 1000)

This seems to be a class request, so it is a HID class request?

> data = dev.read(0x82, 32, timeout=1)
>
> ctrl_transfer fails with USBError(32, 'Pipe error') and
> after couple of retries : USBError(19, 'No such device (it may have been
> disconnected)')

In general, this kind of errors in Windows is due to the reset call.

> i have also tried the whole byte string from the capture
>
> res = dev.ctrl_transfer(0x22, 0x9, 0, 0, [0x03, 0x02, 0x85, 0x0a, 0x05,
> 0x14, 0xff, 0xff], 1000)
>
> to same effect.
>
> So what am i missing?
> Why is the trace saying that host to device message is using function 0x1b
> (Class interface) and device to host is using function 0x08 (control
> transfer), shouldn't it be the other way around?
>
> thanks,
> Anatoli
>
>
> --
> Comprehensive Server Monitoring with Site24x7.
> Monitor 10 servers for $9/Month.
> Get alerted through email, SMS, voice calls or mobile push notifications.
> Take corrective actions from your mobile device.
> http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
> ___________
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>



-- 
Best Regards,
Wander Lairson Costa

--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Detect device on Mac

2014-12-28 Thread Wander Lairson Costa
2014-11-17 7:56 GMT-02:00 Oci Ocean :
> Hallo together,
>

Hi, sorry for the delay.

> I have a problem  detecting my ir-reciever on Mac 10.8.
> The ir-reciever is noticed by the oporating system and i can control
> iTunes with a remote control but:
>
> device = usb.core.find(find_all=True)
>
> just finds USB-Mouse and Keyboard.
>
> Where is my mistake or what can i do to have success?
>

So, I am not a Mac guy, does Mac have a lsusb like tool? Does your
device appear there?

Best Regards,
Wander Lairson Costa

--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


[pyusb-users] Out for the rest of the month

2014-12-07 Thread Wander Lairson Costa
Hi,

I just would like to let you know that I will be out for vacation for
the rest of the month, so support requests and PR will take some time
to request answered.

Merry Christmas!

-- 
Best Regards,
Wander Lairson Costa

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] PyUSB on Intel Galileo Gen 2

2014-11-27 Thread Wander Lairson Costa
Hi,

Could you please run with the env var PYUSB_DEBUG=debug and post the logs?

2014-11-25 3:31 GMT-02:00 Setia Budi :
> Actually, libusb is available on Yocto Linux:
>
> root@clanton:~# ls /lib/ | grep libusb
> libusb-0.1.so.4
> libusb-0.1.so.4.4.4
> libusb-1.0.so.0
> libusb-1.0.so.0.1.0
>
> But still, every time I call my script, I always have this error message
>
> Traceback (most recent call last):
>   File "pyru824.py", line 71, in 
> RFID_READER = usb.core.find(idVendor=VENDOR_ID, idProduct=PRODUCT_ID)
>   File "/usr/lib/python2.7/site-packages/usb/core.py", line 1199, in find
> raise ValueError('No backend available')
> ValueError: No backend available
>
> Kind regards,
> Budi
>
>
> On Tue, Nov 25, 2014 at 12:49 PM, Setia Budi  wrote:
>>
>> configure: error: in `/home/root/libusb-1.0.9':
>> configure: error: no acceptable C compiler found in $PATH
>>
>>
>> Need to get c compiler >.<
>>
>>
>>
>> On Tue, Nov 25, 2014 at 12:23 PM, Setia Budi  wrote:
>>>
>>> Thanks for the hint. I will try it now :)
>>>
>>> Kind regards,
>>> Budi
>>>
>>> On Tue, Nov 25, 2014 at 12:17 PM, Xiaofan Chen 
>>> wrote:
>>>>
>>>> On Tue, Nov 25, 2014 at 7:33 AM, Setia Budi 
>>>> wrote:
>>>> > Hi all,
>>>> > At the moment I am working with Intel Galileo Gen2 with Yocto Linux
>>>> > running
>>>> > on top of it. This micro PC is planned to replace some other micro PC
>>>> > for
>>>> > field experiment.
>>>> > I installed pyusb on it without any issue, however, once I run my
>>>> > script,
>>>> > which is using pyusb module, I found this error message:
>>>> >
>>>> > Traceback (most recent call last):
>>>> >   File "pyru824.py", line 71, in 
>>>> > RFID_READER = usb.core.find(idVendor=VENDOR_ID,
>>>> > idProduct=PRODUCT_ID)
>>>> >   File "/usr/lib/python2.7/site-packages/usb/core.py", line 1199, in
>>>> > find
>>>> > raise ValueError('No backend available')
>>>> > ValueError: No backend available
>>>> >
>>>> > I am just wondering whether anyone has a solution for this problem?
>>>> > Thank you :)
>>>>
>>>> Did you install libusb-1.0? For Linux it is better to install libusb-1.0
>>>> as the backend for pyusb. If your Linux distro does not provide
>>>> the package, then you need to build from source. But most
>>>> Linux distros provide libusb-1.0.
>>>>
>>>> Website: http://libusb.info/
>>>> Download: http://sourceforge.net/projects/libusb/
>>>>
>>>>
>>>> --
>>>> Xiaofan
>>>>
>>>>
>>>> --
>>>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>>>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
>>>> with Interactivity, Sharing, Native Excel Exports, App Integration &
>>>> more
>>>> Get technology previously reserved for billion-dollar corporations, FREE
>>>>
>>>> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
>>>> ___
>>>> pyusb-users mailing list
>>>> pyusb-users@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>>>
>>>
>>
>
>
> --
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>



-- 
Best Regards,
Wander Lairson Costa

--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Access Denied Error on Windows 7

2014-11-13 Thread Wander Lairson Costa
2014-11-11 15:22 GMT-02:00 Richard Bryan :
> I'm frequently running into an "Access Denied (insufficient permissions)"
> errors on Windows 7 (with libusb1 backend) during long-running usb sessions
> with a device.  When this happens, I call reset() and dispose_resources() on
> the usb handle and then attempt to reenumerate it using usb.core.find(), but
> the Access Denied error keeps occurring until I unplug and replug the
> device.  Restarting the program alone doesnt fix it.
>

iirc, libusb reset operation is problematic under Windows, so better
to avoid it.

> I have a multithreaded program, but interaction with pyusb is only ever done
> in the same, single thread.
>

This should not cause problems...

> Anyone have any ideas what's going on?  Or is this something I should ask
> the libusb list about?
>

Could you please run you program with the environment variable
PYUSB_DEBUG=debug defined and report the logs?

> Richard
>
> --
> Comprehensive Server Monitoring with Site24x7.
> Monitor 10 servers for $9/Month.
> Get alerted through email, SMS, voice calls or mobile push notifications.
> Take corrective actions from your mobile device.
> http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>



-- 
Best Regards,
Wander Lairson Costa

--
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Further info

2014-11-03 Thread Wander Lairson Costa
2014-11-03 14:48 GMT-02:00 Anony Mous :
>> If libusb(x) has been installed with Homebrew:
> It hasn't. This is a fresh compile under 10.6.8. I am trying -- hard -- to
> avoid using homebrew and similar. Last time I tried, which was not with
> homebrew but macports, it wrecked my system by overwriting things I was
> using with incompatible versions and required a format and reinstall of the
> OS.
>
> It's a library. It should be reasonable to compile and install. I have done
> this many other times with many other libraries and never run into a
> problem.
>
> So that's where I am about homebrew. Nervous. Very nervous.
>
>>
> Adding libusb path to DYLD_LIBRARY_PATH should be enough.
>
> in .bash-profile, I have these:
>
>
> export DYLD_FALLBACK_LIBRARY_PATH=/usr/local/lib
> export DYLD_LIBRARY_PATH=/usr/local/lib
> export PYUSB_DEBUG_LEVEL=debug
>

The of the environment variable change recently to PYUSB_DEBUG.

> env returns (each cut from lots of results and pasted here):
>
> DYLD_FALLBACK_LIBRARY_PATH=/usr/local/lib
> DYLD_LIBRARY_PATH=/usr/local/lib
> PYUSB_DEBUG_LEVEL=debug
>
> The libraries are definitely in /usr/local/lib viz:
>
> bash-3.2$ ls -l /usr/local/lib/libusb*
> -rwxr-xr-x  1 root  wheel   81480 Oct 28 14:20
> /usr/local/lib/libusb-1.0.0.dylib
> -rw-r--r--  1 root  wheel  245792 Oct 28 14:20 /usr/local/lib/libusb-1.0.a
> lrwxr-xr-x  1 root  wheel  18 Oct 28 14:20
> /usr/local/lib/libusb-1.0.dylib -> libusb-1.0.0.dylib
> -rwxr-xr-x  1 root  wheel 936 Oct 28 14:20 /usr/local/lib/libusb-1.0.la
>
> Here's my test code:
>
> =
>
> #!/usr/bin/python
>
> import usb.core
> import usb.backend.libusb1
>
> testmode = 1
>
> if testmode == 0:
> mybackend = usb.backend.libusb1.get_backend(find_library=lambda x:
> "/usr/local/lib/libusb-1.0.0.dylib")
>
> if mybackend == None:
> print "Failure to evaluate library name"
> print "backend = "+str(mybackend)
> else:
> dev = usb.core.find(idVendor=0xfffe, idProduct=0x0001, backend=mybackend)
> if dev is None:
> raise ValueError('Our device is not connected')
> elif testmode == 1:
> dev = usb.core.find(idVendor=0xfffe, idProduct=0x0001)
> if dev is None:
> raise ValueError('Our device is not connected')
>
> In testmode 0:
>
> bash-3.2$ ./pm-ben.py
> Failure to evaluate library name
> backend = None
>
> In testmode 1:
>
> bash-3.2$ ./pm-ben.py
> Traceback (most recent call last):
>   File "./pm-ben.py", line 19, in 
> dev = usb.core.find(idVendor=0xfffe, idProduct=0x0001)
>   File "/Library/Python/2.6/site-packages/usb/core.py", line 1199, in find
> raise ValueError('No backend available')
> ValueError: No backend available
>
> 
>
> It doesn't appear that the DEBUG log command does anything, but this is
> still just trying to get libusb to wake up, so I wouldn't expect it to.
>
> Anything in there that is helpful to anyone?
>
> --Ben
> fyng...@gmail.com
>
>
> --
>
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>



-- 
Best Regards,
Wander Lairson Costa

--
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Continuous monitoring of 3 USB scales

2014-11-03 Thread Wander Lairson Costa
2014-11-02 1:54 GMT-02:00 Mark McClure :
> Hello list:
>
> I have three A&D EJ-3000 scales that I want to simultaneously acquire data
> from every 1 minute over 24-hr periods.  All scales have a USB interface.
> I've started working through the pyusb tutorial, but before I confuse myself
> any further, I thought I'd ask if what I want to do is even possible?  Tech
> support at A&D told me that retrieving weight data from the scales
> automatically (i.e. without pushing the print button on the scales) could
> not be done with USB because the interface was uni-directional.  Instead,
> they suggested that I switch to RS-232.  Is this true, and if so why?
>

Hi,

It really depends on how the firmware behaves, from USB POV, you can
always poll the device for data each minute. But might be other
constraints that I am not aware of.

> I printed the configuration of the scale after installing pyusb and starting
> the tutorial.
>
>
> CONFIGURATION 1: 20 mA ===
>bLength  :0x9 (9 bytes)
>bDescriptorType  :0x2 Configuration
>wTotalLength :   0x2d (45 bytes)
>bNumInterfaces   :0x1
>bConfigurationValue  :0x1
>iConfiguration   :0x0
>bmAttributes :   0x80 Bus Powered
>bMaxPower:0xa (20 mA)
> INTERFACE 0: Human Interface Device 
>  bLength:0x9 (9 bytes)
>  bDescriptorType:0x4 Interface
>  bInterfaceNumber   :0x0
>  bAlternateSetting  :0x0
>  bNumEndpoints  :0x2
>  bInterfaceClass:0x3 Human Interface Device
>  bInterfaceSubClass :0x0
>  bInterfaceProtocol :0x1
>  iInterface :0x0
>   ENDPOINT 0x81: Interrupt IN ==
>bLength  :0x7 (7 bytes)
>bDescriptorType  :0x5 Endpoint
>bEndpointAddress :   0x81 IN
>bmAttributes :0x3 Interrupt
>wMaxPacketSize   :   0x40 (64 bytes)
>bInterval:0x4
>   ENDPOINT 0x2: Interrupt OUT ==
>bLength  :0x7 (7 bytes)
>bDescriptorType  :0x5 Endpoint
>bEndpointAddress :0x2 OUT
>bmAttributes :0x3 Interrupt
>    wMaxPacketSize   :   0x40 (64 bytes)
>bInterval:0x4
>
> Any guidance would be greatly appreciated.
>


-- 
Best Regards,
Wander Lairson Costa

--
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Arghh

2014-10-29 Thread Wander Lairson Costa
Thanks @emmanuel, so helpful, as always :)

@anony Could you please run your script with the PYUSB_DEBUG=debug
environment variable set and post the logs?

2014-10-28 20:59 GMT-02:00 Emmanuel Blot :
> Adding libusb path to DYLD_LIBRARY_PATH should be enough.
>
> I'm using this syntax daily on OS X without any issue.
>
> If libusb(x) has been installed with Homebrew:
>
> export DYLD_LIBRARY_PATH="/usr/local/opt/libusb/lib"
>
> $> ls -l /usr/local/opt/libusb/lib/
> total 464
> -r--r--r--  1 eblot  admin   93280 28 Oct 23:57 libusb-1.0.0.dylib
> -r--r--r--  1 eblot  admin  139144 19 Oct 18:46 libusb-1.0.a
> lrwxr-xr-x  1 eblot  admin  18 19 Oct 18:46 libusb-1.0.dylib ->
> libusb-1.0.0.dylib
> drwxr-xr-x  3 eblot  admin 102 28 Oct 23:57 pkgconfig
>
> There is no such thing as ld.so.conf on OS X.
>
> Cheers,
> Manu
>
> On Tue, Oct 28, 2014 at 10:01 PM, Wander Lairson Costa
>  wrote:
>> 2014-10-28 18:51 GMT-02:00 Anony Mous :
>>> ok, is it the other way around? OSX requires dylibs, rather than .so, so
>>> PyUSB is looking for/using the wrong thing?
>>>
>>> There's a line in the usblib configure that says the linker doesn't support
>>> .so and elsewhere it implies that the default *is* the .so format, so it
>>> seems like it really thinks it ought to be making dylibs...
>>>
>>> but if that's the case, why doesn't PyUSB look for dylibs?
>>>
>>> So confused...
>>>
>>
>> PyUSB uses ctypes, which works fine with dynlib, but iirc it does not
>> look at environment variables setup, so you need the path of libusb
>> configured in the search path for your system. I never used a Mac OSX,
>> don't how it works, but should be something like /etc/ld.so.conf in
>> Linux.
>>
>>
>> --
>> Best Regards,
>> Wander Lairson Costa
>>
>> --
>> ___
>> pyusb-users mailing list
>> pyusb-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>
> --
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users



-- 
Best Regards,
Wander Lairson Costa

--
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Arghh

2014-10-28 Thread Wander Lairson Costa
2014-10-28 18:51 GMT-02:00 Anony Mous :
> ok, is it the other way around? OSX requires dylibs, rather than .so, so
> PyUSB is looking for/using the wrong thing?
>
> There's a line in the usblib configure that says the linker doesn't support
> .so and elsewhere it implies that the default *is* the .so format, so it
> seems like it really thinks it ought to be making dylibs...
>
> but if that's the case, why doesn't PyUSB look for dylibs?
>
> So confused...
>

PyUSB uses ctypes, which works fine with dynlib, but iirc it does not
look at environment variables setup, so you need the path of libusb
configured in the search path for your system. I never used a Mac OSX,
don't how it works, but should be something like /etc/ld.so.conf in
Linux.


-- 
Best Regards,
Wander Lairson Costa

--
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Confusion with attach_kernel_driver() Method in pyusb-1.0.0b2

2014-10-01 Thread Wander Lairson Costa
2014-09-30 23:31 GMT-03:00 Jared Contrascere
:
>
> Hello!
>
> On Ubuntu 12.04 LTS, using Python 3.4.1 and pyusb-1.0.0b2, I cannot 
> successfully call attach_kernel_driver(). My attempts follow:
>
> dev.attach_kernel_driver()
> # TypeError: attach_kernel_driver() missing 1 required positional argument: 
> 'interface'
>

attach_kernel_driver needs the interface number argument

> When I call the method using the interface number, I get a different 
> exception.
>
> dev.attach_kernel_driver(0)
> # NotImplementedError: attach_kernel_driver
>

The error message says what it says: attach_kernel_driver is not
implemented in this backend (which I suppose is libusb0).

>
> Can anyone clear up my confusion here? I looked at the relevant source code 
> and I'm not sure which direction I should go.
>

You can try libusb 1.0, but the one shipped with Ubuntu 12.04 is too
old, you will need to download the sources and build a newer one.

> Thank you!
> Jared
>
> --
> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>



-- 
Best Regards,
Wander Lairson Costa

--
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] NotImplementedError in is_kernel_driver_active() in pyusb 1.0.0b2

2014-09-29 Thread Wander Lairson Costa
Em 28/09/2014 20:29, "Jared Contrascere" 
escreveu:
>
> Hello!
>
> According to the release notes at
https://github.com/walac/pyusb/blob/master/ReleaseNotes.rst the functions
is_kernel_driver_active, detach_kernel_driver and attach_kernel_driver does
not accept an Interface object anymore.
>
> When upgrading from pyusb-1.0.0a3 to pyusb-1.0.0b2 I changed:
>
> dev.is_kernel_driver_active(interface)
> # is now...
> dev.is_kernel_driver_active()
>
> This raises a NotImplementedError. Is the beta-2 release too new to begin
application development or am I doing something wrong?
>

My bad. It does not accept an interface object, you must always pass an
interface number. Sorry about the confusing info.

>
--
> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
>
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>
--
Slashdot TV.  Videos for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


[pyusb-users] [Released] PyUSB 1.0.0 beta 2

2014-09-23 Thread Wander Lairson Costa
Dear all,

PyUSB 1.0.0, beta 2 is out. This is expected to be the last beta release.

THIS RELEASE HAS SOME IMPORTANT API BREAKAGES, PLEASE LOOK AT THE
RELEASE NOTES FILE [1] FOR DETAILS.

[1] https://github.com/walac/pyusb/blob/master/ReleaseNotes.rst

-- 
Best Regards,
Wander Lairson Costa

--
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Unable to read from an USB device

2014-09-17 Thread Wander Lairson Costa
2014-09-16 9:51 GMT-03:00 Gerry :
> I have the following code but it is NOT getting any data.
>
> import usb.core
> import usb.util
> import sys
> VENDOR_ID = 0x24c0
> PRODUCT_ID = 0x0003
> device = usb.core.find(idVendor=VENDOR_ID, idProduct=PRODUCT_ID)
> if device is None:
>  sys.exit("Could not find the Weather Station")
> else:
>  print (device)
>
> if device.is_kernel_driver_active(0):
>  try:
>  device.detach_kernel_driver(0)
>  except usb.core.USBError as e:
>  sys.exit("Could not detach driver: %s" % str(e))
>
> try:
>  device.set_configuration()
>  device.reset()

Once you did a reset, the device came back to a unconfigured state.

> except usb.core.USBError as e:
>  sys.exit("Could not set configuration: %s" % str(e))
>
> endpoint = device[0][0,0][0]
>
> data = []
>
> data1 += device.read(endpoint.bEndpointAddress, endpoint.wMaxPacketSize)
>

Why not:

data = device.read(endpoint.bEndpointAddress, endpoint.wMaxPacketSize

> It does not give me any error code or anything...NOTHING.
>
> Any ideas
>

Try to remove the reset() call, if it keeps not working, you can use
the PYUSB_DEBUG=debug environment variable to see what's happening and
report to us.



-- 
Best Regards,
Wander Lairson Costa

--
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
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Working with multiple identical devices

2014-09-14 Thread Wander Lairson Costa
2014-09-08 9:05 GMT-03:00 Setia Budi :
> 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

--
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
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] PyUSB Release USB Device

2014-09-14 Thread Wander Lairson Costa
Em 02/09/2014 03:25, "Prashant Patel"  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
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Sniff USB Packets

2014-09-09 Thread Wander Lairson Costa
2014-09-09 16:46 GMT-03:00 Rolf Inator :
> 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

--
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
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Working with multiple identical devices

2014-09-08 Thread Wander Lairson Costa
2014-09-07 22:40 GMT-03:00 Setia Budi :
> 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
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Working with multiple identical devices

2014-09-04 Thread Wander Lairson Costa
2014-09-03 22:49 GMT-03:00 Setia Budi :
> 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
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Errno 2 - Entity not found - On windows

2014-09-04 Thread Wander Lairson Costa
2014-09-02 11:17 GMT-03:00 Julio Sánchez :
> 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 "", line 1, in 
> 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

--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Asynchronous transfers

2014-08-01 Thread Wander Lairson Costa
2014-07-30 15:38 GMT-03:00 Slavko Kocjancic :
> 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

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Trouble specifying a backend on embedded.

2014-07-31 Thread Wander Lairson Costa
2014-07-31 14:48 GMT-03:00 Samuel Thurston :
>
> On 07/30/2014 05:51 PM, Wander Lairson Costa wrote:
>> 2014-07-30 15:01 GMT-03:00 Samuel Thurston :
>>> 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 "", line 1, in 
>>> 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 "", line 1, in 
>>> 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

--
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Trouble specifying a backend on embedded.

2014-07-30 Thread Wander Lairson Costa
2014-07-30 15:01 GMT-03:00 Samuel Thurston :
> 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 "", line 1, in 
>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 "", line 1, in 
> 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

--
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Asynchronous transfers

2014-07-29 Thread Wander Lairson Costa
2014-07-29 13:49 GMT-03:00 Slavko Kocjancic :
> On 29. 07. 2014 18:20, Wander Lairson Costa wrote:
>> 2014-07-29 11:28 GMT-03:00 Slavko Kocjancic :
>>> Hello...
>>>
>>> How to make Asynchronous transfers with pyusb?
>>> I look for some example but no luck...
>>>
>>> I stuck on the beggining.. Ie I need to allocate some buffer but fail...
>>> I try like this:
>>>
>>> import usb
>>> transfer=lib.libusb_alloc_transfer(0)
>>> lib.libusb_free_transfer(transfer)
>>>
>>> How to do that?!?
>>>
>> 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

--
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Asynchronous transfers

2014-07-29 Thread Wander Lairson Costa
2014-07-29 11:28 GMT-03:00 Slavko Kocjancic :
> Hello...
>
> How to make Asynchronous transfers with pyusb?
> I look for some example but no luck...
>
> I stuck on the beggining.. Ie I need to allocate some buffer but fail...
> I try like this:
>
> import usb
> transfer=lib.libusb_alloc_transfer(0)
> lib.libusb_free_transfer(transfer)
>
> How to do that?!?
>

Unfortunately, PyUSB doesn't have async support yet :(


-- 
Best Regards,
Wander Lairson Costa

--
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] usb.core.USBError: [Errno 32] Pipe error

2014-07-25 Thread Wander Lairson Costa
2014-07-25 0:35 GMT-03:00 S Plucena :
> Hi!
>
> I'm using Ubuntu 12.04 development machine, Epson LX-300. I have
> followed the tutorial from Git, was able to find my printer but got
> stuck with pipe error. I'm trying to print directly to printer.
>
> Note: Made it to work once, then this error showed up. All had
> encountered time out errors.
>

Does the error persist after you reboot the printer?



-- 
Best Regards,
Wander Lairson Costa

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Select device by name linux / win difference

2014-07-17 Thread Wander Lairson Costa
2014-07-17 4:04 GMT-03:00 Slavko Kocjancic :
> On 17. 07. 2014 01:01, Wander Lairson Costa wrote:
>> 2014-07-16 15:05 GMT-03:00 Slavko Kocjancic :
>>> I download from here
>>> http://sourceforge.net/projects/pyusb/files/PyUSB%201.0/1.0.0-alpha-3/
>>>
>> Could you please download from this link [1] and check if it works?
>>
>> [1] https://github.com/walac/pyusb/tarball/master
>>
> Hello...
> With that library I got text output on linux too!
> Seems that I have multiple install in both systems. I do cleanup of anny
> pyusb and install previous driver. Now work in both system.
>
> Thanks for guide me.
>

You're welcome! I am glad it is working now!

-- 
Best Regards,
Wander Lairson Costa

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Select device by name linux / win difference

2014-07-16 Thread Wander Lairson Costa
2014-07-16 15:05 GMT-03:00 Slavko Kocjancic :
> I download from here
> http://sourceforge.net/projects/pyusb/files/PyUSB%201.0/1.0.0-alpha-3/
>

Could you please download from this link [1] and check if it works?

[1] https://github.com/walac/pyusb/tarball/master

-- 
Best Regards,
Wander Lairson Costa

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Select device by name linux / win difference

2014-07-16 Thread Wander Lairson Costa
2014-07-16 11:47 GMT-03:00 Slavko Kocjancic :
> ...but I newer installed GIT version on Win system. So where it came?
>

I guess you downloaded the zip from walac.github.io/pyusb, which is
just a packaged git HEAD.

This website is temporary because SF finished trac support.

Best Regards,
Wander Lairson Costa

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Select device by name linux / win difference

2014-07-16 Thread Wander Lairson Costa
2014-07-16 8:22 GMT-03:00 Slavko Kocjancic :

[snip]

>>
> That different result confuse me too.
> And I do install same pyusb-1.0.0.b1 in both systems.
> The only difference can be the libusb driver itself. for win probably
> libusb-win and for linux probably libusb1.0 but don't know wich one the
> pyusb pick.
>
>

That's weird, only git version has support the printing device info
through "print dev".


-- 
Best Regards,
Wander Lairson Costa

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Select device by name linux / win difference

2014-07-16 Thread Wander Lairson Costa
2014-07-16 7:39 GMT-03:00 Slavko Kocjancic :
> On 16. 07. 2014 12:33, Wander Lairson Costa wrote:
>> 2014-07-16 6:05 GMT-03:00 Slavko Kocjancic :
>>> Hello...
>>>
>>> Attached is simple example. The problem is that it's works in linux but
>>> not in windows. And I wan't to be portable. Can someone tell me what I
>>> do wrong?
>>> seems that  is handeled different in win (it
>>> return long string?!)
>>>
>>>
>>>
>>>
>>> #there is current only one device with correct vid/pid attached
>>> import usb
>>> def openUsb(vid,pid,name=''):
>>>   try:
>>>   devices = usb.core.find(idVendor=vid, idProduct=pid, 
>>> find_all=True)
>>>   for dev in devices:
>>>   print type (dev)
>>>   print dev
>>>   if (usb.util.get_string(dev,256,2)==name):
>>>   dev.set_configuration()
>>>   return dev
>>>   except Exception as e:
>>>   print e
>>>
>>>
>>> USBdev=openUsb(0x16d0,0x06ad,'Q_ANALISER')
>>> if not USBdev:
>>>   print "Device not found"
>>>   exit(0)
>>> print "Device found ",USBdev
>>>
>>>
>>> '''
>>> OUTPUT on LINUX#
>>> 
>>> 
>>> Device found  
>>>
>>>
>>>
>>> OUTPUT on WINDOWS#
>>> 
>>> DEVICE ID 16d0:06ad on Bus 000 Address 001 =
>>>bLength:   0x12 (18 bytes)
>>>bDescriptorType:0x1 Device
>>>bcdUSB :  0x110 USB 1.1
>>>bDeviceClass   :0x0 Specified at interface
>>>bDeviceSubClass:0x0
>>>bDeviceProtocol:0x0
>>>bMaxPacketSize0:0x8 (8 bytes)
>>>idVendor   : 0x16d0
>>>idProduct  : 0x06ad
>>>bcdDevice  :0x1 Device 0.01
>>>iManufacturer  :0x1 CAA
>>>iProduct   :0x2 Q_ANALISER
>>>iSerialNumber  :0x0
>>>bNumConfigurations :0x1
>>> CONFIGURATION 1: 400 mA ==
>>>  bLength  :0x9 (9 bytes)
>>>  bDescriptorType  :0x2 Configuration
>>>  wTotalLength :   0x1b (27 bytes)
>>>  bNumInterfaces   :0x1
>>>  bConfigurationValue  :0x1
>>>  iConfiguration   :0x0
>>>  bmAttributes :   0xc0 Self Powered
>>>  bMaxPower:   0xc8 (400 mA)
>>>   INTERFACE 0: Human Interface Device 
>>>bLength:0x9 (9 bytes)
>>>bDescriptorType:0x4 Interface
>>>bInterfaceNumber   :0x0
>>>bAlternateSetting  :0x0
>>>bNumEndpoints  :0x0
>>>bInterfaceClass:0x3 Human Interface Device
>>>bInterfaceSubClass :0x0
>>>bInterfaceProtocol :0x0
>>>iInterface :0x0
>>> Device not found
>>> Press any key to continue . . .
>>>
>>>
>> Hi,
>>
>> It feels like you are using different git revisions for Windows and
>> Linux, aren't you?
>>
> It's should be same.
> But don't know how to check wich backend pyusb use at linux and win...
> In win there should be only one, but in linux I have at least 3 and need
> all... (for other things)
>

I said that because you have different results when you do "print dev"
on Linux and Windows. You can do a "git pull origin master" on both
repositories to make sure you are using git HEAD.

-- 
Best Regards,
Wander Lairson Costa

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Select device by name linux / win difference

2014-07-16 Thread Wander Lairson Costa
2014-07-16 6:05 GMT-03:00 Slavko Kocjancic :
> Hello...
>
> Attached is simple example. The problem is that it's works in linux but
> not in windows. And I wan't to be portable. Can someone tell me what I
> do wrong?
> seems that  is handeled different in win (it
> return long string?!)
>
>
>
>
> #there is current only one device with correct vid/pid attached
> import usb
> def openUsb(vid,pid,name=''):
>  try:
>  devices = usb.core.find(idVendor=vid, idProduct=pid, find_all=True)
>  for dev in devices:
>  print type (dev)
>  print dev
>  if (usb.util.get_string(dev,256,2)==name):
>  dev.set_configuration()
>  return dev
>  except Exception as e:
>  print e
>
>
> USBdev=openUsb(0x16d0,0x06ad,'Q_ANALISER')
> if not USBdev:
>  print "Device not found"
>  exit(0)
> print "Device found ",USBdev
>
>
> '''
> OUTPUT on LINUX#
> 
> 
> Device found  
>
>
>
> OUTPUT on WINDOWS#
> 
> DEVICE ID 16d0:06ad on Bus 000 Address 001 =
>   bLength:   0x12 (18 bytes)
>   bDescriptorType:0x1 Device
>   bcdUSB :  0x110 USB 1.1
>   bDeviceClass   :0x0 Specified at interface
>   bDeviceSubClass:0x0
>   bDeviceProtocol:0x0
>   bMaxPacketSize0:0x8 (8 bytes)
>   idVendor   : 0x16d0
>   idProduct  : 0x06ad
>   bcdDevice  :0x1 Device 0.01
>   iManufacturer  :0x1 CAA
>   iProduct   :0x2 Q_ANALISER
>   iSerialNumber  :0x0
>   bNumConfigurations :0x1
>CONFIGURATION 1: 400 mA ==
> bLength  :0x9 (9 bytes)
> bDescriptorType  :0x2 Configuration
> wTotalLength :   0x1b (27 bytes)
> bNumInterfaces   :0x1
> bConfigurationValue  :0x1
> iConfiguration   :0x0
> bmAttributes :   0xc0 Self Powered
> bMaxPower:   0xc8 (400 mA)
>  INTERFACE 0: Human Interface Device 
>   bLength:0x9 (9 bytes)
>   bDescriptorType:0x4 Interface
>   bInterfaceNumber   :0x0
>   bAlternateSetting  :0x0
>   bNumEndpoints  :0x0
>   bInterfaceClass:0x3 Human Interface Device
>   bInterfaceSubClass :0x0
>   bInterfaceProtocol :0x0
>   iInterface :0x0
> Device not found
> Press any key to continue . . .
>
>

Hi,

It feels like you are using different git revisions for Windows and
Linux, aren't you?

-- 
Best Regards,
Wander Lairson Costa

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] libusb1 problem

2014-07-13 Thread Wander Lairson Costa
81: Isochronous IN 
>bLength  :0x7 (7 bytes)
>bDescriptorType  :0x5 Endpoint
>bEndpointAddress :   0x81 IN
>bmAttributes :0x1 Isochronous
>wMaxPacketSize   :  0xbc0 (3008 bytes)
>    bInterval:0x1
>   ENDPOINT 0x82: Isochronous IN 
>bLength  :0x7 (7 bytes)
>bDescriptorType  :0x5 Endpoint
>bEndpointAddress :   0x82 IN
>bmAttributes :0x1 Isochronous
>wMaxPacketSize   :  0xbc0 (3008 bytes)
>bInterval:0x1
>
> Any help would be appreciated.
> Regards, PetrS.
>
> --
>
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>



-- 
Best Regards,
Wander Lairson Costa

--
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] New Engineer here!

2014-07-02 Thread Wander Lairson Costa
2014-06-30 18:34 GMT-03:00 Avi Gadish :
> Hi all,
>
> My name is Avi and I am a rising senior Electrical Engineering student at
> The Cooper Union who is interested in learning more about reverse
> engineering USB devices!
>
> I am attempting to read (download) a bunch of data from HOBOwares U30
> logging device (http://www.onsetcomp.com/products/data-loggers/u30-nrc).
>
> The device measures data from the (sold separately) 12-bit Temperature
> sensor over a predefined time.
> I have the software for the device and have tried sniffing the USB data with
> USBlyzer (very hard to make any sense of the many URBs).
>
> I know my device has 2 endpoints (numbered 81 and 02 for "in" and "out"
> requests respectively) and it registers as a HID.
>
> I have tried (via a python script on this page:
> http://www.mattcutts.com/blog/playing-with-a-usb-missile-launcher/) sending
> some control reads and dont know what to make of the responses I get.
>
> Im not sure how to connect to/query the various endpoints and im scared to
> write to the device (dont want to break it?)
>

We could expect that if there some dangerous input that could brick
the device the firmware should filter it out, but who knows...

> Any advice for this noobie would be greatly appreciated!

I guess there is not much to say here, you have gone very far already.
What you might do is try to find patterns on the data you sniff,
that's what RE is about after all...


-- 
Best Regards,
Wander Lairson Costa

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] ctrl_transfer failed...

2014-05-21 Thread Wander Lairson Costa
2014-05-21 14:08 GMT-03:00 Slavko Kocjancic :
> On 05/21/2014 05:27 PM, Wander Lairson Costa wrote:
>> 2014-05-21 3:00 GMT-03:00 Slavko Kocjancic :
>>> On 05/21/2014 03:36 AM, Wander Lairson Costa wrote:
>>>> 2014-05-20 13:26 GMT-03:00 Slavko Kocjancic :
>>>>> Hello...
>>>>>
>>>>> I'm new to python (and pyusb).
>>>>> I try to port some VUSB device to work with python, but get at trouble
>>>>> in beggining. I can't send bytes...
>>>>> here is my example (stripped from manual...)
>>>>>
>>>>> import usb.core
>>>>> import usb.util
>>>>>
>>>>> from array import *
>>>>> dev = usb.core.find(idVendor=0x16c0, idProduct=0x05df)
>>>>> if dev is None:
>>>>>raise ValueError('Device not found')
>>>>> dev.set_configuration()
>>>>>
>>>>> msg = 'test'
>>>>> print dev.ctrl_transfer(32+128, 9, 0, 0, msg)
>>>>>
>>>> I guess the first argument should be just 32.
>>> Well I want write. And bit 7 of first argument tells if this is write or
>>> read.
>>> and msg (at least by manual) behave as buffer for tx, and integer for
>>> size in receive mode.
>>>
>> Yes, with this bit set, the request is an IN transfer, and the `msg`
>> parameter is (wrongly) interpreted as the length of the transfer.
>
> I realized that when I wan't to read from device. I'm interpreted this
> bit just opposite. But have other problem with win driver and take a lot
> of time to discover what are wrong. At least it works now.
>
>

You can use the util.build_request_type function to avoid bit mistakes.



-- 
Best Regards,
Wander Lairson Costa

--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] ctrl_transfer failed...

2014-05-21 Thread Wander Lairson Costa
2014-05-21 3:00 GMT-03:00 Slavko Kocjancic :
> On 05/21/2014 03:36 AM, Wander Lairson Costa wrote:
>> 2014-05-20 13:26 GMT-03:00 Slavko Kocjancic :
>>> Hello...
>>>
>>> I'm new to python (and pyusb).
>>> I try to port some VUSB device to work with python, but get at trouble
>>> in beggining. I can't send bytes...
>>> here is my example (stripped from manual...)
>>>
>>> import usb.core
>>> import usb.util
>>>
>>> from array import *
>>> dev = usb.core.find(idVendor=0x16c0, idProduct=0x05df)
>>> if dev is None:
>>>   raise ValueError('Device not found')
>>> dev.set_configuration()
>>>
>>> msg = 'test'
>>> print dev.ctrl_transfer(32+128, 9, 0, 0, msg)
>>>
>> I guess the first argument should be just 32.
>
> Well I want write. And bit 7 of first argument tells if this is write or
> read.
> and msg (at least by manual) behave as buffer for tx, and integer for
> size in receive mode.
>

Yes, with this bit set, the request is an IN transfer, and the `msg`
parameter is (wrongly) interpreted as the length of the transfer.

--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] ctrl_transfer failed...

2014-05-20 Thread Wander Lairson Costa
2014-05-20 13:26 GMT-03:00 Slavko Kocjancic :
> Hello...
>
> I'm new to python (and pyusb).
> I try to port some VUSB device to work with python, but get at trouble
> in beggining. I can't send bytes...
> here is my example (stripped from manual...)
>
> import usb.core
> import usb.util
>
> from array import *
> dev = usb.core.find(idVendor=0x16c0, idProduct=0x05df)
> if dev is None:
>  raise ValueError('Device not found')
> dev.set_configuration()
>
> msg = 'test'
> print dev.ctrl_transfer(32+128, 9, 0, 0, msg)
>

I guess the first argument should be just 32.

> and there is error report
>
> Traceback (most recent call last):
>File "pyusbtest.py", line 13, in 
>  print dev.ctrl_transfer(32+128, 9, 0, 0, msg)
>File "/usr/local/lib/python2.7/dist-packages/usb/core.py", line 711,
> in ctrl_transfer
>  self.__get_timeout(timeout)
>File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py",
> line 823, in ctrl_transfer
>  buff = _interop.as_array((0,) * data_or_wLength)
> TypeError: can't multiply sequence by non-int of type 'str'
>
> how to proceed? (python2.7 on ubuntu)
> slavko.
>
>
>



-- 
Best Regards,
Wander Lairson Costa

--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] libusb-1.0 compatibility

2014-05-19 Thread Wander Lairson Costa
2014-05-15 1:38 GMT-03:00 Xiaofan Chen :
> On Thu, May 15, 2014 at 9:13 AM, Walker Inman  wrote:
>> Thank you for the help, we will test this tomorrow.  On another note, is
>> there any way to register a call back function for new device / device
>> disconnect event notifications?
>
> Please take note that hotplug support is only available for
> Linux and Mac OS X backend of libusb, not yet integrated
> in libusb Windows backend, so even if pyusb implements
> the hotplug support (I think not yet), it will not work under
> Windows.
>

Yes, PyUSB does not have hotplug support yet.

-- 
Best Regards,
Wander Lairson Costa

--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Unable to read with pyusb, though HID device works in stdout

2014-05-11 Thread Wander Lairson Costa
2014-05-11 0:10 GMT-03:00 Xiaofan Chen :
> On Sun, May 11, 2014 at 1:42 AM, Wander Lairson Costa
>  wrote:
>> 2014-05-10 5:48 GMT-03:00 Jim Easterbrook :
>>> On 09/05/14 23:21, Wander Lairson Costa wrote:
>>>> HID devices are problematic with libusb, and since PyUSB depends on
>>>> libusb, pyusb can't handle HID devices either. A better way should to
>>>> use hidapi [1].
>>>>
>>>> [1] http://www.signal11.us/oss/hidapi/
>>>
>>> Note that on Linux hidapi uses libusb as a backend by default.
>>> https://github.com/signal11/hidapi/tree/master/linux
>>>
>>> PS What are the problems with HID devices and pyusb? I'm using it with
>>> weather stations that have an HID interface and it seems to work OK.
>>> --
>>
>> This information came from libusb ML, maybe things changed now. So,
>> the problem might be just a matter of unloading the HID driver...
>
> Major problem with libusb and HID device is the lack of HID backend
> under Mac OS X. Under Linux, libusb works fine with HID device (need
> to detach the kernel HID driver). Under Windows, there are some
> limitations as well. So HIDAPI is better in terms of cross-platform
> support.
>

Thanks for clarifying.

Best Regards,
Wander Lairson Costa

--
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] ValueError: No backend available

2014-05-10 Thread Wander Lairson Costa
2014-05-09 21:09 GMT-03:00 Bruce Lewis :
>
> Thanks for the prompt reply ...
>
> libusb is installed in ...
> /Library/Python/2.7/site-packages/usb/backend/
> which contains the following ...
>

My bad. I mean the libusb library, not libusb backend...

-- 
Best Regards,
Wander Lairson Costa

--
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Unable to read with pyusb, though HID device works in stdout

2014-05-10 Thread Wander Lairson Costa
2014-05-10 5:48 GMT-03:00 Jim Easterbrook :
> On 09/05/14 23:21, Wander Lairson Costa wrote:
>> HID devices are problematic with libusb, and since PyUSB depends on
>> libusb, pyusb can't handle HID devices either. A better way should to
>> use hidapi [1].
>>
>> [1] http://www.signal11.us/oss/hidapi/
>
> Note that on Linux hidapi uses libusb as a backend by default.
> https://github.com/signal11/hidapi/tree/master/linux
>
> PS What are the problems with HID devices and pyusb? I'm using it with
> weather stations that have an HID interface and it seems to work OK.
> --

This information came from libusb ML, maybe things changed now. So,
the problem might be just a matter of unloading the HID driver...

-- 
Best Regards,
Wander Lairson Costa

--
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Unable to read with pyusb, though HID device works in stdout

2014-05-09 Thread Wander Lairson Costa
HID devices are problematic with libusb, and since PyUSB depends on
libusb, pyusb can't handle HID devices either. A better way should to
use hidapi [1].

[1] http://www.signal11.us/oss/hidapi/

2014-05-09 0:47 GMT-03:00 Dm M :
> Hi,
>
> I am having problems reading from a usb nfc device that acts like a
> keyboard. If I plug the device into my linux computer and scan a nfc tag, it
> outputs it out as if a keyboard was typing the keys:
>
>> $: 2352481416
>
>
> However when I try to isolate the device to capture output with pyusb I am
> unable to read anything from the device. In the code I posted below it just
> continually prints "[]", never reading any data. When I use ipython to read
> with a specified timeout (endpoing.read(129, 5000)), it always times out
> despite triggering a tag in the mean time.
>
> One thing I noticed is the iInterface number is 4, instead of 0, but I am
> not sure how to use that info.
>
>
> Device info lsusb -v:
>
>>> Bus 002 Device 009: ID 08ff:0009 AuthenTec, Inc.
>>>
>>> Device Descriptor:
>>>
>>>   bLength18
>>>
>>>   bDescriptorType 1
>>>
>>>   bcdUSB   1.10
>>>
>>>   bDeviceClass0 (Defined at Interface level)
>>>
>>>   bDeviceSubClass 0
>>>
>>>   bDeviceProtocol 0
>>>
>>>   bMaxPacketSize0 8
>>>
>>>   idVendor   0x08ff AuthenTec, Inc.
>>>
>>>   idProduct  0x0009
>>>
>>>   bcdDevice0.08
>>>
>>>   iManufacturer   1 深圳市思远创智能设备有限公司
>>>
>>> http://www.sycreader.com
>>>
>>>   iProduct2 (error)
>>>
>>>   iSerial 3 REV_0008
>>>
>>>   bNumConfigurations  1
>>>
>>>   Configuration Descriptor:
>>>
>>> bLength 9
>>>
>>> bDescriptorType 2
>>>
>>> wTotalLength   34
>>>
>>> bNumInterfaces  1
>>>
>>> bConfigurationValue 1
>>>
>>> iConfiguration  0
>>>
>>> bmAttributes 0xa0
>>>
>>>   (Bus Powered)
>>>
>>>   Remote Wakeup
>>>
>>> MaxPower  100mA
>>>
>>> Interface Descriptor:
>>>
>>>   bLength 9
>>>
>>>   bDescriptorType 4
>>>
>>>   bInterfaceNumber0
>>>
>>>   bAlternateSetting   0
>>>
>>>   bNumEndpoints   1
>>>
>>>   bInterfaceClass 3 Human Interface Device
>>>
>>>   bInterfaceSubClass  1 Boot Interface Subclass
>>>
>>>   bInterfaceProtocol  1 Keyboard
>>>
>>>   iInterface  4 RFID Reader With Keyboard
>>>
>>> HID Device Descriptor:
>>>
>>>   bLength 9
>>>
>>>   bDescriptorType33
>>>
>>>   bcdHID   1.10
>>>
>>>   bCountryCode   33 US
>>>
>>>   bNumDescriptors 1
>>>
>>>   bDescriptorType34 Report
>>>
>>>   wDescriptorLength  63
>>>
>>>  Report Descriptors:
>>>
>>>** UNAVAILABLE **
>>>
>>>   Endpoint Descriptor:
>>>
>>> bLength 7
>>>
>>> bDescriptorType 5
>>>
>>> bEndpointAddress 0x81  EP 1 IN
>>>
>>> bmAttributes3
>>>
>>>   Transfer TypeInterrupt
>>>
>>>   Synch Type   None
>>>
>>>   Usage Type   Data
>>>
>>> wMaxPacketSize 0x0008  1x 8 bytes
>>>
>>> bInterval   8
>>>
>>> Device Status: 0x
>>>
>>>   (Bus Powered)
>>
>>
>
>
> Python code:
>
>>> import sys
>>>
>>> import usb.core
>>>
>>> import usb.util
>>>
>>>
>>> VENDOR_ID = 0x08ff
>>>
>>> PRODUCT_ID = 0x0009
>>>
>>>
>>> device = usb.core.find(idVendor=VENDOR_ID, idProduct=PRO

Re: [pyusb-users] ValueError: No backend available

2014-05-09 Thread Wander Lairson Costa
2014-05-09 17:53 GMT-03:00 Bruce Lewis :
> Good morning ..
>
> I have an iMac 7.1 running OS X Mavericks and use Enthought Canopy to run
> Python.
> I want to use Python to read data from and write data to USB ports.
> I have used MacPorts to install PyUSB and libusb using their portfiles.
> From Idle I have run...
>
> import usb.core
> import usb.util
> dev = usb.core.find(find_all=True)
>
> and receive the following error...
>
> Traceback (most recent call last):
>   File "", line 1, in 
> dev = usb.core.find(find_all=True)
>   File "/Library/Python/2.7/site-packages/usb/core.py", line 867, in find
> raise ValueError('No backend available')
> ValueError: No backend available
>
> I have trawled through the various web sites that identify this error and I
> have been unable to resolve the problem.
> Does anyone please have a solution?
>

Where is libusb installed at?

-- 
Best Regards,
Wander Lairson Costa

--
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] read function

2014-05-05 Thread Wander Lairson Costa
2014-05-05 13:19 GMT-03:00 Walker Inman :
> Thanks, that sounds reasonable.  I also have some cdc type devices that use
> a totally different library.   Ill check those out. I think adding a wrapper
> in my application should take care of it.
>
> Regarding debug,  where & how can I configure?
>

If you define the PYUSB_DEBUG=debug environment variable, PyUSB will
dump IO info on stdout (terminal). The tutorial [1] has more
information.

[1] https://github.com/walac/pyusb/blob/master/docs/tutorial.rst

-- 
Best Regards,
Wander Lairson Costa

--
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] read function

2014-05-05 Thread Wander Lairson Costa
2014-05-02 11:40 GMT-03:00 Walker Inman :
> To further the below, I have now tested both on windows and linux with the
> same result.  It always takes until the 4th read call until my response
> appears,  even with the delay between reads set to zero.  This seems like
> read() is causing some state machine to progress..??  I will probably just
> wrap the read call with a for loop that runs 4x -- but this seems like quite
> a hack.
>
> Is there any documentation on how your logging module is configured? Id like
> to know more about what is happening on my read calls.
>
> Also, is there any way to check if / how much data is waiting on a bulk in
> ep without 'reading' the data?
>
> If the above 4x read calls are progressing a state machine, is there a way
> to directly advance the state machine?
>
> Thanks --- fyi, im quite new to pyusb / lib usb but have written an embedded
> usb cdc host so have some familiarity with usb etc.
>

It feels like a hardware/firmware issues. A long time ago I worked
with a multifunctional printer which used to enqueue empty packets to
the USB controller. So, every command response had to be read twice:
the first one was the empty packet, and then the packets with the real
data.


-- 
Best Regards,
Wander Lairson Costa

--
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] [Libusbx-devel] [Released] PyUSB 1.0.0 beta 1

2014-04-18 Thread Wander Lairson Costa
2013-10-31 3:58 GMT-02:00 Johannes Stezenbach :
> On Wed, Oct 30, 2013 at 09:24:11PM -0200, Wander Lairson Costa wrote:
>> 2013/10/30 Johannes Stezenbach :
>>
>> >> >> >> > [2249737.372143] usb 1-1.1: usbfs: process 32478 (python) did not 
>> >> >> >> > claim interface 0 before use
>> >> >> >> >
>> >> >> >>
>> >> >> >> Interface claiming, in another hand, is handled internally by PyUSB,
>> >> >> >> this might be a bug.
>> >> >> >
>> >> >> > usb.control.get_interface() does not claim the interface.
>> >> >> >
>> >> >>
>> >> >> Ah, no because control requests against endpoint 0 does not need
>> >> >> interface claiming.
>> >> >
>> >> > So I wonder what cause the kernel to complain.
>> >> >
>> >>
>> >> Maybe it is just a debug info without real meaning...
>> >
>> > I tried again and the
>> > alternate_setting = usb.control.get_interface(dev, interface_number)
>> > line in the tutorial causes the Linux kernel warning (Linux 3.10.14).
>> >
>> > So it seems the Linux kernel disagrees with your assumption?
>> > If the control request is for USB_RECIP_INTERFACE it checks if
>> > the interface has been claimed:
>> > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/usb/core/devio.c#n765
>> >
>> >
>>
>> I don't have time right now, but I need to look further into this, as
>> it might be a problem with PyUSB. Thanks to pointing this out.
>> For now, what if you explicitly claim the interface (with
>> usb.util.claim_interface function) before calling get_interface?
>
> It works.  And intf.set_altsetting() also claims the interface,
> that's what I've been using.
>

It has been a very very long time, but finally I could go into this,
and you are right, when issuing a control request to an interface, I
must claim it.
I just pushed a fix [1]. Thanks for point me out this.

[1] 
https://github.com/walac/pyusb/commit/4c7d9a94c25a732c62db4515376bd90798a483d8


-- 
Best Regards,
Wander Lairson Costa

--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Tektronix oscilloscope

2014-04-03 Thread Wander Lairson Costa
2014-04-02 21:13 GMT-03:00 Marcos Anzorena :
> Hello:
>
> Excuse my ignorance, how can i put my code on the wiki?
> I have never done anything like that.
>

https://github.com/walac/pyusb/wiki

Just go there and create a page. Thank you for your interest in contributing.


-- 
Best Regards,
Wander Lairson Costa

--
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Reading USB in Separate Process

2014-02-26 Thread Wander Lairson Costa
2014-02-21 10:19 GMT-03:00 Dean Chester :
> Hi,
>
> I'm running my read call in a separate thread, is this likely to cause
> problems doing this? As currently it keeps failing to read the USB despite
> there being data for it to read. The code works when I run it in the same
> thread as the main application on its own, however now using Process from
> the multiprocessing module it fails to read.
>
> Attached is some of the output with libusb at DEBUG for the log level.
>
> It was working before I put the whole thing in a background process.
>
> What could be going wrong?
>

Hi,

First of all, sorry for the delay, I was in a trip and couldn't check
my email for a few days.

You cannot access the device from different process due to interface
claiming. PyUSB 1.0.0 will be thread safe, but it is not for now (this
is one of pending things that prevents the stable release).


-- 
Best Regards,
Wander Lairson Costa

--
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Reading RFID tag using MTI RU-824 via pylab

2014-02-12 Thread Wander Lairson Costa
ta= [ 0xff 0x00 ] 255
> Item(Local ): Usage, data= [ 0x01 ] 1
> (null)
> Item(Main  ): Input, data= [ 0x02 ] 2
> Data Variable Absolute No_Wrap Linear
> Preferred_State No_Null_Position Non_Volatile
> Bitfield
> Item(Global): Report ID, data= [ 0x45 ] 69
> Item(Global): Report Count, data= [ 0x17 ] 23
> Item(Global): Report Size, data= [ 0x08 ] 8
> Item(Global): Logical Minimum, data= [ 0x00 ] 0
> Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
> Item(Local ): Usage, data= [ 0x01 ] 1
> (null)
> Item(Main  ): Input, data= [ 0x02 ] 2
> Data Variable Absolute No_Wrap Linear
> Preferred_State No_Null_Position Non_Volatile
> Bitfield
> Item(Main  ): End Collection, data=none
>   Endpoint Descriptor:
> bLength 7
> bDescriptorType 5
> bEndpointAddress 0x01  EP 1 OUT
> bmAttributes3
>   Transfer TypeInterrupt
>   Synch Type   None
>   Usage Type   Data
> wMaxPacketSize 0x0040  1x 64 bytes
> bInterval   1
>   Endpoint Descriptor:
> bLength 7
> bDescriptorType 5
> bEndpointAddress 0x82  EP 2 IN
> bmAttributes3
>   Transfer TypeInterrupt
>   Synch Type   None
>   Usage Type   Data
> wMaxPacketSize 0x0040  1x 64 bytes
> bInterval   1
> Device Status: 0x0001
>   Self Powered
>

To begin with, your former code can be summed up to this (with latest
git PyUSB):

import usb.core
import usb.util
import sys

VENDOR_ID = 0x24e9
PRODUCT_ID = 0x0824

device = usb.core.find(idVendor=VENDOR_ID, idProduct=PRODUCT_ID)

if device is None:
sys.exit("Could not find Id System Barcode Reader.")
else:
print 'Device detected'

device.set_configuration()

device.write(0x01, [0x01]) ---> you probably meant [0x01] or '\x01'
instead of '0x01'
print device.read(0x82, 64, 1000)

If you are still getting a read timeout, that is probably because the
0x01 command means nothing to the device.

-- 
Best Regards,
Wander Lairson Costa

--
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Reading RFID tag using MTI RU-824 via pylab

2014-02-11 Thread Wander Lairson Costa
2014-02-11 9:18 GMT-02:00 Setia Budi :
>
> There is one thing which I am not quite sure whether it is right or wrong.
> This is my understanding, there are two types of endpoint, endpoint out and 
> endpoint in.
> Every time we want to send a command to the device, we sent the command 
> through endpoint out, on the other hand, if we want to read data from the 
> device, we read it from endpoint in.
> is that correct?
>

Actually your device can have more than one read and/or write
endpoint. Your device can even be more than one logical device, it is
called a composite device, with each logical device having its own set
of endpoints.

-- 
Best Regards,
Wander Lairson Costa

--
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Reading RFID tag using MTI RU-824 via pylab

2014-02-11 Thread Wander Lairson Costa
2014-02-11 9:09 GMT-02:00 Setia Budi :
>
> it happens on read operation.
>

Could you please post the output of the following command?
lsusb -v -d 24e9:0824


>
> On Tue, Feb 11, 2014 at 10:06 PM, Wander Lairson Costa 
>  wrote:
>>
>> 2014-02-11 3:56 GMT-02:00 Setia Budi :
>> >
>> > Hi fellows,
>> > I will try to give further information related to my problem.
>> >
>> > I am facing difficulties in order to send USB commands to an RFID reader.
>> > This is the command reference of the device: 
>> > https://github.com/mti-rfid/RFID_Explorer
>> >
>> > I am working with the MTI RU-824 model.
>> >
>> > The manufacturer of the device only provide a driver for Windows (using 
>> > .Net), but we need to run the device on Linux. That's why I need to write 
>> > few lines of code in Python as a new "driver".
>> >
>> > I am using PyUSB for accessing the device, and this is few lines of my 
>> > code:
>> >
>> > 
>> >
>> > import usb.core
>> > import usb.util
>> > import sys
>> >
>> > VENDOR_ID = 0x24e9
>> > PRODUCT_ID = 0x0824
>> >
>> > device = usb.core.find(idVendor=VENDOR_ID, idProduct=PRODUCT_ID)
>> >
>> > if device is None:
>> > sys.exit("Could not find Id System Barcode Reader.")
>> > else:
>> > print 'Device detected'
>> >
>> > device.set_configuration()
>> >
>> > cfg = device.get_active_configuration()
>> > interface_number = cfg[(0, 0)].bInterfaceNumber
>> > alternate_setting = usb.control.get_interface(device, interface_number)
>> > usb_interface = usb.util.find_descriptor(
>> > cfg, bInterfaceNumber=interface_number,
>> > bAlternateSetting=alternate_setting
>> > )
>> >
>> > endpoint_out = usb.util.find_descriptor(
>> > usb_interface,
>> > # match the first OUT endpoint
>> > custom_match=lambda e: usb.util.endpoint_direction(e.bEndpointAddress) 
>> > == usb.util.ENDPOINT_OUT
>> > )
>> >
>> > endpoint_in = usb.util.find_descriptor(
>> > usb_interface,
>> > # match the first IN endpoint
>> > custom_match=lambda e: usb.util.endpoint_direction(e.bEndpointAddress) 
>> > == usb.util.ENDPOINT_IN
>> > )
>> >
>> > endpoint_out.write('0x01')
>> > print endpoint_in.read(len('0x01'), 1000)
>> >
>> > =
>> > My question is on the last 2 lines.
>> > I am using endpoint_out to send a command and endpoint_in to read data 
>> > from the reader. Am I correct?
>> >
>> > The problem is, when I run the code, there is an error message like this:
>> > usb.core.USBError: [Errno 110] Operation timed out
>> >
>> > Anyone can give a clue?
>>
>> Does this happen on write or read operation?
>>
>>
>> --
>> Best Regards,
>> Wander Lairson Costa
>>
>> --
>> Android apps run on BlackBerry 10
>> Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
>> Now with support for Jelly Bean, Bluetooth, Mapview and more.
>> Get your Android app in front of a whole new audience.  Start now.
>> http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
>>
>> ___
>> pyusb-users mailing list
>> pyusb-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>
>
>
> --
> Android apps run on BlackBerry 10
> Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
> Now with support for Jelly Bean, Bluetooth, Mapview and more.
> Get your Android app in front of a whole new audience.  Start now.
> http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
> ___
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>



-- 
Best Regards,
Wander Lairson Costa

--
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Reading RFID tag using MTI RU-824 via pylab

2014-02-11 Thread Wander Lairson Costa
2014-02-11 3:56 GMT-02:00 Setia Budi :
>
> Hi fellows,
> I will try to give further information related to my problem.
>
> I am facing difficulties in order to send USB commands to an RFID reader.
> This is the command reference of the device: 
> https://github.com/mti-rfid/RFID_Explorer
>
> I am working with the MTI RU-824 model.
>
> The manufacturer of the device only provide a driver for Windows (using 
> .Net), but we need to run the device on Linux. That's why I need to write few 
> lines of code in Python as a new "driver".
>
> I am using PyUSB for accessing the device, and this is few lines of my code:
>
> 
>
> import usb.core
> import usb.util
> import sys
>
> VENDOR_ID = 0x24e9
> PRODUCT_ID = 0x0824
>
> device = usb.core.find(idVendor=VENDOR_ID, idProduct=PRODUCT_ID)
>
> if device is None:
> sys.exit("Could not find Id System Barcode Reader.")
> else:
> print 'Device detected'
>
> device.set_configuration()
>
> cfg = device.get_active_configuration()
> interface_number = cfg[(0, 0)].bInterfaceNumber
> alternate_setting = usb.control.get_interface(device, interface_number)
> usb_interface = usb.util.find_descriptor(
> cfg, bInterfaceNumber=interface_number,
> bAlternateSetting=alternate_setting
> )
>
> endpoint_out = usb.util.find_descriptor(
> usb_interface,
> # match the first OUT endpoint
> custom_match=lambda e: usb.util.endpoint_direction(e.bEndpointAddress) == 
> usb.util.ENDPOINT_OUT
> )
>
> endpoint_in = usb.util.find_descriptor(
> usb_interface,
> # match the first IN endpoint
> custom_match=lambda e: usb.util.endpoint_direction(e.bEndpointAddress) == 
> usb.util.ENDPOINT_IN
> )
>
> endpoint_out.write('0x01')
> print endpoint_in.read(len('0x01'), 1000)
>
> =
> My question is on the last 2 lines.
> I am using endpoint_out to send a command and endpoint_in to read data from 
> the reader. Am I correct?
>
> The problem is, when I run the code, there is an error message like this:
> usb.core.USBError: [Errno 110] Operation timed out
>
> Anyone can give a clue?

Does this happen on write or read operation?


-- 
Best Regards,
Wander Lairson Costa

--
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Reading RFID tag using MTI RU-824 via pylab

2014-02-08 Thread Wander Lairson Costa
2014-02-08 5:30 GMT-02:00 Setia Budi :
>
> Anyone has an experience to read RFID tags using MTI RU-824 RFID reader in 
> Python (using pylab)?
> To be honest, I have zero experience with accessing USB devices or any 
> hardware without and driver. I can easily read the tags using this reader in 
> C# since the manufacturer provide a library which is only suitable for .Net.
> However, I need to make the device to be able to operate under linux and 
> python is the best option for me to start. I have read a bit about pylab from 
> here: http://pyusb.sourceforge.net/docs/1.0/tutorial.html
>
> My specific question is how to instruct the reader to start reading and how 
> to get the data from the reader?
>
> At the moment I already have EP (I assume EP stands for EndPoint). What can I 
> do with this EP?
>
> I know, this can be a silly question, but I am totally new in USB world.
>

The best start it to read a basic USB tutorial, so you can learn about
descriptors and transfer types, once you understand the basics of USB,
the PyUSB tutorial will make a lot more sense for you.


-- 
Best Regards,
Wander Lairson Costa

--
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Read data with interrupts

2014-01-04 Thread Wander Lairson Costa
2014/1/3 Nicolas Göddel :
> Hi,
>
> yes, I think asynchronous I/O support would be that kind of communication with
> PyUSB I prefer.
> Is there an official ToDo list where I can see when all features for the new
> version are implemented, respectively when can I except the new version?
>

I have some things in my head but unfortunately there is no official
TODO list...

-- 
Best Regards,
Wander Lairson Costa

--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Read data with interrupts

2014-01-02 Thread Wander Lairson Costa
2014/1/2 Nicolas Göddel :
> Hi there,
>
> actually I am reading raw data from an usb endpoint with dev.read() in a 
> thread,
> but it would be nicer to have a callback which will be called if data is
> available. Is there a possibility to do so with PyUSB?
>
> And what about using two concurrent threads where one of them is used to write
> data to an endpoint X and another is used to read consecutively from and other
> endpoint Y? At the moment this is the scenario I work with. The two threads 
> are
> using one Lock together and the reader uses one Condition to notify a third
> thread if it has new data available writing it to the end of a list, which 
> acts
> as a FIFO buffer. The main thread shows the GUI.
>

I guess what you actually would like is asynchronous I/O support,
which will probably come in the 1.1 version...

-- 
Best Regards,
Wander Lairson Costa

--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Help to access on my OCR device

2013-12-27 Thread Wander Lairson Costa
2013/12/26 Christian Bianchini :
> Right,  I am trying to reverse engineer the sys file, I think is something
> very simple to active the device via PyUSB but if someone can give me a
> quick lesson what are these Interrupt and Isochronous used for.
> From a point of view  electronic I will create an interrupt to trigger the
> device, but not sure if that is the same on the log that I got.
>

The isochronous endpoint is probably used for some image downloading,
the interrupt endpoint might be for the host polls the device for data
availability. These are just guesses..

-- 
Best Regards,
Wander Lairson Costa

--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


Re: [pyusb-users] Help to access on my OCR device

2013-12-26 Thread Wander Lairson Costa
2013/12/26 Christian Bianchini :
> Ok I managed to read
>
> array('B', [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
>
> Thats is great, could you explain me what the 3 EndPoint are doing?  They
> are IN so I need to use the write method, so probably the interrupt is going
> to turn on the lights and then I can read with the first EndPoint.
>
> If I decompile the DLL I should be ok to re-create a small library? :)
>

Now it is up to you either reverse engineer your device protocol or
ask the manufacturer to disclose it...

-- 
Best Regards,
Wander Lairson Costa

--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
___
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users


  1   2   3   4   >