Nate Bargmann
f76b354588
Reformatted src directory
2017-08-09 06:14:31 -05:00
Bill Somerville
e44566e8a7
Release the serial port used for PTT when possible
...
When using separate serial port for PTT via RTS pr DTR it is
convienent to close the port when the PTT line is not asserted. This
allows other applications to share the PTT serial port.
This has been achieved by ensuring that file descriptor for the port
is set to -1 when the port is closed, this then allows the invalid FD
to be used as a PTT surrogate for the rig_get_ptt API when the port is
only being used for PTT.
2016-08-31 22:34:09 +01:00
Bill Somerville
4e2a6adf12
Move serial line control error checks to lower level routines
...
Moved in preference to introducing errno.h into rig.c.
2014-11-24 00:51:12 +00:00
Bill Somerville
0e0779877d
Add more diagnostics and error checks to serial line control
2014-11-24 00:18:48 +00:00
Stephane Fillod
212f2c97b2
serial: round up VTIME
...
Round up the VTIME setting in case the rig timeout is less than 100 ms,
which would make the termios timeout infinite.
2013-05-07 07:59:49 +02:00
Stephane Fillod
6c370dd36d
serial: fix blocking call on ports, esp. on win32
...
Summary from Lada:
On Win7, good testing command is:
C:\hamlib> rigctl -vvvvv -m 214 -r COM1 -s 4800 -C data_bits=8 -C
stop_bits=2 -C serial_handshake=Hardware -C timeout=1000
Behavior of this command differs on COM port. On hardware ports
(onboard, PCI NetMos, all probably 16550-compatible) rigctl freeze in
data write. It is correct, no hardware handshake is estabilished. On
FT232 USB port initialization failed by timeout. I think it is not
correct but this is not subject of this e-mail.
Looked into hamlib source and found, that timeout argument is no
longer handled. SetCommTimeouts takes timeout from c_cc[VTIME] which
is not filled.
Signed-off-by: Ladislav Vaiz <spam@nagano.cz>
2013-05-06 23:47:56 +02:00
Nate Bargmann
dad27d1f69
Update LGPL header in src source files.
...
TNX to Lucian Laga, YO6PLB, for the notification.
2011-08-22 21:38:37 -05:00
Stéphane Fillod, F8CFE
9de8e3f1d2
Add Mark/Space serial parity
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2996 7ae35d74-ebe9-4afe-98af-79ac388436b8
2010-10-26 19:31:09 +00:00
Stéphane Fillod, F8CFE
5c24ee2925
Workaround SF#3055689
...
* make sure the PTT is not set when configured as RTS/DTR at open()/close() time.
It appears the Linux kernel force their value as explained here[1] during open.
Also obvious when reading the source code[2], esp. in uart_startup()
and uart_update_termios() where uart_set_mctrl(port, TIOCM_DTR | TIOCM_RTS)
is called.
[1] http://books.google.fr/books?id=75eeBNcjcuIC&lpg=PA152&ots=Qvgi6VDLvm&pg=PA152#v=onepage&q&f=false
[2] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=drivers/serial/serial_core.c;hb=HEAD
* don't let the OS change modem signals at close() time
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2983 7ae35d74-ebe9-4afe-98af-79ac388436b8
2010-09-17 14:46:16 +00:00
Stéphane Fillod, F8CFE
299aba9233
While we're at it, add support for 150 bps serial devices
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2703 7ae35d74-ebe9-4afe-98af-79ac388436b8
2009-06-01 17:02:58 +00:00
Stéphane Fillod, F8CFE
38b3425646
Add support for 600 bps serial devices, SF ID: 2793000, patch by Magne, LA1BFA
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2698 7ae35d74-ebe9-4afe-98af-79ac388436b8
2009-05-18 18:39:59 +00:00
Martin Ewing, AA6E
f6ddc3edad
documentation
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2145 7ae35d74-ebe9-4afe-98af-79ac388436b8
2006-10-15 00:27:52 +00:00
Stéphane Fillod, F8CFE
9fae198566
renamed port_t as hamlib_port_t
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1957 7ae35d74-ebe9-4afe-98af-79ac388436b8
2005-04-03 12:27:17 +00:00
Stéphane Fillod, F8CFE
3e43344263
Split parallel port primitives in separate file from serial
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1862 7ae35d74-ebe9-4afe-98af-79ac388436b8
2004-10-02 20:37:24 +00:00
Stéphane Fillod, F8CFE
643fb5feae
* ser_ptt*/ser_dcd* are gone. Try to not mix low level serial stuff with
...
high level Hamlib stuff. Added ser_get_cts,ser_get_dsr,ser_get_car.
* better error code cascading
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1861 7ae35d74-ebe9-4afe-98af-79ac388436b8
2004-10-02 20:18:16 +00:00
Stéphane Fillod, F8CFE
f23efe3a7c
prepare work for Win32 systems which have 2 possible ABI: _stdcall and _cdecl
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1858 7ae35d74-ebe9-4afe-98af-79ac388436b8
2004-10-02 10:32:09 +00:00
Stéphane Fillod, F8CFE
c08cc78724
Fixes for BRK/RTS/DTR handling under win32
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1782 7ae35d74-ebe9-4afe-98af-79ac388436b8
2004-08-01 23:13:17 +00:00
Stéphane Fillod, F8CFE
211ee6dc68
export ser_set_dtr(), added ser_set_brk()
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1718 7ae35d74-ebe9-4afe-98af-79ac388436b8
2004-04-16 20:04:11 +00:00
Stéphane Fillod, F8CFE
7ec6ee0b12
remove unused buffered mode stuff
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1555 7ae35d74-ebe9-4afe-98af-79ac388436b8
2003-10-01 19:44:00 +00:00
Stéphane Fillod, F8CFE
f9478f5e97
* reworked parallel port access: invert logic to make it more natural
...
* explicit ppdev locking
* support for inclusion by C++ code
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1543 7ae35d74-ebe9-4afe-98af-79ac388436b8
2003-09-28 15:34:44 +00:00
Stéphane Fillod, F8CFE
61fb6bad2e
* fix a bug with TIOCMBIC/TIOCMBIS and char arg
...
* added support for Win32 parallel port
* added par_read_status() helper
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1526 7ae35d74-ebe9-4afe-98af-79ac388436b8
2003-08-25 22:35:55 +00:00
Stéphane Fillod, F8CFE
bc8b5a3fe4
mingw/cygwin fixes
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1513 7ae35d74-ebe9-4afe-98af-79ac388436b8
2003-08-20 07:22:40 +00:00
Stéphane Fillod, F8CFE
343deb6f59
Support for pipelined tuning, including DCD on CD line.
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1510 7ae35d74-ebe9-4afe-98af-79ac388436b8
2003-08-17 22:39:07 +00:00
Stéphane Fillod, F8CFE
b47cf01e33
termios replacement for win32 support
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1506 7ae35d74-ebe9-4afe-98af-79ac388436b8
2003-08-15 01:25:26 +00:00
Stéphane Fillod, F8CFE
20efdcce8d
new pp_write data/control helpers
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1485 7ae35d74-ebe9-4afe-98af-79ac388436b8
2003-06-22 19:50:36 +00:00
Stéphane Fillod, F8CFE
8fd0a399ff
speed_t requires termios
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1446 7ae35d74-ebe9-4afe-98af-79ac388436b8
2003-04-19 11:49:43 +00:00
Stéphane Fillod, F8CFE
f9c5661564
* portability fixes
...
* On some arch (win32), backends cannot use exported global variables as initializers
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1443 7ae35d74-ebe9-4afe-98af-79ac388436b8
2003-04-16 22:33:18 +00:00
Stéphane Fillod, F8CFE
36ce8141ca
extract set_dtr/set_rts to serve multiple purposes
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1377 7ae35d74-ebe9-4afe-98af-79ac388436b8
2003-02-23 22:36:30 +00:00
Stéphane Fillod, F8CFE
2bb4e81d09
fixes to allow new RIG_PORT_PARALLEL
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1300 7ae35d74-ebe9-4afe-98af-79ac388436b8
2002-11-28 22:33:48 +00:00
Stéphane Fillod, F8CFE
9b82982c18
BSD port fix
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1167 7ae35d74-ebe9-4afe-98af-79ac388436b8
2002-09-08 22:45:16 +00:00
Stéphane Fillod, F8CFE
f78428fa09
fix to make it build on *BSD, and maybe others
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1157 7ae35d74-ebe9-4afe-98af-79ac388436b8
2002-09-05 18:20:30 +00:00
Stéphane Fillod, F8CFE
d5ef4f01b5
split serial_open in open and serial_setup
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1012 7ae35d74-ebe9-4afe-98af-79ac388436b8
2002-03-07 22:49:00 +00:00
Stéphane Fillod, F8CFE
bb1593d737
call cfmakeraw only when available
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@900 7ae35d74-ebe9-4afe-98af-79ac388436b8
2002-01-22 21:17:55 +00:00
Stéphane Fillod, F8CFE
c3f9e8ec68
non-serial parts of serial.[ch] moved to iofunc.[ch]
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@876 7ae35d74-ebe9-4afe-98af-79ac388436b8
2002-01-16 22:58:51 +00:00
Francois Retief
2e78e9b0bb
Added read_serial function to read strings from a port.
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@846 7ae35d74-ebe9-4afe-98af-79ac388436b8
2002-01-07 17:14:22 +00:00
Stéphane Fillod, F8CFE
313170b604
misc cleanup
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@817 7ae35d74-ebe9-4afe-98af-79ac388436b8
2001-12-27 22:00:43 +00:00
Stéphane Fillod, F8CFE
95c6c458dc
static/dynamic build fixes
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@745 7ae35d74-ebe9-4afe-98af-79ac388436b8
2001-12-16 11:14:47 +00:00
Chris Karpinsky, AA1VL
3528fccbc9
add serial_flush() method to clean rx buffer
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@737 7ae35d74-ebe9-4afe-98af-79ac388436b8
2001-12-15 03:13:39 +00:00
Stéphane Fillod, F8CFE
8f3083cdb2
added win32 headers detection
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@640 7ae35d74-ebe9-4afe-98af-79ac388436b8
2001-08-22 21:12:09 +00:00
Stéphane Fillod, F8CFE
bdfe0b969a
'path' field renamed in port_t
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@608 7ae35d74-ebe9-4afe-98af-79ac388436b8
2001-07-25 21:59:55 +00:00
Stéphane Fillod, F8CFE
1f01081335
converted to LGPL
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@582 7ae35d74-ebe9-4afe-98af-79ac388436b8
2001-07-13 19:08:15 +00:00
Stéphane Fillod, F8CFE
c74995b05f
further win32 porting
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@556 7ae35d74-ebe9-4afe-98af-79ac388436b8
2001-06-15 07:08:37 +00:00
Stéphane Fillod, F8CFE
9b44155fb1
* more win32 portability stuff
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@546 7ae35d74-ebe9-4afe-98af-79ac388436b8
2001-06-12 23:59:21 +00:00
Stéphane Fillod, F8CFE
ed6bbc95a6
better error handling in serial comm, fix a bug in stream openning
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@536 7ae35d74-ebe9-4afe-98af-79ac388436b8
2001-06-10 22:19:08 +00:00
Stéphane Fillod, F8CFE
e968f8e7be
misc update for port_t support
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@533 7ae35d74-ebe9-4afe-98af-79ac388436b8
2001-06-05 18:08:30 +00:00
Stéphane Fillod, F8CFE
da19dd9a47
new port_t design
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@523 7ae35d74-ebe9-4afe-98af-79ac388436b8
2001-06-04 17:01:21 +00:00
Stéphane Fillod, F8CFE
5c50fee821
try to make hamlib more portable
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@511 7ae35d74-ebe9-4afe-98af-79ac388436b8
2001-06-02 17:56:37 +00:00
Stéphane Fillod, F8CFE
d6eb493604
* enabled dcd state retrieval code
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@395 7ae35d74-ebe9-4afe-98af-79ac388436b8
2001-02-15 00:00:11 +00:00
Stéphane Fillod, F8CFE
0f2d6fd179
* started some wider term control support (termios, termio, sgtty),
...
still not OK on win32
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@385 7ae35d74-ebe9-4afe-98af-79ac388436b8
2001-02-14 01:09:57 +00:00
Stéphane Fillod, F8CFE
41e6bec773
* misc update
...
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@370 7ae35d74-ebe9-4afe-98af-79ac388436b8
2001-02-11 23:16:07 +00:00