Advanced serial protocol debugger with live decoding and visualization. Cross-platform desktop GUI built using PyQt5 for debugging and analyzing serial communication protocols.
- π Multi-Port Support: Connect to multiple serial ports simultaneously
- π Live Packet Decoding: Real-time decoding in ASCII, HEX, Binary, JSON, and Mixed formats
- π Advanced Filtering: Filter packets by port, direction, content, and size
- β±οΈ Timestamp Tracking: Precise timestamps for all packets (millisecond accuracy)
- π Data Visualization: Real-time charts showing data flow over time
- πΎ Session Recording: Record and replay communication sessions
- π€ Export Tools: Export data to JSON, CSV, or plain text formats
- π¨ Protocol Profiles: Save and load custom protocol configurations
- π Plugin Architecture: Extensible plugin system for custom decoders and analyzers
- π― Custom Frame Support: Configure custom frame delimiters for protocol parsing
- Modern Qt-based interface with Fusion theme
- Resizable panels and tabbed views
- Color-coded RX/TX packets
- Real-time statistics dashboard
- Context menus and keyboard shortcuts
- Cross-platform compatibility (Windows, Linux, macOS)
- Python 3.7 or higher
- PyQt5 5.15+
- pyserial 3.5+
- matplotlib 3.5+
- numpy 1.21+
- Clone the repository:
git clone https://github.com/BaseMax/qt-serial-protocol-inspector.git
cd qt-serial-protocol-inspector- Install dependencies:
pip install -r requirements.txt- Run the application:
python main.py- Click "Connect Port" button or use the toolbar
- Select your serial port from the dropdown
- Configure connection settings:
- Baud rate (9600, 19200, 38400, 57600, 115200, or custom)
- Data bits (5, 6, 7, 8)
- Parity (None, Even, Odd, Mark, Space)
- Stop bits (1, 1.5, 2)
- Click OK to connect
The application provides multiple views for analyzing data:
- Data View Tab: Tabular view with timestamp, port, direction, size, and decoded data
- Raw Data Tab: Scrolling text view with detailed packet information
- Charts Tab: Real-time visualization of data flow
- Statistics Tab: Session statistics including packet counts and byte totals
Select from multiple decoding formats:
- ASCII: Plain text representation
- HEX: Hexadecimal byte values (e.g., "48 65 6C 6C 6F")
- Mixed: ASCII for printable characters, HEX for non-printable
- JSON: Pretty-printed JSON (validates JSON structure)
- Binary: Binary representation (e.g., "01001000 01100101")
Use filters to focus on specific packets:
- Text Search: Enter text in the search box to filter packets
- Direction Filter: Check/uncheck RX and TX checkboxes
- Port Filter: Filter by specific port (via Filter menu)
- Size Filter: Filter by packet size range
- Click "Start Recording" to begin session recording
- All packets will be captured with full metadata
- Click "Stop Recording" when finished
- Export the session using File β Export Session
- Enter data in the "Send Data" field at the bottom
- Select format (ASCII or HEX)
- Click "Send" to transmit to all active ports
Examples:
- ASCII:
Hello World - HEX:
48 65 6C 6C 6For48656C6C6F
Protocol profiles allow you to save custom settings:
- Go to Tools β Manage Profiles
- Create or edit profiles with custom settings
- Configure frame delimiters, default format, and parsing rules
- Select active profile from the dropdown
Built-in Profiles:
- Default: Standard ASCII protocol
- JSON: JSON message decoder
- HEX: Hexadecimal-only view
Export session data in multiple formats:
- File β Export Session
- Choose format:
- JSON: Machine-readable with full metadata
- CSV: Spreadsheet-compatible format
- TXT: Human-readable plain text
The application supports custom plugins for extending functionality.
-
Create a Python file in the
plugins/directory -
Inherit from one of the plugin base classes:
DecoderPlugin: For custom data decodersExporterPlugin: For custom export formatsAnalyzerPlugin: For packet analysis tools
-
Implement required methods:
from plugin_manager import AnalyzerPlugin
class MyAnalyzerPlugin(AnalyzerPlugin):
def get_name(self):
return "My Analyzer"
def get_description(self):
return "Custom packet analyzer"
def get_version(self):
return "1.0.0"
def initialize(self, app_context):
self.app_context = app_context
def execute(self, data):
return self.analyze(data)
def analyze(self, packets):
# Your analysis logic here
return results- Restart the application to load the plugin
See plugins/checksum_analyzer.py for a complete example that calculates various checksums for packet data.
- main.py: Main GUI application and event handling
- serial_comm.py: Serial port communication and management
- protocol_decoder.py: Data decoding and packet representation
- session_recorder.py: Session recording and data filtering
- protocol_profiles.py: Protocol profile management
- plugin_manager.py: Plugin system architecture
- Observer Pattern: Event-driven architecture with Qt signals/slots
- Strategy Pattern: Pluggable decoders and exporters
- Factory Pattern: Protocol profile creation
- Plugin Pattern: Extensible plugin system
Application settings are stored in config.json (auto-created on first run).
Session recordings are saved in the sessions/ directory.
Protocol profiles are stored in the profiles/ directory.
Linux: Add your user to the dialout group:
sudo usermod -a -G dialout $USERThen log out and log back in.
Windows: Ensure you have proper permissions and no other application is using the port.
macOS: No special configuration usually needed, but check System Preferences β Security & Privacy if issues occur.
If you encounter dependency issues:
pip install --upgrade pip
pip install -r requirements.txt --upgradeIf the GUI doesn't render properly, try setting the Qt style:
export QT_STYLE_OVERRIDE=Fusion # Linux/macOS
set QT_STYLE_OVERRIDE=Fusion # WindowsContributions are welcome! Please feel free to submit pull requests or open issues.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
- Follow PEP 8 guidelines
- Use meaningful variable names
- Add docstrings to all classes and functions
- Keep functions focused and modular
This project is licensed under the MIT License - see the LICENSE file for details.
Max Base
- PyQt5 for the excellent GUI framework
- pyserial for reliable serial communication
- matplotlib for data visualization
- The open-source community for inspiration and tools
For issues, questions, or suggestions:
- Open an issue on GitHub
- Check existing documentation
- Review example plugins
Future enhancements:
- Protocol script recorder/playback
- Advanced statistics and analytics
- Network serial support (TCP/UDP)
- Packet injection and fuzzing tools
- Custom color schemes
- Multi-language support
- Advanced protocol parsers (Modbus, CAN, etc.)
- Automated testing framework
Happy Debugging! π§