[ Source: libusb ]. Package: libusb-dev (2:0.1.12-28). Other Packages Related to libusb-dev. Architecture, Package Size, Installed Size, Files. Amd64, 29.2 kB.
On Tue, Dec 21, 2010 at 1:45 AM, damateem wrote: I'm using libusb-win32 on Windows and now want to port my code to Linux (Ubuntu). I managed to get my code to compile, but it won't run correctly because libusb-0.1-4, which ships with Ubuntu maverick, doesn't read strings from devices correctly. Due to the Windows dependency, I don't want to port the code to libusb-1. Therefore, I'm left with two choices, install libusb-0.1-12 or libusb-compat-0.1.3. To remain as recent as possible without porting the code to libusb-1, I decided to go with libusb-compat (if that is a bad idea, please tell me so). Just take note that Ubuntu/Debian still ships old libusb-0.1.
And the libusb-0.1-4 package is of version 0.1.12. So you do not need to install libusb-0.1.12, Reference. Rather you can post your codes and problems. Xiaofan Thread view.
I'm using libusb-win32 on Windows and now want to port my code to Linux (Ubuntu). I managed to get my code to compile, but it won't run correctly because libusb-0.1-4, which ships with Ubuntu maverick, doesn't read strings from devices correctly. Due to the Windows dependency, I don't want to port the code to libusb-1.
Therefore, I'm left with two choices, install libusb-0.1-12 or libusb-compat-0.1.3. To remain as recent as possible without porting the code to libusb-1, I decided to go with libusb-compat (if that is a bad idea, please tell me so). The documentation for libusb-compat says not to install it alongside libusb-0.1, but I'm not sure how to remove libusb-0.1-4. I tried apt-get purge libusb-0.1-4 but it returned errors that I don't fully understand and refused to remove the package. What are the steps for installing libusb-compat-0.1.3? Thanks, David Do You Yahoo!? Tired of spam?
Mail has the best spam protection around. Damateem wrote: The documentation for libusb-compat says not to install it alongside libusb-0.1, Correct. The two packages provide an identical API, and are thus mutually exclusive. but I'm not sure how to remove libusb-0.1-4.
I tried apt-get purge libusb-0.1-4 but it returned errors that I don't fully understand and refused to remove the package. Please discuss this with your Linux distribution - my guess is that the packaging system does not know that the two packages are equivalent, and that either of them can fulfill the requirement for a libusb-0.1 API. What are the steps for installing libusb-compat-0.1.3? If installing from source then must make sure to not have libusb-0.1 installed.
Otherwise, standard configure make make install. I posted a similar question, but thought I might get a better response with a different subject line and a rephrasing of the question. There isn't an Ubuntu package for 0.1.12, so I need to install from source. I built the source and installed using the following commands (as instructed in the INSTALL.libusb file)./configure make sudo make install All seemed to build and install without error, but I'm having problems reading strings from devices. Testlibusb gives the following output. Dev #0: 1DD3 - 0001 Dev #0: 80EE - 0021 Dev #0: 1D6B - 0001 Dev #0: 0781 - 5406 Dev #0: 1D6B - 0002 As you can see, I'm not getting manufacturer, product or serial number strings. This is exactly what I was seeing with libisb-0.1.4 that ships with Ubuntu.
I read that this is a known problem with 0.1.4, which is the reason for upgrading to 0.1.12. I expect that testlibusb is still using libusb-0.1.4, but I don't know how to prove it. Are there steps that need to be completed after the three commands listed above?
What can I do to debug this problem? Any help is greatly appreciated. Thanks, David. On Tue, Dec 21, 2010 at 8:36 AM, damateem wrote: There isn't an Ubuntu package for 0.1.12, so I need to install from source. I built the source and installed using the following commands (as instructed in the INSTALL.libusb file)./configure make sudo make install As mentioned in the other thread, you do not need to do this. Ubuntu's libusb-0.1-4 is of version 0.1.12 (with Debian/Ubuntu patches). The above will install things to /usr/local.
So you can undo the above by deleting things installed into /usr/local. All seemed to build and install without error, but I'm having problems reading strings from devices. Testlibusb gives the following output.
Dev #0: 1DD3 - 0001 Dev #0: 80EE - 0021 Dev #0: 1D6B - 0001 Dev #0: 0781 - 5406 Dev #0: 1D6B - 0002 As you can see, I'm not getting manufacturer, product or serial number strings. This is exactly what I was seeing with libusb-0.1.4 that ships with Ubuntu. So the problem is that the example program does not work as intended in your system. This is what I get under Ubuntu 10.10 32bit. Mcuee@.:/Desktop/build/libusb/libusb-0.1.12/tests$./testlibusb Dev #1: Linux 2.6.35-22-generic ohcihcd - OHCI Host Controller Dev #2: - USB Reader Dev #3: Logitech - USB Optical Mouse Dev #4: LPCUSB - USBSerial Dev #5: Microsoft - Microsoft Notebook Receiver v2.0 Dev #1: Linux 2.6.35-22-generic ehcihcd - EHCI Host Controller Dev #4: Amontec - Amontec JTAGkey-2 Dev #6: SanDisk - SanDisk Cruzer Did you really run testlibusb from within the build directory? On Tue, Dec 21, 2010 at 1:45 AM, damateem wrote: I'm using libusb-win32 on Windows and now want to port my code to Linux (Ubuntu).
I managed to get my code to compile, but it won't run correctly because libusb-0.1-4, which ships with Ubuntu maverick, doesn't read strings from devices correctly. Due to the Windows dependency, I don't want to port the code to libusb-1. Therefore, I'm left with two choices, install libusb-0.1-12 or libusb-compat-0.1.3. To remain as recent as possible without porting the code to libusb-1, I decided to go with libusb-compat (if that is a bad idea, please tell me so). Just take note that Ubuntu/Debian still ships old libusb-0.1. And the libusb-0.1-4 package is of version 0.1.12. So you do not need to install libusb-0.1.12, Reference.
Rather you can post your codes and problems. Hi, On Mon, Dec 20, 2010 at 06:40:48PM +0000, libusb-devel-request@. Wrote: Date: Mon, 20 Dec 2010 12:45:53 -0500 From: damateem Subject: Libusb-devel Installing libusb-compat To: libusb-devel@. Message-ID: Content-Type: text/plain; charset=ISO-8859-1 I'm using libusb-win32 on Windows and now want to port my code to Linux (Ubuntu).
Good idea:) I managed to get my code to compile, but it won't run correctly because libusb-0.1-4, which ships with Ubuntu maverick, doesn't read strings from devices correctly. Due to the Windows dependency, I don't want to port the code to libusb-1. Therefore, I'm left with two choices, install libusb-0.1-12 or libusb-compat-0.1.3. To remain as recent as possible without porting the code to libusb-1, I decided to go with libusb-compat (if that is a bad idea, please tell me so). It might be worthwhile to conditionally implement support for -1, since (AFAIUI) -1 will become the new default library anyway, thus you'll then be able to use -1 on the platforms where it's available (which will be all platforms in future), otherwise -0.1.
The documentation for libusb-compat says not to install it alongside libusb-0.1, but I'm not sure how to remove libusb-0.1-4. I tried apt-get purge libusb-0.1-4 but it returned errors that I don't fully understand and refused to remove the package. What are the steps for installing libusb-compat-0.1.3? Heh, yes, that's a somewhat challenging issue;) On my MIPS router (which had 1000 wakeups/s due to half-assed -0.1 implementation) I managed to solve that by simply creating a checkinstall'ed package of a -compat source build, which then 'provides' the same version information as the original libusb-0.1-4 package. A simple dpkg -i of that checkinstall'ed version should then work.
Ii libusb-0.1-4 2:0.1.12-13 userspace USB programming library ii libusb-1.0-0 2:1.0.8-2local1 userspace USB programming library ii libusb-1.0-0-dev 2:1.0.8-2local1 userspace USB programming library developmen ii libusb-compat 2:0.1.12-13-1 Package created with checkinstall 1.6.1 $ dpkg -s libusb-compat Package: libusb-compat Status: install ok installed Priority: extra Section: checkinstall Installed-Size: 208 Maintainer: root@. Architecture: mipsel Version: 2:0.1.12-13-1 Provides: libusb-compat, libusb-0.1-4 Description: Package created with checkinstall 1.6.1 Hmm, I now remember that I also created a dummy libusb-0.1-4 package using equivs: $ dpkg -L libusb-0.1-4 /. /usr /usr/share /usr/share/doc /usr/share/doc/libusb-0.1-4 /usr/share/doc/libusb-0.1-4/changelog.Debian.gz /usr/share/doc/libusb-0.1-4/copyright /usr/share/doc/libusb-0.1-4/README.Debian Given that fiddling with checkinstall and equivs took me (IIRC) half of an evening, it might be more worthwhile (i.e., future-proof) to add support for 1.0 API instead. HTH, Andreas Mohr.