Wykres commitów

3631 Commity (libusb-1-0)

Autor SHA1 Wiadomość Data
Bill Somerville 2889f49392 Fix Icom IC-756Pro mode get/set.
The IC-756Pro doesn't have DATA mode but the capabilities incorrectly
used commands to get/set DATA sub modes.
2014-04-27 14:17:42 +01:00
Nate Bargmann 13c8cfa3ee Fix pkg-config generation on Windows
Merge branch 'fix_pkg-config' of git://git.code.sf.net/u/bsomervi/hamlib
2014-04-16 21:28:05 -05:00
Nate Bargmann 274bf21fdd Fix a buffer overflow in the Windows termios emulation.
Merge branch 'fix_windows_termios_segv' of git://git.code.sf.net/u/bsomervi/hamlib
2014-04-16 21:26:13 -05:00
Nate Bargmann 2885d56445 Add option to not use VFO XCHG command for Icom
Added option to not use VFO XCHG command when setting split
parameters.

Merge branch 'change_icom_sub_access' of git://git.code.sf.net/u/bsomervi/hamlib
2014-04-16 21:23:52 -05:00
Nate Bargmann 0b8a01e460 configure.ac: Fix a warning message.
Merge branch 'fix_k3' of git://git.code.sf.net/u/bsomervi/hamlib
2014-04-16 21:21:43 -05:00
Bill Somerville 99eec397d2 Fix pkg-config generation.
The NET_LIBS  configuration variable  was not  being exapanded  in the
pkgpconfig template file. This caused  static builds against hamlib to
fail on Windows because the WinSock library was not referenced.
2014-04-02 01:58:32 +01:00
Bill Somerville b27b423dce Fix a buffer overflow in the Windows termios emulation.
The  YACK() macro  generates  a  message of  variable  length due  the
__FILE__ string  and a  message returned  by MS  FormatMessage() being
inserted  into a  fixed length  string  buffer. I  have increased  the
buffer length to 1024 bytes and used snprintf to avoid overflows.

It looks like the whole YACK() macro should do nothing unless DEBUG is
defined so  there is probably  a small performance  gain to be  had by
doing that also. I have left that to the experts to decide.
2014-03-24 17:09:03 +00:00
Bill Somerville b0f6955740 Added option to not use VFO XCHG command when setting split parameters.
With Icom rigs that use MAIN?SUB VFOs there is a trade off when
setting the mode or frequency of the "other" VFO. Untill now Hamlib
uses the XCHG VFO command to address the "other" VFO. This has some
advantages, particularly it preserves the selected VFO and it
preserves memory mode of either VFO. The disadvantage is that any
split command causes the Rx to glitch when the VFO/MEMs are exchanged.

I have added a config parameter for Icom rigs called "no_xchg" which
forces the direct addressing of VFOs to set split mode/frequency. It
is a boolean option with a default of "0" (false) which equates to
prior behaviour. Setting it to "1" (true) will make the backend use
change VFO commands to set the "other" VFO. This means that TX on
"SUB" in split is assumed, that both are in VFO mode (not MEM), and
set/get split functions will leave the MAIN VFO selected.
2014-03-20 18:36:43 +00:00
Bill Somerville d9d8ed099c Fix a warning message.
A buffer was shorter than a max length being copied into it.
2014-03-18 22:00:02 +00:00
Nate Bargmann fafbb772c5 rigctl.c/rotctl.c: fix closing brace placement
A closing brace was improperly placed before a pair of CPP #endif
directives rather than between them.  Caught by a cppcheck audit.
2014-03-07 05:55:54 -06:00
Nate Bargmann c230cad17b kenwood/k3.c: Avoid possible buffer overrun
Running cppcheck found that the string length given to strncpy was one
too large for the buffer.
2014-03-06 14:55:10 -06:00
Bill Somerville 6e44327a7c Fix configure.ac
Added missing bracket that was causing configure without pkg-config to
fail.
2014-03-04 15:45:54 +00:00
Nate Bargmann 0fa8a5656c Quell warning from MinGW on setting CM108 pttbitnum
MinGW was issuing the following warning:

  CC     rig.lo
rig.c: In function 'rig_init':
rig.c:330:36: warning: assignment makes integer from pointer without a cast [enabled by default]
  rs->rigport.parm.cm108.ptt_bitnum = DEFAULT_CM108_PTT_BITNUM;
                                    ^

The constant DEFAULT_CM108_PTT_BITNUM was being defined as a string on
non-linux platforms.  Now defined to an integer on these platforms.  The
actual value may need to be corrected at some point in the future when
CM108 support is completed for those platforms.
2014-02-16 07:33:42 -06:00
Bill Somerville ea49154813 Fix Yaesu FT1000MP and FT1000MP Mk V modes.
The get mode function was not taking account of the extra mode bit in
the IF passband status byte. Also the set mode function was not
supporting the full set of available rig modes.

Added tuning step and bandwidth data for the newly supported modes.
2014-02-15 15:36:24 +00:00
Bill Somerville 266139aa7c Fix Elecraft K3 Data Sub-Mode Setting.
The data sub-mode has to be set after setting the bandwidth on the
"back" VFO since the BW$ command seems to reset the data sub-mode.
2014-02-14 21:12:50 +00:00
Bill Somerville f42ff9bd6d Fix Elecraft Data Mode Translation.
Ensure a valid mode is set for all possible mode set values.
2014-02-14 21:12:50 +00:00
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