{"id":14158,"date":"2023-10-14T05:00:42","date_gmt":"2023-10-14T11:00:42","guid":{"rendered":"http:\/\/fallows.ca\/wp\/?p=14158"},"modified":"2023-10-12T10:25:30","modified_gmt":"2023-10-12T16:25:30","slug":"debugging-my-perseus-driver","status":"publish","type":"post","link":"http:\/\/fallows.ca\/wp\/projects\/software-projects\/debugging-my-perseus-driver\/","title":{"rendered":"Debugging My Perseus Driver"},"content":{"rendered":"<p><a href=\"http:\/\/fallows.ca\/wp\/wp-content\/uploads\/2023\/10\/sherlock.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-14159\" src=\"http:\/\/fallows.ca\/wp\/wp-content\/uploads\/2023\/10\/sherlock.jpg\" alt=\"debugging my perseus driver\" width=\"354\" height=\"184\" srcset=\"http:\/\/fallows.ca\/wp\/wp-content\/uploads\/2023\/10\/sherlock.jpg 354w, http:\/\/fallows.ca\/wp\/wp-content\/uploads\/2023\/10\/sherlock-300x156.jpg 300w\" sizes=\"auto, (max-width: 354px) 100vw, 354px\" \/><\/a><\/p>\n<p>Well, I just spent ten days debugging my Perseus driver. Finally working. Thought you might enjoy the story. <!--more--><\/p>\n<p>As I write some<a href=\"http:\/\/play.fallows.ca\/wp\/radio\/software-defined-radio\/developing-my-new-sdr-diversity-recorder\/\" target=\"_blank\" rel=\"noopener\"> SDR software to capture diversity I\/Q data<\/a>, 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.<\/p>\n<p>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?<\/p>\n<p>I wrote to <a href=\"https:\/\/microtelecom.it\/en\" target=\"_blank\" rel=\"noopener nofollow\">Microtelecom<\/a> 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, <a href=\"https:\/\/shop.elad-usa.com\/\" target=\"_blank\" rel=\"noopener nofollow\">Elad<\/a> with the same question. Again, no reply. Then, I posted a query on the<a href=\"https:\/\/groups.io\/g\/Perseus-SDR\" target=\"_blank\" rel=\"noopener nofollow\"> Perseus User Group<\/a>, and did get some clues relating to new development in 2012 by a third party.<\/p>\n<p>At this point, I realized that debugging my Perseus driver was not going well. I needed to do some serious detective work.<\/p>\n<p>My 2008 code was written against Perseus DLL version 1.2. I then noticed the current DLL&#8217;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 <a href=\"https:\/\/dogbolt.org\/\" target=\"_blank\" rel=\"noopener nofollow\">online decompiler explorer<\/a> 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.<\/p>\n<h2>Debugging My Perseus Driver &#8211; Success at Last<\/h2>\n<p>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&#8217;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.<\/p>\n<p>So, I arbitrarily set the start command to request buffers of a 512 byte multiple. Low and behold, the callback fired perfectly!<\/p>\n<p>Problem solved with a lot of detective work. Sherlock would have been proud of me.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Well, I just spent ten days debugging my Perseus driver. Finally working. Thought you might enjoy the story.<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Debugging My Perseus Driver #Perseus #SWL","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"enabled":false},"version":2}},"categories":[12,6],"tags":[163,193],"series":[],"class_list":["post-14158","post","type-post","status-publish","format-standard","hentry","category-software-defined-radio","category-software-projects","tag-perseus","tag-swl"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Debugging My Perseus Driver - Living On The Horizon<\/title>\n<meta name=\"description\" content=\"Well, I just spent ten days debugging my Perseus driver. Finally working. Thought you might enjoy the story.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fallows.ca\/wp\/projects\/software-projects\/debugging-my-perseus-driver\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Debugging My Perseus Driver - Living On The Horizon\" \/>\n<meta property=\"og:description\" content=\"Well, I just spent ten days debugging my Perseus driver. Finally working. Thought you might enjoy the story.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fallows.ca\/wp\/projects\/software-projects\/debugging-my-perseus-driver\/\" \/>\n<meta property=\"og:site_name\" content=\"Living On The Horizon\" \/>\n<meta property=\"article:published_time\" content=\"2023-10-14T11:00:42+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/fallows.ca\/wp\/wp-content\/uploads\/2023\/10\/sherlock.jpg\" \/>\n<meta name=\"author\" content=\"John VE6EY\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@VE6EY\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"John VE6EY\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fallows.ca\/wp\/projects\/software-projects\/debugging-my-perseus-driver\/\",\"url\":\"https:\/\/fallows.ca\/wp\/projects\/software-projects\/debugging-my-perseus-driver\/\",\"name\":\"Debugging My Perseus Driver - Living On The Horizon\",\"isPartOf\":{\"@id\":\"http:\/\/fallows.ca\/wp\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/fallows.ca\/wp\/projects\/software-projects\/debugging-my-perseus-driver\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/fallows.ca\/wp\/projects\/software-projects\/debugging-my-perseus-driver\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/fallows.ca\/wp\/wp-content\/uploads\/2023\/10\/sherlock.jpg\",\"datePublished\":\"2023-10-14T11:00:42+00:00\",\"author\":{\"@id\":\"http:\/\/fallows.ca\/wp\/#\/schema\/person\/9750e0ab227030255d9806757525f945\"},\"description\":\"Well, I just spent ten days debugging my Perseus driver. Finally working. Thought you might enjoy the story.\",\"breadcrumb\":{\"@id\":\"https:\/\/fallows.ca\/wp\/projects\/software-projects\/debugging-my-perseus-driver\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fallows.ca\/wp\/projects\/software-projects\/debugging-my-perseus-driver\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fallows.ca\/wp\/projects\/software-projects\/debugging-my-perseus-driver\/#primaryimage\",\"url\":\"http:\/\/fallows.ca\/wp\/wp-content\/uploads\/2023\/10\/sherlock.jpg\",\"contentUrl\":\"http:\/\/fallows.ca\/wp\/wp-content\/uploads\/2023\/10\/sherlock.jpg\",\"width\":354,\"height\":184,\"caption\":\"debugging my perseus driver\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fallows.ca\/wp\/projects\/software-projects\/debugging-my-perseus-driver\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/fallows.ca\/wp\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Christmas\",\"item\":\"http:\/\/fallows.ca\/wp\/tag\/christmas\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Debugging My Perseus Driver\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/fallows.ca\/wp\/#website\",\"url\":\"http:\/\/fallows.ca\/wp\/\",\"name\":\"Living On The Horizon\",\"description\":\"Blogs and Stuff\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/fallows.ca\/wp\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"http:\/\/fallows.ca\/wp\/#\/schema\/person\/9750e0ab227030255d9806757525f945\",\"name\":\"John VE6EY\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/fallows.ca\/wp\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e4048edfe09efff51033c48b4fb951e8ac0a4dc84a25c96b25e5ae9f5b7069a5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e4048edfe09efff51033c48b4fb951e8ac0a4dc84a25c96b25e5ae9f5b7069a5?s=96&d=mm&r=g\",\"caption\":\"John VE6EY\"},\"sameAs\":[\"https:\/\/x.com\/VE6EY\"],\"url\":\"http:\/\/fallows.ca\/wp\/author\/play\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Debugging My Perseus Driver - Living On The Horizon","description":"Well, I just spent ten days debugging my Perseus driver. Finally working. Thought you might enjoy the story.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fallows.ca\/wp\/projects\/software-projects\/debugging-my-perseus-driver\/","og_locale":"en_US","og_type":"article","og_title":"Debugging My Perseus Driver - Living On The Horizon","og_description":"Well, I just spent ten days debugging my Perseus driver. Finally working. Thought you might enjoy the story.","og_url":"https:\/\/fallows.ca\/wp\/projects\/software-projects\/debugging-my-perseus-driver\/","og_site_name":"Living On The Horizon","article_published_time":"2023-10-14T11:00:42+00:00","og_image":[{"url":"http:\/\/fallows.ca\/wp\/wp-content\/uploads\/2023\/10\/sherlock.jpg","type":"","width":"","height":""}],"author":"John VE6EY","twitter_card":"summary_large_image","twitter_creator":"@VE6EY","twitter_misc":{"Written by":"John VE6EY","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/fallows.ca\/wp\/projects\/software-projects\/debugging-my-perseus-driver\/","url":"https:\/\/fallows.ca\/wp\/projects\/software-projects\/debugging-my-perseus-driver\/","name":"Debugging My Perseus Driver - Living On The Horizon","isPartOf":{"@id":"http:\/\/fallows.ca\/wp\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fallows.ca\/wp\/projects\/software-projects\/debugging-my-perseus-driver\/#primaryimage"},"image":{"@id":"https:\/\/fallows.ca\/wp\/projects\/software-projects\/debugging-my-perseus-driver\/#primaryimage"},"thumbnailUrl":"http:\/\/fallows.ca\/wp\/wp-content\/uploads\/2023\/10\/sherlock.jpg","datePublished":"2023-10-14T11:00:42+00:00","author":{"@id":"http:\/\/fallows.ca\/wp\/#\/schema\/person\/9750e0ab227030255d9806757525f945"},"description":"Well, I just spent ten days debugging my Perseus driver. Finally working. Thought you might enjoy the story.","breadcrumb":{"@id":"https:\/\/fallows.ca\/wp\/projects\/software-projects\/debugging-my-perseus-driver\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fallows.ca\/wp\/projects\/software-projects\/debugging-my-perseus-driver\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fallows.ca\/wp\/projects\/software-projects\/debugging-my-perseus-driver\/#primaryimage","url":"http:\/\/fallows.ca\/wp\/wp-content\/uploads\/2023\/10\/sherlock.jpg","contentUrl":"http:\/\/fallows.ca\/wp\/wp-content\/uploads\/2023\/10\/sherlock.jpg","width":354,"height":184,"caption":"debugging my perseus driver"},{"@type":"BreadcrumbList","@id":"https:\/\/fallows.ca\/wp\/projects\/software-projects\/debugging-my-perseus-driver\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/fallows.ca\/wp\/"},{"@type":"ListItem","position":2,"name":"Christmas","item":"http:\/\/fallows.ca\/wp\/tag\/christmas\/"},{"@type":"ListItem","position":3,"name":"Debugging My Perseus Driver"}]},{"@type":"WebSite","@id":"http:\/\/fallows.ca\/wp\/#website","url":"http:\/\/fallows.ca\/wp\/","name":"Living On The Horizon","description":"Blogs and Stuff","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/fallows.ca\/wp\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"http:\/\/fallows.ca\/wp\/#\/schema\/person\/9750e0ab227030255d9806757525f945","name":"John VE6EY","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/fallows.ca\/wp\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e4048edfe09efff51033c48b4fb951e8ac0a4dc84a25c96b25e5ae9f5b7069a5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e4048edfe09efff51033c48b4fb951e8ac0a4dc84a25c96b25e5ae9f5b7069a5?s=96&d=mm&r=g","caption":"John VE6EY"},"sameAs":["https:\/\/x.com\/VE6EY"],"url":"http:\/\/fallows.ca\/wp\/author\/play\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6wKKr-3Gm","jetpack-related-posts":[],"_links":{"self":[{"href":"http:\/\/fallows.ca\/wp\/wp-json\/wp\/v2\/posts\/14158","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/fallows.ca\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/fallows.ca\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/fallows.ca\/wp\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/fallows.ca\/wp\/wp-json\/wp\/v2\/comments?post=14158"}],"version-history":[{"count":3,"href":"http:\/\/fallows.ca\/wp\/wp-json\/wp\/v2\/posts\/14158\/revisions"}],"predecessor-version":[{"id":14166,"href":"http:\/\/fallows.ca\/wp\/wp-json\/wp\/v2\/posts\/14158\/revisions\/14166"}],"wp:attachment":[{"href":"http:\/\/fallows.ca\/wp\/wp-json\/wp\/v2\/media?parent=14158"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/fallows.ca\/wp\/wp-json\/wp\/v2\/categories?post=14158"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/fallows.ca\/wp\/wp-json\/wp\/v2\/tags?post=14158"},{"taxonomy":"series","embeddable":true,"href":"http:\/\/fallows.ca\/wp\/wp-json\/wp\/v2\/series?post=14158"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}