[hpsdr] Fixed: Bugs in KISS WinUSB code

george byrkit ghbyrkit at chartermi.net
Mon Dec 21 11:00:28 PST 2009


Dear All,
The bugs that I found have been fixed and a new chunk of code pushed to the
SVN repository in my branch to replace the buggy code.

As all things go, I've probably introduced other bugs, but they may take
time to find!  Especially since I'm traveling for the holidays starting
tomorrow (Tuesday the 22nd) and returning late this Saturday (the 26th).

I'm unclear on matters relating to FFTW and such, and have asked for some
clarification from Bill KD5TFD.  I know that the version that he uses is
3.2Alpha2 (it's in the 'wisdom' file that PowerSDR creates), which isn't
downloadable anymore from the fftw.org website.

In KISS, SharpDSP uses FFTW, but the dll that it uses is named libfftw3f.dll
and not libfftw3f-3.dll, so the naming is non-standard!  Hopefully, we can
clear this up in the near future, and possibly migrate to 3.2.2, which seems
to be the latest non-alpha, non-beta release.  Knowing the right version,
and having the name standardized will help, especially as people have to
replace the 32 bit version with the 64 bit version if using a 64 bit OS!
I'd love to hear from anyone who has more details than the few that I have!
Learning is a life-long exercise...

Please see the new WIKI page at
http://openhpsdr.org/wiki/index.php?title=WinUSB_Notes where there are notes
related to WinUSB, the version of KISS code that uses it, and issues related
to 64 bit windows.

Let me take this moment to answer Alberto's question as to why/whether I
used his method to initialize the Ozy board from within the C# code.  The
answer is 'yes and no'.  Yes, I provide a method, Open_HPSDR, which does NOT
load the firmware.  This is for backwards compatibility with libusb0 which
did it that way.  This way, one can still use initozy11.bat, which may be
useful if you need to use writeI2C.exe to tweak settings on the board when
the firmware is loaded.  The particular issue with penelope and gain comes
to mind.  So the KISS code can be configured by choosing which set of code
to use, to select whether to use initozy11.bat or to use
Open_HPSDR_Load_Firmware to open the device and load the firmware.  I
mention that just below.

But there is also the Open_HPSDR_Load_Firmware method, which takes strings
identifying the FX2 firmware and FPGA code files, and does what
Initialize_HPSDR does in Alberto's code.  One difference is that Alberto's
code is more C-like than C++ like, in that his methods are NOT part of a
class, so it's proper to pass a structure in with data like the firmware
filenames.  In C#, it's not really possible to have non-class methods, so
I've used the class concept to good use, so no structure passing is
necessary.  One creates an instance of the WinUSB class defined in my
WinUSBManaged.cs file, and sets fields (variables) or properties to desired
values, and can likewise read those fields or properties back as needed.

Now, I could have made the Open_HPSDR_Load_Firmware method have the name
Open_HPSDR, and it would have been an 'alternate' version (an 'override')
with different input parameters.  C# is just fine with that.  But by having
the name be clearly different, I've highlighted the functional difference
between Open_HPSDR_Load_Firmware and Open_HPSDR.  I hope that answers your
question, Alberto.

Perhaps anyone trying to load the driver on a 64 bit Windows OS can provide
some more details about what errors they are encountering!  I suspect that I
could have loaded a 64 bit OS onto my computer, but chose not to because I
do so much of my work as 32 bit work, and didn't want to disrupt that.
Maybe there are error messages in the system error log, or text displayed
during the attempted driver install that Alberto and I can try to use to
figure out what is happening!

Vy 73,
George K9TRV
 

__________ Information from ESET Smart Security, version of virus signature
database 4707 (20091221) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 




More information about the Hpsdr mailing list