
DIY Encrypted Messaging Device
Ultimate ESP32 Messaging Device via MQTT Server with TLS and AES-256
YouTube Demo
Introduction
Build your own secure, portable messaging device using an ESP32, keypad, LCD, and MQTT.
This project demonstrates practical DIY electronics that combine privacy, communication, and creativity. The device can send and receive encrypted messages, making it ideal for safe, offline communication experiments.
Materials & Components
You’ll need the following components:
- Microcontroller: ESP32 for handling logic and communication.
- Input: 4×4 numpad that works in T9 typing style, like old-school Nokia phones.
- Display: 16×2 LCD for real-time message display.
- Power: Rechargeable battery with long-lasting performance.
- Charging Port: USB Type-A port that uses a USB-to-USB adapter.
- Case: 3D printed in bold blue for aesthetics and protection.
- Toggle Switch: Decorative “rocket-style” switch added for visual appeal.
Operation & Tutorial (How it Works)
The device functions as a secure messaging system, sending and receiving messages via an MQTT server with TLS encryption, and decrypting them with AES-256 encryption.
How it works:
- The user types a message using the keypad.
- The ESP32 sends the message via MQTT, encrypted using TLS.
- The paired device receives and decrypts the message using AES-256.
- The LCD displays the message in real-time.
Keypad Functions
Each button serves a specific role:
- A — Sends the typed message.
- B — Acts as a backspace.
- C — Switches between T9 typing and preset quick messages.
- D — Toggles between transmit and receive modes.
Messaging Flow
To send a message:
- Type your message using the numpad.
- Press A to send it.
To receive a message:
- Press D to enter receive mode.
- The message instantly appears on the LCD.
- Start typing again to automatically return to transmit mode.
Additional Notes
- The ESP32 communicates using MQTT topics, which can be structured like this for easier integration:
messenger/device/state → LOCKED / UNLOCKEDmessenger/message → JSON { "method":"PIN|RFID|PHONE", "id":"tagId|user", "result":"OK|FAIL", "time":"ISO8601" }messenger/command → payload SEND | RECEIVE
- Ensure TLS encryption is enabled for secure communication.
- Decrypt messages using AES-256 for privacy.
- The system is portable, so it can be used anywhere with paired devices.
Intended Outcome
This project demonstrates:
- How to create a secure messaging system with an ESP32.
- Integration of keypad input and LCD display for real-time communication.
- Practical use of MQTT and AES encryption in DIY electronics.
- A portable, creative, and interactive electronics project.
