Commit Graph

3515 Commits

Author SHA1 Message Date
Bill Somerville
09373ede8f Fix data sub-modes on Elecraft K3.
The K3 supports AFSK & FSK sub-modes and for the D versions it also
has an internal RTTY and PSK31 decoder. The decoder sub-modes are
reported as FSK (RTTY) and the AFSK sub-modes are reported as PKT(USB
& LSB). LSB modes are assumed to be RTTY and USB modes are assumed to
be PKT(PSK, WS modes etc.).

For mode set the data sub-modes are set as follows:

RTTY -> FSK D normal (LSB) VFO shows MARK QRG
RTTYR -> FSK D reversed (USB) VFO shows MARK QRG
PKTUSB -> DATA A normal (USB) VFO shows suppressed carrier QRG
PKTLSB -> AFSK A normal (LSB) optimised for RTTY VFO shows MARK QRG

Not all data sub-mode combinations are possible but the above mapping
seems most likely to cover the user requirements.
2014-02-14 21:11:24 +00:00
Bill Somerville
6e57454b06 Add spilt mode get and set for Elecraft K3. 2014-02-14 21:11:24 +00:00
Steve Conklin
a92017df38 Support for Flex 6K SDR radios, plus some fixes for easycomm
Two patches:

The first adds support for the Flex 6K series of SDR radios. These
radios have a CAT application that runs on a windows machine, and
exposes a network socket that can be opened for CAT commands. This back
end connects to that network socket and provides an interface.  I've
tested pretty thoroughly using a Flex 6700 but I don't have the other
models available (6500 and 6700R). CAT support on these models is
evolving with frequent updates from Flex, and this  back end does not
reflect the latest features to be added. I hope to get to them soon.

The second patch makes the easycomm interface more robust by flushing
the serial port and clearing the buffer.

Steve, AI4QR

Merge branch 'for-upstream' of https://github.com/sconklin/hamlib into sconklin-for-upstream
2014-02-09 07:17:24 -06:00
Ervin Hegedus
8c4bb72b99 Fixed SWIG `Setting a const char * variable may leak memory' error 2014-02-03 22:38:48 +01:00
Ervin Hegedus
f0acfa78eb RIG_PASSBAND_NORMAL wasn't handled correctly when rig_set_mode() was called - fixed 2014-02-03 21:32:59 +01:00
Nate Bargmann
ed33efdc2f Merge IC-756 Pro III fix from Bill, G4WJS
Merge branch 'fix_icom_ic756p3_data_mode' of git://git.code.sf.net/u/bsomervi/hamlib
2014-02-03 10:12:10 -06:00
Bill Somerville
83640f3fcc Fix Icom IC-756 Pro III get data mode.
The "1A 06" command to get the data mode returns 2 bytes rather than
the one byte documented in the user manual.

Fix indexing error, collect data mode from correct reply byte.
2014-02-03 15:11:44 +00:00
Bill Somerville
03fc1e0cb0 Extend TS590s firmware defect fixup to both VFOs.
It turns out that either VFO can be incorrectly set in split mode when
the VFO is the TX VFO. The logic has been changed to send an IF; query
and read and set the other VFO if the VFO just set in set_freq is the
TX VFO and the rig is in split.
2014-01-30 13:54:02 +00:00
Bill Somerville
1f3fe7b5d1 Make Kenwood TS590s firmware defect fixup revision specific.
As Kenwood have finally released TS590s firmware revision 1.08 and it
fixes the split TX defects; the fixup has been made revision specific.
2014-01-30 13:54:02 +00:00
Bill Somerville
64863c80ff Fix Kenwood get_vfo function returning wrong VFO in split TX.
The Kenwood IF command, which is used to get the current VFO, returns
the TX VFO in transmit mode. The get_vfo function needs to return the
RX VFO to be consistent and useful elsewhere. The implementation now
swaps the returned VFO if the rig is in split mode and transmitting at
the time of the query.
2014-01-30 13:54:02 +00:00
Bill Somerville
c4d89f2797 Fix TS590s firmware defect.
The TS590s with firmware revision 1.07 or earlier fails to set VFO B
frequency properly when the rig is in split mode and the TX VFO is VFO
B. The symptom is, subsequent TX is on the wrong frequency (the
previous frequency) or there is no output at all. The fix is to read
VFO A and then immediately set VFO A to the read frequency. This
effectively null sequence has the side effect of setting VFO B
properly.
2014-01-30 13:53:32 +00:00
Bill Somerville
e2b2f884c8 Get firmware revision for TS590s in rig_open.
Defects in the TS590s f/w can be addressed selectively according to
revision.

Enable kenwood_open function for TS590s.

For some reason the TS590s did not use the kenwood_open function, as
fetching the firmware revision may be required for this rig and it is
done in that function; it has been enabled.
2014-01-30 13:42:30 +00:00
Bill Somerville
ff44c229dd Correct order of MD and DA commands for TS590s.
The selection of data mode with DAn; is only possible after a valid
mode for data has been set (USB, LSB and, FM).
2014-01-30 13:32:04 +00:00
Bill Somerville
8ece70169b Add data sub-mode support for TS590s.
The TS590s has a DA command to set USB, LSB or, FM data
submodes. Support for get and set of these sub-modes has been
added. Mapped from RIG_MODE_PKTUSB, RIG_MODE_PKTLSB and,
RIG_MODE_PKTFM respectively.
2014-01-30 13:30:10 +00:00
Bill Somerville
5e60ae88f7 Fix Kenwood get split VFO function.
kenwood_get_split_vfo was not returning its txvfo parameter. I have
added code to calculate the TX VFO.
2014-01-30 13:28:00 +00:00
Bill Somerville
18842a5cdc Fix Kenwood CAT transaction busy retry mechanism.
Retries would always fail due to the expected response length being
modified prematurely to the response length of the error/busy
response.
2014-01-30 13:25:08 +00:00
Bill Somerville
c6abaa1111 Correct receive buffer length for IS; comamnd. 2014-01-30 13:23:11 +00:00
Bill Somerville
f3695ab8dc Fix Kenwood TS-870s split and bandwidth set/get.
The TS-870s has no width set for SSB and AM, instead the bandwidth is
set via a high and low pass fiter setting. The backend now sets these
to try and achieve the requested bandwidth. The HPF setting is assumed
to be the default.

The bandwidth query reads both the HPF and the LPF and returns the
difference.

The value of RIG_BANDWIDTH_NORMAL skips bandwidth adjustements.

The get and set_split operations have been enabled.
2014-01-30 13:19:15 +00:00
Bill Somerville
54c297b4c4 Fix Kenwood Split Operation for TS50 & TS480.
The TS50S has the old FN and SP commands rather than the newer FR/FT
commands, added code to support these commands allowing split
operation to be commanded on the TS50S.

The TS480 had no split VFO functions enabled, added normal modern
Kenwood split VFO and mode handing functions.
2014-01-30 13:09:30 +00:00
Bill Somerville
02915a5712 Fix Kenwood TS-2000 split operation.
The API calls to set split frequency and split mode were missing, I
have set them to the preexisting Kenwood functions and they seem to
work as expected. I'm not sure why they were not already enabled.
2014-01-30 13:02:19 +00:00
Steve Conklin
3eae92c1d0 Add paramater checking, serial port flush, buffer clear, and additional debug output
Signed-off-by: Steve Conklin <steve@conklinhouse.com>
2014-01-15 14:04:06 -06:00
Steve Conklin
e17ab36bc8 Add support for Flex6K radios
Signed-off-by: Steve Conklin <steve@conklinhouse.com>
2014-01-15 14:03:50 -06:00
Nate Bargmann
18f2f54f7d Document need for zlib for 'configure'
The macro that sets up the configure script test for Python expects the
zlib development files to be installed.  Add this to README.betatester.
2013-12-13 15:04:52 -06:00
Nate Bargmann
6ea09a138a Clean up build system, fix test programs
Clean up various left over commented lines from dlopen to single
libhamlib transition.  Remove unneeded configure variables.

Correct minor inconsistencies in Makefile.am files.

Define a new variable, READLINE_LIBS, so that only programs that offer
Readline support are linked against it.

Fix various compilation warnings and errors in test files revealed with
'make check' on MinGW.

Define rig and rotor backends to (mostly) be built in alphabetical
order.
2013-12-10 20:14:22 -06:00
Nate Bargmann
342068fe38 Restore inclusion of libusb.dll
Also add libgcc_s_sjlj-1.dll required since Debian's MinGW was upgraded
to GCC 4.8.
2013-12-10 20:05:00 -06:00
Julian Cable
3c15a1d6c3 Use Automake conditionals for G313 build
Split G313 sources into POSIX and Windows versions and use Automake
conditionals for building on *linux-gnu or  mingw*, pw32*, or cygwin
platforms.

Fixed dlopen issue on g313 backend which broke rigmatrix generation.

Signed-off-by: Nate Bargmann <n0nb@n0nb.us>
2013-11-23 08:03:17 -06:00
Nate Bargmann
0eda2b55d1 No longer rely on pkg-config for libusb
Use AC_CHECK_LIB macro to search for libusb rather than rely on
pkg-config.  Preserve environment variables LIBUSB_CFLAGS and
LIBUSB_LIBS as user precious variables.  Two features,
--with-xml-support and --enable-usrp still rely on pkg-config so only
invoke pkg-config when either or both of these features are selected.
Only the Winradio g313 model uses libdl so test for it only when
Winradio backend is enabled.
2013-10-30 22:29:50 -05:00
mvcstroomer
e9ee671149 Add Icom IC-7100 support.
From Martin, CT1IQI:

"Several programs under Linux rely on Hamlib for control. I wanted to
try WSJT-X (digital modes like JT65) and found that my new IC-7100 was
not yet supported, also after having compiled the current git version of
Hamlib and having compiled WSJT-X against that.

So I added a IC-7100 by taking the ic-7200 and 7420 rig files as
example, be it without going (yet) through all of the very many commands
the ic-7100 supports.

This produced the situation where there was communication, e.g. setting
and reading frequencies, but the PTT control did not work.  I debugged
that to actually the lack of a PTT mode in Hamlib that uses serial and
CAT at the same time; currently PTT per 'serial' seems equivalent to
toggling certain RS232 pins but not to any serial command level. So I
added a RIG_PTT_SERIAL_CAT mode for PTT control. Now the wsjt-x program
works nicely with the ic-7100 and controls both frequency and PTT via
the single USB cable."

Signed-off-by: Nate Bargmann <n0nb@n0nb.us>
2013-10-25 08:40:36 -05:00
Bill Somerville
29cb138210 Fix Icom IC-726 mode handling.
The IC-726 doesn't accept passband width sub commands with the mode
command. Well it does for CW, but not for other modes. I have disabled
the sending passband width sub commands for this rig to at least get
the mode setting commands accepted by the rig.

Fix IC-475A/E mode set command.

As with IC-726 very limited passband width sub commands with mode set
command so disabled all for now.
2013-10-18 19:12:55 +01:00
Bill Somerville
87ca3f338d Add support for Data Modes on Icom "Pro" models.
The Icom IC-7x6Pro models support AFSK data modes with Tx audio
delivered via the back ACC socket. This mode is enabled and queried
via a separate "0x1A06" command and applies to USB, LSB, FM and, AM as
USB-D, LSB-D, FM-D and, AM-D respectively on the radio. I have added
all but AM because hamlib has no mode enumeration for AM Data mode.

Most of the IC-7xxx rigs have an extended version of this special
command which also involves width. This needs further work to
implement.

Signed-off-by: Nate Bargmann <n0nb@n0nb.us>
2013-10-18 09:44:01 -05:00
Bill Somerville
419dc8540f Fix Yaesu newcat backend set_tx_vfo issue.
The newcat Yaesu backend was using a toggle command to set the TX VFO
where an explicit set command is avaiable.

This fix corrects the function for the FT-2000(D) and the FT-DX5000.

There is still an issue with the FT-450D which as far as I can see has
no definitive way of setting which VFO will be used for TX.

Signed-off-by: Nate Bargmann <n0nb@n0nb.us>
2013-10-01 03:15:48 -05:00
Nate Bargmann
87688bc254 hamlib.pc.in: Use AC_SUBST variables
Use AC_SUBST variables for generating hamlib.pc based on local
configuration of Hamlib.

Rework libusb pkg-config section and set LIBUSB as an AC_SUBST variable.
2013-10-01 03:00:59 -05:00
Nate Bargmann
9cd11ebe27 Force libhamlib to be relinked when a backend is updated
Add the rig and rotor backends to the list of dependencies for
libhamlib.la so that updating a given backend will force libhamlib.la to
be relinked as well.  Thanks to Bill Sommerville, G4WJS, for reporting
this.

Removed obsolete references and variables related to LTDL.
2013-09-26 21:57:04 -05:00
Bill Somerville
4f41b5b1d0 Fix Icom IC-756 filter handling.
The IC-756 only has two filters per mode unlike the later IC-756
variants that have three. The code was sending invalid commands
due to trying to select the third filter for certain bandwidths.

Also the default filter bandwidths were incorrect for this model.

Signed-off-by: Nate Bargmann <n0nb@n0nb.us>
2013-09-26 21:53:45 -05:00
Nate Bargmann
e233e6ffe5 hamlib.pc.in: Changes conformant to pkg-config docs
A careful reading of the pkg-config user guide and manual page showed
some errors in the format of the generated hamlib.pc file.  This patch,
hopefully, corrects those errors.
2013-09-24 22:17:48 -05:00
Nate Bargmann
f66da71719 Honor LIBUSB_LIBS when set by user
LIBUSB_LIBS was not passed to the LDADD variable for the Hamlib test
utilities.  This fix permits the user invoking 'configure' to specify a
static libusb to include the libusb symbols in libhamlib:

	./configure LIBUSB_LIBS="/usr/lib/i386-linux-gnu/libusb.a"

Note that the actual path will vary from system to system.
2013-09-23 14:27:31 -05:00
Nate Bargmann
9d267de520 Updates to README files for changed library structure 2013-09-22 20:58:18 -05:00
Nate Bargmann
1f0590dfbe Fix conditional build of winradio backend
With the new registration code set the HAVE_WINRADIO preprocessor
conditional if the winradio backend is to be built and test this
conditional in src/register.c whether to build winradio support.
2013-09-22 20:45:49 -05:00
Nate Bargmann
3999121d03 Update NEWS for Peaberry backend model 2013-09-22 20:44:45 -05:00
Bill Somerville
efd1917e98 Fix rig_open not failing when PTT/DCD port is unavailable.
rig_open was giving RIG_DEBUG_ERR messsages if PTT or DCD
port was unavailable but the function was not returning an
error status.

Signed-off-by: Nate Bargmann <n0nb@n0nb.us>
2013-09-21 21:14:11 -05:00
Hans Van Ingelgom
840ef67a85 Added Peaberry V1 and V2 models
On the Peaberry forum, we have a thread with some hamlib patches for the
Peaberry SDR (a softrock-like transceiver). Both version 1 and version 2
have been implemented and tested.

There are two patches: the first one, made by me (ON8VQ) adds support
for the two radio's, and the second one, made by R2AEE, fixes the tuning
(using PICUSB commands instead of AVRUSB).

The patches are available here:
http://ae9rb.com/forum/viewtopic.php?f=4&t=166

Signed-off-by: Nate Bargmann <n0nb@n0nb.us>
2013-09-20 14:34:21 -05:00
Bill Somerville
bf539f052b Patch to fix broken Yaesu backend with FT-2000(D)
Hi All,

attached is a patch to correct the Yaesu backend to stop it sending the
SH1; command to teh FT-2000(D) radios where it is illegal.

73
Bill
G4WJS.

commit 8e60a966de140c14fe506f958de92a8e1b738d2c
Author: Bill Somerville <bill@classdesign.com>
Date:   Fri Sep 20 02:10:58 2013 +0100

    Fix Yaesu backend using illegal command on FT-2000

    The FT-2000 doesn't support the SH1; command used by
    the get_mode/set_mode function. This was causing a
    "Protocol error" return when trying to get/set the mode
    of VFO B.

Signed-off-by: Nate Bargmann <n0nb@n0nb.us>
2013-09-19 22:08:42 -05:00
Nate Bargmann
c39b51327b Revise test for MinGW with sleep()
Revise the preprocessor conditional test for MinGW variables.  Tested on
all of my MinGW installations.  The prior test was broken by MinGW 3.0
on Debian Unstable.
2013-09-19 21:59:42 -05:00
Nate Bargmann
1bac099494 Remove remaining references to rpc
As rpc backends were removed some time ago, remove all remaining
documentation and other references to rpc.
2013-09-19 15:24:52 -05:00
Ladislav Vaiz
f632695131 Android build updates for monolithic build
Android is now built as a static library.

Signed-off-by: Nate Bargmann <n0nb@n0nb.us>
2013-09-19 07:25:08 -05:00
Nate Bargmann
9210621c75 Remove dependency on libltdl
No longer depend on libltdl from the libtool package.  The
winradio/linradio/wg313api backend still depends on libdl, but since it
is only compiled on POSIX, it will use the POSIX supplied libdl.

Update documentation to remove references to libltdl.
2013-09-18 22:58:00 -05:00
Bill Somerville
ef28e435d8 Patch to allow same serial port for PTT and CAT.
Hi,

patch attached to enable the above which was partially coded but not
quite working.

73
Bill
G4WJS.

>From 9dab3a250dfad7203772df91aadf79d38c108f04 Mon Sep 17 00:00:00 2001
From: Bill Somerville <bill@classdesign.com>
Date: Fri, 6 Sep 2013 01:13:34 +0100
Subject: [PATCH] Fix using same serail port for PTT and CAT

src/rig.c was coded to allow the same serial port for PTT and
CAT but them tried to open the port twice. I have added code
to share the file descriptor in this situation.

Signed-off-by: Nate Bargmann <n0nb@n0nb.us>
2013-09-18 12:34:20 -05:00
Steve Conklin
e6889901da easycomm patch from Steve Conklin, AI4QR
The attached patch restores what I think is the original easycomm
rotator interface functionality. It eliminates the conditional code
for USE_CUSTOM_CODE and USE_TEST_CODE.

Apparently for a very long time, the easycomm back end has been build
with USE_CUSTOM_CODE hardcoded in the source file. This generated code
that issued commands not even remotely similar to what's specified in
the easycommII protocol, which is documented in the easycomm directory
for hamlib.

It appears that at some point someone used the easycomm back end to
implement some custom tests for something, and it was committed and
has been carried this way ever since.

This restored what I think is proper functionality according to the
easycomm spec.

If you are a user of the easycomm back end, or you know of any
easycomm compatible rotor controllers that can be used for testing,
let me know and I can be more thorough about this.

Notes and disclaimers:

0. The original easycomm spec author seems to be unavailable.

1. I don't think that there was valid code to parse the position data
returned from the rotor controller. What was actually getting compiled
simply set some hard-coded values. I replaced it with what I think is
called for by the spec.

2. The easycomm spec is vague about what is supposed to be returned
for any command, so I may still not be parsing position information
correctly as it comes from other easycomm controllers.

3. I wrote my own rotator controller code based upon an interpretation
of the easycomm II spec. This back end for rotctl works with my
implementation. I don't have access to any other easycomm controllers
or even know whether any exist, so I am unable to test this against
any other implementation of easycomm.

4. Even when you select EASYCOMM II as the back end, it sends commands
which are only supposed to be valid for easycomm I according to the
spec (i.e. the position set command includes uplink and downlink
frequency and mode information fields). My rotor controller handles
these, so I didn't change the position set portion of the code.

I understand if there's concern for breaking rotator control for
existing users of the easycomm back end (if any actually exist). If
this patch is too risky, I'll either rewrite my controller to use
another protocol, or add another back end for my own newly invented
protocol "ai4qrcomm" (and document it better than easycomm).

Thanks,

Steve, AI4QR

Signed-off-by: Nate Bargmann <n0nb@n0nb.us>
2013-09-18 12:28:56 -05:00
Nate Bargmann
332a04b7cd Clean up backend Makefile.am files
Moved all backend *.h files into the SOURCES primary as Automake
documentation states all source file types should be listed.  This
causes Automake to include *.h files in rebuild rules for the targets.

Removed the '-DIN_HAMLIB' assignment from the CFLAGS primary in each
backend and assigned it to AM_CPPFLAGS in configure.ac.  The effect is
the same and it simplifies the backend Makefile.am files.

Removed all commented lines.
2013-09-16 21:51:39 -05:00
Nate Bargmann
36f5f4cf6a Revert to previous handling of getaddrinfo()
Use the system gettaddrinfo function when possible as before.  Tested on
GNU, Cygwin, MinGW on Linux, and MinGW on Windows.  Under MinGW the
replacement getaddrinfo is used.  Perhaps this is an area for
investigation to be certain MinGW really doesn't supply getaddrinfo.
This reverts some of the patches from Remi Chateauneu in commit
60019c9.  This fixes build issues encountered building the Windows
binary daily snapshots.

Enabled static library build by default at configure time.

Fixed pthread library linking for the ars backend on MinGW.
2013-09-15 19:47:49 -05:00