Skip to content

dh1tw/goHamlib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hamlib binding for Golang

Go Report Card Build Status Coverage Status

This is a golang binding for Hamlib. The binding has been hand written in order to provide a golang idiomatic API but staying also close as possible to hamlib's C API. Except of Hamlib (C), goHamlib has no other external dependencies.

goHamlib is compatible with both, Hamlib 1.2.x and 3.x.

You might also want to checkout gorigctl which is a drop-in replacement for hamlib's rigctl, although it comes with a cli GUI and a modern, open network interface (implementing the shackbus specification using protocol buffers and MQTT).

Implementation status

Currently, goHamlib covers about 80% of the hamlib API. Basically (the rarely used) Channel API is still missing.

Supported Platforms

goHamlib has been tested on the following platforms:

  • AMD64
  • i386
  • ARMv7 (e.g. Raspberry Pi 2)
  • ARMv8 (e.g. Raspberry Pi 3)

and the following operating Systems:

  • Linux (Ubuntu, Raspian, Armbian)
  • MacOS (Sierra)
  • Windows 10

License

This library is published under the permissive MIT license. Although please keep in mind that Hamlib is published under the LGPL license.

Installation & Compilation

goHamlib depends on Hamlib which can be either installed through your OS packet manager or easily build from source. If you want the latest patches and support for the latest rigs, you might want to compile the latest stable release or directly from the git repository.

Make sure that you have installed the latest release of Go and set the GOPATH environment variable.

Linux Dependencies

$ sudo apt-get install -y libhamlib2 libhamlib-dev

MacOS Dependencies

You can install the hamlib package through homebrew

$ brew install hamlib

Compilation

$ go get github.com/dh1tw/goHamlib

Tests

Most of goHamlib's API is unit tested. In order to execute the unit tests, run:

$ cd $GOPATH/src/github.com/dh1tw/goHamlib
$ go test

Documentation

goHamlib's API is documented at go.dev

Example

Checkout the dummyrig_test.go in this repository to see how to use goHamlib.