Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 987 Bytes

README.md

File metadata and controls

39 lines (27 loc) · 987 Bytes

TCP listen

A small tool that uses GNRC TCP of RIOT to listen on a specific port. It can handle a single connection at a time and simply prints all messages received.

build and run

You can use this tool for testing on native Linux and macOS. First, setup local networking for the test:

</path/to/riot>/dist/tools/tapsetup/tapsetup -c 1

Second, build and run the tcp_listen tool with RIOT on native. Ensure that RIOTBASE is set or provide the path when calling make, like:

export RIOTBASE=</path/to/riot>
make && make term

Copy the lladdr of the RIOT node that is printed to the console and open another terminal where you run netcat, as follows with the given port (default: 24911):

nc -6 <lladdr-of-riot>%bridge0 <port>

Now you can send strings from your host via netcat to the RIOT node, which prints the messages.

debugging

You can use wireshark or tcpdump to sniff the network traffic, e.g.:

sudo tcpdump -i bridge0 tcp