A simple and efficient implementation of the Character Generator Protocol (Chargen, RFC 864) for the ESP32 microcontroller.
This project turns an ESP32 into a Chargen server. Once connected to your Wi-Fi network, it listens on port 19 for TCP connections. When a client connects, the server sends a continuous stream of ASCII characters, making it a great tool for network testing or learning about TCP servers on embedded systems.
This implementation uses the AsyncTCP library to handle clients asynchronously, allowing it to serve multiple clients without blocking.
- Features
- Hardware & Software
- Installation
- Usage
- Contributing
- License
- Contact
- ✅ RFC 864 Compliant: Implements the Character Generator Protocol.
- ⚡ Asynchronous: Built with
AsyncTCPto handle multiple clients efficiently without blocking the main loop. - 🌐 Wi-Fi Ready: Easily configure your Wi-Fi credentials to get it online.
- An ESP32 development board (e.g., NodeMCU-32S, ESP32-DevKitC).
- Arduino Framework for ESP32
- AsyncTCP for ESP32
AsyncTCP
PlatformIO will automatically install these dependencies when you build the project.
Follow these steps to get the project running on your ESP32.
-
Clone the repository:
git clone https://github.com/jnovonj/ESP32-Chargen-Server.git cd ESP32-Chargen-Server -
Configure Wi-Fi Credentials:
const char *Hostname = "ChargenServer"; const char *ssid = "YOUR_WIFI_SSID"; const char *password = "YOUR_WIFI_PASSWORD";
-
Power On & Monitor: After uploading, open the Serial Monitor in PlatformIO (plug icon). The ESP32 will attempt to connect to your Wi-Fi. Once connected, it will print its IP address to the serial monitor.
Connecting to WiFi... WiFi connected. IP address: 192.168.1.123 Chargen Server started on port 19 -
Connect to the Server: From any computer on the same network, use a
telnetclient ornetcatto connect to the ESP32's IP address on port 19.telnet 192.168.1.123 19
Or using
netcat:nc 192.168.1.123 19
You should immediately see a continuous stream of ASCII characters printed to your terminal. To disconnect, close the
telnetorncsession (usually withCtrl+]thenquitfor telnet, orCtrl+Cfor nc).
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
This project is licensed under the GNU General Public License v3.0 (GPL-3.0). See the LICENSE file for full terms.
jnovonj
Project Link: https://github.com/jnovonj/ESP32-Chargen-Server