1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/dist/tools/ethos
Joakim Nohlgård 369267863c ethos: Avoid EOF loops on detached stdin
Add a specific case of EOF on stdin to avoid situations where the
message `error reading from stdio. res=0` is repeated forever if stdin
is not a terminal. When ethos is started as a background process with
stdin redirected to /dev/null, e.g. `ethos ... < /dev/null &`, then
reading stdin will always result in a 0 length read (EOF).
If stdin is a tty we close the program on EOF (CTRL+D in the terminal),
otherwise, we stop reading from stdin after EOF was reached, but
continue tunneling traffic as usual.
2018-01-24 08:54:40 +01:00
..
.gitignore dist/tools/ethos: add .gitignore for ethos 2016-02-17 11:38:53 +01:00
ethos.c ethos: Avoid EOF loops on detached stdin 2018-01-24 08:54:40 +01:00
LICENSE dist: add ethos UNIX tool 2016-02-07 19:15:15 +01:00
Makefile dist: ethos: add clean target 2016-04-11 17:03:28 +02:00
README.md netdev2: rename to netdev and remove gnrc_netdev 2017-03-15 09:31:20 +01:00
start_network.sh dist/tools: make ethos baudrate configurable 2016-07-14 17:01:02 +02:00

Requirements

  • currently, the host side only compiles on Linux

Usage

To use, add

#
GNRC_NETIF_NUMOF := 2
USEMODULE += ethos gnrc_netdev
CFLAGS += '-DETHOS_UART=UART_DEV(0)' -DETHOS_BAUDRATE=115200 -DUSE_ETHOS_FOR_STDIO

to app Makefile, "make clean all flash", then run this tool so follows: # sudo ./ethos