{"id":19402,"date":"2015-12-21T21:38:30","date_gmt":"2015-12-22T02:38:30","guid":{"rendered":"https:\/\/reactivemusic.net\/?p=19402"},"modified":"2021-01-26T17:27:28","modified_gmt":"2021-01-26T22:27:28","slug":"hamlib-and-rigctl","status":"publish","type":"post","link":"https:\/\/reactivemusic.net\/?p=19402","title":{"rendered":"Hamlib and rigctl"},"content":{"rendered":"<p class=\"lead\">Hamlib provides a linux command-line API for amateur radios.<\/p>\n<p><a href=\"https:\/\/reactivemusic.net\/wp-content\/uploads\/2015\/12\/Hamlib_design.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-19403\" src=\"https:\/\/reactivemusic.net\/wp-content\/uploads\/2015\/12\/Hamlib_design-300x147.png\" alt=\"Hamlib_design\" width=\"300\" height=\"147\" srcset=\"https:\/\/reactivemusic.net\/wp-content\/uploads\/2015\/12\/Hamlib_design-300x147.png 300w, https:\/\/reactivemusic.net\/wp-content\/uploads\/2015\/12\/Hamlib_design.png 400w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<h3>Installation<\/h3>\n<p>On\u00a0Mac OS you can install using Mac Ports:<\/p>\n<div class=\"panel\">\n<p><span style=\"color: #666666;\">sudo port install hamlib<\/span><\/p>\n<\/div>\n<h3>Usage<\/h3>\n<p>Get a list of &#8220;rig numbers&#8221; for supported radios:<\/p>\n<div class=\"panel\">\n<p>rigctl -l<\/p>\n<\/div>\n<p>Find available serial ports:<\/p>\n<div class=\"panel\">\n<p>ls \/dev\/tty.*<\/p>\n<\/div>\n<p>Set the frequency to 7.2 MHz and mode to LSB on a Tentec Eagle transceiver:<\/p>\n<div class=\"panel\">\n<p>rigctl -m 1608 -r \/dev\/tty.usbmodem14531 -s 57600 F 7200000 M LSB 0<\/p>\n<\/div>\n<p>Use a rigctl command with no commands at the end to start an interactive command shell.<\/p>\n<h4>Network control with TCP\/IP<\/h4>\n<p>First start the daemon. It uses port 4532 by default, but here we are setting it explicitly:<\/p>\n<div class=\"panel\">\n<p>rigctld -m 1608 -r \/dev\/tty.usbmodem14531 -s 57600 -t 4532 &amp;<\/p>\n<\/div>\n<p>Then in another window, send commands to the daemon using netcat. For set example, to set the frequency to 14.247:<\/p>\n<div class=\"panel\">\n<p>echo &#8216;F 14247000&#8217; | nc -w 1 localhost 4532<\/p>\n<\/div>\n<h4>Max\/MSP<\/h4>\n<p>Note: [mxj tcpClient] no longer functions in Max8 (1\/25\/2021)<\/p>\n<p>This patch uses the mxj tcpClient object from\u00a0<a href=\"https:\/\/cycling74.com\/toolbox\/tcpclient\/#.Vnj_fpMrKuU\">https:\/\/cycling74.com\/toolbox\/tcpclient\/#.Vnj_fpMrKuU<\/a>\u00a0by Arvid Tomayko to communicate with rigctld over TCP\/IP. The patch below is a modified help file that connected to the radio using rigctld as configured above.<\/p>\n<p><a href=\"https:\/\/reactivemusic.net\/wp-content\/uploads\/2015\/12\/Screen-Shot-2015-12-22-at-2.47.10-AM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-19408\" src=\"https:\/\/reactivemusic.net\/wp-content\/uploads\/2015\/12\/Screen-Shot-2015-12-22-at-2.47.10-AM-300x213.png\" alt=\"Screen Shot 2015-12-22 at 2.47.10 AM\" width=\"300\" height=\"213\" srcset=\"https:\/\/reactivemusic.net\/wp-content\/uploads\/2015\/12\/Screen-Shot-2015-12-22-at-2.47.10-AM-300x213.png 300w, https:\/\/reactivemusic.net\/wp-content\/uploads\/2015\/12\/Screen-Shot-2015-12-22-at-2.47.10-AM-1024x729.png 1024w, https:\/\/reactivemusic.net\/wp-content\/uploads\/2015\/12\/Screen-Shot-2015-12-22-at-2.47.10-AM.png 2034w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<h4>Notes on grig and rpc.rigd<\/h4>\n<p>grig is a graphical rig front end for hamlib by Alex Csete. rpc.rigd is a daemon that allows multiple clients. I was able to get both of them sort of working together (use -m 1901 from grig) but the daemon starts streaming error messages &#8220;read_string timeout without reading a character&#8221;. Also the latency with grig over the LAN is high. Its possible that there are problems with the rig CAT file. I am using the file for the Tentec Orion &#8211; as I haven&#8217;t figured out how to add new devices. At any rate, the above methods (UDP or TCP command line) are way more responsive.<\/p>\n<h4>References:<\/h4>\n<ul>\n<li>manpage:\u00a0<a style=\"line-height: normal;\" href=\"http:\/\/manpages.ubuntu.com\/manpages\/precise\/man1\/rigctl.1.html\">http:\/\/manpages.ubuntu.com\/manpages\/precise\/man1\/rigctl.1.html<\/a><\/li>\n<li>general information about using Mac for amateur radio:\u00a0<a style=\"line-height: normal;\" href=\"http:\/\/www.aerodynes.fr\/2013\/12\/27\/ham-operation-on-a-mac\/\">http:\/\/www.aerodynes.fr\/2013\/12\/27\/ham-operation-on-a-mac\/<\/a><\/li>\n<li>daemon:\u00a0<a href=\"http:\/\/www.makelinux.net\/man\/8\/R\/rigctld\">http:\/\/www.makelinux.net\/man\/8\/R\/rigctld<\/a><\/li>\n<li>rpc.rigd notes:\u00a0<a href=\"http:\/\/sourceforge.net\/p\/groundstation\/mailman\/groundstation-user\/thread\/CAFkZyWTk-uFyDCV4anVmHhAaO5dcE-ECt9rNrQYMYC3b1UQFBg@mail.gmail.com\/\">http:\/\/sourceforge.net\/p\/groundstation\/mailman\/groundstation-user\/thread\/CAFkZyWTk-uFyDCV4anVmHhAaO5dcE-ECt9rNrQYMYC3b1UQFBg@mail.gmail.com\/<\/a><\/li>\n<li>rpc.rigd man page:\u00a0<a href=\"http:\/\/www.manualpages.de\/FreeBSD\/FreeBSD-ports-9.0-RELEASE\/man8\/rpc.rigd.8.html\">http:\/\/www.manualpages.de\/FreeBSD\/FreeBSD-ports-9.0-RELEASE\/man8\/rpc.rigd.8.html<\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hamlib provides a linux command-line API for amateur radios. Installation On\u00a0Mac OS you can install using Mac Ports: sudo port install hamlib Usage Get a list of &#8220;rig numbers&#8221; for supported radios: rigctl -l Find available serial ports: ls \/dev\/tty.* Set the frequency to 7.2 MHz and mode to LSB on a Tentec Eagle transceiver: &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/reactivemusic.net\/?p=19402\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Hamlib and rigctl&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","footnotes":""},"categories":[332],"tags":[347,57],"class_list":["post-19402","post","type-post","status-publish","format-standard","hentry","category-radio-2","tag-development","tag-radio"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Hamlib and rigctl - reactive music<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/reactivemusic.net\/?p=19402\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Hamlib and rigctl - reactive music\" \/>\n<meta property=\"og:description\" content=\"Hamlib provides a linux command-line API for amateur radios. Installation On\u00a0Mac OS you can install using Mac Ports: sudo port install hamlib Usage Get a list of &#8220;rig numbers&#8221; for supported radios: rigctl -l Find available serial ports: ls \/dev\/tty.* Set the frequency to 7.2 MHz and mode to LSB on a Tentec Eagle transceiver: &hellip; Continue reading &quot;Hamlib and rigctl&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/reactivemusic.net\/?p=19402\" \/>\n<meta property=\"og:site_name\" content=\"reactive music\" \/>\n<meta property=\"article:published_time\" content=\"2015-12-22T02:38:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-01-26T22:27:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/reactivemusic.net\/wp-content\/uploads\/2015\/12\/Hamlib_design-300x147.png\" \/>\n<meta name=\"author\" content=\"Tom Zicarelli\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tom Zicarelli\" \/>\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\":\"Article\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=19402#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=19402\"},\"author\":{\"name\":\"Tom Zicarelli\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/#\\\/schema\\\/person\\\/56224d281582df7e5518e037ca63e571\"},\"headline\":\"Hamlib and rigctl\",\"datePublished\":\"2015-12-22T02:38:30+00:00\",\"dateModified\":\"2021-01-26T22:27:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=19402\"},\"wordCount\":374,\"image\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=19402#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/reactivemusic.net\\\/wp-content\\\/uploads\\\/2015\\\/12\\\/Hamlib_design-300x147.png\",\"keywords\":[\"development\",\"radio\"],\"articleSection\":[\"Radio\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=19402\",\"url\":\"https:\\\/\\\/reactivemusic.net\\\/?p=19402\",\"name\":\"Hamlib and rigctl - reactive music\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=19402#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=19402#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/reactivemusic.net\\\/wp-content\\\/uploads\\\/2015\\\/12\\\/Hamlib_design-300x147.png\",\"datePublished\":\"2015-12-22T02:38:30+00:00\",\"dateModified\":\"2021-01-26T22:27:28+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/#\\\/schema\\\/person\\\/56224d281582df7e5518e037ca63e571\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=19402#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/reactivemusic.net\\\/?p=19402\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=19402#primaryimage\",\"url\":\"https:\\\/\\\/reactivemusic.net\\\/wp-content\\\/uploads\\\/2015\\\/12\\\/Hamlib_design.png\",\"contentUrl\":\"https:\\\/\\\/reactivemusic.net\\\/wp-content\\\/uploads\\\/2015\\\/12\\\/Hamlib_design.png\",\"width\":400,\"height\":197},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=19402#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/reactivemusic.net\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Hamlib and rigctl\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/#website\",\"url\":\"https:\\\/\\\/reactivemusic.net\\\/\",\"name\":\"reactive music\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/reactivemusic.net\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/#\\\/schema\\\/person\\\/56224d281582df7e5518e037ca63e571\",\"name\":\"Tom Zicarelli\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0da58cf21a2707dd335b204b8ed3cd9194dcbf9d9814ac5d71195a65c76c8a72?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0da58cf21a2707dd335b204b8ed3cd9194dcbf9d9814ac5d71195a65c76c8a72?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0da58cf21a2707dd335b204b8ed3cd9194dcbf9d9814ac5d71195a65c76c8a72?s=96&d=mm&r=g\",\"caption\":\"Tom Zicarelli\"},\"sameAs\":[\"http:\\\/\\\/tomzicarelli.com\"],\"url\":\"https:\\\/\\\/reactivemusic.net\\\/?author=2\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Hamlib and rigctl - reactive music","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:\/\/reactivemusic.net\/?p=19402","og_locale":"en_US","og_type":"article","og_title":"Hamlib and rigctl - reactive music","og_description":"Hamlib provides a linux command-line API for amateur radios. Installation On\u00a0Mac OS you can install using Mac Ports: sudo port install hamlib Usage Get a list of &#8220;rig numbers&#8221; for supported radios: rigctl -l Find available serial ports: ls \/dev\/tty.* Set the frequency to 7.2 MHz and mode to LSB on a Tentec Eagle transceiver: &hellip; Continue reading \"Hamlib and rigctl\"","og_url":"https:\/\/reactivemusic.net\/?p=19402","og_site_name":"reactive music","article_published_time":"2015-12-22T02:38:30+00:00","article_modified_time":"2021-01-26T22:27:28+00:00","og_image":[{"url":"https:\/\/reactivemusic.net\/wp-content\/uploads\/2015\/12\/Hamlib_design-300x147.png","type":"","width":"","height":""}],"author":"Tom Zicarelli","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Tom Zicarelli","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/reactivemusic.net\/?p=19402#article","isPartOf":{"@id":"https:\/\/reactivemusic.net\/?p=19402"},"author":{"name":"Tom Zicarelli","@id":"https:\/\/reactivemusic.net\/#\/schema\/person\/56224d281582df7e5518e037ca63e571"},"headline":"Hamlib and rigctl","datePublished":"2015-12-22T02:38:30+00:00","dateModified":"2021-01-26T22:27:28+00:00","mainEntityOfPage":{"@id":"https:\/\/reactivemusic.net\/?p=19402"},"wordCount":374,"image":{"@id":"https:\/\/reactivemusic.net\/?p=19402#primaryimage"},"thumbnailUrl":"https:\/\/reactivemusic.net\/wp-content\/uploads\/2015\/12\/Hamlib_design-300x147.png","keywords":["development","radio"],"articleSection":["Radio"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/reactivemusic.net\/?p=19402","url":"https:\/\/reactivemusic.net\/?p=19402","name":"Hamlib and rigctl - reactive music","isPartOf":{"@id":"https:\/\/reactivemusic.net\/#website"},"primaryImageOfPage":{"@id":"https:\/\/reactivemusic.net\/?p=19402#primaryimage"},"image":{"@id":"https:\/\/reactivemusic.net\/?p=19402#primaryimage"},"thumbnailUrl":"https:\/\/reactivemusic.net\/wp-content\/uploads\/2015\/12\/Hamlib_design-300x147.png","datePublished":"2015-12-22T02:38:30+00:00","dateModified":"2021-01-26T22:27:28+00:00","author":{"@id":"https:\/\/reactivemusic.net\/#\/schema\/person\/56224d281582df7e5518e037ca63e571"},"breadcrumb":{"@id":"https:\/\/reactivemusic.net\/?p=19402#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/reactivemusic.net\/?p=19402"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/reactivemusic.net\/?p=19402#primaryimage","url":"https:\/\/reactivemusic.net\/wp-content\/uploads\/2015\/12\/Hamlib_design.png","contentUrl":"https:\/\/reactivemusic.net\/wp-content\/uploads\/2015\/12\/Hamlib_design.png","width":400,"height":197},{"@type":"BreadcrumbList","@id":"https:\/\/reactivemusic.net\/?p=19402#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/reactivemusic.net\/"},{"@type":"ListItem","position":2,"name":"Hamlib and rigctl"}]},{"@type":"WebSite","@id":"https:\/\/reactivemusic.net\/#website","url":"https:\/\/reactivemusic.net\/","name":"reactive music","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/reactivemusic.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/reactivemusic.net\/#\/schema\/person\/56224d281582df7e5518e037ca63e571","name":"Tom Zicarelli","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0da58cf21a2707dd335b204b8ed3cd9194dcbf9d9814ac5d71195a65c76c8a72?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0da58cf21a2707dd335b204b8ed3cd9194dcbf9d9814ac5d71195a65c76c8a72?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0da58cf21a2707dd335b204b8ed3cd9194dcbf9d9814ac5d71195a65c76c8a72?s=96&d=mm&r=g","caption":"Tom Zicarelli"},"sameAs":["http:\/\/tomzicarelli.com"],"url":"https:\/\/reactivemusic.net\/?author=2"}]}},"_links":{"self":[{"href":"https:\/\/reactivemusic.net\/index.php?rest_route=\/wp\/v2\/posts\/19402","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/reactivemusic.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/reactivemusic.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=19402"}],"version-history":[{"count":11,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=\/wp\/v2\/posts\/19402\/revisions"}],"predecessor-version":[{"id":19994,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=\/wp\/v2\/posts\/19402\/revisions\/19994"}],"wp:attachment":[{"href":"https:\/\/reactivemusic.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=19402"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=19402"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=19402"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}