1
0
mirror of https://github.com/UzixLS/picocom.git synced 2025-07-19 07:21:18 +03:00
Commit Graph

307 Commits

Author SHA1 Message Date
b1f5034610 Merge pull request #90 from JoeMerten/osx-custom-baud-enable
Changed when to enable custom baud by default (#84)
2018-01-29 09:46:41 +02:00
07c27c626d Changed __x86__ macro to __i386__ 2018-01-28 17:29:44 +02:00
56e6886768 Enable default custom baud not for old PPC Mac (#84)
This check implies, that custom baud will not be enabled by default for OSX older than 10.4
2018-01-28 16:23:05 +01:00
a799995415 Changed when to enable custom baud by default (#84)
For Apple:
- enable by default for macOS / OSX
- do not enable by default for iOS

Have not found a way to check for OSX version on preprocessor level.
2018-01-25 17:02:18 +01:00
849532b261 Replaced strcpy in init_history()
Mostly to avoid compiler warnings on some systems
2018-01-21 21:16:26 +02:00
e2be81fcf7 Replaced strcpy & strcat in file_completion_cb()
Mostly to silence warnings (against using strcat / strcpy) that some
compilers produce
2018-01-21 17:44:10 +02:00
a2899a676c Rewording 2018-01-20 23:17:10 +02:00
7eac76f27b Minor rewording 2018-01-20 20:29:19 +02:00
8b33ed33d6 Minor rewording 2018-01-20 20:18:31 +02:00
8eab62945d Close tty_fd after resetting and before exiting 2018-01-20 16:45:48 +02:00
2a120ef1df Comments 2018-01-20 16:44:43 +02:00
7bf7b5d491 Explicitly unlock tty_fd when exiting with noreset 2018-01-20 14:36:11 +02:00
dabb708a8c Explicitly unlock tty_fd before exiting
Call flock(fd, LOCK_UN) explicitly for managed file at term_exitfunc().

This should, normally, not be necessary. Normally, exiting the program
should take care of unlocking the file. Unfortuntelly, it has been
observed that, on some systems, exiting or closing an flock(2)'ed tty fd
has peculiar side effects (like not reseting the modem-control lines,
even if HUPCL is set).
2018-01-20 13:19:51 +02:00
007072bd57 Better --lower/raise-dtr/rts handling
Set the levels of DTR and RTS modem-control lines (according to the
--lower/raise-dtr/rts command-line options) *twice*: Once
immediatelly (as quickly as possible) after opening the port (before
actually configuring it), and once after configuring it. On some systems
configuring the port (i.e. calling tcsetattr) has the effect of reseting
the DTR and RTS signals.
2018-01-20 11:38:43 +02:00
36b1dea5b2 Minor rewording / update 2018-01-18 10:31:14 +02:00
7bc133c8f9 Added missing options in help string 2018-01-18 10:30:11 +02:00
0ad57a2142 Comments 2018-01-17 20:44:48 +02:00
58e55a835f Updated email (comments) 2018-01-17 20:38:27 +02:00
d857e917ab Merge branch 'master' of https://github.com/npat-efault/picocom 2018-01-17 19:57:32 +02:00
2fa6a1d7a2 Changed when to enable custom baud by default
Be very conservative when enabling custom baudrate
support (USE_CUSTOM_BAUD) by default. Only enable (by default) on
systems where we know it will cause no problems. For other systems the
user can try to enable it explicitly (see Makefile).

Currently enabled by default on:

  Linux, Kernel verison > 2.6.0, x86 and x86_64 architectures
  FreeBSD, OpenBSD, DragonFly BSD
2018-01-17 19:57:07 +02:00
55b7019934 Changed when to enable custom baud by default
Be very conservative when enabling custom baudrate
support (USE_CUSTOM_BAUD) by default. Only enable (by default) on
systems where we know it will cause no problems. For other systems the
user can try to enable it explicitly (see Makefile).

Currently enabled by default on:

  Linux, Kernel verison > 2.6.0, x86 and x86_64 architectures
  FreeBSD, OpenBSD, NetBSD, DragonFly BSD
2018-01-17 19:48:14 +02:00
8f3cdcb0b0 Regenerated docs 2018-01-17 11:45:06 +02:00
f44852b124 Formating, minor rewording 2018-01-16 23:30:01 +02:00
b40a2c8002 Minor rewording 2018-01-16 04:52:57 +02:00
a36bc69ee1 Smaller standard input read buffer (16 bytes) 2018-01-16 04:26:07 +02:00
d4bf3502d5 Merge branch 'read-stdin' of https://github.com/JoeMerten/picocom into JoeMerten-read-stdin 2018-01-16 04:16:26 +02:00
a020a12f7a #73: for read stdin, changed naming to the same as for port read 2018-01-16 03:02:59 +01:00
4845b66d99 #73: read multiple bytes from stdin with a single read() call 2018-01-16 02:58:51 +01:00
8ca2e5a10f Better build support for custom baudrates
For some systems (OSes, versions, architectures) custom-baudrate
support is enabled by default.

For others, support may work, but must be enabled by defining
USE_CUSTOM_BAUD in the Makefile

You can also disable custom baudrate support altogether (even for
systems where it's enabled by default), by defining NO_CUSTOM_BAUD in
the Makefile
2018-01-16 03:46:09 +02:00
e41aeb84ac Merge branch 'JoeMerten-bsd-improvements' 2018-01-16 02:21:41 +02:00
13904345f5 Reverted #84 initial refactoring, removing #define HAS_CUSTOM_BAUD 2018-01-16 00:49:35 +01:00
33b023fe80 #84, renamed bsd.txt to bsd_notes.txt 2018-01-16 00:20:40 +01:00
f162d0cf14 #84, just updated bsd.txt 2018-01-16 00:19:09 +01:00
6ebb8c56fc #84: custom baudrate support for OpenBsd, and Dragonfly (but not NetBsd) 2018-01-15 23:30:30 +01:00
249cf8ea3c #84, added missing #endif 2018-01-15 20:35:00 +01:00
4776a5c781 #84, as suggested by Nick, surrounded platform specific headers by appropriated #ifdef 2018-01-15 20:33:05 +01:00
7a14651b93 #84: Manual control of handshake lines for OpenBsd, NetBsd and Dragonfly 2018-01-15 20:23:07 +01:00
f9e0b4c8a2 Small refactoring in term.c for bsd improvements
Introduced `#define HAS_CUSTOM_BAUD` for platforms which have appropriate implementation.

Moving that `#if defined(__linux__) && defined(USE_CUSTOM_BAUD)` ... stuff out of `term.c`and put it to `termios2.h` / `custbaud_bsd.h` headers.
Moving that platform specific `#ifdefs` to the platform specific headers helps removing duplicate complex `#ifdef` constructs.
The both platform specific headers then do `#define HAS_CUSTOM_BAUD` to signal that custom baudrate support is implemented for the target platform.
I'd tested all above mentioned platforms with both USE_CUSTOM_BAUD unset and set to check if that refactoring don't raises unexpected issues.
2018-01-15 19:47:46 +01:00
ab140a283b Regenerated docs 2018-01-13 16:12:33 +02:00
681ff11114 Added the --raise-rts and --raise-dtr options
Fixes #86
2018-01-13 16:11:07 +02:00
59fc43ef68 Raise / lower / pulse DTR related fixes
- Made functions term_[raise/lower]_dtr() work *only* by using the
  respective ioctl, not by setting the baudrate to 0. In case the ioctl
  is not supported for a system, the functions fail. Function
  term_pulse_dtr() still works by setting the baudrate to zero, if the
  ioctl is not supported. As a result, for systems without support for
  ioctls that set / clear the modem-control lines, DTR can only be
  pulsed, not toggled.

- When using tcsetattr() to pulse the DTR line (i.e. on systems where
  ioctls for setting / clearing the modem control lines are not
  supported), set only the output speed to B0, not both input and output
  speed.
2018-01-11 19:43:31 +02:00
42182a2232 Updated copyright years in boilerplate 2018-01-09 20:35:30 +02:00
ec378aed4e Changed VERSION and TTY_Q_SZ in Android.mk 2018-01-09 13:53:47 +02:00
eaf579f644 Correct printing of string-length
Added the cast, as without it, it may fail on systems where size_t is not
long (e.g is long long)

Fixes #85
2018-01-09 13:47:00 +02:00
7e0f1c5e7f Regenerated docs 2018-01-09 02:34:18 +02:00
a0c56a4235 Updated manual 2018-01-09 02:32:46 +02:00
6af9fe5633 Check for settings mismatch at startup
Check for port-settings mismatch ate startup, and print a warning
message if found

Closes #78
2018-01-09 01:44:22 +02:00
9b49043ee6 Regenerated docs 2018-01-02 18:31:17 +02:00
9275584258 Merge pull request #82 from JoeMerten/freebsd-rts-dtr
Freebsd rts dtr
2018-01-02 18:26:25 +02:00
de631d4c58 FreeBSD: Fixed initial sw-side state of RTS and DTR 2018-01-02 15:58:58 +01:00