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: Jeffrey N. <jsn...@su...> - 2016-08-23 13:31:47
|
On 8/23/2016 5:23 AM, Hermann Hamann wrote: > Hi, thank you > <Iwould say it's highly unusual to not know the driver for a device > you control, which is one of the reasons why everyone > <has rejected the registry idea. > > Well, why then the library search? It is completely superfluous if I > fix anything at installation. > Sincerely > Hermann I believe the automatic backend selection is to make scripts that run on only your computer simpler and interactive python shells more convenient. For anything that's going to be run on other people's computers you should definitely be specifying the backend. Moreover, you should be altering the PATH so you know which dll is being used. So yes, in *your* application it is superfluous. It is convenient for other sorts of situations, though. Jeff |
From: Jay A. <jay...@gm...> - 2016-08-23 13:05:53
|
On 23 August 2016 at 18:32, Jay Aurabind <jay...@gm...> wrote: > On 23 August 2016 at 16:40, Tormod Volden <lis...@gm...> wrote: >> On Tue, Aug 23, 2016 at 8:31 AM, Jay Aurabind wrote: >>> On 23 August 2016 at 02:18, Tormod Volden wrote: >>>> I am a bit confused here, did you really want to manipulate the root >>>> hub with pyusb, or did something go wrong here? >>>> >>> >>> Absolutely not, only reason I wanted to try giving write permission to >>> that device, which happens to be the root hub was because that's the >>> only permission error I see in the LIBUSB debug messages, as you can >>> see from the logs I showed. If I run pyusb as root, I do not see those >>> permission errors. >> >> OK, I see. >> >>> >>> I suspect that pyusb reads certain data commonly for all available >>> devices, may to figure out whether that is really the device it needs >>> to work on ? >> >> It usually shouldn't try to retrieve descriptor strings from other >> devices than the ones targeted. The device descriptor (retrieved and >> cached by the OS) is usually enough to filter out the right devices >> (e.g. filtering on vid/pid). How are the devices filtered in your >> program? > > Here is the code which creates the error: > > all_devices = usb.core.find(find_all=True) > > if not all_devices: > logging.debug("No device connected") > return [] > > boards = [] > > # iterate on all devices found > for board in all_devices: > interface_number = -1 > try: > # The product string is read over USB when accessed. > # This can cause an exception to be thrown if the device > # is malfunctioning. > product = board.product > > This is how pyusb is used. The program doesn't go beyond the last line > shown above, if run as normal user. See full source github[1]. > > > > > [1]:https://github.com/mbedmicro/pyOCD/blob/master/pyOCD/pyDAPAccess/interface/pyusb_backend.py#L88 > I just managed to get it working. Simply added an exception for the try block for ValueError: continue Is this an acceptable solution generally? Is there a point in asking pyOCD to take it ? >> >>>> Some devices can be released from the kernel, and then be available >>>> for you to manipulate it through the device node (and thus via e.g >>>> libusb and pyusb). See for instance the libusb_detach_kernel_driver() >>>> function in libusb. However, in most cases people use libusb and pyusb >>>> to access devices that have no kernel driver. >>> >>> In that case, even the root should not be able to write to those >>> devices, since its exclusively managed by kernel. Then how come I get >>> no errors when I run pyocd with root permissions ? >> >> You won't be able to claim any of its interfaces, but I suppose some >> control transfers are still allowed. >> >> Tormod >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> pyusb-users mailing list >> pyu...@li... >> https://lists.sourceforge.net/lists/listinfo/pyusb-users > > > > -- > > Thanks and Regards, > Aurabindo J -- Thanks and Regards, Aurabindo J |
From: Jay A. <jay...@gm...> - 2016-08-23 13:02:35
|
On 23 August 2016 at 16:40, Tormod Volden <lis...@gm...> wrote: > On Tue, Aug 23, 2016 at 8:31 AM, Jay Aurabind wrote: >> On 23 August 2016 at 02:18, Tormod Volden wrote: >>> I am a bit confused here, did you really want to manipulate the root >>> hub with pyusb, or did something go wrong here? >>> >> >> Absolutely not, only reason I wanted to try giving write permission to >> that device, which happens to be the root hub was because that's the >> only permission error I see in the LIBUSB debug messages, as you can >> see from the logs I showed. If I run pyusb as root, I do not see those >> permission errors. > > OK, I see. > >> >> I suspect that pyusb reads certain data commonly for all available >> devices, may to figure out whether that is really the device it needs >> to work on ? > > It usually shouldn't try to retrieve descriptor strings from other > devices than the ones targeted. The device descriptor (retrieved and > cached by the OS) is usually enough to filter out the right devices > (e.g. filtering on vid/pid). How are the devices filtered in your > program? Here is the code which creates the error: all_devices = usb.core.find(find_all=True) if not all_devices: logging.debug("No device connected") return [] boards = [] # iterate on all devices found for board in all_devices: interface_number = -1 try: # The product string is read over USB when accessed. # This can cause an exception to be thrown if the device # is malfunctioning. product = board.product This is how pyusb is used. The program doesn't go beyond the last line shown above, if run as normal user. See full source github[1]. [1]:https://github.com/mbedmicro/pyOCD/blob/master/pyOCD/pyDAPAccess/interface/pyusb_backend.py#L88 > >>> Some devices can be released from the kernel, and then be available >>> for you to manipulate it through the device node (and thus via e.g >>> libusb and pyusb). See for instance the libusb_detach_kernel_driver() >>> function in libusb. However, in most cases people use libusb and pyusb >>> to access devices that have no kernel driver. >> >> In that case, even the root should not be able to write to those >> devices, since its exclusively managed by kernel. Then how come I get >> no errors when I run pyocd with root permissions ? > > You won't be able to claim any of its interfaces, but I suppose some > control transfers are still allowed. > > Tormod > > ------------------------------------------------------------------------------ > _______________________________________________ > pyusb-users mailing list > pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users -- Thanks and Regards, Aurabindo J |
From: Tormod V. <lis...@gm...> - 2016-08-23 11:10:51
|
On Tue, Aug 23, 2016 at 8:31 AM, Jay Aurabind wrote: > On 23 August 2016 at 02:18, Tormod Volden wrote: >> I am a bit confused here, did you really want to manipulate the root >> hub with pyusb, or did something go wrong here? >> > > Absolutely not, only reason I wanted to try giving write permission to > that device, which happens to be the root hub was because that's the > only permission error I see in the LIBUSB debug messages, as you can > see from the logs I showed. If I run pyusb as root, I do not see those > permission errors. OK, I see. > > I suspect that pyusb reads certain data commonly for all available > devices, may to figure out whether that is really the device it needs > to work on ? It usually shouldn't try to retrieve descriptor strings from other devices than the ones targeted. The device descriptor (retrieved and cached by the OS) is usually enough to filter out the right devices (e.g. filtering on vid/pid). How are the devices filtered in your program? >> Some devices can be released from the kernel, and then be available >> for you to manipulate it through the device node (and thus via e.g >> libusb and pyusb). See for instance the libusb_detach_kernel_driver() >> function in libusb. However, in most cases people use libusb and pyusb >> to access devices that have no kernel driver. > > In that case, even the root should not be able to write to those > devices, since its exclusively managed by kernel. Then how come I get > no errors when I run pyocd with root permissions ? You won't be able to claim any of its interfaces, but I suppose some control transfers are still allowed. Tormod |
From: Hermann H. <her...@we...> - 2016-08-23 09:24:10
|
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div> <div> </div> <div>Hi, thank you</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"> <div style="background-color: rgb(255,255,255);"><Iwould say it's highly unusual to not know the driver for a device you control, which is one of the reasons why everyone</div> <div style="background-color: rgb(255,255,255);"><has rejected the registry idea.</div> <div style="background-color: rgb(255,255,255);"><br/> Well, why then the library search? It is completely superfluous if I fix anything at installation.<br/> Sincerely</div> <div style="background-color: rgb(255,255,255);">Hermann</div> </div> </div> </div> </div></div></body></html> |
From: Jay A. <jay...@gm...> - 2016-08-23 06:32:00
|
On 23 August 2016 at 02:18, Tormod Volden <lis...@gm...> wrote: > On Mon, Aug 22, 2016 at 8:19 AM, Jay Aurabind wrote: >> Hi Tormod and Steve, >> >> Thanks for your responses. I tried running the pyocd-gdbserver with >> LIBUSB_DEBUG=9, and got the following[snipped]: >> >> libusb: debug [libusb_open] open 2.1 >> libusb: error [_get_usbfs_fd] libusb couldn't open USB device >> /dev/bus/usb/002/001: Permission denied >> libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes. >> libusb: debug [libusb_open] open 2.1 returns -3 >> uncaught exception: The device has no langid >> Traceback (most recent call last): >> >> The device 1 on bus 2, is actually the root hub - the output of lsusb >> -v -s2:1 is: > > I am a bit confused here, did you really want to manipulate the root > hub with pyusb, or did something go wrong here? > Absolutely not, only reason I wanted to try giving write permission to that device, which happens to be the root hub was because that's the only permission error I see in the LIBUSB debug messages, as you can see from the logs I showed. If I run pyusb as root, I do not see those permission errors. I suspect that pyusb reads certain data commonly for all available devices, may to figure out whether that is really the device it needs to work on ? >> >> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub >> Device Descriptor: >> bLength 18 >> bDescriptorType 1 >> bcdUSB 2.00 >> bDeviceClass 9 Hub >> bDeviceSubClass 0 >> bDeviceProtocol 0 Full speed (or root) hub >> bMaxPacketSize0 64 >> idVendor 0x1d6b Linux Foundation >> idProduct 0x0002 2.0 root hub >> bcdDevice 4.06 >> iManufacturer 3 Linux 4.6.6-300.fc24.x86_64 ehci_hcd >> iProduct 2 EHCI Host Controller >> iSerial 1 0000:00:1d.0 >> bNumConfigurations 1 > > (Obviously the underlying hardware was not made by the Linux > Foundation, the kernel usb stack just presents the root hub like it > would be yet another USB device.) > > A "device" like this will be grabbed by the kernel (ehci_hcd driver). > More generally it can happen per USB interface of the device and each > can be claimed by its own driver. > > The same would be the case for e.g. a USB mass storage device. The > relevant kernel driver will grab it exclusively, and you won't get > permissions to write to it, whatever the file permissions on the > corresponding USB device node. > > Some devices can be released from the kernel, and then be available > for you to manipulate it through the device node (and thus via e.g > libusb and pyusb). See for instance the libusb_detach_kernel_driver() > function in libusb. However, in most cases people use libusb and pyusb > to access devices that have no kernel driver. In that case, even the root should not be able to write to those devices, since its exclusively managed by kernel. Then how come I get no errors when I run pyocd with root permissions ? > >> But even after adding the following rule to udev, I am still getting >> the permission error: >> >> ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="1d6b", >> ATTRS{idProduct}=="0003", MODE="0666", GROUP="plugdev" >> ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0d28", >> ATTRS{idProduct}=="0204", MODE="0666", GROUP="plugdev" >> >> I tried with both with and without GROUP="plugdev" because the group >> didnt really exist in my (Fedora 24) distro. Although I created the >> group and added myself to it, and rebooted. > > (You can of course use any group that you are member of.) > > Regards, > Tormod > > ------------------------------------------------------------------------------ > _______________________________________________ > pyusb-users mailing list > pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users -- Thanks and Regards, Aurabindo J |
From: Tormod V. <lis...@gm...> - 2016-08-22 21:20:26
|
On Fri, Aug 19, 2016 at 11:15 AM, Hermann Hamann wrote: > Hi, Tormod > > This is the crashdump : > > > C:\Portable\wdso>python wdso.py > > wdso 0.9.8 > found productId 0x0834 > [Errno 5] Input/output error > Process USB_server: > Traceback (most recent call last): > File "C:\Python27\lib\multiprocessing\process.py", line 258, in _bootstrap > self.run() > File "C:\Python27\lib\multiprocessing\process.py", line 114, in run > self._target(*self._args, **self._kwargs) > File "C:\Portable\wdso\wdso.py", line 5019, in createUSBProcess > USBProcess = USB(USBQ,ScopeQ,DiagQ,PID,BUS,DEV) > File "C:\Portable\wdso\wdso.py", line 3563, in __init__ > self.device_init() > File "C:\Portable\wdso\wdso.py", line 3631, in device_init > self.device.ctrl_transfer(0x42,0xb1,0xdc,0,None); sleep(0.02) > File "C:\Python27\lib\site-packages\usb\core.py", line 1043, inctrl_transfer > self.__get_timeout(timeout)) > File "C:\Python27\lib\site-packages\usb\backend\libusb1.py", line 883,in <her...@we...> > ctrl_transfer timeout)) > File "C:\Python27\lib\site-packages\usb\backend\libusb1.py", line 595, > in _check > raise USBError(_strerror(ret), ret, _libusb_errno[ret]) > USBError: [Errno 5] Input/output error > finished > The interesting parts are probably in libusb and not in pyusb. You can run with the LIBUSB_DEBUG environment variable set to a number to get more info, e.g.: LIBUSB_DEBUG=4 You can also set these from within python, like in the example of PYUSB_DEBUG here: os.environ['PYUSB_DEBUG'] = 'debug' Now when it comes to the libusb <-> kernel hardware driver interaction on Windows, it is not easy to get the full overview of possibilities, requirements and failure modes. Quoting from https://github.com/libusb/libusb/wiki/Windows : "libusb0.sys access is done through the libusbK DLL, therefore, if you plan to use the libusb-win32/libusb0.sys driver in libusb, you must have that library installed. If using a recent version of Zadig, you should not have to do anything, at it will install the library for you." Whether this was always (or still!) true I am not sure. Tormod |
From: Tormod V. <lis...@gm...> - 2016-08-22 21:03:15
|
On Fri, Aug 19, 2016 at 10:50 AM, Hermann Hamann <her...@we...> wrote: > Hi Tormod, > thank you for your expertise; now I see clearer. > >> < Why it crashed? >> I don't know. > > I will send you a crash dump later. Great, thanks. > >> <If you want to use libusb-1.0 backend, you need to have libusb-1.0.dll in >> <the system and better use WinUSB driver for your device. >> >> I want the backend that is in the registry. > >>pyusb by default looks for libusb1 first > > < .... you must select backend explicitly. > > Well how can I? I do not know which backend is available on my clients' > machines. You should know! The application that you deliver to your client is your.py + pyusb + libusb backend. If your application is "taking care" of a device you ship this bundle + hardware driver (libusb0.sys or inf declaring WinUSB for the device). If your application is just an extra tool and an existing application already installed a hardware driver that you don't want to interfere with, you better know the application which "owns" the device and which hardware driver it uses, but as you already are aware of, you can also read out the registered hardware driver from the registry. If the existing hardware driver can be either libusb0.sys or winusb.sys, you must bundle all appropriate backends to handle all cases. As I said before, the libusb1 backend should handle both, but due the bug you encounter it seems you will need to bundle both libusb1 and libusb-win32 for now and your application must choose between either as function of the hardware driver, as a workaround for this bug. Again, only if you cannot decide the hardware driver for this device... And whether the client may have other applications using some variety of libusb or not, that is not something you should speculate about, because the other "private" libusb libraries can be modified versions for what you know. If the machine is well administrated, it might have a relatively recent, official libusb installed in the system32 folder, but you probably shouldn't rely on that. Your installation program/instructions should install the libusb DLL that you need. > I can only rely on the driver that was installed for my device and which is > displayed > in the control panel. I suppose the control panel gets it through the > registry. > > << Flexibility comes at a cost. > And what is the cost of reliability? The cost of reliability here is that you shouldn't rely on the convenience auto-detection of already installed libusb backends that pyusb offers as an option. It is provided as a convenience, but as an application programmer you don't have to rely on it. As any other application programmer you should know what is the hardware driver used for the device, and assure the existence of libraries that your program needs. pyusb has the flexibility of working with many backends and thus with many hardware drivers so it gives many possibilities. The cost of flexibility is that is you have choose between all these possibilities, and make sure your choice is implemented. It would be very normal for a program or library to depend on one specific hardware driver. Here pyusb is very flexible. The cost of this flexibility is paid by the pyusb developers, and only your choice of relying on the autodetection convenience is adding to your bill. The client's flexibility to use different hardware drivers will cost you as the application programmer. On the other hand if you know that the device uses the libusb0.sys hardware driver, and you know that the libusb-win32 backend works well with your device, you just select this backend in your application and bundle libusb-win32 with it. You also make sure that this libusb0.dll is the one picked up by pyusb by having it first in the path that pyusb uses for DLL discovery. This is how other Windows applications make sure they have the right DLL's (and version) loaded, for instance by throwing them into the directory where the executable is. Or you follow the suggestion in the pyusb manual https://github.com/walac/pyusb/blob/master/docs/tutorial.rst#specifying-libraries-by-hand (with the only catch that you might have to find out if the host is 32 or 64 bit). > > <And the pyusb application currently uses a DLL search to select default > library > <backend, regardless of the device. > > Well I rank the registry higher in authority than the library search order. It looks like you are mixing up library backend and driver. The registry will tell you which driver (part of OS) is handling the device. The OS doesn't dictate what DLL's you make up your application from. From the OS point of view, your application includes pyusb and libusb backend. The libusb backend is not a driver or service, it is a piece of code linked into your application (linked at run-time in the case of pyusb). > > > <Hermann, in your case you are probably better off selecting the > <libusb0 backend in your python application, if you know that your > <device requires libusb0.sys. Otherwise, register the device for WinUSB > <(with .inf file or Zadig), make sure a known good libusb1.dll is > <installed in the path (before any third party libusb1.dll) and select > <the libusb1 backend in your python application for good measure. > > Well I am a bit confused when regarding recommendations for driver > installation. > The tutorial recommends the inf-wizard and libusb0 and so I did and it works > fine. Which exact tutorial? That must be for the libusb-win32 backend. > Well I can instruct my clients to do the same and hardcode pyusb0 into my > program. BTW, do you actually mean pyusb0 (0.4) or libusb0? It actually gets really fun if you have a pyusb 0.4 program, that either runs through pyusb 0.4 (and its possible backends) or through the pyusb 1.0 legacy mode (and thus the backend selection we have talked about) - a lot more combinations possible and auto-selections that the poor 0.4 program wouldn't know about. I remember trying to draw a chart of these once... This gets even more complicated with Linux factored in, where many supported distributions still have pyusb 0.4 so making one pyusb application that works everywhere is challenging, at least without bundling your own pyusb, and python, and libusb - for each platform... > So much about flexibility. Flexibility is not the same as autodetection. And the autodetection actually works as intended. Just the above mentioned bug may have ruined the result. Or the 3rd party libusb1.dll that was first in your path is somehow broken - let us know if you can reproduce with the official, latest libusb. > > <BTW, Hermann's example patch hardcodes "ControlSet002" which I believe > <should be "CurrentControlSet", unless there are better ways to find > > I found this with a registry editor search. I do not understand enough to > judge the generality of this approach. > > <(e.g. different serial numbers but same vid/pid) can have different > <Service values, and I am not sure how the patch deals with that. > I would not care, nobody will have two same oscilloscopes on its computer. The Windows registry contains different instances for each serial number. If the oscilloscopes have no USB serial number, there will be a new instance for every USB hardware port address used. In theory you can have different drivers associated depending on which USB port it is plugged into :) > > Thank you again for your effort, this makes my issue obsolete an I will not > open it. Glad I could help. Your issue is at a level higher than pyusb. Tormod > > Sincerely Hermann |
From: Tormod V. <lis...@gm...> - 2016-08-22 20:48:36
|
On Mon, Aug 22, 2016 at 8:19 AM, Jay Aurabind wrote: > Hi Tormod and Steve, > > Thanks for your responses. I tried running the pyocd-gdbserver with > LIBUSB_DEBUG=9, and got the following[snipped]: > > libusb: debug [libusb_open] open 2.1 > libusb: error [_get_usbfs_fd] libusb couldn't open USB device > /dev/bus/usb/002/001: Permission denied > libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes. > libusb: debug [libusb_open] open 2.1 returns -3 > uncaught exception: The device has no langid > Traceback (most recent call last): > > The device 1 on bus 2, is actually the root hub - the output of lsusb > -v -s2:1 is: I am a bit confused here, did you really want to manipulate the root hub with pyusb, or did something go wrong here? > > Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub > Device Descriptor: > bLength 18 > bDescriptorType 1 > bcdUSB 2.00 > bDeviceClass 9 Hub > bDeviceSubClass 0 > bDeviceProtocol 0 Full speed (or root) hub > bMaxPacketSize0 64 > idVendor 0x1d6b Linux Foundation > idProduct 0x0002 2.0 root hub > bcdDevice 4.06 > iManufacturer 3 Linux 4.6.6-300.fc24.x86_64 ehci_hcd > iProduct 2 EHCI Host Controller > iSerial 1 0000:00:1d.0 > bNumConfigurations 1 (Obviously the underlying hardware was not made by the Linux Foundation, the kernel usb stack just presents the root hub like it would be yet another USB device.) A "device" like this will be grabbed by the kernel (ehci_hcd driver). More generally it can happen per USB interface of the device and each can be claimed by its own driver. The same would be the case for e.g. a USB mass storage device. The relevant kernel driver will grab it exclusively, and you won't get permissions to write to it, whatever the file permissions on the corresponding USB device node. Some devices can be released from the kernel, and then be available for you to manipulate it through the device node (and thus via e.g libusb and pyusb). See for instance the libusb_detach_kernel_driver() function in libusb. However, in most cases people use libusb and pyusb to access devices that have no kernel driver. > But even after adding the following rule to udev, I am still getting > the permission error: > > ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="1d6b", > ATTRS{idProduct}=="0003", MODE="0666", GROUP="plugdev" > ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0d28", > ATTRS{idProduct}=="0204", MODE="0666", GROUP="plugdev" > > I tried with both with and without GROUP="plugdev" because the group > didnt really exist in my (Fedora 24) distro. Although I created the > group and added myself to it, and rebooted. (You can of course use any group that you are member of.) Regards, Tormod |
From: Jay A. <jay...@gm...> - 2016-08-22 06:20:20
|
On 20 August 2016 at 21:53, Tormod Volden <lis...@gm...> wrote: > On Sat, Aug 20, 2016 at 3:46 PM, Steven Michalske wrote: >> Here is a general answer for Linux. >> http://unix.stackexchange.com/questions/44308/understanding-udev-rules-and-permissions-in-libusb > > IMHO that link doesn't have the greatest answer (or question). > Probably the asking user failed to use group permission because he > didn't log out and in again after adding the user to the groups. I > think group permissions are superior to just letting any user (or > process) full access to the device. I'd recommend something like this: > > # Example udev rules (usually placed in /etc/udev/rules.d) > # Makes given device writeable for the "plugdev" group > ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", > ATTRS{idProduct}=="df11", MODE="664", GROUP="plugdev" > >>> On Aug 20, 2016, at 07:46, Jay Aurabind wrote: >>> I am a user of pyOCD, and I am having an issue related to pyusb which >>> is what the former uses for talking to the USB device. The situation >>> is that I need to use pyOCD through an eclipse plugin. Eclipse >>> launches pyocd-gdbserver and normal user. But it will only work if >>> launched as root. > >>> ValueError: The device has no langid > > The missing langid here looks like https://github.com/walac/pyusb/issues/139 > > I don't know if this is something wrong about langid (in the device or > software) or if it is just that requesting langid is the first > operation requiring full access to the device. The last comment there > about specifying langid hints to the former option. > > Regards, > Tormod > > ------------------------------------------------------------------------------ > _______________________________________________ > pyusb-users mailing list > pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users Hi Tormod and Steve, Thanks for your responses. I tried running the pyocd-gdbserver with LIBUSB_DEBUG=9, and got the following[snipped]: libusb: debug [libusb_open] open 2.1 libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/002/001: Permission denied libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes. libusb: debug [libusb_open] open 2.1 returns -3 uncaught exception: The device has no langid Traceback (most recent call last): The device 1 on bus 2, is actually the root hub - the output of lsusb -v -s2:1 is: Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 9 Hub bDeviceSubClass 0 bDeviceProtocol 0 Full speed (or root) hub bMaxPacketSize0 64 idVendor 0x1d6b Linux Foundation idProduct 0x0002 2.0 root hub bcdDevice 4.06 iManufacturer 3 Linux 4.6.6-300.fc24.x86_64 ehci_hcd iProduct 2 EHCI Host Controller iSerial 1 0000:00:1d.0 bNumConfigurations 1 But even after adding the following rule to udev, I am still getting the permission error: ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="1d6b", ATTRS{idProduct}=="0003", MODE="0666", GROUP="plugdev" ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0d28", ATTRS{idProduct}=="0204", MODE="0666", GROUP="plugdev" I tried with both with and without GROUP="plugdev" because the group didnt really exist in my (Fedora 24) distro. Although I created the group and added myself to it, and rebooted. -- Thanks and Regards, Aurabindo J |
From: Tormod V. <lis...@gm...> - 2016-08-20 16:23:59
|
On Sat, Aug 20, 2016 at 3:46 PM, Steven Michalske wrote: > Here is a general answer for Linux. > http://unix.stackexchange.com/questions/44308/understanding-udev-rules-and-permissions-in-libusb IMHO that link doesn't have the greatest answer (or question). Probably the asking user failed to use group permission because he didn't log out and in again after adding the user to the groups. I think group permissions are superior to just letting any user (or process) full access to the device. I'd recommend something like this: # Example udev rules (usually placed in /etc/udev/rules.d) # Makes given device writeable for the "plugdev" group ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="664", GROUP="plugdev" >> On Aug 20, 2016, at 07:46, Jay Aurabind wrote: >> I am a user of pyOCD, and I am having an issue related to pyusb which >> is what the former uses for talking to the USB device. The situation >> is that I need to use pyOCD through an eclipse plugin. Eclipse >> launches pyocd-gdbserver and normal user. But it will only work if >> launched as root. >> ValueError: The device has no langid The missing langid here looks like https://github.com/walac/pyusb/issues/139 I don't know if this is something wrong about langid (in the device or software) or if it is just that requesting langid is the first operation requiring full access to the device. The last comment there about specifying langid hints to the former option. Regards, Tormod |
From: Steven M. <smi...@gm...> - 2016-08-20 13:46:29
|
Permissions deal with your Linux configuration. Here is a general answer for Linux. http://unix.stackexchange.com/questions/44308/understanding-udev-rules-and-permissions-in-libusb You can google for libusb permissions for your distribution if this doesn't lead to a solution. > On Aug 20, 2016, at 07:46, Jay Aurabind <jay...@gm...> wrote: > > Hi, > > I am a user of pyOCD, and I am having an issue related to pyusb which > is what the former uses for talking to the USB device. The situation > is that I need to use pyOCD through an eclipse plugin. Eclipse > launches pyocd-gdbserver and normal user. But it will only work if > launched as root. > > My question is, how can I make pysb do its job without requiring root > permissions? Here is the error I get when launching pyocd-gdbserver as > normal user. The last lines suggests its pyusb having issues: > > uncaught exception: The device has no langid > Traceback (most recent call last): > File "build/bdist.linux-x86_64/egg/pyOCD/tools/gdb_server.py", line > 262, in run > frequency=self.args.frequency) > File "build/bdist.linux-x86_64/egg/pyOCD/board/mbed_board.py", line > 210, in chooseBoard > target_override, frequency) > File "build/bdist.linux-x86_64/egg/pyOCD/board/mbed_board.py", line > 182, in getAllConnectedBoards > connected_daps = dap_class.get_connected_devices() > File "build/bdist.linux-x86_64/egg/pyOCD/pyDAPAccess/dap_access_cmsis_dap.py", > line 352, in get_connected_devices > all_interfaces = _get_interfaces() > File "build/bdist.linux-x86_64/egg/pyOCD/pyDAPAccess/dap_access_cmsis_dap.py", > line 44, in _get_interfaces > return INTERFACE[usb_backend].getAllConnectedInterface() > File "build/bdist.linux-x86_64/egg/pyOCD/pyDAPAccess/interface/pyusb_backend.py", > line 88, in getAllConnectedInterface > product = board.product > File "/usr/lib/python2.7/site-packages/usb/core.py", line 841, in product > self._product = util.get_string(self, self.iProduct) > File "/usr/lib/python2.7/site-packages/usb/util.py", line 314, in get_string > raise ValueError("The device has no langid") > ValueError: The device has no langid > > > Please let me know if there are any workarounds to make pyusb work > without requiring root privilege. > > -- > > Thanks and Regards, > Aurabindo J > > ------------------------------------------------------------------------------ > _______________________________________________ > pyusb-users mailing list > pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users |
From: Jay A. <jay...@gm...> - 2016-08-20 12:46:31
|
Hi, I am a user of pyOCD, and I am having an issue related to pyusb which is what the former uses for talking to the USB device. The situation is that I need to use pyOCD through an eclipse plugin. Eclipse launches pyocd-gdbserver and normal user. But it will only work if launched as root. My question is, how can I make pysb do its job without requiring root permissions? Here is the error I get when launching pyocd-gdbserver as normal user. The last lines suggests its pyusb having issues: uncaught exception: The device has no langid Traceback (most recent call last): File "build/bdist.linux-x86_64/egg/pyOCD/tools/gdb_server.py", line 262, in run frequency=self.args.frequency) File "build/bdist.linux-x86_64/egg/pyOCD/board/mbed_board.py", line 210, in chooseBoard target_override, frequency) File "build/bdist.linux-x86_64/egg/pyOCD/board/mbed_board.py", line 182, in getAllConnectedBoards connected_daps = dap_class.get_connected_devices() File "build/bdist.linux-x86_64/egg/pyOCD/pyDAPAccess/dap_access_cmsis_dap.py", line 352, in get_connected_devices all_interfaces = _get_interfaces() File "build/bdist.linux-x86_64/egg/pyOCD/pyDAPAccess/dap_access_cmsis_dap.py", line 44, in _get_interfaces return INTERFACE[usb_backend].getAllConnectedInterface() File "build/bdist.linux-x86_64/egg/pyOCD/pyDAPAccess/interface/pyusb_backend.py", line 88, in getAllConnectedInterface product = board.product File "/usr/lib/python2.7/site-packages/usb/core.py", line 841, in product self._product = util.get_string(self, self.iProduct) File "/usr/lib/python2.7/site-packages/usb/util.py", line 314, in get_string raise ValueError("The device has no langid") ValueError: The device has no langid Please let me know if there are any workarounds to make pyusb work without requiring root privilege. -- Thanks and Regards, Aurabindo J |
From: Jeffrey N. <jsn...@su...> - 2016-08-20 12:26:43
|
Your real problem is that you don't know beforehand which driver your device will be using. If you're doing the driver install as part of an installer (e.g. using wdi-simple.exe) or instructing your users to use zadig.exe then you should already know which driver has been installed. I would say it's highly unusual to not know the driver for a device you control, which is one of the reasons why everyone has rejected the registry idea. And since you'll know which driver has been installed, you'll know which backend to use. You can include a libusb dll with your program and add its directory to the front of the PATH, like so: os.environ['PATH'] = get_main_dir() + ';' + os.environ['PATH'] Which will guarantee that you're using the DLL you think you are. P.S. all these can be put together nicely with cx_freeze and inno setup to create a "real program" for your users. Best Regards, Jeff On 8/20/2016 5:19 AM, Hermann Hamann wrote: > Hi > > ..and debug the real problem > What is my real problem? > H.H. > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > pyusb-users mailing list > pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users |
From: Hermann H. <her...@we...> - 2016-08-20 09:19:28
|
<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 name="quoted-content">Hi</div> <div name="quoted-content">> ..and debug the real problem<br/> What is my real problem?</div> <div name="quoted-content">H.H.</div> </div> </div> </div></div></body></html> |
From: Hermann H. <her...@we...> - 2016-08-19 09:15:52
|
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div> <div>Hi, Tormod</div> <div> </div> <div>This is the crashdump :</div> <div> <div> </div> <div><br/> C:\Portable\wdso>python wdso.py<br/> <br/> wdso 0.9.8<br/> found productId 0x0834<br/> [Errno 5] Input/output error<br/> Process USB_server:<br/> Traceback (most recent call last):<br/> File "C:\Python27\lib\multiprocessing\process.py", line 258, in _bootstrap<br/> self.run()<br/> File "C:\Python27\lib\multiprocessing\process.py", line 114, in run<br/> self._target(*self._args, **self._kwargs)<br/> File "C:\Portable\wdso\wdso.py", line 5019, in createUSBProcess<br/> USBProcess = USB(USBQ,ScopeQ,DiagQ,PID,BUS,DEV)<br/> File "C:\Portable\wdso\wdso.py", line 3563, in __init__<br/> self.device_init()<br/> File "C:\Portable\wdso\wdso.py", line 3631, in device_init<br/> self.device.ctrl_transfer(0x42,0xb1,0xdc,0,None); sleep(0.02)<br/> File "C:\Python27\lib\site-packages\usb\core.py", line 1043, inctrl_transfer<br/> self.__get_timeout(timeout))<br/> File "C:\Python27\lib\site-packages\usb\backend\libusb1.py", line 883,in ctrl_transfer timeout))<br/> File "C:\Python27\lib\site-packages\usb\backend\libusb1.py", line 595,<br/> in _check<br/> raise USBError(_strerror(ret), ret, _libusb_errno[ret])<br/> USBError: [Errno 5] Input/output error<br/> finished<br/> <br/> C:\Portable\wdso><br/> <br/> Sincerely Hermann</div> <div> </div> <div><br/> </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> </div> </div></div></body></html> |
From: Hermann H. <her...@we...> - 2016-08-19 09:05:22
|
<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;"><br/> Hi Xiaofan<br/> <br/> <I mean why your program finds this very old version of<br/> <libusb Windows dll? You probably want to use the latest<br/> <version of libusb Windows release and put the dll in the<br/> <right directory.</div> <div style="margin:0 0 10px 0;">This problem does not occur on my machine but my client's.</div> <div style="margin:0 0 10px 0;">I have no influence on that setup, and it works for him.</div> <div style="margin:0 0 10px 0;"><br/> >> < Why it crashed?<br/> >> I don't know.</div> <div style="margin:0 0 10px 0;">I will post the crash dump later.<br/> <br/> > The registry thingy has nothing to do with your problem.<br/> <br/> Therefore I asked what the registry is good for.</div> <div style="margin:0 0 10px 0;">It seems absolutely useless in the case of device <-> driver relationship.</div> <div style="margin:0 0 10px 0;">So whiy does the control panel list the installed drivers if nobody will care?</div> <div style="margin:0 0 10px 0;">There was a big misunderstanding in the role and authority of the registry on my side.</div> <div style="margin:0 0 10px 0;">So I will resign. Sorry Microsoft, lost chance.</div> <div style="margin:0 0 10px 0;">Sincerely Hermann<br/> </div> </div> </div> </div></div></body></html> |
From: Hermann H. <her...@we...> - 2016-08-19 08:50:47
|
<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 name="quoted-content">Hi Tormod,</div> <div name="quoted-content">thank you for your expertise; now I see clearer.</div> <div name="quoted-content"><br/> > < Why it crashed?<br/> > I don't know.</div> <div name="quoted-content"> </div> <div name="quoted-content">I will send you a crash dump later.</div> <div name="quoted-content"><br/> > <If you want to use libusb-1.0 backend, you need to have libusb-1.0.dll in<br/> > <the system and better use WinUSB driver for your device.<br/> ><br/> > I want the backend that is in the registry.<br/> <br/> >pyusb by default looks for libusb1 first</div> <div name="quoted-content"> </div> <div name="quoted-content">< .... you must select backend explicitly.</div> <div name="quoted-content"> </div> <div name="quoted-content">Well how can I? I do not know which backend is available on my clients' machines.</div> <div name="quoted-content">I can only rely on the driver that was installed for my device and which is displayed </div> <div name="quoted-content">in the control panel. I suppose the control panel gets it through the registry.</div> <div name="quoted-content"><br/> << Flexibility comes at a cost.</div> <div name="quoted-content">And what is the cost of reliability?</div> <div name="quoted-content"><br/> <And the pyusb application currently uses a DLL search to select default library<br/> <backend, regardless of the device.</div> <div name="quoted-content"> </div> <div name="quoted-content">Well I rank the registry higher in authority than the library search order.</div> <div name="quoted-content"><br/> <br/> <Hermann, in your case you are probably better off selecting the<br/> <libusb0 backend in your python application, if you know that your<br/> <device requires libusb0.sys. Otherwise, register the device for WinUSB<br/> <(with .inf file or Zadig), make sure a known good libusb1.dll is<br/> <installed in the path (before any third party libusb1.dll) and select<br/> <the libusb1 backend in your python application for good measure.</div> <div name="quoted-content"> </div> <div name="quoted-content">Well I am a bit confused when regarding recommendations for driver installation.</div> <div name="quoted-content">The tutorial recommends the inf-wizard and libusb0 and so I did and it works fine.</div> <div name="quoted-content">Well I can instruct my clients to do the same and hardcode pyusb0 into my program.</div> <div name="quoted-content">So much about flexibility.</div> <div name="quoted-content"><br/> <br/> <BTW, Hermann's example patch hardcodes "ControlSet002" which I believe<br/> <should be "CurrentControlSet", unless there are better ways to find</div> <div name="quoted-content"> </div> <div name="quoted-content">I found this with a registry editor search. I do not understand enough to</div> <div name="quoted-content">judge the generality of this approach.</div> <div name="quoted-content"><br/> <(e.g. different serial numbers but same vid/pid) can have different<br/> <Service values, and I am not sure how the patch deals with that.</div> <div name="quoted-content">I would not care, nobody will have two same oscilloscopes on its computer.</div> <div name="quoted-content"> </div> <div name="quoted-content">Thank you again for your effort, this makes my issue obsolete an I will not open it.</div> <div name="quoted-content"> </div> <div name="quoted-content">Sincerely Hermann</div> <div name="quoted-content"><br/> ------------------------------------------------------------------------------<br/> _______________________________________________<br/> pyusb-users mailing list<br/> pyu...@li...<br/> <a href="https://lists.sourceforge.net/lists/listinfo/pyusb-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/pyusb-users</a></div> </div> </div> </div></div></body></html> |
From: Tormod V. <lis...@gm...> - 2016-08-18 18:40:26
|
On Thu, Aug 18, 2016 at 11:07 AM, Hermann Hamann wrote: > <What do you mean by private directory of some other device? > > If it helps you: > > C:\Program Files\RTLSDR Scanner>dir lib*.* > 12.04.2013 20:04 68.608 libusb-1.0.dll Probably "C:\Program Files\RTLSDR Scanner" is in the global %PATH%, so it is not so "private". > < Why it crashed? > I don't know. I believe the crash probably happened when libusb1 accessed the device through the libusb0.sys driver (which in theory could work but the different drivers have their subtleties). libusb1 might have worked better if it could access the device through the WinUSB driver. Since the libusb-win32 library / libusb0 driver combination seems to work you have likely encountered a bug in the libusb1/libusb0.sys combination. It would be nice if you can file a bug and supply more detail, if not to get the bug fixed, at least warn others about the issue. > <If you want to use libusb-1.0 backend, you need to have libusb-1.0.dll in > <the system and better use WinUSB driver for your device. > > I want the backend that is in the registry. pyusb by default looks for libusb1 first, using the path, like how most applications loads DLLs. If you have the libusb1 DLL installed in the path but don't want to have it selected, you must select backend explicitly. I suppose libusb1 (somewhere through the Windows API layers) uses the registry to know which driver to use. It is however not obvious how pyusb should interpret the registry to choose its backend library. Flexibility comes at a cost. For instance, libusb-win32 ships both a library (DLL) and a driver (SYS) and the former always uses the latter to access the device, whereas libusb1 is just a library and can use various drivers (WinUSB, HID, libusb0.sys, libusbK) to access the device. The Windows driver registry will point to which driver is in charge of a device, and the application must perform requests to this driver, but the application (or developer) must itself select its libraries. And the pyusb application currently uses a DLL search to select default library backend, regardless of the device. If libusb1 would only support WinUSB, and we had a strict driver<->libusb relation, heuristics based on the registered driver could make more sense. Add more possible backends and drivers, try to make things consistent across platforms, and it all becomes more complex. Hermann, in your case you are probably better off selecting the libusb0 backend in your python application, if you know that your device requires libusb0.sys. Otherwise, register the device for WinUSB (with .inf file or Zadig), make sure a known good libusb1.dll is installed in the path (before any third party libusb1.dll) and select the libusb1 backend in your python application for good measure. BTW, Hermann's example patch hardcodes "ControlSet002" which I believe should be "CurrentControlSet", unless there are better ways to find the "Service" associated with a device. I also think device instances (e.g. different serial numbers but same vid/pid) can have different Service values, and I am not sure how the patch deals with that. Regards, Tormod |
From: Xiaofan C. <xia...@gm...> - 2016-08-18 12:08:06
|
On Thu, Aug 18, 2016 at 7:57 PM, Xiaofan Chen <xia...@gm...> wrote: > On Thu, Aug 18, 2016 at 5:07 PM, Hermann Hamann <her...@we...> wrote: >> >> Hi >> >> <Why do you think registry access is needed? >> I have read so in the internet. I will post reference later. >> >> <What do you mean by private directory of some other device? >> >> If it helps you: >> >> C:\Program Files\RTLSDR Scanner>dir lib*.* >> Volume in Laufwerk C: hat keine Bezeichnung. >> Volumeseriennummer: ECEC-C891 >> >> Verzeichnis von C:\Program Files\RTLSDR Scanner >> >> 12.04.2013 20:04 68.608 libusb-1.0.dll >> 1 Datei(en), 68.608 Bytes >> 0 Verzeichnis(se), 70.811.631.616 Bytes frei >> >> C:\Program Files\RTLSDR Scanner> > > This again has nothing to do with libusb or pyusb. I mean why your program finds this very old version of libusb Windows dll? You probably want to use the latest version of libusb Windows release and put the dll in the right directory. >> < Why it crashed? >> I don't know. > > You need to figure that out. > >> <If you want to use libusb-1.0 backend, you need to have libusb-1.0.dll in >> <the system and better use WinUSB driver for your device. >> >> I want the backend that is in the registry. > > The registry thingy has nothing to do with your problem. > -- Xiaofan |
From: Xiaofan C. <xia...@gm...> - 2016-08-18 12:00:15
|
On Wed, Aug 17, 2016 at 3:31 PM, Hermann Hamann <her...@we...> wrote: > Hi > < would you mind opening a issue? > I will do so, but it may take some time. > I have absolutely no background in Windows and there will be a lot of > googling before I can present hard facts. > > Therefore I ask the Window gurus among the users to answer me some > questions: > 1. What is the registry for? > 2. Is it valid programming style to disregard registry entries? > 3. Has anyone succesfully used a non registered driver? > I see. If you have no background in Windows, maybe you want to step back and debug the real problem and forget about the registry thingy for a while. As for 3), you can use Zadig which will take care of the digital signature requirement under Windows. -- Xiaofan |
From: Xiaofan C. <xia...@gm...> - 2016-08-18 11:57:39
|
On Thu, Aug 18, 2016 at 5:07 PM, Hermann Hamann <her...@we...> wrote: > > Hi > > <Why do you think registry access is needed? > I have read so in the internet. I will post reference later. > > <What do you mean by private directory of some other device? > > If it helps you: > > C:\Program Files\RTLSDR Scanner>dir lib*.* > Volume in Laufwerk C: hat keine Bezeichnung. > Volumeseriennummer: ECEC-C891 > > Verzeichnis von C:\Program Files\RTLSDR Scanner > > 12.04.2013 20:04 68.608 libusb-1.0.dll > 1 Datei(en), 68.608 Bytes > 0 Verzeichnis(se), 70.811.631.616 Bytes frei > > C:\Program Files\RTLSDR Scanner> This again has nothing to do with libusb or pyusb. > < Why it crashed? > I don't know. You need to figure that out. > <If you want to use libusb-1.0 backend, you need to have libusb-1.0.dll in > <the system and better use WinUSB driver for your device. > > I want the backend that is in the registry. The registry thingy has nothing to do with your problem. -- Xiaofan |
From: Hermann H. <her...@we...> - 2016-08-18 09:11:09
|
<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 name="quoted-content"> <div> <div class="gmail_extra"> <div class="gmail_quote"> <div>Hi Chris,</div> <div><Can you clarify #3? I've always had to install the driver, is that what you mean by registered?</div> <div>Yes.</div> <div> </div> <div><I've some rough notes on Windows usage at <a href="https://bitbucket.org/clach04/coldtears_clock/wiki/Windows" target="_blank">https://bitbucket.org/clach04/coldtears_clock/wiki/Windows</a></div> <div>Thank you.</div> <div> </div> <div><On creating issues, it is worth creating it as a place holder and incrementally adding details when you have them.</div> <div> </div> <div>OK</div> <div> </div> </div> </div> </div> </div> </div> </div> </div></div></body></html> |
From: Hermann H. <her...@we...> - 2016-08-18 09:07:27
|
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div> <div>Hi <div style="margin: 10.0px 5.0px 5.0px 10.0px;padding: 10.0px 0 10.0px 10.0px;border-left: 2.0px solid rgb(195,217,229);"> <div style="margin: 0 0 10.0px 0;"><br/> <Why do you think registry access is needed?<br/> I have read so in the internet. I will post reference later.<br/> <br/> <What do you mean by private directory of some other device?</div> <div style="margin: 0 0 10.0px 0;"><br/> If it helps you:</div> <div style="margin: 0 0 10.0px 0;"><br/> C:\Program Files\RTLSDR Scanner>dir lib*.*<br/> Volume in Laufwerk C: hat keine Bezeichnung.<br/> Volumeseriennummer: ECEC-C891<br/> <br/> Verzeichnis von C:\Program Files\RTLSDR Scanner<br/> <br/> 12.04.2013 20:04 68.608 libusb-1.0.dll<br/> 1 Datei(en), 68.608 Bytes<br/> 0 Verzeichnis(se), 70.811.631.616 Bytes frei<br/> <br/> C:\Program Files\RTLSDR Scanner></div> <div style="margin: 0 0 10.0px 0;">< Why it crashed?</div> <div style="margin: 0 0 10.0px 0;">I don't know.</div> <div style="margin: 0 0 10.0px 0;"><br/> <If you want to use libusb-1.0 backend, you need to have libusb-1.0.dll in<br/> <the system and better use WinUSB driver for your device.<br/> <br/> I want the backend that is in the registry.</div> <div style="margin: 0 0 10.0px 0;">Sincerely H. H.</div> </div> </div> </div></div></body></html> |
From: Xiaofan C. <xia...@gm...> - 2016-08-17 14:26:36
|
On Sat, Aug 13, 2016 at 3:34 PM, Hermann Hamann <her...@we...> wrote: > 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. Why do you think registry access is needed? > Instead pyusb started searching with pyusb1 backend and finds some libusb1 > in some private directory of some other device. And crashed. > > This is not acceptable. What do you mean by private directory of some other device? Why it crashed? If you want to use libusb-1.0 backend, you need to have libusb-1.0.dll in the system and better use WinUSB driver for your device. -- Xiaofan |