{"id":6318,"date":"2023-09-24T20:43:10","date_gmt":"2023-09-25T01:43:10","guid":{"rendered":"https:\/\/areciv.com\/blog\/?p=6318"},"modified":"2023-09-24T20:43:13","modified_gmt":"2023-09-25T01:43:13","slug":"expert-electronics-tci-python-library-to-control-expertsdr3-devices","status":"publish","type":"post","link":"https:\/\/areciv.com\/blog\/2023\/09\/expert-electronics-tci-python-library-to-control-expertsdr3-devices\/","title":{"rendered":"Expert Electronics TCI Python Library to Control ExpertSDR3 Devices"},"content":{"rendered":"\n<p>As with most of my hobbies, I enjoy the computerized side of Amateur Radio.  I got an Expert Electronics <a href=\"https:\/\/eesdr.com\/en\/products-en\/transceivers-en\/sunsdr2dx-en\">SunSDR2 DX<\/a> recently to replace a cobbled-together system I had been using for 15+ years after I started having a couple of major issues.  I'm loving the huge spectrum display!<\/p>\n\n\n\n<p>Despite the proprietary software package, it has an openly documented interface called <a href=\"https:\/\/github.com\/ExpertSDR3\/TCI\">TCI<\/a> which uses <a href=\"https:\/\/en.wikipedia.org\/wiki\/WebSocket\">WebSockets<\/a> to carry commands and even audio to other programs for processing, allowing things like spotting networks, modems, and memory managers to be written by anyone.<\/p>\n\n\n\n<p>I implemented the TCI interface as a Python library which can be <a href=\"https:\/\/pypi.org\/project\/eesdr-tci\/\">installed using pip<\/a> and used to build your own applications.  I also created numerous sample programs which were really solutions to things I wanted to have with the radio.  Most of the features were fleshed out as I wrote these samples.  The utilities include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>json_dump.py<\/code>: reads startup parameters and outputs them as a JSON dictionary<\/li>\n\n\n\n<li><code>param_listener.py<\/code>: prints out all parameter changes received from the TCI server<\/li>\n\n\n\n<li><code>receive_audio.py<\/code>: receives audio stream from the TCI interface which can be piped to other utilities<\/li>\n\n\n\n<li><code>spot_saved_stations.py<\/code>: repeatedly spots a list of stations to keep them visible in the EESDR interface<\/li>\n\n\n\n<li><code>scanner.py<\/code>: moves between a list of stations and pauses if squelch is broken<\/li>\n\n\n\n<li><code>direwolf_interface.py<\/code>: provides a pure TCI interface to the&nbsp;<a href=\"https:\/\/github.com\/wb2osz\/direwolf\">direwolf<\/a>&nbsp;packet soundmodem. (Note: currently, this requires building a modified version which can pipe the transmit audio, see&nbsp;<a href=\"https:\/\/github.com\/ars-ka0s\/direwolf\/tree\/stdout-audio\">this branch<\/a>&nbsp;if interested.)<\/li>\n\n\n\n<li><code>ctcss_decode.py<\/code>: listens for CTCSS\/PL tones in receiver audio and prints possible matches.<\/li>\n<\/ul>\n\n\n\n<p>I am also working on firmware for a macropad which will output MIDI commands and a utility using this library that will convert the MIDI commands to TCI inputs.<\/p>\n\n\n\n<p>It's still an early version so I haven't written much documentation yet, but I tried to make the examples as readable as possible to show how the different parts are used.<\/p>\n\n\n\n<p>Check out the source code or try it out with pip and let me know if there are any types of utilities you are looking forward to building with it!  <\/p>\n\n\n<div class=\"ebg-br-wrapper\">\n\t<div class=\"ebg-br-cfg-dark-theme-off ebg-br-template-repo\">\n\t\t<div class=\"ebg-br-body ebg-br-border ebg-br-background-color\">\n\t\t\t<i class=\"ebg-br-hide ebg-br-logo fab fa-github\"><\/i>\n\t\t\t<i class=\"ebg-br-cfg-icon-type-source-file ebg-br-logo ebg-br-icon-github ebg-br-img-color-auto\">&nbsp;<\/i>\n\t\t\t<div class=\"ebg-br-col ebg-br-col-sidebar\">\n\t\t\t\t<img decoding=\"async\" class=\"ebg-br-header-avatar\" src=\"https:\/\/avatars.githubusercontent.com\/u\/26339355?v=4\" alt=\"Avatar\" width=\"150\" height=\"150\" \/>\n\t\t\t<\/div>\n\t\t\t<div class=\"ebg-br-col ebg-br-col-main\">\n\t\t\t\t<p class=\"ebg-br-title\">\n\t\t\t\t\t<strong>\n\t\t\t\t\t\t<a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https:\/\/github.com\/ars-ka0s\/eesdr-tci\">\n\t\t\t\t\t\t\teesdr-tci <i class=\"ebg-br-hide fas fa-link\"><\/i><img decoding=\"async\" class=\"ebg-br-cfg-icon-type-source-file ebg-br-img-color-auto\" src=\"https:\/\/areciv.com\/blog\/wp-content\/plugins\/embed-block-for-github\/public\/images\/link.svg\" alt=\"\" height=\"22\" width=\"22\">\n\t\t\t\t\t\t\t<span class=\"screen-reader-text\">(this link opens in a new window)<\/span>\n\t\t\t\t\t\t<\/a>\n\t\t\t\t\t<\/strong>\n\t\t\t\t\t<em>\n\t\t\t\t\t\tby<a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https:\/\/github.com\/ars-ka0s\">\n\t\t\t\t\t\t\tars-ka0s <i class=\"ebg-br-hide fas fa-link\"><\/i><img decoding=\"async\" class=\"ebg-br-cfg-icon-type-source-file ebg-br-img-color-auto\" src=\"https:\/\/areciv.com\/blog\/wp-content\/plugins\/embed-block-for-github\/public\/images\/link.svg\" alt=\"\" height=\"9\" width=\"9\">\n\t\t\t\t\t\t\t<span class=\"screen-reader-text\">(this link opens in a new window)<\/span>\n\t\t\t\t\t\t<\/a>\n\t\t\t\t\t<\/em>\n\t\t\t\t<\/p>\n\t\t\t\t<p class=\"ebg-br-description \">\n\t\t\t\t\tPython package to interact with Expert Electronics SDR TCI control interface.\n\t\t\t\t<\/p>\n\t\t\t\t<p class=\"ebg-br-footer\">\n\t\t\t\t\t<span class=\"ebg-br-subscribers\">\n\t\t\t\t\t\t<i class=\"ebg-br-hide ebg-br-icon fas fa-heart\">&nbsp;<\/i>\n\t\t\t\t\t\t<i class=\"ebg-br-cfg-icon-type-source-file ebg-br-icon ebg-br-icon-subscribers ebg-br-img-color-auto\">&nbsp;<\/i>\n\t\t\t\t\t\t3 Subscribers\t\t\t\t\t<\/span>\n\t\t\t\t\t<span class=\"ebg-br-watchers\">\n\t\t\t\t\t\t<i class=\"ebg-br-hide ebg-br-icon fas fa-eye\">&nbsp;<\/i>\n\t\t\t\t\t\t<i class=\"ebg-br-cfg-icon-type-source-file ebg-br-icon ebg-br-icon-watchers ebg-br-img-color-auto\">&nbsp;<\/i>\n\t\t\t\t\t\t7 Watchers\t\t\t\t\t<\/span>\n\t\t\t\t\t<span class=\"ebg-br-forks\">\n\t\t\t\t\t\t<i class=\"ebg-br-hide ebg-br-icon fas fa-code-branch\">&nbsp;<\/i>\n\t\t\t\t\t\t<i class=\"ebg-br-cfg-icon-type-source-file ebg-br-icon ebg-br-icon-forks ebg-br-img-color-auto\">&nbsp;<\/i>\n\t\t\t\t\t\t3 Forks\t\t\t\t\t<\/span>\n\t\t\t\t\t<a target=\"_blank\" rel=\"noopener noreferrer\" class=\"ebg-br-link\" href=\"https:\/\/github.com\/ars-ka0s\/eesdr-tci\">\n\t\t\t\t\t\tCheck out this repository on GitHub.com <i class=\"ebg-br-hide fas fa-link\"><\/i><img decoding=\"async\" class=\"ebg-br-cfg-icon-type-source-file ebg-br-img-color-auto\" src=\"https:\/\/areciv.com\/blog\/wp-content\/plugins\/embed-block-for-github\/public\/images\/link.svg\" alt=\"\" height=\"11\" width=\"11\">\n\t\t\t\t\t\t<span class=\"screen-reader-text\">(this link opens in a new window)<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t<\/p>\n\t\t\t<\/div>\n\t\t<\/div>\n\t<\/div>\n\t<div class=\"ebg-br-editmode ebg-br-box-status\">\n\t\t<div class=\"egb-br-cache-status\">\n\t\t\t<div class=\"ebg-br-cfg-cache-off\">\n\t\t\t\t<span class=\"egb-br-status-img-on-off\">Cache<\/span>\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<div class=\"egb-br-dark_theme-status\">\n\t\t\t<div class=\"ebg-br-cfg-dark-theme-off\">\n\t\t\t\t<span class=\"egb-br-status-img-on-off\">Dark Theme<\/span>\n\t\t\t<\/div>\n\t\t<\/div>\n\t<\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>As with most of my hobbies, I enjoy the computerized side of Amateur Radio. I got an Expert Electronics SunSDR2 DX recently to replace a cobbled-together&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":6330,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"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":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[55,88],"tags":[110,112],"class_list":["post-6318","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-amateur-radio","category-software","tag-python","tag-tci"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/areciv.com\/blog\/wp-content\/uploads\/2023\/09\/pypi-logo.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/areciv.com\/blog\/wp-json\/wp\/v2\/posts\/6318","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/areciv.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/areciv.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/areciv.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/areciv.com\/blog\/wp-json\/wp\/v2\/comments?post=6318"}],"version-history":[{"count":3,"href":"https:\/\/areciv.com\/blog\/wp-json\/wp\/v2\/posts\/6318\/revisions"}],"predecessor-version":[{"id":6331,"href":"https:\/\/areciv.com\/blog\/wp-json\/wp\/v2\/posts\/6318\/revisions\/6331"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/areciv.com\/blog\/wp-json\/wp\/v2\/media\/6330"}],"wp:attachment":[{"href":"https:\/\/areciv.com\/blog\/wp-json\/wp\/v2\/media?parent=6318"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/areciv.com\/blog\/wp-json\/wp\/v2\/categories?post=6318"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/areciv.com\/blog\/wp-json\/wp\/v2\/tags?post=6318"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}