Merge branch 'new_man_pages'

Hamlib-3.3
Nate Bargmann 2018-07-29 22:11:31 -05:00
commit 478a7a25c1
19 zmienionych plików z 2956 dodań i 3356 usunięć

Wyświetl plik

@ -2,13 +2,14 @@ EXTRA_DIST = hamlib.cfg index.doxygen hamlib.css footer.html \
Hamlib_design.eps Hamlib_design.png
dist_man_MANS = man1/rigctl.1 man1/rigctld.1 man1/rigmem.1 man1/rigsmtr.1 \
man1/rigswr.1 man1/rotctl.1 man1/rotctld.1
man1/rigswr.1 man1/rotctl.1 man1/rotctld.1 man7/hamlib.7 \
man7/hamlib-primer.7 man7/hamlib-utilities.7
htmldir = $(docdir)/html
dist_html_DATA = Hamlib_design.png hamlib.html
SRCDOCLST = ../src/rig.c ../src/rotator.c ../src/tones.c ../src/locator.c \
../src/event.c ../src/conf.c ../src/mem.c ../src/settings.c
../src/event.c ../src/conf.c ../src/mem.c ../src/settings.c
info_TEXINFOS = hamlib.texi
hamlib_TEXINFOS = nutshell.texi getting_started.texi utility_programs.texi \

Wyświetl plik

@ -0,0 +1,155 @@
Guidelines for updating and authoring new man pages.
Overview
========
The man pages are written in the roff formatting language. See roff(7) ("man
roff") for an overview. roff is implemented on modern Unix like systems by
groff (GNU roff) which is a suite of programs and macro definition files that
make up the roff system.
Documentation written in roff can be transformed into a number of formats for
final publication. For the Hamlib project, the output formats are the classic
man(1) format to a terminal screen, HTML, and PDF. While groff includes a
number of macro pacakges suitable for a variety of document styles, Hamlib
source files are written using the man(7) macro package. The layout of Hamlib
man pages generally follow the format specified in man-pages(7). The macros
used in the man pages format is specified in groff_man(7).
The use of mdoc from the BSD projects has been considered and may be used in
the future if the need arises. Conversely, the classic man macros are
reasonably well understood, fairly simple, easy to use, can be processed by a
wide range of tools, and fits the Hamlib philosophy of being as approachable
as possible. To be fair, mdoc is very comprehensive and would allow many more
formatting choices to be available for the various output formats. At some
point mdoc may well be the better choice.
The latest versions of the manual pages referenced above may be found at:
http://man7.org/linux/man-pages/dir_section_7.html
For information on mdoc, see:
http://mandoc.bsd.lv/
Recommended Practices
=====================
Sections
--------
The man pages are sorted into various sections depending on the part of the
system they document. For Hamlib, the man pages fall into one of three
categories. The placement is as follows:
Section Hamlib subject domain
1 Executables, rigctl, rotctl, etc.
3 Hamlib library constants and functions.
7 General Hamlib information.
Macros and escapes
------------------
The use of man macros to mark up the roff source files is strongly encouraged.
In some cases, the use of lower level troff font escapes, such as "\fBxxx\fP",
is required, but should be used sparingly. Such escapes are hard to read and
not all editors can highlight the escape correctly.
The default font for HTML and PDF is Roman (often Times Roman on the local
system) and rarely needs to be specified directly with the ".R" macro. Text
may be bolded using the ".B" macro or italicized using the ".I" macro. A set
of combination macros exist that combine alternating sequences of styled text
such as ".BR" for alternating Bold and Roman text.
In the OPTIONS and COMMANDS sections of the utility pages there are complex
constructs of the form of:
.BR M ", " set_mode " \(aq" \fIMode\fP "\(aq \(aq" \fIPassband\fP \(aq
The result is that the command strings will be in Bold, the punctuation will
be in Roman, and the names of the variables will be in Italics using the low
level troff font escapes. Quoted strings are required to ensure spacing
between items as the ".BR" macro uses (and other combination macros) spaces to
separate its arguments. As you can see, the font escapes are hard to read as
they must be run up tight against the text.
Special symbols such as copyright or trademark glyphs and styled quotation
marks do require roff escapes inlined with the text. Several such escapes
can be found in the Hamlib roff source files:
Escape Description
\(aq ASCII single quote
\(oq Styled opening single quote
\(cq Styled closing single quote
\(lq Styled opening double quote
\(rq Styled closing double quote
\(co Copyright symbol
Besides the macros documented in man(7), the following troff macros are used
in the Hamlib man pages:
Macro Description
.br Line break (analogous to '\n' in C)
.sp Line break plus an additional blank line
.nf Do not justify following text (encloses the .MT block)
.fi Resume justification
Structure
---------
In addition to the standard man page sections of NAME, SYNPOPSIS, etc., the
Hamlib utility (section 1) man pages add the sections COMMANDS, READLINE,
PROTOCOL, DIAGNOSTICS, COPYRIGHT, and COLOPHON depending on the individual
utility.
Layout Tips
===========
Keep in mind that roff documents are most often processed in a single pass,
i.e. the document processor reads the file from top to bottom and formats the
text per the macros and escapes found along the way. Anything that is not a
macro or an escape gets rendered into the output file and that includes blank
lines. As a result, best practice is to not include blank lines in the
running text. Instead use the ".PP" or ".IP" macros to indicate a paragraph
or an indented paragraph break. To provide vertical spac between elements of
the source document, a single '.' on a line will be discarded by the document
processor. This provides a way to visually separate paragraphs and headings.
Note: While the man macro package recognizes ".LP" and ".P" as synonyms for
".PP", some tools may only recognize ".PP". One such tool is the older
'man2html' converter.
Blank lines may be included as part of an example block placed between the
".EX" and ".EE" macros. Lines between these macros are rendered in HTML and
PDF as blocks of constant width text and should be verbatim input or output
from the shell, programs, or blocks of source code.
Examples should be indented from the blocks of text. The ".RS 0.5i" macro is
used for indentation of normal text blocks while ".RS 1.0i" is used for
indented text blocks, such as a block indented using the ".TP" macro. For
each case the indented block must be followed by the ".RE" macro to return the
next block of text to the normal indentation level.
Normal section headings use the ".SH" macro which provides for vertical space
between the previous text and the heading and also begins the next block of
running text. All text blocks must follow a heading. Headings are normally
composed of one word in all capital letters.
Sub-headings use the ".SS" macro which provides vertical space above the
previous block of text and indents the sub-heading to about half the distance
from the left margin and the block of text that follows. Only one level of
sub-headings is provided.
Getting Help
============
If something is unclear on how to format a new or updated man page, simply
post your question to the mailing list:
hamlib-developer@lists.sourceforge.net
73!

Wyświetl plik

@ -1,13 +1,13 @@
There are several ways to obtain a working installation of Hamlib. In
the following sections discuss installing from a package manager,
building from source, and installing Hamlib project supplied binaries on
Microsoft Windows@registeredsymbol{}.
There are several ways to obtain a working installation of Hamlib.
The following sections discuss installing from a package manager,
building from source, and installing Hamlib project supplied binaries
on Microsoft Windows@registeredsymbol{}.
@menu
* Unix binary packages::
* Source options::
* Building from source::
* MS Windows 32 binaries::
* Microsft Windows binaries::
@end menu
@node Unix binary packages
@ -31,17 +31,17 @@ the documentation for your chosen distribution be your guide.
Distribution packages are most often official Hamlib releases and in
some cases could be quite old and lacking support for newer radios or
rotors. In some cases support is improved in existing radio or rotor
back ends and bugs are fixed in newer releases. Often times to get
the improved support/bug fixes, building from source will be required.
Relax, it's not hard. :-)
rotators. In some cases support is improved in existing radio or
rotator back ends and bugs are fixed in newer releases. Often times
to get the improved support/bug fixes, building from source will be
required. Relax, it's not hard. :-)
Source code is available as official releases, testing snapshots,
daily development snapshots, and the bleeding edge of development
directly from the @url{http://git-scm.com/, Git} repository. As a
rule, even the bleeding edge tarballs should configure and compile
without error even though certain implementation work may be in
progress and may be incomplete or have errors.
directly from the @url{https://github.com/Hamlib/Hamlib, Git
repository}. As a rule, even the bleeding edge tarballs should
configure and compile without error even though certain implementation
work may be in progress and may be incomplete or have errors.
@menu
* Source releases::
@ -56,9 +56,12 @@ progress and may be incomplete or have errors.
@cindex Source, obtaining releases
Official Hamlib source releases, commonly called @dfn{tarballs} can be
found on the @url{http://sourceforge.net/projects/hamlib/files/hamlib/,
SourceForge.net Hamlib files} Web page. The most recent release is
listed first.
found on the
@url{http://sourceforge.net/projects/hamlib/files/hamlib/,
SourceForge.net Hamlib files} Web page. As a convenience, release
archives are also mirrored at the
@url{https://github.com/Hamlib/Hamlib/releases, GitHub Hamlib
releases} page. The most recent release is listed first.
@node Source snapshots
@subsection Getting source snapshots
@ -66,20 +69,25 @@ listed first.
@cindex Source, getting snapshots
@cindex Source, obtaining snapshots
@cindex Source, daily snapshots
@cindex Source, release candidates
@cindex Source, RC
Testing release candidates and daily snapshots of the development
repository are available via the World Wide Web from
@url{http://n0nb.users.sourceforge.net/, Hamlib Git daily snapshots}.
These are not official releases but are provided for testing new
features and bug fixes.
Testing release candidates (RCs) are posted during the period (often a
few weeks) before a planned release. Beginning with the 3.2 release,
RCs are hosted by the @url{https://github.com/Hamlib/Hamlib/releases,
GitHub release archive}. RCs are identifed by having a @i{~rc}
suffix.
Testing release snapshots are only posted for a few weeks before a
planned release. The daily development snapshot is made and posted
each day by around 1030 UTC. Daily snapshots @i{should} compile but
sometimes a bug creeps in that prevents compilation. If that should
happen, please report it to the
@email{hamlib-developer@@lists.sourceforge.net, hamlib-developer
mailing list}.
Daily snapshots of the development repository are available via the
World Wide Web from @url{http://n0nb.users.sourceforge.net/, Hamlib
Git daily snapshots}. These are not official releases but are
provided for testing new features and bug fixes.
The daily development snapshot is made and posted each day by around
1030 UTC. Daily snapshots @i{should} compile but sometimes a bug
creeps in that prevents compilation. If that should happen, please
report it to the @email{hamlib-developer@@lists.sourceforge.net,
hamlib-developer mailing list}.
@node Git clone
@subsection Git repository
@ -102,6 +110,12 @@ To clone the repository use the following command:
git clone git://git.code.sf.net/p/hamlib/code hamlib
@end example
or:
@example
git clone https://github.com/Hamlib/Hamlib.git
@end example
Odds are that you will want to run the above command in a sub
directory of your home directory. The @file{hamlib} directory will be
created by Git and the @dfn{master} branch will be checked out for you
@ -120,13 +134,13 @@ repository.
@cindex Source, building from
Building from source will be required for various reasons. Perhaps
only an older release is provided by your distribution, or you'd like
to test recent changes to Hamlib---either a specific back end or API
changes---and offer a report to the developers, or you'd like to take
part in development and offer your contribution to the project, or
you'd just like to learn how to build a relatively comprehensive
only an older release is provided by your distribution, or you would
like to test recent changes to Hamlib---either a specific back end or
API changes---and offer a report to the developers, or you'd like to
take part in development and offer your contribution to the project,
or you'd just like to learn how to build a relatively comprehensive
package from source. Any is a good reason to build from the source
code.
code archive.
Before going further, this manual assumes familiarity with working
from the command prompt in a Linux/BSD/Unix like system's @dfn{shell}
@ -150,7 +164,7 @@ Let's get started.
* Other make targets::
* Parallel build trees::
* Adding debugging symbols::
* Compiling MS Windows 32::
* Compiling Microsoft Windows::
@end menu
@node Compiling source tarballs
@ -161,16 +175,16 @@ Let's get started.
Before proceeding, it is essential to read the information in the
files, @file{README}, @file{INSTALL}, and @file{README.betatester}
supplied in the Hamlib @dfn{top-level} directory which will be named
something like @file{hamlib-3.0~git} where the latter part is
the release version. In this case the @samp{3.0~git} indicates this is
a development snapshot of the Git master branch. These files
provide detailed information for compiling Hamlib and will vary some
from release to release.
something like @file{hamlib-3.3~git} where the latter part is the
release version. In this case the @samp{3.3~git} indicates this is a
development snapshot of the Git master branch. These files provide
detailed information for compiling Hamlib and will vary some from
release to release.
Compiling from a source tarball whether it is an official release or
a testing or daily development snapshot follows the same set of commands,
known as the @dfn{three step} which are each run from the top-level
directory:
Compiling from a source tarball whether it is an official release or a
testing or daily development snapshot follows the same set of
commands, known as the @dfn{three step} which are each run from the
top-level directory:
@example
./configure
@ -192,7 +206,7 @@ sudo make install
The @command{./configure} command examines your system and checks it
for any packages that are required or good to have options for
compiling Hamlib. The leading @file{./} tells the shell to only run
the @command{configure} command found in the current directory. It's
the @command{configure} command found in the current directory. It is
always possible that a @command{configure} command could be lurking
elsewhere and we don't want to run that!
@ -216,9 +230,9 @@ LinuxCommand.org reference above.
@end quotation
Of course, things are usually complicated a bit by options and Hamlib
is no exception. The good news is that the defaults, i.e. no options,
work well in most situations. Options are needed to enable the
compilation of certain portions of Hamlib such as the language
is no exception. The good news is that the defaults, i.e., no
options, work well in most situations. Options are needed to enable
the compilation of certain portions of Hamlib such as the language
bindings. Optional features usually require that more development
tools are installed. The @file{INSTALL}, and @file{README.betatester}
files in the Hamlib top-level directory will have details on the
@ -249,16 +263,20 @@ exist during installation as will several other directories in it.
Installing in your home directory means that @dfn{root}, or superuser
(administrator) privileges are not required when running @command{make
install}. On the other hand, some extra work will need to be done so
other programs can use the library. (TODO: describe this in an
appendix).
other programs can use the library.
@ignore
(TODO: describe library hackery in an appendix).
@end ignore
Another useful option is @samp{--help} which will give a few screens
full of options for @command{configure}. If in a desktop environment
the scroll bar can be used to scroll back up through the output. In
either a terminal or a virtual console Linux supports the
@key{Shift-PageUp} key combination to scroll back up. As luck would
have it, @key{Shift-PageDown} can be used to scroll down toward the
end of the output and the shell prompt.
@key{Shift-PageUp} key combination to scroll back up. Converesely
@key{Shift-PageDown} can be used to scroll down toward the end of the
output and the shell prompt (Shift-UpArrow/Shift-DownArrow may also
work to scroll one line at a time).
After a fair amount of time, depending on your computer, and a lot of
screen output, @command{configure} will finish its job. So long as
@ -349,19 +367,9 @@ as root from any directory.
@quotation Note
Subsequent installations of Hamlib will not need to have
@command{ldconfig} run after each installation so long as no new
backend libraries nor a newer major version of Hamlib were installed.
A developer adding a new backend (see @file{README.developer}) will
need to run @command{ldconfig} for the new back end library to be
found by the library loader (this refers a new back end, i.e. a
sibling to the existing Icom, Kenwood, Yaesu, etc.@: back ends, not a
new model in an existing back end).
Likewise, any time a new back end appears in a source tarball,
@command{ldconfig} will need to be run for the library loader to find
it. There is no harm running @command{ldconfig} after each run of
@command{make install}.
@command{ldconfig} run after each installation if a newer major
version of Hamlib was not installed, i.e. when recompiling the same
version during development.
@end quotation
On some distributions a bit of configuration will be needed before
@ -425,7 +433,10 @@ To remove even the generated @file{Makefile}s, run @command{make
distclean} from the top-level directory. After this target is run,
@command{configure} will need to be run again to regenerate the
@file{Makefile}s. This command may not be as useful as the
@file{Makefile}s do not take up much space.
@file{Makefile}s do not take up much space, however it can be useful
for rebuilding the @file{Makefile}s when modifying a
@file{Makefile.am} or @file{confgure.ac} during build system
development.
@node Parallel build trees
@subsection Parallel build trees
@ -458,16 +469,14 @@ Run:
@command{../hamlib/configure CFLAGS="-ggdb3 -O0" CXXFLAGS="-ggdb3 -O0"}
@end example
from a build directory intended for a debugging build.
from a sibling build directory intended for a debugging build.
The @samp{-ggdb3} option tells the C compiler, this case the GNU C
Compiler, @command{gcc}, to add special symbols useful for
@command{gdb}. The @samp{-O0} option tells @command{gcc} to turn off
Compiler, @command{gcc}, to add special symbols useful for GDB, the
GNU debugger. The @samp{-O0} option tells @command{gcc} to turn off
all optimizations which will make it easier to follow some variables
that might otherwise be optimized away. @samp{CFLAGS} and
@samp{CXXFLAGS} may be set independently for each compiler (sadly, a
bug in the build system source file in Hamlib 1.2.15.3 and earlier did
not preserve @samp{CXXFLAGS}).
@samp{CXXFLAGS} may be set independently for each compiler.
@quotation Note
There are a number compiler options available for controlling debugging
@ -475,13 +484,13 @@ symbols and setting optimization levels. Please consult the compiler's
manual for all the details.
@end quotation
@node Compiling MS Windows 32
@subsection Compiling for MS Windows 32 bit architectures
@cindex Compiling for MS Windows 32
@cindex MS Windows 32, compiling
@node Compiling Microsoft Windows
@subsection Compiling for Microsoft Windows
@cindex Compiling for Microsoft Windows
@cindex Microsoft Windows, compiling
Currently compiling is done on a Debian 8 (Jessie) virtual machine
using @url{http://www.mingw.org/, MinGW32}. @file{README.build-win32}
using @url{http://www.mingw.org/, MinGW}. @file{README.build-win32}
in the @file{scripts} directory has details on how this is
accomplished.
@ -489,23 +498,28 @@ Work is ongoing to correct build issues in the
@url{http://www.cygwin.com/, Cygwin} environment running on MS
Windows.
@node MS Windows 32 binaries
@section Pre-compiled binaries for MS Windows 32 bit architectures
@cindex Pre-compiled binaries for MS Windows 32
@cindex MS Windows 32, compiled binaries
@cindex MS Windows 32, pre-compiled binaries
@node Microsft Windows binaries
@section Pre-compiled binaries for Microsoft Windows
@cindex Pre-compiled binaries for Microsoft Windows
@cindex Microsoft Windows, compiled binaries
@cindex Microsoft Windows, pre-compiled binaries
Pre-compiled binaries for MS Windows 32 bit architectures (Windows NT
and newer) are available for both official releases and daily
development snapshots. Official releases are available through the
Pre-compiled binaries for Microsoft Windows 32 and 64 bit
architectures (Windows NT and newer) are available for both official
releases and daily development snapshots. Official releases are
available through the
@url{http://sourceforge.net/projects/hamlib/files/hamlib/,
SourceForge.net file download service}. Daily development snapshots
are available from @url{http://n0nb.users.sourceforge.net/}.
SourceForge.net file download service}. As an alternative, official
releases are also available though the
@url{https://github.com/Hamlib/Hamlib/releases, Hamlib archive at
GitHub}. Daily development snapshots are available from
@url{http://n0nb.users.sourceforge.net/}.
Beginning with the Hamlib 1.2.15.3 release a self-extracting installer
is available. Among its features are selecting which portions of
Hamlib are installed. The @env{PATH} environment variable will need
to be set manually per the included @file{README.win32-bin} file.
to be set manually per the included @file{README.w32-bin} or
@file{README.w64-bin} file.
Daily development snapshots feature both a .ZIP archive and the self
extracting installer.

Wyświetl plik

@ -12,7 +12,7 @@ updated @value{UPDATED}), which is a development effort to provide a
consistent programming interface for programmers wanting to incorporate
radio and rotor control into their programs.
Copyright @copyright{} 2013 Nate Bargmann
Copyright @copyright{} 2013,2018 Nate Bargmann
@quotation
Permission is granted to copy, distribute and/or modify this document under

Wyświetl plik

@ -39,7 +39,7 @@ from the command line only.
.
.PP
Keep in mind that Hamlib is BETA level software. While a lot of backend
libraries lack complete rig support, the basic functions are usually well
libraries lack complete radio support, the basic functions are usually well
supported.
.
.PP
@ -84,15 +84,15 @@ Set radio serial speed to
.I baud
rate.
.IP
Uses maximum serial speed from rig backend capabilities as the default.
Uses maximum serial speed from radio backend capabilities as the default.
.
.TP
.BR \-c ", " \-\-civaddr = \fIid\fP
Use
.I id
as the CI-V address to communicate with the rig.
as the CI-V address to communicate with the radio.
.IP
Only useful for Icom and some Ten-Tec rigs.
Only useful for Icom and some Ten-Tec radios.
.IP
.BR Note :
The
@ -243,7 +243,7 @@ if an error was returned by
.B 3
the
.B Hamlib
backend has no memory support implemented and/or the rig has no memory access
backend has no memory support implemented and/or the radio has no memory access
available.
.
.

Wyświetl plik

@ -35,7 +35,7 @@ rigsmtr \- measure S-Meter vs azimuth using Hamlib
.B rigsmtr
uses
.B Hamlib
to control a rig to measure S-Meter value versus antenna azimuth.
to control a radio to measure S-Meter value versus antenna azimuth.
.
.PP
It rotates the antenna from minimum azimuth to maximum azimuth.
@ -46,12 +46,13 @@ and the corresponding S-Meter level in dB relative to S9 are then printed on
.BR stdout .
.
.PP
To work correctly, rigsmtr needs a rig that could measure S-Meter and a Hamlib
backend that is able to retrieve it, connected to a Hamlib supported rotator.
To work correctly, rigsmtr needs a radio that could measure S-Meter and a
Hamlib backend that is able to retrieve it, connected to a Hamlib supported
rotator.
.
.PP
Keep in mind that Hamlib is BETA level software. While a lot of backend
libraries lack complete rig support, the basic functions are usually well
libraries lack complete radio support, the basic functions are usually well
supported.
.
.PP
@ -96,15 +97,15 @@ Set radio serial speed to
.I baud
rate.
.IP
Uses maximum serial speed from rig backend capabilities as the default.
Uses maximum serial speed from radio backend capabilities as the default.
.
.TP
.BR \-c ", " \-\-civaddr = \fIid\fP
Use
.I id
as the CI-V address to communicate with the rig.
as the CI-V address to communicate with the radio.
.IP
Only useful for Icom and some Ten-Tec rigs.
Only useful for Icom and some Ten-Tec radios.
.IP
.BR Note :
The
@ -231,7 +232,7 @@ if an error was returned by
.
.TP
.B 3
if the rig doesn't have the required capabilities.
if the radio doesn't have the required capabilities.
.
.
.SH EXAMPLE

Wyświetl plik

@ -75,7 +75,7 @@ needs a radio that can measure VSWR and a
backend that supports reading VSWR from the radio.
.PP
Keep in mind that Hamlib is BETA level software. While a lot of backend
libraries lack complete rig support, the basic functions are usually well
libraries lack complete radio support, the basic functions are usually well
supported.
.
.PP
@ -120,14 +120,14 @@ Set radio serial speed to
.I baud
rate.
.IP
Uses maximum serial speed from rig backend capabilities as the default.
Uses maximum serial speed from radio backend capabilities as the default.
.TP
.BR \-c ", " \-\-civaddr = \fIid\fP
Use
.I id
as the CI-V address to communicate with the rig.
as the CI-V address to communicate with the radio.
.IP
Only useful for Icom and some Ten-Tec rigs.
Only useful for Icom and some Ten-Tec radios.
.IP
.BR Note :
The

Wyświetl plik

@ -0,0 +1,838 @@
.\" Hey, EMACS: -*- nroff -*-
.\"
.\" For layout and available macros, see man(7), man-pages(7), groff_man(7)
.\" Please adjust the date whenever revising the manpage.
.\"
.\" Please keep this file in sync with doc/getting_started.texi
.\"
.TH HAMLIB-PRIMER "7" "2018-05-27" "Hamlib" "Hamlib Information Manual"
.
.
.SH NAME
.
hamlib-primer \- compiling and using the radio and rotator control library
.
.
.SH DESCRIPTION
.
There are several ways to obtain a working installation of Hamlib.
.
The following sections discuss installing from a package manager, building
from source, and installing Hamlib project supplied binaries on Microsoft
Windows\*R.
.
.
.SS Installing binary packages on Linux and BSD
.
The easiest way to install a released version of Hamlib on a Linux based
distribution or a BSD variant is through the provided
.IR "package manager" .
.
While package managers vary according to the distribution (it's easy to lump
BSD variants in this group too) their end goal is to provide ready to use
software packages.
.
Since such a wide variety of package managers exist, it is best to recommend
that the documentation for your chosen distribution be your guide.
.
.
.SS A variety of Hamlib sources
.
Distribution packages are most often official Hamlib releases and in some
cases could be quite old and lacking support for newer radios or rotators.
.
In some cases support is improved in existing radio or rotator back ends and
bugs are fixed in newer releases.
.
Often times to get the improved support/bug fixes, building from source will
be required.
.
Relax, it's not hard. :-)
.
.PP
Source code is available as official releases, testing snapshots, daily
development snapshots, and the bleeding edge of development directly from the
.UR https://github.com/Hamlib/Hamlib
Git repository
.UE .
.
As a rule, even the bleeding edge tarballs should configure and compile
without error even though certain implementation work may be in progress and
may be incomplete or have errors.
.
.
.SS Getting released source
.
.
Official Hamlib source releases, commonly called
.I tarballs
can be
found on the
.UR http://sourceforge.net/projects/hamlib/files/hamlib/
SourceForge.net Hamlib files
.UE
Web page.
.
As a convenience, release archives are also mirrored at the
.UR https://github.com/Hamlib/Hamlib/releases
GitHub Hamlib releases
.UE
page.
.
The most recent release is listed first.
.
.
.SS Getting source snapshots
.
Testing release candidates (RCs) are posted during the period (often a few
weeks) before a planned release.
.
Beginning with the 3.2 release, RCs are hosted by the
.UR https://github.com/Hamlib/Hamlib/releases
GitHub release archive
.UE .
.
RCs are identifed by having a
.I ~rc
suffix.
.
.PP
Daily snapshots of the development repository are available via the World Wide
Web from
.UR http://n0nb.users.sourceforge.net/
Hamlib Git daily snapshots
.UE .
.
These are not official releases but are provided for testing new features and
bug fixes.
.
.PP
The daily development snapshot is made and posted each day by around 1030 UTC.
.
Daily snapshots
.I should
compile but sometimes a bug creeps in that prevents compilation.
.
If that should happen, please report it to the
.MT hamlib-developer@@lists.sourceforge.net
hamlib-developer mailing list
.ME .
.
.
.SS Git repository
.
The source repository can be
.I cloned
which copies the repository to your computer including its entire history,
branches, and release tag information.
.
In other words, once the
.BR git "(1) " clone
command is finished a complete copy of the Hamlib development will be on your
computer.
.
You can do quite a lot with this as nothing is hidden from view since the
entire history of Hamlib is right there all the way from the very first commit
to the present.
.
None of the meta-data is hidden away on some central server.
.
.PP
To clone the repository use the following command:
.
.sp
.RS 0.5i
.EX
git clone https://git.code.sf.net/p/hamlib/code hamlib
.EE
.RE
.
.PP
or:
.sp
.RS 0.5i
.EX
git clone https://github.com/Hamlib/Hamlib.git
.EE
.RE
.
.PP
.
Odds are that you will want to run the above command in a sub directory of
your home directory.
.
The
.I hamlib
directory will be created by Git and the
.I master
branch will be checked out for you as the
.IR "working copy" .
.
The master branch is one of several branches used in Hamlib development.
.
It is the main branch of new features and bug fixes.
.
The working copy will be the latest revision of every file at the time of the
clone.
.
Later updates from the developers will require using another Git command to
update your local repository.
.
.
.SS Building from source
.
Building from source will be required for various reasons.
.
Perhaps only an older release is provided by your distribution, or you would like
to test recent changes to Hamlib\(emeither a specific back end or API
changes\(emand offer a report to the developers, or you would like to take part in
development and offer your contribution to the project, or you would just like to
learn how to build a relatively comprehensive package from source.
.
Any is a good reason to build from the source code archive.
.
.PP
Before going further, this manual assumes familiarity with working from the
command prompt in a Linux/BSD/Unix like system's
.I shell
environment, either in a
.I virtual console
(a text only screen with no graphics) or in a
.I terminal
in a desktop environment
.RB ( xterm ,
.BR rxvt ,
.BR konsole ,
.BR gnome\-terminal ,
.BR xfce4\-terminal ,
.BR terminal ,
etc.).
.
If this is new to you, take some time and read up on using the shell.
.
A good tutorial can be found at
.UR http://linuxcommand.org/
LinuxCommand.org
.UE
which also offers an in-depth book that can be purchased or downloaded for no
cost (the Hamlib project is not associated with nor has any interest in the
sale of this book, it just looks like a very good effort on the part of its
author).
.
.PP
Let's get started.
.
.
.SS Compiling source tarballs
.
Before proceeding, it is essential to read the information in the files,
.IR README ,
.IR INSTALL ,
and
.I README.betatester
supplied in the Hamlib
.I top-level
directory which will be named
something like
.I hamlib-3.3~git
where the latter part is the release version.
.
In this case the
.I 3.3~git
indicates this is a development snapshot of the Git master branch.
.
These files provide detailed information for compiling Hamlib and will vary
some from release to release.
.
.PP
Compiling from a source tarball whether it is an official release or a testing
or daily development snapshot follows the same set of commands, known as the
.I three step
which are each run from the top-level directory:
.
.sp
.RS 0.5i
.EX
\&./configure
make
sudo make install
.EE
.RE
.
.SS configure
.
The
.IB ./ configure
command examines your system and checks it for any packages that are required
or good to have options for compiling Hamlib.
.
The leading
.I ./
tells the shell to only run the
.B configure
command found in the current directory.
.
It is always possible that a
.B configure
command could be lurking elsewhere and we don't want to run that!
.
.PP
Run:
.
.sp
.RS 0.5i
.EX
\&./configure
.EE
.RE
.
.PP
from the top-level directory.
.
.IP
.BR Note :
Some distributions are configured so commands can only be run from directories
listed in the
.B PATH
environment variable.
.
The
.I ./
is necessary or the
.B configure
command will not be run as the
.I current directory
(defined as
.IR . )
is not in the
.BR PATH .
.
This is considered a default security feature so that only programs provided
by the distribution are run.
.
.B PATH
can be modified for your own session, but that is a topic for the
LinuxCommand.org reference above.
.
.PP
Of course, things are usually complicated a bit by options and Hamlib is no
exception.
.
The good news is that the defaults, i.e., no options, work well in most
situations.
.
Options are needed to enable the compilation of certain portions of Hamlib
such as the language bindings.
.
Optional features usually require that more development tools are installed.
.
The
.I INSTALL
and
.I README.betatester
files in the Hamlib top-level directory will have details on the options
available for that release.
.
.PP
A useful option is
.B \-\-prefix
which tells
.B configure
where in the file system hierarchy Hamlib should be installed.
.
If it is not given, Hamlib will be installed in the
.I /usr/local
file system hierarchy.
.
Perhaps you want to install to your home directory instead:
.
.sp
.RS 0.5i
.EX
\&./configure \-\-prefix=$HOME/local
.EE
.RE
.
.IP
.BR Note :
For practice you may wish to start out using the
.BR \-\-prefix = \fI$HOME/local\fP
option to install the Hamlib files into your home directory and avoid
overwriting any version of Hamlib installed into the system directories.
.
The code examples in the remainder of this manual will assume Hamlib has been
installed to
.IR $HOME/local .
.
.PP
All of the files will be installed in the
.I local
directory of your home directory.
.
.I local
will be created if it does not exist during installation as will several other
directories in it.
.
Installing in your home directory means that
.IR root ,
or superuser (administrator) privileges are not required when running
.BR "make install" .
.
On the other hand, some extra work will need to be done so other programs can
use the library.
.
.\" (TODO: describe library hackery in an appendix).
.
.PP
Another useful option is
.B \-\-help
which will give a few screens full of options for
.BR configure .
.
If in a desktop environment the scroll bar can be used to scroll back up
through the output.
.
In either a terminal or a virtual console Linux supports the Shift\-PageUp key
combination to scroll back up.
.
Conversely, Shift\-PageDown can be used to scroll down toward the end of the
output and the shell prompt (Shift\-UpArrow/Shift\-DownArrow may also work to
scroll one line at a time).
.
.PP
After a fair amount of time, depending on your computer, and a lot of screen
output,
.B configure
will finish its job.
.
So long as the few lines previous to the shell prompt don't say \(lqerror\(rq
or some such failure message Hamlib is ready to be compiled.
.
If there is an error and all of the required packages listed in
.I README.betatester
have been installed, please ask for help on the
.MT hamlib\-developer@@lists.sourceforge.net
hamlib-developer mailing list
.ME .
.
.
.SS make
.
The
.BR make (1)
command is responsible for running the
.I compiler
which reads the source files and from the instructions it finds in them writes
.I object
files which are the binary instructions the CPU of a computer can execute.
.
.B make
then calls the
.I linker
which puts the object files together in the correct order to create the Hamlib
library files and its executable programs.
.
.PP
Run:
.
.sp
.RS 0.5i
.EX
make
.EE
.RE
.
.PP
from the top-level directory.
.
.PP
Any error that causes
.B make
to stop early is cause for a question to the
.MT hamlib\-developer@@lists.sourceforge.net
hamlib-developer mailing list
.ME .
.
.PP
In general
.B make
will take longer than
.B configure
to complete its run.
.
As it is a system command, and therefore found in the
.BR PATH ,
prefixing
.B make
with
.I ./
will cause a \(lqcommand not found\(rq error from the shell.
.
.
.SS make install
.
Assuming that you have not set the installation prefix to your home directory,
root (administrator) privileges will be required to install Hamlib to the
system directories.
.
Two popular methods exist for gaining root privileges,
.BR su (1)
and
.BR sudo (8).
.
.B sudo
is probably the most popular these days, particularly when using the
.UR http://www.ubuntu.com
Ubuntu
.UE
family of distributions.
.
.PP
Run:
.
.sp
.RS 0.5i
.EX
sudo make install
.EE
.RE
.
.PP
as root from the top-level directory.
.
.PP
Running
.B make install
will call the installer to put all of the newly compiled files and other files
(such as this document) in predetermined places set by the
.B \-\-prefix
option to
.B configure
in the directory hierarchy (yes, this is by design and
.B make
is not just flinging files any old place!).
.
.PP
A lot of screen output will be generated.
.
Any errors will probably be rather early in the process and will likely be
related to your
.I username
not having write permissions in the system directory structure.
.
.
.SS ldconfig
.
Once the installation is complete one more step is required if Hamlib has
never been installed from a local build before.
.
The
.B ldconfig
command tells the system library loader where to find the newly installed
Hamlib libraries.
.
It too will need to be run with root privileges:
.
.PP
Run:
.
.sp
.RS 0.5i
.EX
sudo ldconfig
.EE
.RE
.
.PP
as root from any directory.
.
.PP
.BR Note :
Subsequent installations of Hamlib will not need to have
.B ldconfig
run after each installation if a newer version of Hamlib was not installed,
i.e. when recompiling the same version during development.
.
.PP
On some distributions a bit of configuration will be needed before
.B ldconfig
will add locally compiled software to its database.
.
Please consult your distribution's documentation.
.
.
.SS Bootstrapping from a \(aqgit clone\(aq
.
Choosing to build from from a
.B git clone
requires a few more development tools (notice a theme here?) as detailed in
.IR README.developer .
.
The most critical will be the GNU Autotools
.RB ( autoconf ,
.BR automake ,
.BR libtool ,
and more) from which the build system consisting of
.BR configure ,
the various
.IR Makefile.in s
throughout the directory structure, and the final
.IR Makefile s
are generated.
.
.PP
In the top-level directory is the
.B bootstrap
script from which the build system is
.IR bootsrapped\(emthe
process of generating the Hamlib build system from
.I configure.ac
and the various
.IR Makefile.am s.
.
At its completion the
.B configure
script will be present to configure the build system.
.
.PP
Next
.B configure
is run with any needed build options
.RB ( "configure \-\-help"
is useful) to enable certain features or provide paths for locating needed
build dependencies, etc.
.
Environment variables intended for the preprocessor and/or compiler may also
be set on the
.B configure
command line.
.
.PP
After the configuration is complete, the build may proceed with the
.B make
step as for the source tarballs above.
.
Or
.B configure \-\-help
may be run, and
.B configure
run again with specific options in which case the
.IR Makefile s
will be regenerated and the build can proceed with the new configuration.
.
.
.SS Other make targets
.
Besides
.BR "make install" ,
other
.I targets
exist when running
.BR make .
.
Running
.B make clean
from the top-level directory removes all of the generated object and
executable files generated by running
.B make
freeing up considerable disk space.
.
.PP
.BR Note :
During development of individual source files, it is not necessary to
run
.B make clean
each time before
.BR make .
.
Simply run
.B make
and only the modified file(s) and any objects that depend on them will be
recompiled.
.
This speeds up development time considerably.
.
.PP
To remove even the generated
.IR Makefile s,
run
.B make distclean
from the top-level directory.
.
After this target is run,
.B configure
will need to be run again to regenerate the
.IR Makefile s.
.
This command may not be as useful as the
.IR Makefile s
do not take up much space, however it can be useful for rebuilding the
.IR Makefile s
when modifying a
.I Makefile.am
or
.I confgure.ac
during build system development.
.
.
.SS Parallel build trees
.
One feature of the GNU build system used by Hamlib is that the object files
can be kept in a directory structure separate from the source files.
.
While this has no effect on the
.B make
targets described above, it does help the developer find files in the source
tree!
.
One such way of using parallel builds is described in
.IR README.developer .
.
.PP
Parallel builds can be very useful as one build directory can be configured
for a release and another build directory can be configured for debugging with
different options passed to
.B configure
from each directory.
.
The generated
.IR Makefile s
are unique to each build directory and will not interfere with each other.
.
.
.SS Adding debugging symbols
.
When additional debugging symbols are needed with, for example, the GNU
Debugger,
.BR gdb ,
the needed compiler and linker options are passed as environment variables.
.
.PP
Run:
.sp
.RS 0.5i
.EX
\&../hamlib/configure CFLAGS="-ggdb3 -O0" CXXFLAGS="-ggdb3 -O0"
.EE
.RE
.
.PP
from a sibling build directory intended for a debugging build.
.
.PP
The
.B \-ggdb3
option tells the C compiler, in this case the GNU C Compiler,
.BR gcc ,
to add special symbols useful for GDB, the GNU debugger.
.
The
.B -O0
option tells
.B gcc
to turn off all optimizations which will make it easier to follow some
variables that might otherwise be optimized away.
.
.B CFLAGS
and
.B CXXFLAGS
may be set independently for each compiler.
.
.PP
.BR Note :
There are a number compiler options available for controlling debugging
symbols and setting optimization levels.
.
Please consult the compiler's manual for all the details.
.
.
.SS Compiling for Microsoft Windows
.
Currently compiling is done on a Debian 8 (Jessie) virtual machine using
.UR http://www.mingw.org
MinGW
.UE .
.I README.build-win32
in the
.I scripts
directory has details on how this is accomplished.
.
.
.SS Pre-compiled binaries for Microsoft Windows
.
Pre-compiled binaries for Microsoft Windows 32 and 64 bit architectures
(Windows NT and newer) are available for both official releases and daily
development snapshots.
.
Official releases are available through the
.UR http://sourceforge.net/projects/hamlib/files/hamlib/
SourceForge.net file download service
.UE .
.
As an alternative, official releases are also available though the
.UR https://github.com/Hamlib/Hamlib/releases
Hamlib archive at GitHub
.UE .
.
Daily development snapshots are available from the
.UR http://n0nb.users.sourceforge.net/
daily snapshots page
.UE .
.
.PP
Beginning with the Hamlib 1.2.15.3 release a self-extracting installer is
available.
.
Among its features are selecting which portions of Hamlib are installed.
.
The
.B PATH
environment variable will need to be set manually per the included
.I README.w32-bin
or
.I README.w64-bin
file.
.
.PP
Daily development snapshots feature both a .ZIP archive and the self
extracting installer.
.
.PP
Bug reports and questions about these archives should be sent to the
.MT hamlib-developer@@lists.sourceforge.net
hamlib-developer mailing list
.ME .
.
.
.SH COPYING
.
This file is part of Hamlib, a project to develop a library that simplifies
radio and rotator control functions for developers of software primarily of
interest to radio amateurs and those interested in radio communications.
.
.PP
Copyright \(co 2001-2018 Hamlib Group (various contributors)
.
.PP
This is free software; see the file COPYING for copying conditions. There is
NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
.
.
.SH SEE ALSO
.
.BR git (1),
.BR hamlib (7),
.BR ldconfig (8),
.BR make (1),
.BR su (1),
.BR sudo (8)
.
.
.SH COLOPHON
.
Links to the Hamlib Wiki, Git repository, release archives, and daily snapshot
archives:
.IP
.UR http://www.hamlib.org
hamlib.org
.UE .

Wyświetl plik

@ -0,0 +1,835 @@
.\" Hey, EMACS: -*- nroff -*-
.\"
.\" For layout and available macros, see man(7), man-pages(7), groff_man(7)
.\" Please adjust the date whenever revising the manpage.
.\"
.\" Please keep this file in sync with doc/utility-programs.texi
.\"
.TH HAMLIB-UTILITIES "7" "2018-05-27" "Hamlib" "Hamlib Information Manual"
.
.
.SH NAME
.
hamlib-utilties \- radio and rotator control utilities of Hamlib
.
.
.SH DESCRIPTION
.
Included with the Hamlib distribution are several utility programs.
.
Besides providing a way for developers to test new code and bug fixes, the
programs also offer a reference implementation for interfacing to the Hamlib
library functions both through the
.B C
.SM API
(Application Programming Interface) and offering a network accessible
.SM API.
.
.PP
This page summarizes the two test programs,
.BR rigctl (1)
for testing radio back ends and
.BR rotctl (1)
for testing rotator back ends and the two network daemons,
.BR rigctld (1)
and
.BR rotcltd (1)
for radio and rotator access via network sockets.
.
Also included are three demonstation utilities,
.BR rigmem (1),
.BR rigsmtr (1),
and
.BR rigswr (1)
which provide functional examples of how Hamlib may be used to accomplish
various tasks.
.
.
.SH rigctl
.
.BR rigctl (1)
is the most frequently used Hamlib utility.
.
As the other
.I ctl
utilities share many of the same characteristics, much of the introductory
information presented in this section is applicable to the other utility
programs.
.
.
.SS Introduction to rigctl
.
Most likely the first of the Hamlib utility programs that is used is
.BR rigctl (1).
.
rigctl is a character based interactive program and a command line program
able to set or query a radio's value with a single command.
.
rigctl is invoked from a shell command prompt with various options and
additional commands.
.
.PP
In its most simple use as a
.I "command line"
program, rigctl is used to set frequency and mode by typing commands after any
rigctl options:
.
.sp
.RS 0.5i
.EX
rigctl F 14205000
.br
rigctl M USB 2400
.EE
.RE
.
.PP
and then query those values:
.
.sp
.RS 0.5i
.EX
rigctl f
.br
rigctl m
.EE
.RE
.
.PP
Entering
.I "interactive mode"
is a simple matter of not placing any commands after any rigctl options:
.
.sp
.RS 0.5i
.EX
rigctl
.EE
.RE
.
.PP
Entering interactive mode allows successive commands to be entered without
exiting rigctl.
.
Recent additions to rigctl allow command editing and history recall through
use of the
.UR https://tiswww.case.edu/php/chet/readline/rltop.html
Readline
.UE
library.
.
.PP
Interactive mode is indicated by the spartan prompt:
.
.sp
.RS 0.5i
.EX
Rig command:
.EE
.RE
.
.PP
Commands are given at the prompt and follow the general rule that upper case
letters set a value and lower case letters query a value:
.
.sp
.RS 0.5i
.EX
Rig command: M
.br
Mode: USB
.br
Passband: 2500
.sp
Rig command: m
.br
Mode: USB
.br
Passband: 2500
.sp
Rig command:
.EE
.RE
.
.PP
An additional prompt is printed when more information is required by the
command.
.
For \f(CWM\fP above, rigctl prompted for the \f(CWMode\fP and \f(CWPassband\fP
values.
.
For \f(CWm\fP above, rigctl returned the \f(CWMode\fP and \f(CWPassband\fP
values without further prompts.
.
The command prompt is returned after each command invocation.
.
.PP
The above examples invoked rigctl without specifying a radio model.
.
This is a feature where the Hamlib internal radio model 1
.I dummy
is used instead.
.
The dummy radio provides a way to test Hamlib functions without the need for
actual radio hardware.
.
However, to develop the Hamlib backend capability for a given radio, having
the actual radio connected to the computer is necessary for debugging.
.
.PP
For example, to quickly set frequency on an Elecraft K3:
.
.sp
.RS 0.5i
.EX
rigctl -m 229 -r /dev/rig F 3900000
.EE
.RE
.
.PP
and to query the frequency and then mode:
.
.sp
.RS 0.5i
.EX
rigctl -m 229 -r /dev/rig f
.br
3900000
.sp
rigctl -m 229 -r /dev/rig m
.br
LSB
.br
2000
.EE
.RE
.
.PP
.BR Note :
the returned values do not have the prompt strings associated with interactive
mode as shown above.
.
.PP
The
.B \-m
option takes a numeric value that corresponds to a given radio back end model.
.
The
.B \-r
option takes the path to the port device on
.SM POSIX
and the device name on Microsoft Windows.
.
.PP
.BR Note :
A complete list of supported radio models may be seen by use of the
.B -l
option:
.
.sp
.RS 0.5i
.EX
rigctl -l
.br
Rig # Mfg Model Version Status
.br
1 Hamlib Dummy 0.5 Beta
.br
2 Hamlib NET rigctl 0.3 Beta
.br
101 Yaesu FT-847 0.5 Beta
.br
103 Yaesu FT-1000D 0.0.6 Alpha
.br
\&.
.br
\&.
.br
\&.
.br
2702 Rohde&Schwarz EB200 0.1 Untested
.br
2801 Philips/Simoco PRM8060 0.1 Alpha
.br
2901 ADAT www.adat.ch ADT-200A 1.36 Beta
.EE
.RE
.
.PP
The list is long so use \f(CWShift\-PageUp\fP/\f(CWShift\-PageDown\fP on
Linux, \f(CWScrollLock\fP then \f(CWPageUp\fP/\f(CWPageDown\fP on Free BSD, or
use the scrollbar to the virtual terminal window
.RB ( cmd
window on Microsoft Windows) or the output can be piped to
.BR more (1)
or
.BR less (1),
e.g. \(lq\f(CWrigctl -l | more\fP\(rq to scroll back up the list.
.
The list is sorted numerically by model number since Hamlib 1.2.15.1.
.
Model numbers of a manufacturer/protocol family are grouped together.
.
.
.SS rigctl reference
.
The complete reference for rigctl can be found in the
.BR rigctl (1)
manual page.
.
.
.SH rotctl
.
Identical in function to
.BR rigctl (1),
.BR rotctl (1)
provides a means for testing Hamlib functions useful for rotator control and
QTH (Maidenhead gridsquare system, see
.UR https://en.wikipedia.org/wiki/Maidenhead_Locator_System
Maidenhead Locator System
.UE )
locator computations.
.
As rotators have a much narrower scope than radios, there are fewer command
line options and commands for rotctl.
.
.
.SS Introduction to rotctl
.
.BR rotctl (1)
is a character based interactive program and a command line program able to
set or query a rotator's value with a single command.
.
rotctl is invoked from a shell command prompt with various options and
additional commands.
.
.PP
In its most simple use as a
.I "command line"
program, rotctl is used to set azimuth position and (optionally) elevation by
typing commands after any rotctl options:
.
.sp
.RS 0.5i
.EX
rotctl P 145.0 23.0
.br
rotctl M 8 25
.EE
.RE
.
.PP
and then query those values:
.
.sp
.RS 0.5i
.EX
rotctl p
.EE
.RE
.
.PP
Entering
.I "interactive mode"
is a simple matter of not placing any commands after any rotctl options:
.
.sp
.RS 0.5i
.EX
rotctl
.EE
.RE
.
.PP
Entering interactive mode allows successive commands to be entered without
exiting rotctl.
.
Interactive mode allows for command editing and history recall through the use
of the
.UR https://tiswww.case.edu/php/chet/readline/rltop.html
Readline
.UE
library.
.
.PP
Interactive mode is indicated by the spartan prompt:
.
.sp
.RS 0.5i
.EX
Rotator command:
.EE
.RE
.
.PP
Commands are given at the prompt:
.
.sp
.RS 0.5i
.EX
Rotator command: M
.br
Direction: 16
.br
Speed: 60
.sp
Rotator command: p
.br
Azimuth: 11.352000
.br
Elevation: 0.000000
.sp
Rotator command: p
.br
Azimuth: 27.594000
.br
Elevation: 0.000000
.sp
Rotator command:
.EE
.RE
.
.PP
An additional prompt is printed when more information is required by the
command.
.
For \f(CWM\fP above, rotctl prompted for the \f(CWDirection\fP and
\f(CWSpeed\fP values.
.
For \f(CWp\fP above, rotctl returned the \f(CWAzimuth\fP and \f(CWElevation\fP
values without further prompts.
.
The command prompt is returned after each command invocation.
.
.PP
The above examples invoked rotctl without specifying a rotator model.
.
This is a feature where the Hamlib internal rotator model 1
.I dummy
is used instead.
.
The dummy rotator provides a way to test Hamlib functions without the need for
actual rotator hardware.
.
However, to develop back end capability for a given rotator, having the actual
controller connected to the computer is necessary for debugging.
.
.PP
For example, to quickly set position for RotorEZ:
.
.sp
.RS 0.5i
.EX
rotctl -m 401 -r /dev/rotor P 100.0 0.0
.EE
.RE
.
.PP
and to query the position:
.
.sp
.RS 0.5i
.EX
rotctl -m 401 -r /dev/rotor p
.br
100.000000
.br
0.000000
.EE
.RE
.
.PP
The returned values do not have the prompt strings associated with interactive
mode as shown above.
.
.PP
The
.B -m
option takes a numeric value that corresponds to a given rotator back end model.
.
The
.B -r
option takes the path to the port device on
.SM POSIX
or the device name on Microsoft Windows.
.
.PP
.BR Note :
A complete list of supported rotator models may be seen by use of the
.B -l
option:
.
.sp
.RS 0.5i
.EX
rotctl -l
.br
Rot # Mfg Model Version Status
.br
1 Hamlib Dummy 0.5 Beta
.br
2 Hamlib NET rotctl 0.3 Beta
.br
201 Hamlib EasycommI 0.3 Beta
.br
202 Hamlib EasycommII 0.3 Beta
.br
\&.
.br
\&.
.br
\&.
.br
1201 AMSAT IF-100 0.1 Untested
.br
1301 LA7LKA ts7400 0.1 Beta
.br
1401 Celestron NexStar 0.1 Untested
.EE
.RE
.
.PP
The list is long so use \f(CWShift\-PageUp\fP/\f(CWShift\-PageDown\fP on
Linux, \f(CWScrollLock\fP then \f(CWPageUp\fP/\f(CWPageDown\fP on Free BSD, or
use the scrollbar to the virtual terminal window
.RB ( cmd
window on Microsoft Windows) or the output can be piped to
.BR more (1)
or
.BR less (1),
e.g. \(lq\f(CWrotctl -l | more\fP\(rq to scroll back up the list.
.
The list is sorted numerically by model number since Hamlib 1.2.15.1.
.
Model numbers of a manufacturer/protocol family are grouped together.
.
.
.SS rotctl reference
.
The complete reference for rotctl can be found in the
.BR rotctl (1)
manual page.
.
.
.SH rigctld
.
The
.BR rigctld (1)
program is a network server that accepts the familiar commands of
.BR rigctl (1)
and provides the response data over a
.SM TCP/IP
network socket to an application.
.
In this manner an application can access a rigctld instance from nearly
anywhere (caveat, no security is currently provided by rigctld).
.
Applications using rigctld do not link directly to Hamlib nor use its C API.
.
.
.SS Introduction to rigctld
.
.BR rigctld (1)
communicates to a client through a
.SM TCP
network socket using text commands shared with
.BR rigctl (1).
.
The protocol is simple; commands are sent to rigctld on one line and rigctld
responds to
.B get
commands with the requested values, one per line, when successful, otherwise,
it responds with one line
.B RPRT
.IR x ,
where
.I x
is a negative number indicating the Hamlib error code.
.
Commands that do not return values respond with the line
.B RPRT
.IR x ,
where
.I x
is zero when successful, otherwise a negative number indicating the Hamlib
error code.
.
Each line is terminated with a newline,
.IR \en ,
character.
.
This protocol is primarily for use by the
.B NET rigctl
(radio model 2) backend.
.
.PP
A separate Extended Response protocol extends the above behavior by echoing
the received command string as a header, any returned values as a key: value
pair, and the
.B RPRT
.I x
string as the end of response marker which includes the Hamlib success or
failure value.
.
Consider using this protocol for clients that will interact with
rigctld directly through a TCP network socket.
.
.PP
Multiple radios can be controlled on different TCP ports by use of multiple
rigctld processes each listening on a unique TCP port.
.
It is hoped that rigctld will be especially useful for client authors using
languages such as
.UR http://www.perl.org/
Perl
.UE ,
.UR http://www.python.org/
Python
.UE ,
.UR http://php.net/
PHP
.UE ,
.UR http://www.ruby-lang.org/en/
Ruby
.UE ,
.UR http://www.tcl.tk/
TCL
.UE ,
and others.
.
.
.SS rigctld reference
.
The complete reference for rigctld can be found in the
.BR rigctld (1)
manual page.
.
.
.SH rotctld
.
The
.BR rotctld (1)
program is a network server that accepts the familiar commands of
.BR rotctl (1)
and provides the response data over a \f(CWTCP/IP\fP network socket to an
application.
.
In this manner an application can access a rotctld instance from nearly
anywhere (caveat, no security is currently provided by rotctld).
.
Applications using rotctld do not link directly to Hamlib nor use its C API.
.
.
.SS Introduction to rotctld
.
.BR rotctld (1)
communicates to a client through a
.SM TCP
network socket using text commands shared with
.BR rotctl (1).
.
The protocol is simple, commands are sent to rotctld on one line and
rotctld responds to
.B get
commands with the requested values, one per line, when successful, otherwise,
it responds with one line
.B RPRT
.IR x ,
where
.I x
is a negative number indicating the Hamlib error code.
.
Commands that do not return values respond with the line
.B RPRT
.IR x ,
where
.I x
is zero when successful, otherwise a negative number indicating
the Hamlib error code.
.
Each line is terminated with a newline,
.I \en
character.
.
This protocol is primarily for use by the
.B NET rotctl
(rotator model 2) backend.
.
.PP
A separate Extended Response protocol extends the above behavior by echoing
the received command string as a header, any returned values as a key: value
pair, and the
.B RPRT
.I x
string as the end of response marker which includes the Hamlib success or
failure value.
.
Consider using this protocol for clients that will interact with
rotctld directly through a TCP network socket.
.
.PP
Multiple rotators can be controlled on different TCP ports by use of multiple
rotctld processes each listening on a unique TCP port.
.
It is hoped that rotctld will be especially useful for client authors using
languages such as
.UR http://www.perl.org/
Perl
.UE ,
.UR http://www.python.org/
Python
.UE ,
.UR http://php.net/
PHP
.UE ,
.UR http://www.ruby-lang.org/en/
Ruby
.UE ,
.UR http://www.tcl.tk/
TCL
.UE ,
and others.
.
.
.SS rotctld reference
.
The complete reference for rotctld can be found in the
.BR rotctld (1)
manual page.
.
.
.SH rigmem
.
.B rigmem
may be used to backup and restore memory of radio transceivers and receivers.
.
.
.SS Introduction to rigmem
.
Backup and restore memory of radio transceivers and receivers.
.B rigmem
accepts
.IR command s
from the command line only.
.
.
.SS rigmem reference
.
The complete reference for rigmem can be found in the
.BR rigmem (1)
manual page.
.
.
.SH rigsmtr
.
.B rigsmtr
uses
.B Hamlib
to control a radio to measure S-Meter value versus antenna azimuth.
.
.
.SS Introduction to rigsmtr
.
rigsmtr rotates the antenna from minimum azimuth to maximum azimuth.
Every second, or
.I time_step
if specified in seconds, it retrieves the signal strength. Azimuth in degrees
and the corresponding S-Meter level in dB relative to S9 are then printed on
.BR stdout .
.
.PP
To work correctly, rigsmtr needs a radio that could measure S-Meter and a Hamlib
backend that is able to retrieve it, connected to a Hamlib supported rotator.
.
.
.SS rigsmtr reference
.
The complete reference for rigsmtr can be found in the
.BR rigsmtr (1)
manual page.
.
.
.SH rigswr
.
.B rigswr
may be used to measure VSWR vs frequency.
.
.
.SS Introduction to rigswr
.
rigswr uses Hamlib to control a radio to measure VSWR (Voltage Standing
Wave Ratio) over a frequency range.
It scans frequencies from
.I start_freq
to
.I stop_freq
with an optional increment of
.I freq_step
(default step is 100 kHz).
.
All values must be entered as an integer in Hertz (cycles per second).
.BR Note :
rigswr assumes that
.I start_freq is less than or equal to
.IR stop_freq .
.
If it is greater, rigswr will exit without doing anything.
.
.PP
For each frequency, rigswr transmits at 25% of total POWER during 0.5 second
in CW mode and reads VSWR.
.
.PP
Frequency and the corresponding VSWR are then printed on stdout.
.
.PP
To work correctly, rigswr needs a radio that can measure VSWR and a
Hamlib backend that supports reading VSWR from the radio.
.
.
.SS rigswr reference
.
The complete reference for rigswr can be found in the
.BR rigswr (1)
manual page.
.
.
.SH COPYING
.
This file is part of Hamlib, a project to develop a library that simplifies
radio and rotator control functions for developers of software primarily of
interest to radio amateurs and those interested in radio communications.
.
.PP
Copyright \(co 2001-2018 Hamlib Group (various contributors)
.
.PP
This is free software; see the file COPYING for copying conditions. There is
NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
.
.
.SH SEE ALSO
.
.BR less (1),
.BR more (1),
.BR rigctl (1),
.BR rigctld (1),
.BR rotctl (1),
.BR rotctld (1),
.BR rigmem (1),
.BR rigsmtr (1),
.BR rigswr (1),
.BR hamlib (7),
.BR hamlib-primer (7)
.
.
.SH COLOPHON
.
Links to the Hamlib Wiki, Git repository, release archives, and daily snapshot
archives:
.IP
.UR http://www.hamlib.org
hamlib.org
.UE .

345
doc/man7/hamlib.7 100644
Wyświetl plik

@ -0,0 +1,345 @@
.\" Hey, EMACS: -*- nroff -*-
.\"
.\" For layout and available macros, see man(7), man-pages(7), groff_man(7)
.\" Please adjust the date whenever revising the manpage.
.\"
.\" Please keep this file in sync with doc/nutshell.texi
.\"
.TH HAMLIB "7" "2018-05-21" "Hamlib" "Hamlib Information Manual"
.
.
.SH NAME
.
hamlib \- radio and rotator control library
.
.
.SH DESCRIPTION
.
The
.BR "Ham Radio Control Libraries" ,
.B Hamlib
for short, is a development effort to provide a consistent interface for
programmers wanting to incorporate radio and rotator control in their
programs.
.
.PP
Hamlib is not a complete user application, rather, it is a software layer
intended to make controlling various radios and other amateur radio station
(shack) hardware much easier.
.
Hamlib will allow authors of software such as logging programs, digital
communications programs, or those wanting to develop the ultimate radio
control software to concentrate on the user interface and the basic function
of the program rather than radio control.
.
Hamlib consists of several parts, the programming library, utility programs,
and library interfaces to other programming languages.
.
.PP
Most recent amateur radio transceivers allow external control of their
functions through a serial interface.
.
Unfortunately, control commands are not always consistent across a
manufacturer's product line and each manufacturer's product line differs
greatly from its competitors.
.
.PP
Hamlib attempts to solve this problem by presenting a
.I virtual radio
to the programmer by providing an interface to actions such as setting a given
Variable Frequency Oscillator's (VFO) frequency, setting the operating mode,
querying the radio of its current status and settings, and giving the
application a list of a given radio's capabilities.
.
Unfortunately, what can be accomplished by Hamlib is limited by the radios
themselves and some offer very limited capability.
.
.PP
Other devices, such as antenna rotators, can be placed into the Hamlib control
scheme.
.
Other recent developments include network interface servers and a USB
interface capability.
.
Language bindings are provided for
.BR C ", " C++ ", " Perl ", " Python ", " Lua " and " TCL
(more to come).
.
.
.SS Overview
.
Hamlib is a
.I front end
library providing a
.B C
language Application Programming Interface (API) to programmers wishing to
integrate radio or rotator control in their applications.
.
Hamlib presents a
.I virtual radio
or
.I virtual rotator
that is a consistent interface to an application despite wide differences in
radio and rotator interfaces and capabilities.
.
.PP
The front end library uses a number of
.I back end
libraries to translate from the front end to the various individual radio and
rotator models.
.
A back end library handles conversion of the front end variables to the format
needed by the radio or rotator device it controls.
.
The back end libraries are generally grouped by manufacturer and in some cases
by a common control protocol.
.
.PP
Hamlib also provides an interface library for each of several common
.I scripting
languages such as
.UR http://www.perl.org
.B Perl
.UE ,
.UR http://www.python.org
.B Python
.UE ,
.UR https://www.lua.org
.B Lua
.UE ,
and
.UR http://www.tcl.tk
.B TCL
.UE .
.
These language
.I bindings
are
generated through the use of
.UR http://www.swig.org
.B SWIG
.UE ,
a parser/generator for multiple language interfaces to a
.B C
library.
.
A natively generated
.B C++
language interface is also provided.
.
.PP
Besides the C and supplemental APIs, Hamlib also provides a pair of network
daemons that provide a text command based API for controlling an attached
radio or rotator through a
.BR TCP / IP
network connection.
.
The daemons then handle the interface to the Hamlib C API.
.
.PP
More than one type of device, radio or rotator, may be controlled at a
time, however, there is generally a limit of one device per serial port
or other port.
.
.
.SS Hamlib project information
.
The Hamlib Project was founded by Frank Singleton, VK3FCS/KM5WS in July 2000.
.
Shortly after Stephane Fillod, F8CFE, joined Frank on the Hamlib project and
the API and implementation development led to a reasonable level of maturity
in a few years.
.
A major milestone was reached when Hamlib 1.2.0 was released in March 2004.
.
The API and Application Binary Interface (ABI) interfaces have remained stable
since that time up to the latest release of 3.2 in early 2018.
.
.PP
Development continues through the major version number
.RI 3. x
series and beyond.
.
While some API tweaks are planned, ABI compatibility with the prior
.RI 1.2. x
releases remains a priority.
.
Other goals include streamlining the build system (done), improving the SWIG
generated language bindings (done), improving the overall documentation (this
man page with more in progress), and other updates as warranted.
.
.PP
The Project is hosted by
.UR https://sourceforge.net
SourceForge.net
.UE
at the
.UR https://sourceforge.net/projects/hamlib/
Hamlib project page
.UE .
.
As
.UR https://github.com
GitHub
.UE
has become a very popular project hosting site, Hamlib also has a dedicated
.UR https://github.com/Hamlib/Hamlib
GitHub project page
.UE .
.
GitHub also hosts the
.UR http://www.hamlib.org
hamlib.org
.UE
Web site and the
.UR https://github.com/Hamlib/Hamlib/wiki
Hamlib Wiki
.UE .
.
.PP
Development discussion and most user support take place on the
.UR https://sourceforge.net/p/hamlib/mailman/
hamlib-developer mailing list
.UE .
While there are
.UR https://sourceforge.net/p/hamlib/discussion/
SourceForge.net discussion forums
.UE ,
they are rarely used and not as closely read by the developers as the mailing
list.
.
.PP
For
.IR "source code management" ,
the project uses
.UR http://git-scm.com/
.B Git
.UE ,
a fast, distributed content tracker.
.
Among its features is that every developer has the complete Hamlib
development history available locally.
.
For more information on using Git, see
.BR hamlib\-git (7).
.
.IP
.BR Note :
while a canonical Git repository is hosted at SourceForge, its availability is
not essential to continued development although development work flows would
change temporarily.
.
Several developers find the GitHub Web interface easier to use and lately
development has centered around GitHub rather than SourceForge.
.
.
.SS Applications using Hamlib
.
A number of application developers have taken advantage of Hamlib's
capabilities to implement radio and/or rotator control.
.
While not exhaustive, a list is maintained at the Hamlib Wiki,
.UR https://github.com/Hamlib/Hamlib/wiki/Applications-and-Screen-Shots
Applications/Screenshots
.UE .
Developers are encouraged to request their applications be added to the
gallery by way of the hamlib-developer mailing list.
.
.
.SS Using Hamlib with your program
.
As with other Free Software projects, Hamlib relies heavily on copyleft
licensing to encourage development contributions and provide an open
atmosphere for development.
.
Hamlib's source code is released under two
licenses, the
.B Lesser General Public License
(LGPL) for the library portion, and the
.B General Public License
(GPL) for the utility programs.
.
.PP
The LGPL allows the library to be used (linked) by programs regardless of
their individual license.
.
However, any contributions to the library source remain under copyleft which
means that the library source code may not be used in violation of the terms
of the LGPL.
.
.PP
The utility program source files are released under the GPL.
.
Any direct use of these sources must be in a form that complies with the terms
of the GPL.
.
Concepts learned by studying these sources for the purpose of understanding
the Hamlib API is not covered nor prohibited by the GPL, however, directly
copying GPL sources into any work that is incompatible with the terms of the
GPL is prohibited.
.
.
.SS Radios with a clone capability
.
Hamlib's focus is on controlling radios that employ a port and command
protocol for setting frequency, mode, VFO, PTT, etc.
.
Most VHF/UHF transceivers do not employ such control capability but do provide
for cloning the memory contents from radio to another of the same model.
.
A related project,
.UR http://chirp.danplanet.com
CHIRP
.UE ,
aims to support radios with such a clone capability.
.
Please contact the CHIRP project for support of such radios.
.
.
.SS Pronouncing Hamlib
.
English speakers seem to have two alternate pronunciations for our project:
.
.nf
.IP \(bu 4
Hamlib (Ham \- lib, long \(oqi\(cq, as in library.) IPA style: /\(aqham læb/
.
.IP \(bu 4
Hamlib (Ham \- lib, short \(oqi\(cq, as in liberty.) IPA style: /\(aqham lɪb/
.fi
.
.PP
Then again, we have people who say Linux \(lqL-eye-nux\(rq and those who say
\(lqL-in-nux\(rq...
.
.PP
If you're French, the above does not apply! :-)
.
.
.SH COPYING
.
This file is part of Hamlib, a project to develop a library that simplifies
radio and rotator control functions for developers of software primarily of
interest to radio amateurs and those interested in radio communications.
.
.PP
Copyright \(co 2001-2018 Hamlib Group (various contributors)
.
.PP
This is free software; see the file COPYING for copying conditions. There is
NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
.
.
.SH SEE ALSO
.
.BR hamlib-primer (7)
.
.
.SH COLOPHON
.
Links to the Hamlib Wiki, Git repository, release archives, and daily snapshot
archives:
.IP
.UR http://www.hamlib.org
hamlib.org
.UE .

Wyświetl plik

@ -1,33 +1,34 @@
The @dfn{Ham Radio Control Libraries}, @dfn{Hamlib} for short, is a
development effort to provide a consistent interface for programmers
wanting to incorporate radio control in their programs.
wanting to incorporate radio and rotator control in their programs.
Hamlib is not a complete user application, rather, it is a software
layer intended to make controlling various radios and other shack
hardware much easier. Hamlib will allow authors of such software as
logging programs, digital communications programs, or those wanting to
develop the ultimate radio control software to concentrate on the user
interface and the basic function of the program rather than radio
control. Hamlib consists of several parts, the programming library,
utility programs, and library interfaces to other programming languages.
layer intended to make controlling various radios and other amateur
radio station (shack) hardware much easier. Hamlib will allow authors
of software such as logging programs, digital communications programs,
or those wanting to develop the ultimate radio control software to
concentrate on the user interface and the basic function of the
program rather than radio control. Hamlib consists of several parts,
the programming library, utility programs, and library interfaces to
other programming languages.
Most recent amateur radio transceivers allow external control of their
functions through a serial interface. Unfortunately, control commands
are not always consistent across a manufacturer's product line and each
manufacturer's product line differs greatly from its competitors.
functions through a serial interface. Unfortunately, control commands
are not always consistent across a manufacturer's product line and
each manufacturer's product line differs greatly from its competitors.
Hamlib attempts to solve this problem by presenting a "virtual radio" to
the programmer by providing an interface to actions such as setting a
given VFO's frequency, setting the operating mode, querying the radio of
its current status and settings, and giving the application a list of a
given radio's capabilities. Unfortunately, what can be accomplished by
Hamlib is limited by the radios themselves and some offer very limited
capability.
Hamlib attempts to solve this problem by presenting a "virtual radio"
to the programmer by providing an interface to actions such as setting
a given Variable Frequency Oscillator's (VFO) frequency, setting the
operating mode, querying the radio of its current status and settings,
and giving the application a list of a given radio's capabilities.
Unfortunately, what can be accomplished by Hamlib is limited by the
radios themselves and some offer very limited capability.
Other devices, such as antenna rotors, can be placed into the Hamlib
control scheme. Other recent developments include network interface
servers and a USB interface capability. Language bindings are provided
for C, C++, Perl, Python, Lua and TCL (more to come).
Other devices, such as antenna rotators, can be placed into the Hamlib
control scheme. Other recent developments include network interface
servers and a USB interface capability. Language bindings are
provided for C, C++, Perl, Python, Lua and TCL (more to come).
@menu
* Overview::
@ -44,20 +45,20 @@ for C, C++, Perl, Python, Lua and TCL (more to come).
@cindex Front end library
@cindex Virtual radio
@cindex Virtual rotor
@cindex Virtual rotator
Hamlib is a @dfn{front end} library providing a @emph{C} language
Application Programming Interface @acronym{API} to programmers wishing
to integrate radio or rotor control in their applications. Hamlib
presents a @dfn{virtual radio} or @dfn{virtual rotor} that is a
consistent interface to an application despite wide differences in radio
and rotor interfaces and capabilities.
to integrate radio or rotator control in their applications. Hamlib
presents a @dfn{virtual radio} or @dfn{virtual rotator} that is a
consistent interface to an application despite wide differences in
radio and rotator interfaces and capabilities.
@cindex Back end library
The front end library uses a number of @dfn{back end} libraries to
translate from the front end to the various individual radio and
rotor models. A back end library handles conversion of the
front end variables to the format needed by the radio or rotor
device it controls. The back end libraries are generally grouped by
rotator models. A back end library handles conversion of the front
end variables to the format needed by the radio or rotator device it
controls. The back end libraries are generally grouped by
manufacturer and in some cases by a common control protocol.
@quotation
@ -78,23 +79,25 @@ of Hamlib's design.
@cindex Languages, scripting
@cindex Interface, languages
Hamlib also provides an interface library for each of several common
@dfn{scripting} languages such as @url{http://www.perl.org, Perl, Perl},
@url{http://www.python.org, Python, Python}, @url{https://www.lua.org, Lua, Lua}
and @url{http://www.tcl.tk, TCL, TCL}. These language @dfn{bindings} are
generated through the use of @url{http://www.swig.org, SWIG, SWIG} a parser/generator
for multiple language interfaces to a C library. A native generated @emph{C++}
@dfn{scripting} languages such as @url{http://www.perl.org, Perl,
Perl}, @url{http://www.python.org, Python, Python},
@url{https://www.lua.org, Lua, Lua} and @url{http://www.tcl.tk, TCL,
TCL}. These language @dfn{bindings} are generated through the use of
@url{http://www.swig.org, SWIG, SWIG} a parser/generator for multiple
language interfaces to a C library. A native generated @emph{C++}
language interface is also provided.
@cindex Daemon, network
@cindex Network, daemon
Besides the C and supplemental APIs, Hamlib also provides a pair of
network daemons that provide a text command based API for controlling
an attached radio or rotor through a @emph{TCP/IP} network connection.
The daemons then handle the interface to the Hamlib C API.
an attached radio or rotator through a @emph{TCP/IP} network
connection. The daemons then handle the interface to the Hamlib C
API.
More than one type of device, radio or rotor, may be controlled at a
time, however, there is generally a limit of one device per serial port
or other port.
More than one type of device, radio or rotator, may be controlled at a
time, however, there is generally a limit of one device per serial
port or other port.
@node The Hamlib project
@section Hamlib project information
@ -102,50 +105,47 @@ or other port.
@cindex Project, Hamlib
The Hamlib Project was founded by Frank Singleton,VK3FCS/KM5WS in July
2000. Shortly after Stephane Fillod, F8CFE, joined Frank on the Hamlib
project and the API and implementation development led to a reasonable
level of maturity in a few years. A major milestone was reached when
Hamlib 1.2.0 was released in March 2004. The API and Application
Binary Interface (@acronym{ABI}) interfaces have remained stable since
that time up to the latest release of 1.2.15.3 in late 2012.
2000. Shortly after Stephane Fillod, F8CFE, joined Frank on the
Hamlib project and the API and implementation development led to a
reasonable level of maturity in a few years. A major milestone was
reached when Hamlib 1.2.0 was released in March 2004. The API and
Application Binary Interface (@acronym{ABI}) interfaces have remained
stable since that time up to the latest release of 3.2 in early 2018.
Development continues with a bump of the public version number to 3.0
(essentially simply dropping the ``1.'' of previous releases). While some
API tweaks are planned, ABI compatibility with the prior 1.2.@i{x}
releases remains a priority. Other goals include streamlining the
build system (done), improving the SWIG generated language bindings
(in progress), improving the overall documentation (this manual, in
progress), and other updates as warranted.
Development continues through the major version number 3.x and beyond.
While some API tweaks are planned, ABI compatibility with the prior
1.2.@i{x} releases remains a priority. Other goals include
streamlining the build system (done), improving the SWIG generated
language bindings (done), improving the overall documentation (this
manual, in progress), and other updates as warranted.
The Project is hosted by @url{https://sourceforge.net/,
SourceForge.net} at the @url{https://sourceforge.net/projects/hamlib/,
Hamlib project page} and the
@url{http://sourceforge.net/apps/mediawiki/hamlib/index.php, Hamlib
Wiki}.
Hamlib project page}. As @url{https://github.com/, GitHub} has become
a very popular project hosting site, Hamlib also has a dedicated
@url{https://github.com/Hamlib/Hamlib, GitHub project page}. GitHub
also hosts the @url{http://www.hamlib.org, hamlib.org} Web site and
the @url{https://github.com/Hamlib/Hamlib/wiki, Hamlib Wiki}.
Development discussion and most user support take place on the
@url{https://sourceforge.net/p/hamlib/mailman/, hamlib-developer mailing
list}. While there are
@url{https://sourceforge.net/p/hamlib/mailman/, hamlib-developer
mailing list}. While there are
@url{https://sourceforge.net/p/hamlib/discussion/, SourceForge.net
discussion forums}, they are rarely used and not as closely read by the
developers as the mailing list.
discussion forums}, they are rarely used and not as closely read by
the developers as the mailing list.
For @dfn{source code management}, the project uses
@url{http://git-scm.com/, Git}, a fast, distributed content tracker.
Among its features is that every developer has the complete Hamlib
development history available locally. While a canonical Git
repository is hosted as SourceForge, its availability is not essential to
continued development, although development work flows would change
temporarily. For more information on using Git, @pxref{Working with
Git}.
development history available locally. For more information on using
Git, @pxref{Working with Git}.
@quotation Note
The SourceForge.net Web interface to the Hamlib Git repository is
currently broken (a ticket is pending) as of late February, 2013. A
mirror exists at @url{https://github.com/N0NB/hamlib, GitHub} which
supports browsing via the Web and other Git commands. Access of the
SF.net repository by other means (SSH or Git protocols) is unaffected
by this issue.
While a canonical Git repository is hosted as SourceForge, its
availability is not essential to continued development, although
development work flows would change temporarily. Several developers
find the GitHub Web interface easier to use and lately development has
centered around GitHub rather than SourceForge.
@end quotation
@node Applications using Hamlib
@ -154,9 +154,9 @@ by this issue.
@cindex Applications, using Hamlib
A number of application developers have taken advantage of Hamlib's
capabilities to implement radio and/or rotor control. While not
capabilities to implement radio and/or rotator control. While not
exhaustive, a list is maintained at the Hamlib Wiki,
@url{https://sourceforge.net/apps/mediawiki/hamlib/,
@url{https://github.com/Hamlib/Hamlib/wiki/Applications-and-Screen-Shots,
Applications/Screenshots}. Developers are encouraged to request their
applications be added to the gallery by way of the hamlib-developer
mailing list.
@ -166,16 +166,17 @@ mailing list.
@cindex Hamlib licensing
@cindex Licensing, Hamlib
As with other Free Software projects, Hamlib relies heavily on copyleft
licensing to encourage development contributions and provide an open
atmosphere for development. Hamlib's source code is released under two
licenses, the @acronym{LGPL} for the library portion, and the
@acronym{GPL} for the utility programs.
As with other Free Software projects, Hamlib relies heavily on
copyleft licensing to encourage development contributions and provide
an open atmosphere for development. Hamlib's source code is released
under two licenses, the Lesser General Public License (@acronym{LGPL})
for the library portion, and the General Public License
(@acronym{GPL}) for the utility programs.
The LGPL allows the library to be used (linked) by programs regardless
of their individual license. However, any contributions to the library
source remain under copyleft which means that the library source code
may not be used in violation of the terms of the LGPL.
of their individual license. However, any contributions to the
library source remain under copyleft which means that the library
source code may not be used in violation of the terms of the LGPL.
The utility program source files are released under the GPL. Any direct
use of these sources must be in a form that complies with the terms of
@ -192,12 +193,12 @@ with the terms of the GPL is prohibited.
@cindex Cloning, radio
Hamlib's focus is on controlling rigs that employ a port and command
protocol for setting frequency, mode, VFO, PTT, etc. Most VHF/UHF
protocol for setting frequency, mode, VFO, PTT, etc. Most VHF/UHF
transceivers do not employ such control capability but do provide for
cloning the memory contents from radio to another of the same model. A
related project, @url{http://chirp.danplanet.com/, CHIRP}, aims to
support rigs with such a clone capability. Please contact the CHIRP
project for support of such rigs.
cloning the memory contents from radio to another of the same model.
A related project, @url{http://chirp.danplanet.com/, CHIRP}, aims to
support radios with such a clone capability. Please contact the CHIRP
project for support of such radios.
@node Pronunciation
@section Pronouncing Hamlib

Plik diff jest za duży Load Diff

Wyświetl plik

@ -1,2 +1,2 @@
EXTRA_DIST = README.scripts build-win32.sh README.build-win32 \
build-VB.NET.sh README.build-VB.NET
EXTRA_DIST = README.scripts build-w32.sh build-w64.sh README.build-Windows \
build-VB.NET.sh README.build-VB.NET astylerc

Wyświetl plik

@ -0,0 +1,94 @@
This file is a HOWTO for the cross-compiling of Windows 32 and 64 bit
binary DLLs built from a tarball generated by 'make dist' in a Git
checkout. The resulting DLLs are built with a cdecl interface compatible
with MS VC++.
Prerequisites
=============
In these steps the release or daily snapshot tarball is unpacked in ~/builds
for the Windows build and all operations are done from there unless
otherwise noted.
Under Linux you need at least the mingw-w64 package to cross-compile it, zip
to create the archive, the tofrodos or dos2unix package installed to convert
to DOS text format, and Wine plus the free MVC++Toolkit available from:
http://uploading.com/files/HNH73WB3/VCToolkitSetup%28v1.01%29%282004.07.06%29.zip.html
to create the Windows .LIB file (unzip and then install it with Wine in the
usual way).
On Debian Jesse the mingw-w64 package works and is being used to build
the daily Windows 32/64 snapshots and releases.
Finally, the Windows version of libusb 1.0 must be available for the USB backends
to be built. Download the latest libusb-1.0 from:
https://sourceforge.net/projects/libusb/files/libusb-1.0/
and unzip the archive in ~/builds
Any version of libusb from 1.0.20 is known to work.
Several variables may need to be set differently at the top of the script file
depending on your system.
The script now relies on a pair of environment variables to locate the needed
libusb files.
The script generates HTML documents for the included .EXE files using groff
to convert the nroff formatted man pages. On Debian and derivatives, the groff
package is likely already installed.
Build for Windows 32/64, cross-compile on Linux:
================================================
Extract the Hamlib tarball into ~/builds (if you prefer another directory
be sure to edit the BUILD_DIR variable in the build-w[32|64].sh script):
$ tar xvfz ~/Downloads/hamlib-3.3~git-???????-20180527.tar.gz
Invoke the build-w[32|64].sh script (it requires a Bash shell) with the
name of the directory/Hamlib version to build (you need not cd into the hamlib
directory, although it won't hurt. The build-w[32|64].sh script uses absolute
paths):
$ build-w32.sh hamlib-3.3~git
or:
$ build-w64.sh hamlib-3.3~git
Release Info
============
The structure of the archive is:
$ tree -d
.
|-- bin
|-- doc
|-- include
| `-- hamlib
|-- lib
|-- gcc
`-- msvc
8 directories
The bin/ directory is where the executables and DLL files are placed. Header
files are under include/Hamlib/ and compiler specific files are under lib/*.
HTML documents for the .EXE programs are in doc/ while text documents
(READMEs and such) are in the main archive directory. The doc/ directory
also contains the generated HTML texinfo manual. The embedded
README.w[32|64]-bin.txt file generated by the build-w[32|64].sh script
describes setting the PATH environment variable in Windows 2000, Windows XP,
and Windows 7.
73, Nate, N0NB

Wyświetl plik

@ -1,98 +0,0 @@
This file is a HOWTO for the cross-compiling of Windows 32 bit binary DLLs
built from a tarball generated by 'make dist' in a Git checkout. The
resulting DLLs are built with a cdecl interface compatible with MS VC++.
Prerequisites
=============
In these steps the release or daily snapshot tarball is unpacked in ~/builds
for the Windows 32 build and all operations are done from there unless
otherwise noted.
Under Linux you need at least the mingw32 package to cross-compile it (although
mingw-w64-i696 is being used to build the daily snapshots) zip to create
the archive, the tofrodos or dos2unix package installed to convert to DOS
text format, and Wine plus the free MVC++Toolkit available from:
http://uploading.com/files/HNH73WB3/VCToolkitSetup%28v1.01%29%282004.07.06%29.zip.html
to create the Windows 32 .LIB file (unzip and then install it with Wine in the
usual way).
NB: Debian Squeeze and later users will need at least the mingw32-runtime
3.15 package as the 3.13 package is broken. You can manually install the
Ubuntu version from:
http://packages.ubuntu.com/maverick/devel/mingw32-runtime
On Debian Jesse the mingw-w64-i686 pacakge works and is being used to build
the daily Windows 32 snapshots.
Finally, the Windows 32 version of libusb must be available for the USB backends
to be built. Download the latest libusb-win32-bin-1.2.4.0.zip from:
https://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/1.2.4.0/
and unzip the archive in ~/builds/libusb-win32-bin-1.2.4.0
Any version of libusb from 1.2.3.0 is known to work.
Several variables may need to be set differently at the top of the script file
depending on your system.
The script now relies on a pair of environment variables to locate the needed
libusb files and the third party pkg-config utility is no longer used for
libusb.
The script generates PDF documents for the included .EXE files using the
groff and ps2pdf utilities to convert the nroff formatted man pages. On
Debian and derivatives, installing the groff and ghostscript packages will
provide them.
Build for Windows 32, cross-compile on Linux:
=============================================
Extract the Hamlib tarball into ~/builds (if you prefer another directory
be sure to edit the BUILD_DIR variable in the build-win32.sh script):
$ tar xvfz ~/Downloads/hamlib-3.0~git-???????-20121007.tar.gz
Invoke the build-win32.sh script (it requires a Bash shell) with the name of
the directory/Hamlib version to build (you need not cd into the hamlib
directory, although it won't hurt. The build-win32 script uses absolute
paths):
$ build-win32.sh hamlib-3.0~git
Release Info
============
The structure of the archive is:
$ tree -d
.
|-- bin
|-- doc
|-- include
| `-- hamlib
|-- lib
| |-- gcc
| `-- msvc
`-- pdf
8 directories
The bin directory is where the executables and DLL files are placed. Header
files are under include/Hamlib and compiler specific files are under lib/*.
PDF documents for the .EXE programs are in pdf/ while text documents
(READMEs and such) are in the main archive directory. The doc/ directory
contains the generated HTML manual. The embedded README.win32-bin file
generated by the build-win32.sh script describes setting the PATH
environment variable in Windows 2000, Windows XP, and Windows 7.
73, Nate, N0NB

Wyświetl plik

@ -1,11 +1,13 @@
The scripts/ directory will contain helper scripts for building Hamlib
binary releases for Win32 and possibly other target platforms. EAch
script should be accompanied by a companion README file with information
on the script and build requirements.
binary releases for Microsoft Windows 32 and 64 bit architectures and
possibly other target platforms. Each script should be accompanied by
a companion README file with information on the script and build
requirements.
Scripts:
build-win32.sh for building Win32 DLLs and EXEs for use with MS VC++.
build-w32.sh and build-w64.sh for building Microsoft Windows 32 and 64 bit
DLLs and EXEs for use with MS VC++.
build-VB.NET.sh for building Win32 DLLs and EXEs for use with MS VB.NET
2002 Framework 1.1

Wyświetl plik

@ -0,0 +1,232 @@
#!/bin/bash
# Builds Hamlib 3.x W32 binary distribution.
# A script to build a set of W32 binary DLLs from a Hamlib tarball.
# This script assumes that the Hamlib tarball has been extracted to the
# directory specified in $BUILD_DIR and that libusb-1.x.y has also
# been extracted to $BUILD_DIR. The MS VC++ Toolkit must also be installed
# and working with Wine.
#
# See README.build-win32 for complete details.
# Set this to a desired directory
BUILD_DIR=~/builds
# Set this to LibUSB archive extracted in $BUILD_DIR
LIBUSB_VER=libusb-1.0.20
# uncomment the correct HOST_ARCH= line for your minGW installation
HOST_ARCH=i686-w64-mingw32
# Set to the strip name for your version of minGW
HOST_ARCH_STRIP=i686-w64-mingw32-strip
# Error return codes. See /usr/include/sysexits.h
EX_USAGE=64
EX_NOINPUT=66
# Pass name of Hamlib archive extracted in $BUILD_DIR
if [ $# -ne 1 ]; then
echo -e "\nUsage: `basename $0` hamlib-version\n"
echo -e "See README.build-win32 for more information.\n"
exit ${EX_USAGE}
fi
# Make sure the Hamlib archive is where we expect
if [ -d ${BUILD_DIR}/$1 ]; then
echo -e "\nBuilding W32 binaries in ${BUILD_DIR}/$1\n\n"
cd ${BUILD_DIR}/$1
else
echo -e "\nBuild directory, ${BUILD_DIR}/$1 not found!\nCheck path for $1 or correct the version number.\n"
exit ${EX_NOINPUT}
fi
RELEASE=`/usr/bin/awk 'BEGIN{FS="["; RS="]"} /\[3\./ {print $2;exit}' ./configure.ac`
HL_FILENAME=hamlib-w32-${RELEASE}
INST_DIR=`pwd`/mingw32-inst
ZIP_DIR=`pwd`/${HL_FILENAME}
LIBUSB_1_0_BIN_PATH=${BUILD_DIR}/${LIBUSB_VER}
# Create W32 specific README.w32-bin file
cat > README.w32-bin <<END_OF_README
What is it?
===========
This ZIP archive or Windows installer contains a build of Hamlib-$RELEASE
cross-compiled for MS Windows 32 bit systems using MinGW under Debian
GNU/Linux 8 (nice, heh!).
The DLL has a cdecl interface for MS VC++.
This software is copyrighted. The library license is LGPL, and the *.EXE files
licenses are GPL. Hamlib comes WITHOUT ANY WARRANTY. See the LICENSE.txt,
COPYING.txt, and COPYING.LIB.txt files.
A draft user manual in HTML format is included in the doc directory. The nroff
manual pages of the utilities not included in the user manual are converted to
HTML and included in the doc directory.
Installation and Configuration
==============================
Extract the ZIP archive into a convenient location, C:\Program Files is a
reasonable choice.
Make sure *all* the .DLL files are in your PATH (leave them in the bin
directory and set the PATH). To set the PATH environment variable in Windows
2000, Windows XP, and Windows 7 (need info on Vista and Windows 8/10) do the
following:
* W2k/XP: Right-click on "My Computer"
Win7: Right-click on "Computer"
* W2k/XP: Click the "Advanced" tab of the "System Properties" dialog
Win7: Click the "Advanced system settings" link in the System dialog
* Click the "Environment Variables" button of the pop-up dialog
* Select "Path" in the "System variables" box of the "Environment Variables"
dialog
NB: If you are not the administrator, system policy may not allow editing
the path variable. The complete path to an executable file will need to be
given to run one of the Hamlib programs.
* Click the Edit button
* Now add the Hamlib path in the "Variable Value:" edit box. Be sure to put
a semi-colon ';' after the last path before adding the Hamlib path (NB. The
entire path is highlighted and will be erased upon typing a character so
click in the box to unselect the text first. The PATH is important!!)
Append the Hamlib path, e.g. C:\Program Files\hamlib-w32-3.0~git\bin
* Click OK for all three dialog boxes to save your changes.
Testing with the Hamlib Utilities
=================================
To continue, be sure you have read the README.betatester file, especially the
"Testing Hamlib" section. The primary means of testing is by way of the rigctl
utility for radios and rotctl utility for rotators. Each is a command line
program that is interactive or can act on a single command and exit.
Documentation for each utility can be found as an HTML file in the doc
directory.
In short, the command syntax is of the form:
rigctl -m 120 -r COM1 -vvvvv
-m -> Radio model 120, or Yaesu FT-817 (use 'rigctl -l' for a list)
-r -> Radio device, in this case COM1
-v -> Verbosity level. For testing four or five v characters are required.
Five 'v's set a debug level of TRACE which generates a lot of screen
output showing communication to the radio and values of important
variables. These traces are vital information for Hamlib rig backend
development.
To run rigctl or rotctl open a cmd window (Start|Run|enter 'cmd' in the
dialog). If text scrolls off the screen, you can scroll back with the mouse.
To copy output text into a mailer or editor (I recommend Notepad++, a free
editor also licensed under the GPL), highlight the text as a rectangle in the
cmd window, press <Enter> (or right-click the window icon in the upper left
corner and select Edit, then Copy), and paste it into your editor with Ctl-V
(or Edit|Paste from the typical GUI menu).
All feedback is welcome to the mail address below.
Uninstall
=========
To uninstall, simply delete the Hamlib directory. You may wish to edit the
PATH as above to remove the Hamlib bin path, if desired.
Information for w32 Programmers
=================================
There is a .LIB import library for MS-VC++ in lib/msvc. Simply #include
<hamlib/rig.h> (add directory to include path), include the .LIB in your
project and you are done. Note: MS-VC++ cannot compile all the Hamlib code, but
the API defined by rig.h has been made MSVC friendly :-)
As the source code for the library DLLs is licensed under the LGPL, your
program is not considered a "derivative work" when using the published Hamlib
API and normal linking to the front-end library, and may be of a license of
your choosing. The published Hamlib API may be found at:
http://hamlib.sourceforge.net/manuals/3.0.1/index.html
Thank You!
==========
Patches, feedback, and contributions are welcome.
Please report problems or success to hamlib-developer@lists.sourceforge.net
Cheers,
Stephane Fillod - F8CFE
Nate Bargmann - N0NB
http://www.hamlib.org
END_OF_README
# Configure and build hamlib for mingw32, with libusb-win32
./configure --host=${HOST_ARCH} \
--prefix=${INST_DIR} \
--without-cxx-binding \
--disable-static \
CPPFLAGS="-I${LIBUSB_1_0_BIN_PATH}/include" \
LDFLAGS="-L${LIBUSB_1_0_BIN_PATH}/MinGW32/dll"
make install
mkdir -p ${ZIP_DIR}/bin ${ZIP_DIR}/lib/msvc ${ZIP_DIR}/lib/gcc ${ZIP_DIR}/include ${ZIP_DIR}/doc
cp -a src/libhamlib.def ${ZIP_DIR}/lib/msvc/libhamlib-2.def; todos ${ZIP_DIR}/lib/msvc/libhamlib-2.def
cp -a ${INST_DIR}/include/hamlib ${ZIP_DIR}/include/.; todos ${ZIP_DIR}/include/hamlib/*.h
cp -a doc/Hamlib_design.png ${ZIP_DIR}/doc
cp -a doc/hamlib.html ${ZIP_DIR}/doc
# C++ binding is useless on w32 because of ABI
rm ${ZIP_DIR}/include/hamlib/{rig,rot}class.h
for f in AUTHORS ChangeLog COPYING COPYING.LIB LICENSE README README.betatester README.w32-bin THANKS ; do \
cp -a ${f} ${ZIP_DIR}/${f}.txt ; todos ${ZIP_DIR}/${f}.txt ; done
# Generate HTML documents from nroff formatted man files
for f in doc/man1/*.1; do \
/usr/bin/groff -mandoc -Thtml >${f}.html ${f}
cp -a ${f}.html ${ZIP_DIR}/doc/. ; done
cd ${BUILD_DIR}/$1
# Copy build files into specific locations for Zip file
cp -a ${INST_DIR}/bin/{rigctld.exe,rigctl.exe,rigmem.exe,rigsmtr.exe,rigswr.exe,rotctld.exe,rotctl.exe} ${ZIP_DIR}/bin/.
cp -a ${INST_DIR}/bin/libhamlib-?.dll ${ZIP_DIR}/bin/.
cp -a ${INST_DIR}/lib/libhamlib.dll.a ${ZIP_DIR}/lib/gcc/.
# NB: Strip Hamlib DLLs and EXEs
${HOST_ARCH_STRIP} ${ZIP_DIR}/bin/*.exe ${ZIP_DIR}/bin/*hamlib-*.dll
# Copy needed third party DLLs
cp -a /usr/i686-w64-mingw32/lib/libwinpthread-1.dll ${ZIP_DIR}/bin/.
cp -a ${LIBUSB_1_0_BIN_PATH}/MinGW32/dll/libusb-1.0.dll ${ZIP_DIR}/bin/libusb-1.0.dll
# Required for MinGW with GCC 4.9
cp -a /usr/lib/gcc/i686-w64-mingw32/4.9-posix/libgcc_s_sjlj-1.dll ${ZIP_DIR}/bin/libgcc_s_sjlj-1.dll
## Need VC++ free toolkit installed (default Wine directory installation shown)
( cd ${ZIP_DIR}/lib/msvc/ && wine ~/.wine/drive_c/Program\ Files/Microsoft\ Visual\ C++\ Toolkit\ 2003/bin/link.exe /lib /machine:i386 /def:libhamlib-2.def )
/usr/bin/zip -r ${HL_FILENAME}.zip `basename ${ZIP_DIR}`

Wyświetl plik

@ -1,29 +1,29 @@
#!/bin/bash
# Builds Hamlib 3.x Win32 binary distribution.
# Builds Hamlib 3.x W64 binary distribution.
# A script to build a set of Win32 binary DLLs from a Hamlib tarball.
# A script to build a set of W64 binary DLLs from a Hamlib tarball.
# This script assumes that the Hamlib tarball has been extracted to the
# directory specified in $BUILD_DIR and that libusb-win32-bin-1.x.y.z has also
# been extracted to $BUILD_DIR. The MS VC++Toolkit must also be installed
# and working with Wine.
#
# See README.build-win32 for complete details.
# Requires libusb-1.0 to be accessible for USB backends to be built.
# See README.build-w64 for complete details.
# Set this to a desired directory
BUILD_DIR=~/builds
# Set this to LibUSB archive extracted in $BUILD_DIR
LIBUSB_VER=libusb-win32-bin-1.2.4.0
LIBUSB_VER=libusb-1.0.20
# uncomment the correct HOST_ARCH= line for your minGW installation
# HOST_ARCH=i586-mingw32msvc
HOST_ARCH=i686-w64-mingw32
HOST_ARCH=x86_64-w64-mingw32
# Set to the strip name for your version of minGW
# HOST_ARCH_STRIP=i586-mingw32msvc-strip
HOST_ARCH_STRIP=i686-w64-mingw32-strip
HOST_ARCH_STRIP=x86_64-w64-mingw32-strip
# Error return codes. See /usr/include/sysexits.h
EX_USAGE=64
@ -33,35 +33,38 @@ EX_NOINPUT=66
# Pass name of Hamlib archive extracted in $BUILD_DIR
if [ $# -ne 1 ]; then
echo -e "\nUsage: `basename $0` hamlib-version\n"
echo -e "See README.build-win32 for more information.\n"
exit $EX_USAGE
echo -e "See README.build-w64 for more information.\n"
exit ${EX_USAGE}
fi
# Make sure the Hamlib archive is where we expect
if [ -d ${BUILD_DIR}/$1 ]; then
echo -e "\nBuilding Win32 binaries in ${BUILD_DIR}/$1\n\n"
echo -e "\nBuilding w64 binaries in ${BUILD_DIR}/$1\n\n"
cd ${BUILD_DIR}/$1
else
echo -e "\nBuild directory, ${BUILD_DIR}/$1 not found!\nCheck path for $1 or correct the version number.\n"
exit $EX_NOINPUT
fi
RELEASE=`/usr/bin/awk 'BEGIN{FS="["; RS="]"} /\[3\./ {print $2}' ./configure.ac`
INST_DIR=`pwd`/mingw-inst
ZIP_DIR=`pwd`/hamlib-win32-${RELEASE}
LIBUSB_WIN32_BIN_PATH=${BUILD_DIR}/${LIBUSB_VER}
RELEASE=`/usr/bin/awk 'BEGIN{FS="["; RS="]"} /\[3\./ {print $2;exit}' ./configure.ac`
HL_FILENAME=hamlib-w64-${RELEASE}
INST_DIR=`pwd`/mingw64-inst
ZIP_DIR=`pwd`/${HL_FILENAME}
LIBUSB_1_0_BIN_PATH=${BUILD_DIR}/${LIBUSB_VER}
# Create Win32 specific README.win32_bin file
cat > README.win32-bin <<END_OF_README
# Create W64 specific README.w64-bin file
cat > README.w64-bin <<END_OF_README
What is it?
===========
This ZIP archive or Windows installer contains a build of Hamlib-$RELEASE
cross-compiled for MS Windows 32 bit using MinGW under Debian GNU/Linux
cross-compiled for MS Windows 64 bit using MinGW under Debian GNU/Linux 8
(nice, heh!).
The DLL has a cdecl interface for MS VC++.
NB: This Windows 64 bit release is EXPERIMENTAL! Some features such as USB
backends have been disabled at this time. Please report bugs, failures, and
success to the Hamlib mailing list below.
This software is copyrighted. The library license is LGPL, and the *.EXE
files licenses are GPL. Hamlib comes WITHOUT ANY WARRANTY. See the
@ -80,7 +83,7 @@ reasonable choice.
Make sure *all* the .DLL files are in your PATH (leave them in the bin
directory and set the PATH). To set the PATH environment variable in
Windows 2000, Windows XP, and Windows 7 (need info on Vista and Windows 8)
Windows 2000, Windows XP, and Windows 7 (need info on Vista and Windows 8/10)
do the following:
* W2k/XP: Right-click on "My Computer"
@ -104,7 +107,7 @@ do the following:
a semi-colon ';' after the last path before adding the Hamlib path (NB. The
entire path is highlighted and will be erased upon typing a character so
click in the box to unselect the text first. The PATH is important!!)
Append the Hamlib path, e.g. C:\Program Files\hamlib-win32-3.0~git\bin
Append the Hamlib path, e.g. C:\Program Files\hamlib-w64-3.0~git\bin
* Click OK for all three dialog boxes to save your changes.
@ -149,20 +152,17 @@ To uninstall, simply delete the Hamlib directory. You may wish to edit the
PATH as above to remove the Hamlib bin path, if desired.
Information for Win32 Programmers
Information for w64 Programmers
=================================
There is a .LIB import library for MS-VC++ in lib/msvc. Simply #include
<hamlib/rig.h> (add directory to include path), include the .LIB in your
project and you are done. Note: MS-VC++ cannot compile all the Hamlib code,
but the API defined by rig.h has been made MSVC friendly :-)
As the source code for the library DLLs is licensed under the LGPL, your
program is not considered a "derivative work" when using the published
Hamlib API and normal linking to the front-end library, and may be of a
license of your choosing. The published Hamlib API may be found at:
http://sourceforge.net/apps/mediawiki/hamlib/index.php?title=Documentation
http://hamlib.sourceforge.net/manuals/1.2.15/index.html
(The 3.0 API is unchanged although new documentation will be forthcoming.)
Thank You!
@ -180,36 +180,34 @@ http://www.hamlib.org
END_OF_README
# Configure and build hamlib for mingw32, with libusb-win32
# Configure and build hamlib for x86_64-w64-mingw32, with libusb-1.0
./configure --host=${HOST_ARCH} \
--prefix=`pwd`/mingw-inst \
--prefix=${INST_DIR} \
--without-cxx-binding \
--disable-static \
CPPFLAGS="-I${LIBUSB_WIN32_BIN_PATH}/include" \
LDFLAGS="-L${LIBUSB_WIN32_BIN_PATH}/lib/gcc"
CPPFLAGS="-I${LIBUSB_1_0_BIN_PATH}/include" \
LDFLAGS="-L${LIBUSB_1_0_BIN_PATH}/MinGW64/dll"
make install
mkdir -p ${ZIP_DIR}/bin ${ZIP_DIR}/lib/msvc ${ZIP_DIR}/lib/gcc ${ZIP_DIR}/include ${ZIP_DIR}/pdf ${ZIP_DIR}/doc
mkdir -p ${ZIP_DIR}/bin ${ZIP_DIR}/lib/gcc ${ZIP_DIR}/include ${ZIP_DIR}/doc ${ZIP_DIR}/lib/msvc # ${ZIP_DIR}/pdf
cp -a src/libhamlib.def ${ZIP_DIR}/lib/msvc/libhamlib-2.def; todos ${ZIP_DIR}/lib/msvc/libhamlib-2.def
cp -a ${INST_DIR}/include/hamlib ${ZIP_DIR}/include/.; todos ${ZIP_DIR}/include/hamlib/*.h
cp -a doc/Hamlib_design.png ${ZIP_DIR}/doc
cp -a doc/hamlib.html ${ZIP_DIR}/doc
# C++ binding is useless on win32 because of ABI
# C++ binding is useless on w64 because of ABI
rm ${ZIP_DIR}/include/hamlib/{rig,rot}class.h
for f in AUTHORS ChangeLog COPYING COPYING.LIB LICENSE README README.betatester README.win32-bin THANKS ; do \
for f in AUTHORS ChangeLog COPYING COPYING.LIB LICENSE README README.betatester README.w64-bin THANKS ; do \
cp -a ${f} ${ZIP_DIR}/${f}.txt ; todos ${ZIP_DIR}/${f}.txt ; done
# Generate PDF documents from nroff formatted man files
cd tests
for f in rigmem.1 rigsmtr.1 rigswr.1; do \
groff -mandoc >${f}.ps ${f} ; ps2pdf ${f}.ps ; rm ${f}.ps ; \
cp -a ${f}.pdf ${ZIP_DIR}/pdf/. ; done
# Generate HTML documents from nroff formatted man files
for f in doc/man1/*.1; do \
/usr/bin/groff -mandoc -Thtml >${f}.html ${f}
cp -a ${f}.html ${ZIP_DIR}/doc/. ; done
cd ${BUILD_DIR}/$1
@ -222,14 +220,13 @@ cp -a ${INST_DIR}/lib/libhamlib.dll.a ${ZIP_DIR}/lib/gcc/.
${HOST_ARCH_STRIP} ${ZIP_DIR}/bin/*.exe ${ZIP_DIR}/bin/*hamlib-*.dll
# Copy needed third party DLLs
cp -a /usr/i686-w64-mingw32/lib/libwinpthread-1.dll ${ZIP_DIR}/bin/.
cp -a ${LIBUSB_WIN32_BIN_PATH}/bin/x86/libusb0_x86.dll ${ZIP_DIR}/bin/libusb0.dll
cp -a /usr/x86_64-w64-mingw32/lib/libwinpthread-1.dll ${ZIP_DIR}/bin/.
cp -a ${LIBUSB_1_0_BIN_PATH}/MinGW64/dll/libusb-1.0.dll ${ZIP_DIR}/bin/libusb-1.0.dll
# Required for MinGW with GCC 4.8
cp -a /usr/lib/gcc/i686-w64-mingw32/4.8/libgcc_s_sjlj-1.dll ${ZIP_DIR}/bin/libgcc_s_sjlj-1.dll
# Required for MinGW with GCC 4.9
cp -a /usr/lib/gcc/x86_64-w64-mingw32/4.9-posix/libgcc_s_seh-1.dll ${ZIP_DIR}/bin/libgcc_s_seh-1.dll
# Need VC++ free toolkit installed (default Wine directory installation shown)
( cd ${ZIP_DIR}/lib/msvc/ && wine ~/.wine/drive_c/Program\ Files/Microsoft\ Visual\ C++\ Toolkit\ 2003/bin/link.exe /lib /machine:i386 /def:libhamlib-2.def )
zip -r hamlib-win32-${RELEASE}.zip `basename ${ZIP_DIR}`
## Need VC++ free toolkit installed (default Wine directory installation shown)
( cd ${ZIP_DIR}/lib/msvc/ && wine ~/.wine/drive_c/Program\ Files/Microsoft\ Visual\ C++\ Toolkit\ 2003/bin/link.exe /lib /machine:amd64 /def:libhamlib-2.def )
zip -r ${HL_FILENAME}.zip `basename ${ZIP_DIR}`

Wyświetl plik

@ -1007,7 +1007,7 @@ int rotctl_parse(ROT *my_rot, FILE *fin, FILE *fout, char *argv[], int argc)
#endif
/* The starting position of the source string is the first
* character past the initial '\'.
* character past the initial '\'.
*/
snprintf(cmd_name, sizeof(cmd_name), parsed_input[0] + 1);
@ -1603,7 +1603,7 @@ void list_models()
rot_load_all_backends();
printf(" Rig # Mfg Model Version Status\n");
printf(" Rot # Mfg Model Version Status\n");
status = rot_list_foreach(hash_model_list, NULL);
if (status != RIG_OK)