Features Overview
SerialyTTY combines multiple advanced features into a comprehensive serial communication tool.
Core Featuresโ
๐ฏ Intelligent Baud Rate Detectionโ
Automatically detects the communication speed of connected devices without manual configuration.
How it works:
- GPIO interrupt-based bit timing measurement
- Analyzes falling edge patterns on RX line
- Calculates bit period from timing samples
- Supports standard baud rates: 9600, 19200, 38400, 57600, 115200
Use cases:
- Unknown device interrogation
- Automatic configuration
- Multi-device testing
- Educational demonstrations
Technical details:
- Precision: ยฑ2% tolerance
- Detection time: <1 second (typical)
- Minimum data: 8 bytes required
- Interrupt latency: <10ยตs
๐ Transparent Bridge Modeโ
Bidirectional serial data passthrough between USB and UART.
Features:
- Zero-latency forwarding (interrupt-driven)
- Real-time RX/TX byte counters
- Escape sequence (
~~~) for mode exit - Buffer management (1KB TX/RX)
Performance:
- Throughput: Up to 115200 bps
- Latency: <1ms typical
- Buffer overflow protection
- Error detection and logging
Use cases:
- Device programming
- Debugging embedded systems
- Protocol analysis
- Firmware updates
๐บ TFT Display Integrationโ
240x320 color display for visual feedback and status monitoring.
Display Screens:
-
Boot Screen
- SerialyTTY logo
- Firmware version
- Hardware detection status
- Initialization progress
-
Menu Screen
- Command list (D, B, S, I, H)
- Hardware status indicators
- Navigation instructions
- Current state display
-
Analyzing Screen
- Baud detection progress
- Real-time bit timing
- Instruction prompts
- Detection status
-
Bridge Screen
- Live RX/TX counters
- Current baud rate
- Connection status
- Escape sequence hint
Technical Features:
- DMA-accelerated rendering
- 8x8 bitmap font (custom)
- RGB565 color depth
- 40 MHz SPI clock
- 30+ FPS update rate
- Multi-line text support
๐พ SD Card Loggingโ
Comprehensive logging system with timestamped entries and structured data.
Log Structure:
[2025-12-08 14:32:15] [INFO] System boot complete
[2025-12-08 14:32:20] [BAUD] Detected: 115200 bps
[2025-12-08 14:32:25] [DATA] TX: 48 65 6C 6C 6F 20 57 6F 72 6C 64
[2025-12-08 14:32:30] [STATE] Entering bridge mode
Log Levels:
INFO- System events and status changesDATA- Communication data (hex dump)BAUD- Baud rate detection resultsSTATE- State machine transitionsTEST- Testing and diagnostic dataERROR- Error conditions
Features:
- Auto-flush every 10 entries
- Binary data hex encoding
- Large packet handling (up to 128 bytes shown)
- Timestamped filenames:
log_YYYYMMDD_HHMMSS.txt - Directory auto-creation:
/sdcard/logs/
Storage:
- FAT16/FAT32 filesystem
- Up to 32GB cards supported
- VFS (Virtual Filesystem) integration
- Safe unmount on shutdown
๐ฅ๏ธ Interactive Menu Systemโ
Professional ANSI-formatted terminal interface for device control.
Commands:
| Key | Command | Description |
|---|---|---|
D | Detect Baud | Start automatic baud rate detection |
B | Bridge Mode | Enter transparent passthrough mode |
S | Settings | Configure device parameters (future) |
I | Info | Display hardware and system information |
H | Help | Show command reference |
Menu Features:
- ANSI color coding
- Clear screen control
- Keyboard navigation
- State-aware prompts
- Context-sensitive help
System States:
BOOTING- Initialization in progressMENU- Main menu activeANALYZING- Baud detection runningFOUND_SPEED- Baud rate detectedBRIDGE- Passthrough mode activeTESTING- Communication test mode
๐ Hardware Auto-Detectionโ
Intelligent scanning and configuration of connected peripherals.
Detection Methods:
-
I2C Scan
- Probes address range 0x08-0x77
- Identifies display controllers
- Detects sensors and expanders
- Reports found devices
-
GPIO Detection
- Tests chip select (CS) lines
- Verifies SPI peripheral presence
- Validates pin states
- Checks pull-up/pull-down
-
SPI Probe
- Attempts device initialization
- Reads manufacturer IDs
- Verifies communication
- Reports capabilities
Graceful Degradation:
- Continues operation without peripherals
- Adapts feature set to available hardware
- Clean boot with missing devices
- No blocking or errors
๐ก Bluetooth LE Support (Stub)โ
Framework ready for Nordic UART Service (NUS) implementation.
Planned Features:
- Wireless serial bridging
- Mobile app connectivity
- Over-the-air configuration
- Remote monitoring
Current Status:
- BLE stack initialized
- Service UUID defined
- Characteristic handlers ready
- Requires implementation completion
Advanced Capabilitiesโ
State Managementโ
Robust state machine with clean transitions:
BOOTING โ MENU โ ANALYZING โ FOUND_SPEED โ BRIDGE
โ โ โ
โโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Features:
- Atomic state transitions
- Callback-based event handling
- State history tracking
- Timeout management
Error Handlingโ
Comprehensive error detection and recovery:
- UART framing errors
- SPI communication failures
- SD card write errors
- Buffer overflow protection
- Watchdog timer (future)
Performance Optimizationโ
DMA (Direct Memory Access):
- Display buffer transfers
- UART TX/RX operations
- Reduced CPU overhead
- Higher throughput
Interrupt-Driven I/O:
- Sub-microsecond response
- Precise timing measurements
- Non-blocking operations
- Priority-based handling
FreeRTOS Integration:
- Task-based architecture
- Efficient scheduling
- Resource sharing
- Synchronization primitives
Integration Featuresโ
SPI Bus Sharingโ
Efficient sharing between TFT and SD card:
- Mutex-based arbitration
- Separate chip select (CS) management
- Different clock speeds per device
- Error state handling (
ESP_ERR_INVALID_STATE)
Dual UART Configurationโ
- UART0: USB serial (console, menu, logging)
- UART1: Target device (bridge, detection)
- Independent baud rates
- Isolated buffers
- Cross-communication support
Timestampingโ
- RTC integration
- Microsecond precision
- ISO 8601 format
- Timezone support (configurable)
Future Features (Roadmap)โ
Phase 5 - Protocol Analysisโ
- I2C bus analyzer
- SPI protocol decoder
- Modbus RTU support
- Custom protocol parsers
Phase 6 - Data Visualizationโ
- Real-time waveform display
- Protocol timeline view
- Statistics graphs
- Packet inspection
Phase 7 - Advanced Loggingโ
- Circular buffer recording
- Trigger-based capture
- Data replay functionality
- Export to CSV/JSON
Phase 8 - Connectivityโ
- WiFi web interface
- BLE UART service
- MQTT data publishing
- REST API
Feature Comparisonโ
| Feature | SerialyTTY | Basic USB-TTL | Logic Analyzer |
|---|---|---|---|
| UART Bridge | โ | โ | โ |
| Auto Baud | โ | โ | โ |
| Display | โ | โ | โ (PC) |
| SD Logging | โ | โ | โ |
| Live Stats | โ | โ | โ |
| Standalone | โ | โ | โ |
| Protocol Decode | ๐ | โ | โ |
| Triggering | ๐ | โ | โ |
| Cost | ~$15 | ~$5 | $50-500 |
Legend: โ Supported | โ Not supported | ๐ Planned
Next: Dive into the Software Architecture to understand how it all works.