Home » Projects » Software Projects » Debugging My Perseus Driver

Debugging My Perseus Driver

debugging my perseus driver

Well, I just spent ten days debugging my Perseus driver. Finally working. Thought you might enjoy the story.

As I write some SDR software to capture diversity I/Q data, I thought I would start by refreshing an old driver I wrote for Perseus back in 2008. Yes, I know Perseus is only single channel, but still the approach would be a proof of concept for dual channel.

But failure arose. I could not get the Callback Function to fire. A callback is some code through which the Perseus DLL transfers data from the hardware to the user. So, I had to figure out why something that worked well in 2008 failed in 2023. After all, it was the same receiver, right?

I wrote to Microtelecom and asked Nico for a more recent SDR Development Kit. Mine was version 1.1 dating from 2007. No reply. So, I wrote to their distributor, Elad with the same question. Again, no reply. Then, I posted a query on the Perseus User Group, and did get some clues relating to new development in 2012 by a third party.

At this point, I realized that debugging my Perseus driver was not going well. I needed to do some serious detective work.

My 2008 code was written against Perseus DLL version 1.2. I then noticed the current DLL’s were versions 3.6 for 32 bit and 3.11 for 64 bit. Could the commands have changed? So I fed the DLL into an online decompiler explorer and read the source code. The results showed my that the exported DLL functions were exactly the same as provided in my original 2007 SDKDK.

Debugging My Perseus Driver – Success at Last

I now had confidence that I understood and was using the proper command functions. So, how to get the DLL to respond properly? With more online searching, I found a note from Nico that when he updated the DLL’s at some point around version 3.2, he made a change to require response buffers to be multiples of 512 bytes. This was different from the original code which required buffers to be multiples of 1020 bytes.

So, I arbitrarily set the start command to request buffers of a 512 byte multiple. Low and behold, the callback fired perfectly!

Problem solved with a lot of detective work. Sherlock would have been proud of me.

One comment

  1. Walt says:

    It’s a shame that no response was received from Nico or Elad. You’d think that someone would have answered a fairly easy question. Glad you solved it!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.