Mike Black W9MDB
9f0d5951cb
Move Startup message after debug_set_level in rigctld.c
2021-08-28 09:53:19 -05:00
Mike Black W9MDB
283281c4cb
astyle all files preparing for 4.3 release
2021-08-26 06:49:24 -05:00
Mike Black W9MDB
5cab1acc0d
In rigctld do not try to close fsockin/fsockout when null -- happens during error on fsockin or fsockout
...
https://github.com/Hamlib/Hamlib/issues/757
2021-08-05 07:50:15 -05:00
Mike Black W9MDB
75687ea273
Show startup arguments for rigctl and rigctld
2021-06-28 10:11:29 -05:00
Mike Black W9MDB
dd2ed945fd
Change default multicast to 0.0.0.0 for now until implemented and tested
...
https://github.com/Hamlib/Hamlib/issues/695
2021-06-21 16:52:27 -05:00
Michael Black
c4e6ed39e6
Merge pull request #715 from mikaelnousiainen/fix-icom-transceive-and-spectrum-data-conflicts
...
Attempt to handle asynchronous rig output data in Icom backend
2021-05-31 08:31:42 -05:00
Mikael Nousiainen
3a67356bc1
Add some comments and improved debugging on SIGIO async data handling
2021-05-31 16:22:22 +03:00
Mike Black W9MDB
fabec4a94c
Improve rig_open error msg in rigctl.c and rigctld.c
2021-05-30 06:48:12 -05:00
Mike Black W9MDB
3e4ff69b96
Add multicast_item_e and change multicast_server API
...
https://github.com/Hamlib/Hamlib/issues/695
2021-05-23 07:40:08 -05:00
Mike Black W9MDB
cc1f277e5f
Beginning of multicast capability
...
https://github.com/Hamlib/Hamlib/issues/695
2021-05-19 13:17:46 -05:00
Mike Black W9MDB
fdf1f7f6f0
Fix newline in help in rigctld.c
2021-05-17 00:05:16 -05:00
Mike Black W9MDB
9902ec796c
Reduce rigctld verbosity when using direct commands from rigctl client
...
https://github.com/Hamlib/Hamlib/issues/690
2021-05-09 15:16:23 -05:00
Mike Black W9MDB
974d978eaa
Eliminate debug msg from rigctld.c
2021-04-12 08:33:58 -05:00
Mike Black W9MDB
778758200e
A more robust rigctld that can survive the rig disappearing and coming back again.
...
This means when a rigctld client sees RIG_EIO it can keep polling and will reconnect when the rig reappears.
2021-04-10 14:22:53 -05:00
Mike Black W9MDB
6901bb1cda
Remove vfo_mode printout
2021-04-09 15:16:41 -05:00
Michael Black W9MDB
6eee309b56
Improve rig_get_version and hamlib_version2 information to include commit information
...
https://github.com/Hamlib/Hamlib/issues/617
2021-03-19 22:56:18 -05:00
Mikael Nousiainen
90112b5769
First attempt at fixing rigctl_parse return values and unnecessary rig re-open cycles
2021-03-16 23:39:35 +02:00
Michael Black W9MDB
94e51bfa24
rigctld.c add retry of rig_open with an IO error
...
https://github.com/Hamlib/Hamlib/issues/560
2021-03-07 09:03:37 -06:00
Michael Black W9MDB
1fcb9404b9
More changes to support macro renaming
2021-03-06 14:59:57 -06:00
Michael Black W9MDB
f88c3f4a4c
Fix mingw compilation errors on new rig_debug macro
2021-03-05 12:03:40 -06:00
Michael Black W9MDB
ee60a68bec
astyle files
2021-02-28 09:46:01 -06:00
Michael Black W9MDB
529685ab69
Disable rigctld error check with rig_close/rig_open -- more investigation needed
...
https://github.com/Hamlib/Hamlib/issues/556
2021-02-20 10:24:08 -06:00
Michael Black W9MDB
185a938a76
Add twiddle_timeout and twiddle_rit --set-conf options
...
rigctld --set-conf=twiddle_timeout=5,twiddle_rit=1
This will set the twiddle timeout to 5 seconds and turn on twiddle_rit
For twiddle timeout VFOB will not be poller for 5 seconds after VFO twiddling is detected. For RIT VFOB get_freq is suppressed and returns the cached value only (set_freq on VFOB still works).
rigctld --twiddle is deprecated and will be removed in 5.0
https://github.com/Hamlib/Hamlib/issues/444
2021-02-18 11:15:02 -06:00
Michael Black W9MDB
06723c959b
Limit the error retry in rigctld.c to 4 times
...
https://github.com/Hamlib/Hamlib/issues/551
2021-02-18 06:48:06 -06:00
Michael Black W9MDB
c717bb5d76
Improve -V version info
2021-01-25 22:24:57 -06:00
Michael Black W9MDB
1b89407a8d
Fix compilation of rigctld.c on mingw
2021-01-24 17:19:58 -06:00
Michael Black W9MDB
2be172ac4e
Improve robustness of rigctld
...
Now retries opening indefinitely
Improved client side too
Error message should now show timeout if rig disappears
2021-01-24 10:51:19 -06:00
Michael Black W9MDB
948e9d5f99
astyle files
2020-10-23 11:36:42 -05:00
Michael Black W9MDB
4e748df12b
Add -x/--uplink switch for GPredict. Will avoid reading freq from the uplink VFO 1=Sub, 2=Main
...
This will likely deprecate the twiddle option
https://github.com/Hamlib/Hamlib/issues/404
2020-10-23 11:34:42 -05:00
Michael Black W9MDB
d4e1e91272
Fix rigctl -W and --twiddle_timeout
2020-10-22 16:04:53 -05:00
Michael Black W9MDB
f52007d02d
Fix twiddle short command
2020-10-20 16:20:05 -05:00
Bill Somerville
f38ee5c6f1
Ensure old hamlibdatetime.h headers in the source dir are ignored
2020-10-17 02:31:17 +01:00
Michael Black W9MDB
275db971cd
Remove sleep on rigctld EOF -- don't think it's really needed
...
https://github.com/Hamlib/Hamlib/issues/366
2020-09-07 08:53:39 -05:00
Michael Black W9MDB
f454cff0b7
Add check for -s switch on all utils to ensure integer is entered
2020-07-01 08:52:44 -05:00
Michael Black W9MDB
ac1f990474
Remove AI_CANONNAME from rigctld.c
...
Didn't work with simple "rigctld" and no -T
https://github.com/Hamlib/Hamlib/issues/298
2020-06-22 09:52:08 -05:00
Michael Black W9MDB
a3c4eb9ee0
Fix cppcheck warnings
2020-06-21 22:31:31 -05:00
Michael Black W9MDB
e092a4a0a4
rigctld -T ::1 now works with rigctl -r ::1
...
More IPV6 testing needed on Windows and MacOS
Still not binding to link local addresses to be addressed next
https://github.com/Hamlib/Hamlib/issues/29
2020-06-21 17:47:04 -05:00
Michael Black W9MDB
afeb77e6d2
rigctld will now return either PTT_NONE or PTT_RIG_MICDATA to rigctl client
...
https://github.com/Hamlib/Hamlib/issues/259
2020-05-31 22:33:56 -05:00
Michael Black W9MDB
1dc461966d
Fix rigctld ptt_type to correctly reflect DTR/RTS
...
Might need to do this with some other values too
github.com/Hamlib/Hamlib/issues/270
2020-05-31 16:42:56 -05:00
Michael Black W9MDB
ff4882f1cd
Remove debug from rigctld.c
2020-05-30 11:13:40 -05:00
Michael Black W9MDB
19263cb249
Add last commit info to rigctld.c
2020-05-28 11:14:48 -05:00
mdblack98
8c73836b48
Fix cppcheck warnings in rigctld.c
2020-05-05 09:29:30 -05:00
mdblack98
bf1a05084d
astyle files
2020-05-03 17:24:42 -05:00
mdblack98
0bd52c259d
Add a bit more debug to rigctld.c
2020-05-03 17:06:34 -05:00
mdblack98
2fcecd7d7f
Remove debug from rigctld.c
2020-05-02 07:42:09 -05:00
mdblack98
9e710156e3
Add ability for rigctld client to turn vfo mode on/off with (,)
...
https://github.com/Hamlib/Hamlib/issues/232
Add caching of some limited rig information
Can be adjusted or turned off with rig_cache_set_timeout_ms or in rigctl with \set_cache_timeout
https://github.com/Hamlib/Hamlib/issues/228
2020-05-01 12:03:54 -05:00
mdblack98
81c21ee314
Reduce debug info in rigctl_parse.c and rigctld.c
2020-04-30 16:52:11 -05:00
mdblack98
b75a29f795
Fix braces in rigctld.c
2020-04-22 12:37:56 -05:00
mdblack98
3feaddfd73
Still working on Flex problem...
...
Adding debug to figure out why vfo_mode doesn't work with rigctl/rigctld
2020-04-22 11:47:56 -05:00
mdblack98
cae85c6dbe
Improve debugstatement in rigctl_parse.c
2020-04-21 12:52:40 -05:00
mdblack98
cefa092350
Change rigctld main loop to continue on EOF
2020-04-21 11:31:22 -05:00
mdblack98
1aef1c6285
Let rigctl_parse return when EOF is detected
2020-04-21 10:34:42 -05:00
Michael Black W9MDB
ff79dc800c
Adding debug to chase down Flex problem disconnect on profile change
2020-04-21 07:51:47 -05:00
Michael Black
ee87d5e6df
Fix buffer overrun in all utilities
...
Change MAXCONFLEN to 1024 bytes for some future proofing
2020-04-01 14:51:50 -05:00
Michael Black
bda5feb1bd
More cppcheck changes
2020-03-23 10:13:02 -05:00
Michael Black
6d9c81cf6a
A couple minor edit changes
2020-03-17 22:54:29 -05:00
Michael Black
7f9bbde383
Improve vfo switch message a bit
2020-03-16 14:23:40 -05:00
Michael Black
4150f12f36
Suppress unimportant error in rigctld.c
2020-03-15 16:31:19 -05:00
Michael Black
33babeaeff
Fix rigctdl multiple connections
2020-03-15 16:19:43 -05:00
Michael Black
35fffc4f38
astyle files
2020-03-15 15:32:46 -05:00
Michael Black
e4058156b1
Change rigctld to keep the rig open all the time
...
When a single client connects/disconnecta/connects it takes a bit too long to open the rig sometimes
2020-03-12 12:06:06 -05:00
Michael Black
18cc118443
Change -W switch to -X
2020-02-24 22:56:18 -06:00
Michael Black
8b462a0242
Add set_twiddle and get_twiddle functions
...
Add -W switch to rigctld to set twiddle timeout..don't need switch for rigctl since it can set from there with \set_twiddle
2020-02-24 09:34:02 -06:00
Bill Somerville
376b328ecb
Report unrecognised PTT and DCD types in rigctl and rigctld
2020-01-26 11:31:40 +00:00
Bill Somerville
99e1948cd3
Made PTT and DCD options consistent between rigctl and rigctld
2020-01-26 10:46:57 +00:00
Michael Black
c8eaf13a3d
Readding rigctld.c accidental removal
2019-12-25 07:58:19 -06:00
Michael Black
4e5e533248
Fix cppcheck warnings
2019-12-24 15:48:36 -06:00
Michael Black
a401d3ac78
Fix memory leak in rigctld and cleanup debug
2019-12-20 11:22:09 -06:00
Michael Black
1dbd633d5a
Missed semicolon
2019-12-19 18:05:23 -06:00
Michael Black
2703423b72
Think I got the fd socket leak on windows fixed now
2019-12-19 18:03:02 -06:00
Michael Black
bfe28e8032
Fix fd leak with fsockout
2019-12-19 17:09:18 -06:00
Michael Black
fb73e5abd7
Fix some cppcheck warnings
...
Fix declarations after statements
Remove some !rig checks...we either don't need them or need them everywhere with a new error code
If you pass a NULL rig you get what you deserve :-)
2019-12-09 17:12:13 -06:00
Michael Black
dc3f33bc11
Change %z to %d with casts for portability
2019-11-30 13:05:21 -06:00
Michael Black
c69502e11c
Fix rigctld for win32 build
2019-11-30 10:27:49 -06:00
Michael Black
6bf3b00c4f
astyle all files
2019-11-30 10:19:08 -06:00
Michael Black
2f4d62709e
Added a dummy snprintf to rig_debug to allow gcc to check format strings
...
This found tons of errors in rig_debug statements
So this patch cleans up all the files that were producing warnings or errors
This should fix a few segfaults when running with debug turned on
2019-11-30 10:04:31 -06:00
Bill Somerville
d931bd4e18
Move unnecessary global and file static variables to the stack
2019-08-29 00:39:39 +01:00
Michael Black
3dce8b01d1
Make rigctld thread safe for vfo_mode and ext_resp and change other globals to thread_local for future reference
2019-07-31 16:03:46 -05:00
Michael Black
ad8a01f18d
netrigctl can now do vfo mode -- has automatic detection of rigctld vfo mode
...
rigctl automatically detects vfo mode of rigctld
rigctli and rigctld recommend vfo mode if not selected
2019-02-05 12:05:51 -06:00
Michael Black W9MDB
35a28884f9
Fix -Z option on rigctld
2018-04-25 17:48:14 -05:00
Michael Black W9MDB
6c369109e6
Add debug time stamps via -Z and --debug-time-stamps
2018-04-15 15:06:52 -05:00
Michael Black W9MDB
ca85f4740c
Allow rigctld to reopen after error
2018-03-27 16:13:37 -05:00
Bill Somerville
489564a1af
Make rig_open() call in rigctld lazy and add graceful termination
...
Because some rigs lock their front panel when opened for CAT it is
helpful to call rig_close() in rigctld when no clients are
connected. This change does that.
A CTRL+C handler is also added to allow rig_close() to be called
during exit.
2018-03-12 19:47:45 +00:00
Nate Bargmann
b692fb22ef
Formatted tests/ to final coding guidelines
2017-10-06 18:58:42 -05:00
Nate Bargmann
d489b8bcb5
Apply formatting to 'tests/' directory
...
Format per style guide.
2017-08-10 05:46:12 -05:00
Michael Black W9MDB
cab7eb1647
Fix FT-891/991 behavior with WSJT-X
...
Separate FT-891 features
Fix rigctl and rigctld to not abort on function not available
Change Yaesu detection of FA length to automatic method instead of rig specific
2017-06-27 16:48:44 +01:00
Bill Somerville
2828422e92
Stop rigctld and rotctld crashing when service threads cannot write to clients
...
Although there is no reasonable recovery from SIGPIPE we do not want
to terminate the server process, just the client servicing thread. We
do this by setting the disposition for SIGPIPE to ignored, this causes
an EPIPE to be returned from blocked write() and send() calls that end
up trying to send to a broken pipe/socket.
2017-05-22 21:56:41 -05:00
Nate Bargmann
4595f77f99
Touch up rigctld.c and rotctld.c with astyle
...
Prior reformat had only been a reindent with Emacs. Now use astyle.
2016-02-14 18:05:55 -06:00
Nate Bargmann
9b45fce776
Reformat rigctld.c and rotctld.c
...
Several lines in each file benefitted from formatting so just reformat
the entire files into Linux C Style.
2016-02-12 20:46:38 -06:00
Bill Somerville
e4e17ce862
Improve IPv6 portability and consistency
...
After discussions with Greg N1DAM I have changed the dual stack
support to explicitly allow IPv4 connections mapped to IPv6 for any
AF_INET6 address since BSD as well as Windows defaults this socket
option to on (disallowed).
IPv4 mapped to IPv6 makes sense for Hamlib servers since starting two
servers one for each protocol family (the other option) is not
possible since there is only a single rig/rotator which cannot be
shared between two servers.
2016-02-12 20:20:25 -06:00
Bill Somerville
04c545b9b9
Only use IPv6 features on Windows versions that support it (>=XP)
2016-02-12 15:30:41 +00:00
Bill Somerville
ca7cbd89f4
Fix compiler warnings
2015-11-27 19:17:47 +00:00
Bill Somerville
181a3e9697
Proper IPv6 and dual stack networking
...
This means that rigctl & rigctld now work with default arguments on a
modern Windows machine with dual stack and localhost being [::1] as
the first interface returned by getaddrinfo().
Try all the interfaces return by DNS lookups to establish a connection
or listening port. Handle Windows network errors correctly so that
meaningful messages are printed.
The rigctl program now accepts IPv6 numeric addresses in the portname
field like [<addr>}:<port> for example the IPv6 loopback on port 4531
would be [::1]:4531.
2015-11-27 13:47:48 +00: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
Remi Chateauneu
60019c9444
Monolitic libraries.
2013-09-08 14:56:28 +01:00
Nate Bargmann
b9ff04abf0
Fix W2k 'freeaddrinfo' error
...
Trying to run the pthread enabled binaries on W2k resulted in an error
dialog with the text, "The procedure entry point freeaddrinfo could not be
located in ws2_32.dll". A Microsoft support page
(http://support.microsoft.com/kb/955045 ) hints that when 'ws2tcpip.h' is
included that 'wspiapi.h' should be included as well. Since MinGw
includes both files, this patch corrects the runtime error on W2k
2013-05-18 07:31:40 -05:00
Nate Bargmann
7e9f628648
rigctld/rotctld: Remove -e|--end-marker option
...
Remove support for deprecated "End Marker" protocol in rigctld and
rotctld.
2013-02-05 14:40:41 -06:00
Andrew Errington
1a77ef9eb9
Initial support for CM108 GPIO contorl of PTT
...
Signed-off-by: Nate Bargmann <n0nb@n0nb.us>
2012-01-11 06:16:51 -06:00
Nate Bargmann
b54932ec96
Assure NULL terminated strings in rigctl/rigctld
...
The -r, -p , and -d options could result in a port pathname that is
not a NULL terminated string as the allowed string length is the same
size as the buffer per the strncpy manual page. This is corrected by
assuring that the allowed length is FILPATHLEN - 1.
2012-01-06 23:11:35 -06:00
Nate Bargmann
0882cd696d
Update GPL/LGPL header in tests source files.
...
TNX to Lucian Laga, YO6PLB, for the notification.
2011-08-22 21:38:37 -05:00