Difference between revisions of "WinUSB Notes"

From HPSDRwiki
Jump to: navigation, search
m (WinUSB Notes)
(WinUSB Notes)
Line 9: Line 9:
  
 
It seems that WinUSB is needed to use KISS (thus my branch is needed...) on Windows 64 bit OS versions, such as Vista 64 bit and Windows 7, 64 bit.  Some have reported trouble using libusb0-based KISS on Windows 7 32 bit.  These people report that my WinUSB branch does work fine on Windows 7, 32 bit (with WinUSB installed as the driver).  I'm not sure what the problem is, as I've used libusb0, KISS (Phil's branch) and PowerSDR on Windows 7 32 bit.
 
It seems that WinUSB is needed to use KISS (thus my branch is needed...) on Windows 64 bit OS versions, such as Vista 64 bit and Windows 7, 64 bit.  Some have reported trouble using libusb0-based KISS on Windows 7 32 bit.  These people report that my WinUSB branch does work fine on Windows 7, 32 bit (with WinUSB installed as the driver).  I'm not sure what the problem is, as I've used libusb0, KISS (Phil's branch) and PowerSDR on Windows 7 32 bit.
 +
 +
Is there anything that WinUSB can do that libusb0 cannot do, other than work on a 64 bit machine?  It seems that, yes, there is at least one advantage to WinUSB.  WinUSB is able to detect an Ozy or Hermes board that is plugged in or powered on AFTER KISS has been launched.  Libusb0 required that Ozy be plugged in and powered on BEFORE launching/running KISS (or PowerSDR).  So this is an advantage
  
 
The first thing that you will need is the WinUSB driver package from Alberto, I2PHD, from www.weaksignals.com.  [http://www.weaksignals.com Alberto I2PHD's WinRad site]  Go to his website and download his WinRad package, which will give you his WinUSB driver installer.  Using this installer should let you install WinUSB as the driver for your hardware on Windows XP, Vista and Windows 7, whether you have a 32 bit OS, or Intel/AMD 64 bit OS (x86 architecture) or Intel Itanium IA64 64 bit OS versions of windows installed.
 
The first thing that you will need is the WinUSB driver package from Alberto, I2PHD, from www.weaksignals.com.  [http://www.weaksignals.com Alberto I2PHD's WinRad site]  Go to his website and download his WinRad package, which will give you his WinUSB driver installer.  Using this installer should let you install WinUSB as the driver for your hardware on Windows XP, Vista and Windows 7, whether you have a 32 bit OS, or Intel/AMD 64 bit OS (x86 architecture) or Intel Itanium IA64 64 bit OS versions of windows installed.
Line 37: Line 39:
  
  
So, you're going to be running or recompiling the KISS code on a 64 bit machine?
 
  
If so, then you'll need to check the 'fftw' subfolder in my branch for the 64 bit dll.  I've provided the installers for the 32 bit and 64 bit fftw dlls, from the http://www.fftw.org/ website.  Please either install the 64 bit package and replace all versions of the 32 bit dll with the dll it installs, or copy and rename the libfftw3f64.dll to libfftw3f.dll, especially in the bin\release and bin\debug folders of my version of the KISS Console project.  Thanks to Dr. Hermann von Hasseln, DL3HVH, for this information!
+
== '''So, you're going to be running or recompiling the KISS code on a 64 bit machine?''' ==
 +
 
 +
 
 +
If so, then you'll need to check the 'fftw' subfolder in my branch for the 64 bit dll.  I've provided the installers for the 32 bit and 64 bit fftw dlls, from the http://www.fftw.org/ website.  Please either install the 64 bit package and replace all versions of the 32 bit dll with the dll it installs.  Much easier is to copy and rename the libfftw3f64.dll to libfftw3f.dll, especially in the bin\release and bin\debug folders of my version of the KISS Console project.  I've already placed libfftw3f64.dll in those directories for your convenience.  Replacing the current libfftw3f.dll is then all you need to do.  I suggest that you rename the current libfftw3f.dll file (to anything else...), then copy libfftw3f64.dll and rename the copy to libfftw3f.dll.  Thanks to Dr. Hermann von Hasseln, DL3HVH, for this information!

Revision as of 07:15, 5 January 2010

WinUSB Notes

This page contains information on using WinUSB with HPSDR hardware.

First, let's all be clear that WinUSB used as a driver replaces libusb0 used as a driver for some particular device, like the Ozy board. If you install WinUSB as the driver for Ozy, libusb0 is no longer the driver. So applications that use libusb0 (like PowerSDR, until Bill Tracey KD5TFD finished porting PowerSDR to WinUSB, or like CWSkimmer, which seems to use libusb0 to speak to Ozy) are not able to coexist with my branch of KISS. My branch of KISS uses WinUSB.

So it's an either/or proposition. If you need libusb0, and can install libusb0 as the driver, and can run PowerSDR, you want to use Phil VK6APH's branch of KISS. His branch is the 'original', and is considered to be the main development branch. I try to keep step with his branch, and feed common bugs and hopefully their solutions back to him. I'm keeping step best as I can with Phil's development work using the Hermes board, as well.

It seems that WinUSB is needed to use KISS (thus my branch is needed...) on Windows 64 bit OS versions, such as Vista 64 bit and Windows 7, 64 bit. Some have reported trouble using libusb0-based KISS on Windows 7 32 bit. These people report that my WinUSB branch does work fine on Windows 7, 32 bit (with WinUSB installed as the driver). I'm not sure what the problem is, as I've used libusb0, KISS (Phil's branch) and PowerSDR on Windows 7 32 bit.

Is there anything that WinUSB can do that libusb0 cannot do, other than work on a 64 bit machine? It seems that, yes, there is at least one advantage to WinUSB. WinUSB is able to detect an Ozy or Hermes board that is plugged in or powered on AFTER KISS has been launched. Libusb0 required that Ozy be plugged in and powered on BEFORE launching/running KISS (or PowerSDR). So this is an advantage

The first thing that you will need is the WinUSB driver package from Alberto, I2PHD, from www.weaksignals.com. Alberto I2PHD's WinRad site Go to his website and download his WinRad package, which will give you his WinUSB driver installer. Using this installer should let you install WinUSB as the driver for your hardware on Windows XP, Vista and Windows 7, whether you have a 32 bit OS, or Intel/AMD 64 bit OS (x86 architecture) or Intel Itanium IA64 64 bit OS versions of windows installed.

You will also be able to use WinRad, until Bill KD5TFD ports PowerSDR to WinUSB.

Alberto has some very good notes on installing the driver, or replacing libusb0 with WinUSB, as part of his package. I suggest that you read his notes and follow his directions. I think that you have to install WinUSB twice for Ozy, once when Ozy contains no programming, and once when Ozy has has its firmware downloaded. You can also find these drivers, newly fixed so that 64 bit Intel/AMD x86 OS install works, in the WinUSBDrivers folder under my SVN archive listed below. You will still want Alberto's instructions...

There were errors in the 64 bit installers, due to an error Microsoft had in their 'Using WinUSB' document. I consulted with Microsoft, who made me aware of the errors. I communicated these facts to Alberto I2PHD and Phil N8VB, who are updating their .inf files to fix the 64 bit x86 architecture processor installations correspondingly. Some teamwork and mutual communications was involved. Everyone has a better result due to the work that was done co-operatively.

Other interesting projects and info on WinUSB include:

1) The SourceForge (www.sourceforge.net) project called LibUsbDotNet. You can download both source and binary. This is a project that allows .Net code to use either libusb0 or WinUSB, without the application program having to know which driver is installed for the hardware. This is not yet being used by KISS or HPSDR, but does hold some promise on Windows for this option. Using LibUsbDotNet would allow a single version of KISS, for example, to exist that would work with either libusb0 or WinUSB.
2) the website http://www.lvr.com/winusb.htm, which contains information on WinUSB, USB in general, sample code, much other information and sample code on things like Serial Ports, Parallel Ports, ethernet, and more. Its maintainer, Jan Axelson, has also written a number of books on these topics. I found his winusb_cs to be very helpful to study in porting KISS and its support programs from libusb0 to WinUSB. Jan Axelson's website

What has been ported from libusb0 to WinUSB?

1) Phil Harman VK6APH's project KISS Console
2) supporting programs like loadfw.exe, loadfpga.exe and writei2c.exe
3) there is also a Visual Studio 2008 project called WinUSBAPI that is Alberto's Borland C++ Builder code ported to VS2008 C++. It doesn't yet have all the methods that the C# project WinUSBManaged that I wrote does. Hopefully, I'll find the time to back-port those methods from WinUSBManaged to WinUSBApi.

The purpose of the 'supporting programs' (which also use winusbmanaged.dll) is to replace the current versions that use libusb0. With these, you can update the versions in your usbblaster-binaries folder so that you can still update the firmware in Penelope, Mercury and other boards. You may have multiple places where these are needed. Up-to-date copies are in my "KISS Console\bin\release" and "Kiss Console\bin\debug" folders, so that initozy11.bat that is in those folders will continue to work.

Where can I find this new code that uses WinUSB? Try this svn path (K9TRV's KISS Branch):

   svn://206.216.146.154/svn/repos_hpsdr_kiss/branches/K9TRV


So, you're going to be running or recompiling the KISS code on a 64 bit machine?

If so, then you'll need to check the 'fftw' subfolder in my branch for the 64 bit dll. I've provided the installers for the 32 bit and 64 bit fftw dlls, from the http://www.fftw.org/ website. Please either install the 64 bit package and replace all versions of the 32 bit dll with the dll it installs. Much easier is to copy and rename the libfftw3f64.dll to libfftw3f.dll, especially in the bin\release and bin\debug folders of my version of the KISS Console project. I've already placed libfftw3f64.dll in those directories for your convenience. Replacing the current libfftw3f.dll is then all you need to do. I suggest that you rename the current libfftw3f.dll file (to anything else...), then copy libfftw3f64.dll and rename the copy to libfftw3f.dll. Thanks to Dr. Hermann von Hasseln, DL3HVH, for this information!