Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SerialScope

A Python desktop tool for monitoring, testing, and debugging serial/UART communication.

Why I Built It

The idea for SerialScope came from my internship at Microchip, where I worked with PIC microcontrollers and had to test and debug serial communication.

While working with existing serial monitoring tools, I found it difficult to inspect communication in the way I needed, especially when dealing with hexadecimal data and structured packets. That led me to build SerialScope as a small, focused tool that brings the things I commonly needed into one place.

What It Does

SerialScope provides a desktop interface for connecting to serial devices and monitoring their communication.

It supports:

  • Serial port detection and connection
  • Configurable baud rate, data bits, stop bits, and parity
  • Sending and receiving serial data
  • ASCII and HEX display modes
  • TX/RX monitoring with timestamps
  • Communication statistics
  • Pause and resume monitoring
  • Hexadecimal packet decoding
  • CSV session export
  • Basic serial connection error handling

Packet Decoder

Embedded devices often communicate using structured binary packets rather than readable text. SerialScope includes a configurable packet decoder that can split a hexadecimal packet into fields such as: Header Length Command Payload Checksum

For example: AA 03 01 7B 00 4F can be viewed as: Header AA Length 03 Command 01 Payload 7B 00 Checksum 4F

ASCII and HEX

ASCII mode is useful for readable serial communication: TX PING RX PONG

HEX mode shows the actual byte values: TX 50 49 4E 47 RX 50 4F 4E 47 0D 0A

Communication Logging

SerialScope keeps track of communication during the current session. Each entry includes:

  • Direction
  • Timestamp
  • HEX data
  • ASCII data

How It Works

Serial Device
      |
      v
Serial Connection
      |
      v
  SerialScope
      |
   +--+--+
   |     |
  TX     RX
   |     |
   +--+--+
      |
      v
Communication Log
      |
  +---+---+
  |       |
 ASCII   HEX
          |
          v
   Packet Decoder
          |
          v
      CSV Export

The application uses a background serial-reading process so that incoming data can be monitored without blocking the graphical interface.

Technology Stack

  • Python
  • Tkinter
  • PySerial
  • Threading
  • Queue
  • CSV

Project Structure

SerialScope/
|
|-- serialscope.py
|-- requirements.txt
|-- README.md
|-- .gitignore
|
|-- docs/
    |-- PROJECT.md
    |-- ROADMAP.md

Installation

Clone the repository:

git clone https://github.com/Omi2413/SerialScope.git

Move into the project directory:

cd SerialScope

Create a virtual environment:

python -m venv .venv

Activate it on Windows:

.venv\Scripts\activate

Install the dependencies:

pip install -r requirements.txt

Run the application:

python serialscope.py

Usage

  1. Connect a serial device to the computer.
  2. Open SerialScope.
  3. Select the required COM port.
  4. Set the baud rate and other serial parameters.
  5. Connect to the device.
  6. Send commands or data from the transmit section.
  7. Monitor incoming and outgoing communication.
  8. Switch between ASCII and HEX modes when needed.
  9. Use the Packet Decoder for structured hexadecimal packets.
  10. Export the session when you need a record of the communication.

Testing

The application was tested using an Arduino as a serial device during development.

Example:

PING

Response:

PONG

The application was also tested with hexadecimal data, packet decoding, pause/resume monitoring, and CSV session export.

I only used Arduino as a device for testing SerialScope. The application itself is designed for serial/UART-compatible devices and is not limited to Arduino.

Current Status

The core SerialScope functionality is working, including:

  • Serial connection
  • TX/RX communication
  • ASCII and HEX modes
  • Live monitoring
  • Pause/resume
  • Packet decoding
  • Communication statistics
  • CSV export

What I Learned

Building SerialScope gave me practical experience with:

  • Python desktop application development
  • Serial and UART communication
  • Tkinter GUI development
  • Multithreading and queues
  • ASCII and binary data handling
  • Hexadecimal data processing
  • Packet structures
  • File handling and CSV export
  • Debugging and error handling

This is a personal software project created for learning, experimentation, and portfolio use.

Screenshots

Main Interface

The main interface provides the serial connection settings and a live view of incoming and outgoing communication.

SerialScope Main Interface

Packet Decoder

The Packet Decoder allows hexadecimal packets to be split into configurable fields for easier inspection.

SerialScope Packet Decoder

About

A simple Python desktop tool for monitoring and debugging serial communication, with support for ASCII/HEX data, packet decoding, and session logging.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages