You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(3) |
Nov
(4) |
Dec
|
2008 |
Jan
(1) |
Feb
(5) |
Mar
(2) |
Apr
|
May
(8) |
Jun
(4) |
Jul
|
Aug
|
Sep
(11) |
Oct
|
Nov
|
Dec
(20) |
2009 |
Jan
(16) |
Feb
(7) |
Mar
(9) |
Apr
(4) |
May
(6) |
Jun
(17) |
Jul
(3) |
Aug
(4) |
Sep
(5) |
Oct
(10) |
Nov
(16) |
Dec
|
2010 |
Jan
(22) |
Feb
(18) |
Mar
(9) |
Apr
(102) |
May
(29) |
Jun
(40) |
Jul
(80) |
Aug
(21) |
Sep
(47) |
Oct
(13) |
Nov
(19) |
Dec
(45) |
2011 |
Jan
(82) |
Feb
(20) |
Mar
(47) |
Apr
(25) |
May
(18) |
Jun
(24) |
Jul
(24) |
Aug
(47) |
Sep
(23) |
Oct
(22) |
Nov
(69) |
Dec
(20) |
2012 |
Jan
(56) |
Feb
(42) |
Mar
(43) |
Apr
(27) |
May
(18) |
Jun
(11) |
Jul
(61) |
Aug
(19) |
Sep
(13) |
Oct
(49) |
Nov
(32) |
Dec
(37) |
2013 |
Jan
(46) |
Feb
(14) |
Mar
(13) |
Apr
(20) |
May
(20) |
Jun
(3) |
Jul
(19) |
Aug
(7) |
Sep
(4) |
Oct
(33) |
Nov
(7) |
Dec
(15) |
2014 |
Jan
(5) |
Feb
(21) |
Mar
(3) |
Apr
(3) |
May
(30) |
Jun
(1) |
Jul
(30) |
Aug
(2) |
Sep
(22) |
Oct
(14) |
Nov
(22) |
Dec
(6) |
2015 |
Jan
(7) |
Feb
(4) |
Mar
(16) |
Apr
(9) |
May
(17) |
Jun
(28) |
Jul
(3) |
Aug
(18) |
Sep
(3) |
Oct
|
Nov
(6) |
Dec
(3) |
2016 |
Jan
(15) |
Feb
(18) |
Mar
(12) |
Apr
(14) |
May
(15) |
Jun
(3) |
Jul
(3) |
Aug
(42) |
Sep
(24) |
Oct
(6) |
Nov
(5) |
Dec
(6) |
2017 |
Jan
(6) |
Feb
(2) |
Mar
(12) |
Apr
|
May
(1) |
Jun
(3) |
Jul
(2) |
Aug
(6) |
Sep
|
Oct
(1) |
Nov
(5) |
Dec
(7) |
2018 |
Jan
|
Feb
(9) |
Mar
(7) |
Apr
|
May
(10) |
Jun
(20) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
(20) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(9) |
Dec
|
2020 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
(5) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
(5) |
Oct
|
Nov
(8) |
Dec
(2) |
2021 |
Jan
(16) |
Feb
(1) |
Mar
|
Apr
(9) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
(2) |
Nov
|
Dec
(1) |
2022 |
Jan
|
Feb
(7) |
Mar
|
Apr
(4) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(2) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Nicolas P. <nic...@aa...> - 2016-12-22 08:55:46
|
Hi, Le 21/12/2016 à 18:18, Mayur Vijaywargi a écrit : > Hi, > > I am getting this kind of error "'ascii' codec can't encode character > u'\u010c' in position 6: ordinal not in range(128)" > > This the code I am using to search endpoint to write: > > def get_device(vid, pid, backend_driver=None): > if backend_driver is not None: > return core.find(idVendor=vid, idProduct=pid, > backend=backend_driver) > else: > return core.find(idVendor=vid, idProduct=pid) > > def searhDevices(): > backend = None > if os.name <http://os.name/> == "nt": > backend = libusb1.get_backend(find_library=lambda x: > "dll/libusb0_x86.dll") > > device = None > for each_device in supported_devices: > device = get_device(each_device.get('vid'), > each_device.get('pid'), backend) > if device is not None: > response['line_size'] = each_device.get("line_size") > break > > if device is None: > raise ValueError('Device not found') > device.set_configuration() > config = device.get_active_configuration() > for intf in config: > for each_endpoint in intf: > global end_point > end_point = util.find_descriptor( > intf, custom_match=lambda e: > util.endpoint_direction(e.bEndpointAddress) == util.ENDPOINT_OUT) > if end_point is not None: > break > > if end_point is None: > raise ValueError('End point not found') > > > end_point.write('¥À') This is not a pyusb problem. Since you wrote '¥À' and not u'¥À' , I assume you use Python3. Even with Python3, you have to specify the source encoding at the first line of the file like the following. # -*- coding: UTF-8 -*- When not specified, Python3 considers you use UTF8 encoding. > > > ------------------------------------------------------------------------------ > 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/intel > > > _______________________________________________ > pyusb-users mailing list > pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users |
From: Mayur V. <ma...@ma...> - 2016-12-21 17:18:32
|
Hi, I am getting this kind of error "'ascii' codec can't encode character u'\u010c' in position 6: ordinal not in range(128)" This the code I am using to search endpoint to write: def get_device(vid, pid, backend_driver=None): if backend_driver is not None: return core.find(idVendor=vid, idProduct=pid, backend=backend_driver) else: return core.find(idVendor=vid, idProduct=pid) def searhDevices(): backend = None if os.name == "nt": backend = libusb1.get_backend(find_library=lambda x: "dll/libusb0_x86.dll") device = None for each_device in supported_devices: device = get_device(each_device.get('vid'), each_device.get('pid'), backend) if device is not None: response['line_size'] = each_device.get("line_size") break if device is None: raise ValueError('Device not found') device.set_configuration() config = device.get_active_configuration() for intf in config: for each_endpoint in intf: global end_point end_point = util.find_descriptor( intf, custom_match=lambda e: util.endpoint_direction(e.bEndpointAddress) == util.ENDPOINT_OUT) if end_point is not None: break if end_point is None: raise ValueError('End point not found') end_point.write('¥À') |
From: Mayur V. <ma...@ma...> - 2016-12-21 17:16:17
|
Hi, I am getting this kind of error "'ascii' codec can't encode character u'\u010c' in position 6: ordinal not in range(128)" This the code I am using to search endpoint to write: def get_device(vid, pid, backend_driver=None): if backend_driver is not None: return core.find(idVendor=vid, idProduct=pid, backend=backend_driver) else: return core.find(idVendor=vid, idProduct=pid) def searhDevices(): backend = None if os.name == "nt": backend = libusb1.get_backend(find_library=lambda x: "dll/libusb0_x86.dll") device = None for each_device in supported_devices: device = get_device(each_device.get('vid'), each_device.get('pid'), backend) if device is not None: response['line_size'] = each_device.get("line_size") break if device is None: raise ValueError('Device not found') device.set_configuration() config = device.get_active_configuration() for intf in config: for each_endpoint in intf: global end_point end_point = util.find_descriptor( intf, custom_match=lambda e: util.endpoint_direction(e.bEndpointAddress) == util.ENDPOINT_OUT) if end_point is not None: break if end_point is None: raise ValueError('End point not found') end_point.write('¥À') |
From: Emmanuel B. <ebl...@gm...> - 2016-12-18 19:05:14
|
On Thu, Nov 17, 2016 at 1:26 AM, Geoff Roddick <geo...@gm...> wrote: > Hi, > > I'm have been unable to access the 2nd, 3rd or 4th port of the FTDI FT4232H. > I can successfully bit bang or use SPI on Port A. > > I thought changing the interface would work, but both 0 and 1 access Port A > and 2 gives me > GpioException: Unable to open USB port: No such FTDI port: 2 > > Can someone point me in the right direction? Hi, I nearly miss your email as I do not follow pyusb ML on a regular basis. Which version of pyftdi are you using ? There have been some bugs and confusions between interface and index in some previous releases of pyftdi. Interface 0 and 1 match the same interface: Port A (for legacy reasons) Interface 2 matches port B Interface 3 and 4 match port C and D, but these ports are only UART/GPIO, not MPSSE-enabled so you will not be able to use SPI on these ones. The new release of PyFTDI (0.20.x) should be easier to use, and will support URL to open a port, such as "ftdi://ftdi:4232/1”. It also support FTDI device identification with “ftdi:///?” URL. You may want to have a look at pyspiflash that provides a (hopefully working :-)) example of using SPI to access SPI data flash devices. Feel free to open a ticket on github (eblot/pyftdi), as this ML is dedicated to pyusb, not pyftdi. HTH, Manu. |
From: Xiaofan C. <xia...@gm...> - 2016-12-07 13:12:36
|
On Sun, Nov 20, 2016 at 6:52 PM, FETULLAH ATAŞ <fet...@gm...> wrote: > Hi all, i am very new to pyusb, what i want to do is send a string format > data over usb to control algorithm of my project. So i have look to tutorial > of pyusb it writes down something about endpoint s of usb. İ dont understand > this part. Can someone explain me straightly or you can refer me to some > tutorial about it. Thank you Some simple introduction to USB may help as well. http://www.usbmadesimple.co.uk/ -- Xiaofan |
From: Cameron D. <fo...@da...> - 2016-11-27 03:45:41
|
I have largely sorted out my problems. I suspect it related to using blocking calls at both ends, while the weather station device is prone to doing i/o in a sequence that has a few random variations in it. This led to deadlock when my code assumed there was some logical sequence to the comms. This became clearer using the trial version of USBlyzer, rather than usbpcap, while running the vendor software under windows. This way, the usb handshaking was revealed. Of course, I have no way to know if the eccentric timing was due to the hardware or a limitation of usblyzer. I am still living with the libusb0 error reporting bug, but can work around it by referrring to the e.backend_error_code. Hardly elegant, but the code is there now. Cameron. |
From: Cameron D. <fo...@da...> - 2016-11-21 08:21:36
|
Hello, This is a plea for help, but also a possible bug in error reporting by pyusb (when using libusb0). Sorry it is so long, but I did not know which bits of information you would want. The symptoms of my problems are at the end. =================== background I am having trouble getting an Oregon Scientific weather station WMR300 to run reliably under Linux using PyUSB under the weewx package. There are several users with this device, and reliability seems to vary a bit depending on the versions of OS, libraries and so on. The problems are manifesting on more than one system. I have also tried a standard CentOS 6.8 desktop system as a vmware guest vm under Windows-7, with similar results. The background is that the device has no vendor documentation, and so has been reverse engineered from communications with their MS-Windows software. My system: Intel Xeon E-3 mainboard running CentOS 6.8, 64-bit The kernel is from the Xen repo, at version 3.18.41-20.el6.x86_64 but it is not running under Xen. Python-2.6.6-66.el6_8.x86_64 libusb1-1.0.9-0.7.rc1.el6.x86_64 libusb-0.1.12-23.el6.x86_64 Pyusb is from easy_install - __init__.py says it is v1.0.0 ( I have diffed against the current version and, apart from spelling changes, there are only a couple of lines in legacy.py that are different. I have used wireshark and usbpcap under windows 7 to look at the system when it works with the vendor software, and to establish the packet contents. Everything seems to be interrupt mode input and output. Under Linux I used tcpdump usbmon2 to get captures to compare. I then look at the capture files in Wireshark for Windows. I have done zero USB programming before, so I am not sure what is expected. The captures look quite different, where the Linux dumps show twice as many packets as the windows captures. I assume this is an artifact/limitation of the usbpcap process, where the handshaking and data transfer is blurred into a single packet. Wireshark refers to this as a usbpcap pseudoheader, so I cannot even tell if I am communicating under the same conditions. Original code in the weewx package was written using pyusb in legacy mode, but I ran into problems debugging it, so I reworked the driver to use pyusb1. I have it set to be able to select libusb0 or libusb1, which give similar but slightly different results. I can send the initial packets to get status and start the device sending back weather data packets. These packets need to be ACKed with specific packet details and after a very short while the write operation on these packets fails, with pyusb reporting timeouts. I have set the code up to carry on after the timeout exceptions and the device meanwhile happily keeps sending data, which we can read. Eventually, after about 100 seconds, the device decides it is missing too many ack packets and stops sending. My initialisation code looks a bit like this, to cope with the fact that it appears as a HID ... dev = usb.core.find( backend=libusb.get_backend(), idVendor=self.vendor_id, idProduct=self.product_id) ... if this is libusb0: try: dev.detach_kernel_driver( self.interface ) except (usb.core.USBError): pass else: kernelactive = dev.is_kernel_driver_active( self.interface ) if kernelactive : dev.detach_kernel_driver( self.interface ) dev.set_configuration() dev.reset() ========================== the problems Start doing some writing and reading... The linux captures initially look like: frame 1: host sends URB_SUBMIT, direction OUT, status "in progress(-115)", and includes the command in a 64-byte null-padded packet frame 2: device sends URB_COMPLETE, dirn OUT, status success (0), data length zero frame 3: host sends URB_SUBMIT, direction IN, status "in progress(-115)", zero data length frame 4: device sends URB_COMPLETE, dirn IN, status success (0),with the results in a 64-byte null-padded payload with frames a millisecond or so apart. The host reads remain the same, but then writes become time1: host sends URB_SUBMIT, direction OUT, status "in progress(-115)", and includes the command in a 64-byte null-padded packet time1+timeout interval: device "returns" URB_COMPLETE, dirn OUT, URB status "No such file or directory" (-2), but URB length was zero. The timeout interval was changed between 200 and 2000 ms, with no difference in result. It does not make sense that the device itself is actually returning a packet after the precise timeout duration (which I don't think it knows), so is this a fake packet injected by the OS, or by libusb? Why does the error message say ENOENT (-2) when is seems to be a timeout? When I look at the USBError exception under libusb1, then e.strerror is "Operation timed out", e.errno is 110 and e.backend_error_code is -7 When I do this under libusb0, the results vary. If I have just plugged the USB in, then the HID kernel driver needs to be detached, and e.strerror is "Connection timed out", the e.errno is None, and the e.backend_error_code is -110. However, if I rerun the test, then the kernel does not have the HID loaded, and it returns (repeatedly) e.strerror is " could not detach kernel driver from interface 0", the e.errno is None, and the e.backend_error_code is -110. So, what do I do now? Thanks Cameron. |
From: chris c. <cl...@gm...> - 2016-11-20 20:25:21
|
Looking at some examples may be your best starting point, e.g. https://github.com/dangardner/pylcdsysinfo On Sun, Nov 20, 2016 at 2:52 AM, FETULLAH ATAŞ <fet...@gm...> wrote: > Hi all, i am very new to pyusb, what i want to do is send a string format > data over usb to control algorithm of my project. So i have look to > tutorial of pyusb it writes down something about endpoint s of usb. İ dont > understand this part. Can someone explain me straightly or you can refer me > to some tutorial about it. Thank you > > ------------------------------------------------------------ > ------------------ > > _______________________________________________ > pyusb-users mailing list > pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > > |
From: FETULLAH A. <fet...@gm...> - 2016-11-20 10:53:04
|
Hi all, i am very new to pyusb, what i want to do is send a string format data over usb to control algorithm of my project. So i have look to tutorial of pyusb it writes down something about endpoint s of usb. İ dont understand this part. Can someone explain me straightly or you can refer me to some tutorial about it. Thank you |
From: Geoff R. <geo...@gm...> - 2016-11-17 00:26:52
|
Hi, I'm have been unable to access the 2nd, 3rd or 4th port of the FTDI FT4232H. I can successfully bit bang or use SPI on Port A. I am currently using pyftdi, but I"m pretty sure I'm missing the correct information for pyUSB. I am using the following: self._gpio.open(vendor=0x403, product=0x6011, interface=1,direction=out_ pins) I thought changing the interface would work, but both 0 and 1 access Port A and 2 gives me GpioException: Unable to open USB port: No such FTDI port: 2 Can someone point me in the right direction? thanks, Geoff. |
From: Hermann H. <her...@we...> - 2016-10-13 09:47:45
|
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div> <div>Hi guys,</div> <div>now you can relax; this is my last submission.</div> <div>It contains some wishes for a next release.</div> <div> </div> <div>--------------------------------</div> <div> </div> <div><u>The Candidates Buglet</u></div> <div><br/> This buglet is not a real error but an example of poor programming style,<br/> which makes the life of the application programmer more difficult than necessary.<br/> <br/> Python is an object oriented language and the natural data type of the library candidates is the dictionary.<br/> <br/> Since the days of Pascal we have learned, that it is a bad idea to litter program text with literals.<br/> <br/> So put the candidates into a dictionary and export it to the application.<br/> <br/> We have also learned in the Kindergarten that data belong into files and not into the program.<br/> <br/> So provide a resource file with a dictionary-friendly structure to define the candidates;<br/> <br/> something like:<br/> <br/> libusb1:libusb-1.0.0,Libusb 1,usb<br/> <br/> …<br/> <br/> During initialization you should try to read this file and load the dictionary..<br/> <br/> With this file you can fine tune the library search to the extend that only one library is to be used.<br/> <br/> This would make the lambda quirk superfluous.<br/> <br/> If you start the file search at the default directory you can define a dedicated library for each device.<br/> <br/> <br/> Apropos lambda:<br/> <br/> did you ever think of who sits at the far end of the USB cable?<br/> <br/> Most probably it is an electronics engineer with a programming background of copying arduino sketches to his files.<br/> <br/> Why should this guy have to change a program only to pass a string to pyusb?<br/> <br/> And in a lambda expression!<br/> <br/> Even after some 10000 lines of python I have not understood how to use it.<br/> <br/> Do not even dream of explaining to a hardware guy what lambda is!<br/> <br/> If you want to keep the possibility of supplying the library name you should provide an easier way.<br/> <br/> Simply permit a string as the backend= parameter which names the library.<br/> <br/> And it would be nice to have a utility function find_installed_library.</div> <div> </div> <div>----------------------</div> <div> </div> <div>So I want to thank you all for your patience in improving my understanding of this matter.</div> <div> </div> <div>Hermann</div> <div> </div> <div><img height="150" src="cid:5f011b9a62cc6dd460c0b73b81e74086cbd2f3a3f74c170f8de36436f5b4b62a" width="200"/></div> </div></div></body></html> |
From: Hermann H. <her...@we...> - 2016-10-13 09:28:52
|
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hi Jeff <div> <div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"> <div style="margin:0 0 10px 0;"><b><Gesendet:</b> Dienstag, 11. Oktober 2016 um 14:55 Uhr<br/> <b><Von:</b> "Jeffrey Nichols" <jsn...@su...><br/> </div> <div name="quoted-content"> <div style="background-color: rgb(255,255,255);"><Don't forget to indicate in the documentation that not knowing which driver to use is a VERY unusual situation ...</div> <div style="background-color: rgb(255,255,255);"> </div> <div style="background-color: rgb(255,255,255);">This is not right. I ship a product and do<strong> never </strong>know what driver the enduser will use.</div> <div style="background-color: rgb(255,255,255);">I an make a suggestion but cannot be sure that it is obeyed. And I might even change my mind.</div> <div style="background-color: rgb(255,255,255);">The only way to make the application safe is to inspect the registry.</div> <div style="background-color: rgb(255,255,255);"> </div> <div style="background-color: rgb(255,255,255);">Sincerely Hermann</div> </div> </div> </div> </div></div></body></html> |
From: Jeffrey N. <jsn...@su...> - 2016-10-11 13:11:51
|
Don't forget to indicate in the documentation that not knowing which driver to use is a VERY unusual situation, and that anyone going down that path will need to install both libusb DLLs in the application's PATH. Jeff On 10/11/2016 6:03 AM, Wander Lairson Costa wrote: > 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 <her...@we... > <mailto:her...@we...>>: > > 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 > pyu...@li... > <mailto:pyu...@li...> > https://lists.sourceforge.net/lists/listinfo/pyusb-users > <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 > pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users |
From: Wander L. C. <wan...@gm...> - 2016-10-11 10:04:37
|
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 <her...@we...>: > 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 > pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > > -- Best Regards, Wander Lairson Costa |
From: Hermann H. <her...@we...> - 2016-10-11 09:27:41
|
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div> <div> <div>Hi,</div> <div>The use of the pyusb0 service is a bit troublesome, because you have to specify the desired library by hand.<br/> I always had the dream of automatically use the installed library.</div> <div>Well, here is how.</div> <div>You must know the Vid and Pid of your device. With that you can look up the registry for the installed service.<br/> If it is winusb you need not care.</div> <div>If it is pyusb0 then you get the device descriptor and extract the device name.<br/> With it you go to the driverstore and scan the filerepository directory for a directory file name <br/> that starts with the device name.</div> <div>Then you walk under this tree until you find a dll name.</div> <div>This is the installed library.</div> <div>Was not so hard.</div> <div>I want to thank Xiaofan for his encouraging advice to dig deeper in this registry thingens.</div> <div>Now there is no more any need to pick a wrong library.</div> <div> </div> <div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"> <div name="quoted-content"> </div> </div> </div> </div></div></body></html> |
From: Hans-Georg J. <te...@jo...> - 2016-10-04 10:40:40
|
Am 29.08.2016 um 19:19 schrieb Rob Gaddi: > Joe wrote: > >> The UT61B has two interfaces, a RS232C interface and this usb interface. >> The RS232 interface works well with PySerial. It continously transmits 2 >> .. 3 Pakets per second with 14 Bytes each. This happens unsolicited >> without any command as long as the RS232C/USB button on the DMM is active. >> > > From someone who does a LOT of code to talk to DMMs, scopes, counters, > etc? Word of advice. You're done. Declare victory and move on. > > You've got it working on one interface. The other is even less well > documented and requires doing deep-down stuff against libusb because > there's no actual kernel driver, and you've got a Chinese manufacturer > of a low-end device being of little to no help so now you're trying to > reverse engineer the protocol from bad code without even the help of a > packet sniffer. This is the sort of rabbit hole that weeks manage to > fall into with nothing to show for them. > > If this is an exercise in learning to work with libusb then have at. > But if what you actually need from this is to talk to the meter? You're > talking to it already. Take the win and walk. > Hi, Rob, you mentioned 'packet sniffer'. This was important. I started to try WireShark Portable with USBPCap and continue reading documents like 'USB in a NutShell'. Eventually succeeded in reading and decoding the data from this DMM with the USB interface. This is done with a Delphi XE2 program, using a dll from https://libstock.mikroe.com/projects/view/528/usb-hid-dll-for-delphi-and-perhaps-other-languages. Still unresolved: It seems, this Delphi program does not correctly initialize the DMM. I have to start and stop the utility from the manufacturer of the DMM first, then I can use my Delphi program again and again unless rebooting or pulling off/connecting the DMM. If this is resolved I'll try to return to work on a python solution. Got interesting example code from Niclas Pinault. Still not working - must look why. Regards - Joe |
From: Hermann H. <her...@we...> - 2016-09-24 07:33:18
|
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div> <div> <div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"> <div style="margin:0 0 10px 0;"> </div> <div name="quoted-content"><It feels like your problem was more about pyusb dependencies than<br/> <pyusb itself. Windows is a pain, because the way it works. Maybe the<br/> <solution is just an updated README file with more detaild instructions<br/> <about dependencies installation.<br/> </div> <div name="quoted-content">I agree.</div> <div name="quoted-content">Find attached a first draft of the Installation Guide.</div> <div name="quoted-content">The urls are wrong and only placeholders.</div> <div name="quoted-content">The remarks on the future of libusb0 are not a prejudice, it is your responsibility.</div> <div name="quoted-content">This text should demonstrate the level of detail, the area covered, and the style</div> <div name="quoted-content">of the guide.</div> <div name="quoted-content">Feel free to comment on everything.</div> <div name="quoted-content"> </div> <div name="quoted-content">This document is in libreoffice format, so that everyone can add comments (in red ink)</div> <div name="quoted-content">to it.</div> <div name="quoted-content"> </div> <div name="quoted-content">Sincerely Hermann Hamann</div> </div> </div> </div></div></body></html> |
From: Wander L. C. <wan...@gm...> - 2016-09-23 12:23:59
|
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 <her...@we...>: > 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 > pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > -- Best Regards, Wander Lairson Costa |
From: Hermann H. <her...@we...> - 2016-09-23 07:18:36
|
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hi, <div><br/> <u>To install or to not install, that is the question.</u></div> <div><br/> 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.<br/> The following correspondence with the maintenance crew was unsuccessful because the service aspect was not realized.<br/> It turned out that the errors were a consequence of different installation requirements of the different services.</div> <div>I confess guilty of having too long ignored the features of the winusb service.</div> <div>I have learned that DLLs need not be installed with winusb.</div> <div>I have learned too that DLLs must be installed with the libusb0 service and the installed library must be used.<br/> And it was the hard way to learn (using an apparently widely unknown technique called testing).</div> <div>And that installation requirement is what you still have to learn!</div> <div>I have enough logfiles to prove that.</div> <div>This has consequences for the structure of pyusb, the features that can safely be provided, and the necessary restrictions that must be documented.</div> <div>The good news is that for winusb served devices no changes are required.</div> <div>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.</div> <div>Who ever objects to this thesis should talk now or be silent for ever.</div> <div>I agree [ ] I disagree [ ]</div> <div> </div> </div></div></body></html> |
From: Hermann H. <her...@we...> - 2016-09-20 12:14:19
|
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div> Hi, <div> <div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"> <div name="quoted-content"><br/> >> * Are there plans for a new version of pyusb1 in the near future?<br/> <br/> > Maybe a minor bug fix version, but not big changes.</div> <div name="quoted-content"> </div> <div name="quoted-content">I am happy to learn about bug fixes. If you run short of bugs I will be ready to send you some.<br/> <br/> >> * Are there plans for a Windows Installation Guide?<br/> </div> <div name="quoted-content">> a pull request is very welcome :)</div> <div name="quoted-content"> </div> <div name="quoted-content">Sorry, I have no internet and cannot use github (:</div> <div name="quoted-content">This mail account is my only contact to the web wide world.</div> <div name="quoted-content">But I will volunteer to provide a Windows Installation chapter for the tutorial.</div> <div name="quoted-content">This will however depend on the way the installation related bugs will be handeled.</div> <div name="quoted-content">So the first thing to do is to make a plan for the removal of the bugs.</div> <div name="quoted-content"> </div> <div name="quoted-content">I will make some suggestions later.</div> <div name="quoted-content"><br/> <br/> Sincerely Hermann<br/> </div> </div> </div> </div></div></body></html> |
From: Wander L. C. <wan...@gm...> - 2016-09-18 21:19:53
|
2016-09-14 8:05 GMT-03:00 Hermann Hamann <her...@we...>: > 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 > pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > -- Best Regards, Wander Lairson Costa |
From: Nicolas P. <nic...@aa...> - 2016-09-16 06:42:48
|
Le 16/09/2016 à 01:21, Joe a écrit : > Am 15.09.2016 um 12:11 schrieb Joe: >>>> What's the best method to install it? >> Solved: pip install hidapi >> > This is now working with the usb hid interface of the UT61B DMM: > hid.device.get_manufacturer_string, > hid.device.get_product_string, > hid.device.get_serial_number_string and > hid.enumerate. > > But I could not find descriptions or documentation or samples of the > following methods and properties of hid.device: > error, close, open, open_path, read, write, send_feature_report. > Unfortunetaly I see no source in the package, only a pyd file. > > Any hint, any idea? > Thanx -- Joe > Even if it is not the right place (PyUSB mailing list) here is an example : class MyDevice(object): def __init__(self, vendor_id=0xXXXX, product_id=0xYYYY, path=None): self.vendor_id = vendor_id self.product_id = product_id self.path = path if path : self.__dev = hid.Device(path=path) else : self.__dev = hid.Device(self.vendor_id, self.product_id) self.manufacturer = self.__dev.manufacturer self.product = self.__dev.product def GetFeature1(self): return struct.unpack("B", self.__dev.get_feature_report(HID_FEATURE_1, 5)[4])[0] def SetFeature2(self, value): self.__dev.send_feature_report(struct.pack("<BBBBL", HID_FEATURE_2 0,0,0, value)) def RequestSomeData(self): self.__dev.write(struct.pack("BBBB", HID_REPORT_OUT_REQUEST_SOME_DATA, 0,0,0)) def GetData(self): data = self.__dev.read(64, 1000) if data : report_id = struct.unpack("B", data[0])[0] if report_id == HID_REPORT_IN_MY_NOP : return None, elif report_id == HID_REPORT_IN_1 : value = struct.unpack("<L", data[4:8])[0] return 1, value elif report_id == HID_REPORT_IN_2 : value = struct.unpack("<LHHHHHHHHHHHH", data[4:]) return 2, value[0], value[1:] else : print "???" d = MyDevice() d.SetFeature2(2) while True : data = d.GetData() if data : if data[0] == None : print "NOP" elif data[0] == 1 : print "1 : %8.8X" % data[1] elif data[0] == 2 : print "2 : %3.3X" % data[1], data[2] Hope this helps. Nicolas |
From: Joe <te...@jo...> - 2016-09-15 23:22:06
|
Am 15.09.2016 um 12:11 schrieb Joe: >>> What's the best method to install it? > Solved: pip install hidapi > This is now working with the usb hid interface of the UT61B DMM: hid.device.get_manufacturer_string, hid.device.get_product_string, hid.device.get_serial_number_string and hid.enumerate. But I could not find descriptions or documentation or samples of the following methods and properties of hid.device: error, close, open, open_path, read, write, send_feature_report. Unfortunetaly I see no source in the package, only a pyd file. Any hint, any idea? Thanx -- Joe , |
From: Nicolas P. <nic...@aa...> - 2016-09-15 11:23:35
|
Le 15/09/2016 à 11:48, Joe a écrit : > Am 15.09.2016 um 09:01 schrieb Nicolas Pinault: >> Under Windows, USB HID devices have to be accessed through the HID API, >> not the USB API. This means you can't use PyUSB with HID devices under >> Windows. >> >> Try this package : https://pypi.python.org/pypi/hid/0.1.1 >> >> Nicolas >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> pyusb-users mailing list >> pyu...@li... >> https://lists.sourceforge.net/lists/listinfo/pyusb-users > What's the best method to install it? My test machine runs under Win 10 > Version 1607 (64 Bit) with Python. Didn't get it running with the infos > from https://pypi.python.org/pypi/hid/0.1.1 > Regards - Joe I don't install it. I just copy __init__.py in my sources folder and rename it hid.py. As this module uses ctypes to work, you also need hidapi.dll. > > ------------------------------------------------------------------------------ > _______________________________________________ > pyusb-users mailing list > pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > . > -- *Nicolas PINAULT R&D electronics engineer *** ni...@aa... <mailto:ni...@aa...> *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 |
From: Joe <te...@jo...> - 2016-09-15 10:11:54
|
Am 15.09.2016 um 11:55 schrieb Joe: > Am 15.09.2016 um 11:48 schrieb Joe: >> What's the best method to install it? Solved: pip install hidapi |