pico-stuff/apps/tcp_server
Luigi Cruz 8fc012c761 Add documentation to apps. 2021-03-11 22:50:45 -03:00
..
CMakeLists.txt Add documentation to apps. 2021-03-11 22:50:45 -03:00
README.md Add documentation to apps. 2021-03-11 22:50:45 -03:00
lwipopts.h Adding SDR code 2021-03-11 13:39:46 -03:00
main.c Add documentation to apps. 2021-03-11 22:50:45 -03:00
tusb_config.h Orgazine projects. 2021-03-03 23:48:48 -03:00
usb_descriptors.c Orgazine projects. 2021-03-03 23:48:48 -03:00

README.md

TCP Server

This is a TCP Server that will work with the USB Network Stack library to provide a TCP/IP connection between the host (computer) and the device (Pico). This example is a demonstration of how to send high-frequency data to the host using a TCP connection.

Dependencies

Usage

This program will start when a TCP connection is established. For this example, we are going to use Netcat. The command bellow should connect the host with the device. When the connection is opened, the device will start to stream data from the internal temperature sensor with ASCII characters. Binary data can also be sent.

$ netcat 192.168.7.1 7777
TEMP: 23.393365 °C
TEMP: 23.393365 °C
TEMP: 23.393365 °C
TEMP: 23.393365 °C
TEMP: 23.393365 °C
TEMP: 23.393365 °C
TEMP: 23.393365 °C
TEMP: 23.393365 °C
TEMP: 23.393365 °C
TEMP: 23.393365 °C
TEMP: 23.393365 °C
TEMP: 23.393365 °C
TEMP: 23.393365 °C
TEMP: 23.393365 °C
TEMP: 23.393365 °C
TEMP: 23.393365 °C
TEMP: 23.393365 °C
TEMP: 23.393365 °C
TEMP: 23.393365 °C
TEMP: 23.393365 °C