{"id":20879,"date":"2024-01-16T19:01:26","date_gmt":"2024-01-17T00:01:26","guid":{"rendered":"https:\/\/reactivemusic.net\/?p=20879"},"modified":"2024-01-16T19:01:42","modified_gmt":"2024-01-17T00:01:42","slug":"hamlib-c-programming-example-on-mac-os","status":"publish","type":"post","link":"https:\/\/reactivemusic.net\/?p=20879","title":{"rendered":"Hamlib C programming example on Mac OS"},"content":{"rendered":"<p>Hamlib provides a standardized computer interface for amateur radios.<\/p>\n<p>I was able to get it to run in a C program on Mac OS Ventura.<\/p>\n<h3>Instructions<\/h3>\n<p>Install Hamlib using homebrew. ie,., brew install hamlib.<\/p>\n<p>Download this sample C test code &#8211; testrig.c &#8211; from\u00a0<a href=\"https:\/\/hamlib.sourceforge.net\/manuals\/1.2.15\/_2tests_2testrig_8c-example.html\">https:\/\/hamlib.sourceforge.net\/manuals\/1.2.15\/_2tests_2testrig_8c-example.html <\/a>or\u00a0<a href=\"https:\/\/github.com\/Hamlib\/Hamlib\/blob\/master\/tests\/testrig.c\">https:\/\/github.com\/Hamlib\/Hamlib\/blob\/master\/tests\/testrig.c<\/a><\/p>\n<p>Change the SERIAL_PORT constant to the actual port name. Change the baud rate.<\/p>\n<p>Lookup the hamlib code for your radio.\u00a0<a href=\"https:\/\/github.com\/Hamlib\/Hamlib\/wiki\/Supported-Radios\">https:\/\/github.com\/Hamlib\/Hamlib\/wiki\/Supported-Radios<\/a><\/p>\n<p>For example, for the Elecraft K3, the code is 2043.<\/p>\n<p>compile using this command:<\/p>\n<pre class=\"p1\"><span class=\"s1\">gcc testrig.c -I \/opt\/homebrew\/include -L \/opt\/homebrew\/lib -l hamlib -o testrig<\/span><\/pre>\n<p>Type this to run the program:<\/p>\n<pre>.\/testrig 2043<\/pre>\n<p>Assuming 2043 is the rig number. If all is working, the program will set a bunch of stuff on your radio, changing frequency, mode, etc.,<\/p>\n<p>Local files: tkzic\/chatgpt\/radio\/ctest.c<\/p>\n<p>notes: link to instructions for compiling hamlib manually:\u00a0<a href=\"https:\/\/github.com\/Hamlib\/Hamlib\/blob\/master\/README.osx\">https:\/\/github.com\/Hamlib\/Hamlib\/blob\/master\/README.osx<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hamlib provides a standardized computer interface for amateur radios. I was able to get it to run in a C program on Mac OS Ventura. Instructions Install Hamlib using homebrew. ie,., brew install hamlib. Download this sample C test code &#8211; testrig.c &#8211; from\u00a0https:\/\/hamlib.sourceforge.net\/manuals\/1.2.15\/_2tests_2testrig_8c-example.html or\u00a0https:\/\/github.com\/Hamlib\/Hamlib\/blob\/master\/tests\/testrig.c Change the SERIAL_PORT constant to the actual port name. Change &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/reactivemusic.net\/?p=20879\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Hamlib C programming example on Mac OS&#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":[230,332],"tags":[25,57],"class_list":["post-20879","post","type-post","status-publish","format-standard","hentry","category-development","category-radio-2","tag-programming","tag-radio"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Hamlib C programming example on Mac OS - 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=20879\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Hamlib C programming example on Mac OS - reactive music\" \/>\n<meta property=\"og:description\" content=\"Hamlib provides a standardized computer interface for amateur radios. I was able to get it to run in a C program on Mac OS Ventura. Instructions Install Hamlib using homebrew. ie,., brew install hamlib. Download this sample C test code &#8211; testrig.c &#8211; from\u00a0https:\/\/hamlib.sourceforge.net\/manuals\/1.2.15\/_2tests_2testrig_8c-example.html or\u00a0https:\/\/github.com\/Hamlib\/Hamlib\/blob\/master\/tests\/testrig.c Change the SERIAL_PORT constant to the actual port name. Change &hellip; Continue reading &quot;Hamlib C programming example on Mac OS&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/reactivemusic.net\/?p=20879\" \/>\n<meta property=\"og:site_name\" content=\"reactive music\" \/>\n<meta property=\"article:published_time\" content=\"2024-01-17T00:01:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-17T00:01:42+00:00\" \/>\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=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=20879#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=20879\"},\"author\":{\"name\":\"Tom Zicarelli\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/#\\\/schema\\\/person\\\/56224d281582df7e5518e037ca63e571\"},\"headline\":\"Hamlib C programming example on Mac OS\",\"datePublished\":\"2024-01-17T00:01:26+00:00\",\"dateModified\":\"2024-01-17T00:01:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=20879\"},\"wordCount\":167,\"keywords\":[\"programming\",\"radio\"],\"articleSection\":[\"development\",\"Radio\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=20879\",\"url\":\"https:\\\/\\\/reactivemusic.net\\\/?p=20879\",\"name\":\"Hamlib C programming example on Mac OS - reactive music\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/#website\"},\"datePublished\":\"2024-01-17T00:01:26+00:00\",\"dateModified\":\"2024-01-17T00:01:42+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/#\\\/schema\\\/person\\\/56224d281582df7e5518e037ca63e571\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=20879#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/reactivemusic.net\\\/?p=20879\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/reactivemusic.net\\\/?p=20879#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/reactivemusic.net\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Hamlib C programming example on Mac OS\"}]},{\"@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 C programming example on Mac OS - 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=20879","og_locale":"en_US","og_type":"article","og_title":"Hamlib C programming example on Mac OS - reactive music","og_description":"Hamlib provides a standardized computer interface for amateur radios. I was able to get it to run in a C program on Mac OS Ventura. Instructions Install Hamlib using homebrew. ie,., brew install hamlib. Download this sample C test code &#8211; testrig.c &#8211; from\u00a0https:\/\/hamlib.sourceforge.net\/manuals\/1.2.15\/_2tests_2testrig_8c-example.html or\u00a0https:\/\/github.com\/Hamlib\/Hamlib\/blob\/master\/tests\/testrig.c Change the SERIAL_PORT constant to the actual port name. Change &hellip; Continue reading \"Hamlib C programming example on Mac OS\"","og_url":"https:\/\/reactivemusic.net\/?p=20879","og_site_name":"reactive music","article_published_time":"2024-01-17T00:01:26+00:00","article_modified_time":"2024-01-17T00:01:42+00:00","author":"Tom Zicarelli","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Tom Zicarelli","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/reactivemusic.net\/?p=20879#article","isPartOf":{"@id":"https:\/\/reactivemusic.net\/?p=20879"},"author":{"name":"Tom Zicarelli","@id":"https:\/\/reactivemusic.net\/#\/schema\/person\/56224d281582df7e5518e037ca63e571"},"headline":"Hamlib C programming example on Mac OS","datePublished":"2024-01-17T00:01:26+00:00","dateModified":"2024-01-17T00:01:42+00:00","mainEntityOfPage":{"@id":"https:\/\/reactivemusic.net\/?p=20879"},"wordCount":167,"keywords":["programming","radio"],"articleSection":["development","Radio"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/reactivemusic.net\/?p=20879","url":"https:\/\/reactivemusic.net\/?p=20879","name":"Hamlib C programming example on Mac OS - reactive music","isPartOf":{"@id":"https:\/\/reactivemusic.net\/#website"},"datePublished":"2024-01-17T00:01:26+00:00","dateModified":"2024-01-17T00:01:42+00:00","author":{"@id":"https:\/\/reactivemusic.net\/#\/schema\/person\/56224d281582df7e5518e037ca63e571"},"breadcrumb":{"@id":"https:\/\/reactivemusic.net\/?p=20879#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/reactivemusic.net\/?p=20879"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/reactivemusic.net\/?p=20879#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/reactivemusic.net\/"},{"@type":"ListItem","position":2,"name":"Hamlib C programming example on Mac OS"}]},{"@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\/20879","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=20879"}],"version-history":[{"count":1,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=\/wp\/v2\/posts\/20879\/revisions"}],"predecessor-version":[{"id":20880,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=\/wp\/v2\/posts\/20879\/revisions\/20880"}],"wp:attachment":[{"href":"https:\/\/reactivemusic.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=20879"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=20879"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/reactivemusic.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=20879"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}