Skip to content

Commit

Permalink
added support for the gs232b protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
dh1tw committed Jan 28, 2024
1 parent 5537110 commit 7af858d
Show file tree
Hide file tree
Showing 8 changed files with 2,569 additions and 255 deletions.
40 changes: 20 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, pull_request]

jobs:
build_linux:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
matrix:
version: ['linux-arm', 'linux-386', 'linux-amd64', 'windows-386', 'windows-amd64']
Expand All @@ -27,14 +27,14 @@ jobs:
GOARCH: amd64
steps:
-
name: Set up Go 1.17
uses: actions/setup-go@v1
name: Set up Go 1.21
uses: actions/setup-go@v4
id: go
with:
go-version: 1.17
go-version: 1.21
-
name: Checkout source code
uses: actions/checkout@v1
uses: actions/checkout@v4
with:
submodules: true
-
Expand Down Expand Up @@ -85,14 +85,14 @@ jobs:
GOARCH: arm64
steps:
-
name: Set up Go 1.17
uses: actions/setup-go@v1
name: Set up Go 1.21
uses: actions/setup-go@v4
id: go
with:
go-version: 1.17
go-version: 1.21
-
name: Checkout source code
uses: actions/checkout@v1
uses: actions/checkout@v4
with:
submodules: true
-
Expand Down Expand Up @@ -132,17 +132,17 @@ jobs:
path: ./release

test_linux:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
-
name: Set up Go 1.17
uses: actions/setup-go@v1
name: Set up Go 1.21
uses: actions/setup-go@v4
id: go
with:
go-version: 1.17
go-version: 1.21
-
name: Checkout source code
uses: actions/checkout@v1
uses: actions/checkout@v4
with:
submodules: true
-
Expand Down Expand Up @@ -170,14 +170,14 @@ jobs:
# runs-on: macos-11.0
steps:
-
name: Set up Go 1.17
uses: actions/setup-go@v1
name: Set up Go 1.21
uses: actions/setup-go@v4
id: go
with:
go-version: 1.17
go-version: 1.21
-
name: Checkout source code
uses: actions/checkout@v1
uses: actions/checkout@v4
with:
submodules: true
-
Expand All @@ -196,7 +196,7 @@ jobs:
# A Github release is created whenever the git reference contains a tag, starting with 'v*' (e.g. v0.4.2)
# And the previous build jobs have been successful
create_release:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: [build_linux, build_macos, test_linux, test_macos]
if: startsWith(github.ref, 'refs/tags/v')
steps:
Expand Down Expand Up @@ -226,7 +226,7 @@ jobs:

# In this job we upload the release artifacts to the corresponding release
upload:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: create_release # release must be created before this job can start
strategy:
matrix:
Expand Down
19 changes: 9 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@ require (
github.com/asim/go-micro/plugins/registry/nats/v3 v3.0.0-20210416163442-a91d1f7a3dbb
github.com/asim/go-micro/plugins/transport/nats/v3 v3.0.0-20210416163442-a91d1f7a3dbb
github.com/asim/go-micro/v3 v3.5.2-0.20210425055400-b11a2f17e92c
github.com/dh1tw/nolistfs v0.1.0
github.com/golang/protobuf v1.5.2
github.com/gorilla/mux v1.8.0
github.com/gorilla/websocket v1.4.2
github.com/dh1tw/nolistfs v0.1.1
github.com/golang/protobuf v1.5.3
github.com/gorilla/mux v1.8.1
github.com/gorilla/websocket v1.5.1
github.com/micro/mdns v0.3.0
github.com/nats-io/nats.go v1.10.0
github.com/spf13/cobra v1.1.3
github.com/spf13/viper v1.7.1
github.com/nats-io/nats.go v1.32.0
github.com/spf13/cobra v1.8.0
github.com/spf13/viper v1.18.2
github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07
golang.org/x/net v0.7.0 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/protobuf v1.26.0
golang.org/x/net v0.20.0 // indirect
google.golang.org/protobuf v1.32.0
)
2,320 changes: 2,217 additions & 103 deletions go.sum

Large diffs are not rendered by default.

50 changes: 24 additions & 26 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,29 @@

[![Alt text](https://i.imgur.com/lcHhslZ.png "remoteRotator WebUI")](https://demo.rotator.shackbus.org)

remoteRotator is a command line application which makes your azimuth / elevation
antenna rotators available on the network. It available for Linux/Windows/MacOS and written in the programing language [Go](https://golang.org).
remoteRotator is a command line application that makes your azimuth / elevation antenna rotators available on the network.
It is available for Linux/Windows/MacOS and is written in the programming language [Go](https://golang.org).

To get a first impression, you're welcome to play with our public demo at [demo.rotator.shackbus.org](https://demo.rotator.shackbus.org).

**ADVICE**: This project is **under development**. The parameters and the ICD
are still **not stable** and subject to change until the first major version
has been reached.
## Supported Rotators

This is a list of rotator controllers which are known to work well with remoteRotator.
remoteRotator supports the following protocols:
- [Yaesu GS-232A](https://www.yaesu.com/downloadFile.cfm?FileID=820&FileCatID=155&FileName=GS232A.pdf&FileContentType=application%2Fpdf)
- [Yaesu GS-232B](https://www.passion-radio.com/index.php?controller=attachment&id_attachment=782)

- [Yaesu GS232A](http://www.yaesu.com/indexVS.cfm?cmd=DisplayProducts&ProdCatID=104&encProdID=79A89CEC477AA3B819EE02831F3FD5B8)
This is a list of rotator controllers that are known to work well with remoteRotator:
- [Yaesu Control Interfaces](https://www.yaesu.com/downloadFile.cfm?FileID=820&FileCatID=155&FileName=GS232A.pdf&FileContentType=application%2Fpdf)
- [K3NG Open Source Rotator Controller (implements Yaesu GS232A)](https://github.com/k3ng/k3ng_rotator_controller)
- [RemoteQTH Azimuth Rotator Interface (K3NG firmware)](https://remoteqth.com/single-rotator-interface.php)
- [EA4TX ARS (implements Yaesu GS232A)](https://ea4tx.com/en/)
- [ERC Easy-Rotator-Control (implements Yaesu GS232A)](https://www.schmidt-alba.de/eshop/)
- [CG Antenna RTC-200 (implements Yaesu GS232B)](https://www.cgantenna.be/product_rtc200.html)
- Dummy rotator (great for playing around with remoteRotator)

If your rotator controller is not supported, feel free to open an [issue](https://github.com/dh1tw/remoteRotator/issues).
It is relatively easy to add more rotator controllers / protocols.

## Supported Transportation Protocols

- [NATS](https://nats.io) (preferred)
Expand All @@ -49,7 +51,7 @@ You can download a tarball / zip archive with the compiled binary for
from the [releases](https://github.com/dh1tw/remoteRotator/releases) page.

remoteRotator works well on SoC boards like the Raspberry / Orange / Banana Pis.
The application is a self contained single executable.
The application is just a single executable.

## Dependencies

Expand Down Expand Up @@ -85,7 +87,7 @@ Use "remoteRotator [command] --help" for more information about a command.

So let's fire up a remoteRotator server for your rotator:

First, identify the serial port to which your rotator is connected. On Windows
First, identify the serial port to which your rotator is connected. On Windows,
this will be something like `COMx` (e.g. `COM3`), on Linux / MacOS it will be
a device in the `/dev/` folder (e.g. `/dev/ttyACM0`).

Expand All @@ -102,7 +104,7 @@ By default, the rotator will only be listening on the loopback adapter. In
order to make it available and discoverable on the local network, a network
connected adapter has to be selected.
remoteRotator supports access via TCP, emulating the Yaesu GS232 protocol
remoteRotator supports access via TCP, emulating the Yaesu GS232A protocol
(disabled by default) and through a web interface (HTTP + Websocket).
You can select the following rotator types:
Expand All @@ -115,9 +117,8 @@ remoteRotator allows to assign a series of meta data to a rotator:
3. Azimuth/Elevation maximum value
4. Azimuth Mechanical stop
These metadata enhance the rotators view (e.g. showing overlap) in the web
interface and can also help to limit for example the rotators range if it does
not support full 360°.
The metadata enriches the rotator representation in the web interface
for example by colorizing the rotator range or indicating the mechanical stop.
Usage:
remoteRotator server lan [flags]
Expand Down Expand Up @@ -164,9 +165,9 @@ no config file found
## Connecting via TCP / Telnet

If you have an application (e.g. [arsvcom](https://ea4tx.com/en/arsvcom/) or
[pstrotator](http://www.qsl.net/yo3dmu/index_Page346.htm)) which can talk to
[pstrotator](http://www.qsl.net/yo3dmu/index_Page346.htm)) that can talk to
a Yaesu compatible rotator, you can point that application to remoteRotator's
builtin TCP server (although disabled by default).
built-in TCP server (although disabled by default).

Let's start a dummy rotator instance on Linux and enable the build-in TCP
server:
Expand Down Expand Up @@ -216,13 +217,13 @@ You can specify the host and port in the settings above, or deactivate the
built-in webserver if you don't need it.

The red arrow indicates the heading of the rotator and the yellow arrow
indicates the preset value to which the rotator will turn to. The yellow arrow
indicates the preset value to which the rotator will turn. The yellow arrow
disappears when the desired direction has been reached.

The dotted red line indicates the mechanical stop of the rotator.
A green arc segment indicates a limited turning radius for this rotator.
A blue arc segment indicates the mechanical overlap supported by this rotator.
These indicators are just visual helpers and are configurable though command line
These indicators are just visual helpers and are configurable through command line
flags or in the config file.

## Web Interface (Aggregator)
Expand All @@ -243,7 +244,7 @@ or NATS. The discovery functionality doesn't require any configuration.

## Config file

The repository contains an example configuration file. By convention it is called
The repository contains an example configuration file. By convention, it is called
`.remoteRotator.[yaml|toml|json]` and is located by default either in the
home directory or the directory where the remoteRotator executable is located.
The format of the file can either be in
Expand All @@ -269,14 +270,14 @@ If an error occurs from which remoteRotator can not recover, the application
exits. This typically happens when the connection with the rotator has been
lost or if the rotator is not responding anymore.
It is recommended to execute remoteRotator as a service under the supervision
of a scheduler like [systemd](https://en.wikipedia.org/wiki/Systemd).
of a scheduler, like [systemd](https://en.wikipedia.org/wiki/Systemd).

## Bug reports, Questions & Pull Requests

Please use the Github [Issue tracker](https://github.com/dh1tw/remoteRotator/issues)
to report bugs and ask questions! If you would like to contribute to remoteRotator,
[pull requests](https://help.github.com/articles/creating-a-pull-request/) are
welcome! However please consider to provide unit tests with the PR to verify
welcome! However please consider providing unit tests with the PR to verify
the proper behavior.

If you file a bug report, please include always the version of remoteRotator
Expand All @@ -293,24 +294,21 @@ remoteRotator Version: v0.6.0, darwin/arm64, BuildDate: 2021-04-18T03:35:42+02:0

## Documentation

The auto generated documentation can be found at
The auto-generated documentation can be found at
[pkg.go.dev](https://pkg.go.dev/github.com/dh1tw/remoteRotator).

## How to build

In order to compile remoteRotator from the sources, you need to have
To compile remoteRotator from the sources, you need to have
[Go >= 1.16](https://golang.org) installed and configured.

It is assumed that the variables `$GOPATH` is set and that `$GOPATH\bin` is
added to your `$PATH` environment variable.

Install the dependencies if you haven't already

``` bash
$ sudo apt-get install git build-essential upx
```

This his how to download, prepare and compile remoteRotator under Linux/MacOS:
Download, prepare and compile remoteRotator under Linux/MacOS:

``` bash
$ mkdir -p $GOPATH/src/github.com/dh1tw && cd "$_"
Expand Down
8 changes: 0 additions & 8 deletions rotator/yaesu/concurrency_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,3 @@ func randomAccess(r *Yaesu, timeout time.Duration, c *apiCallCounter,
}
}
}

// input range 0...500
func randBool(v int) bool {
if v > 250 {
return true
}
return false
}
Loading

0 comments on commit 7af858d

Please sign in to comment.