Skip to content

CFFinch62/LastBridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

29 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

LAST BRIDGE

CI/CD Pipeline License: MIT GitHub release

A comprehensive serial communication solution consisting of two integrated applications:

  • LAST - Linux Advanced Serial Transceiver (GTK3 serial terminal)
  • BRIDGE - Virtual Null Modem Bridge (creates virtual serial devices)

✨ Features

LAST - Linux Advanced Serial Transceiver

  • πŸ” Advanced Port Detection - Overcomes Linux limitations with comprehensive scanning
  • βš™οΈ Complete Serial Control - All parameters: baud rate, data bits, parity, stop bits
  • πŸ“Š Dual Display Mode - Simultaneous text and hex data visualization with dynamic layout
  • πŸ“ File Operations - Send files with line-by-line transmission and configurable delays
  • 🎯 Programmable Macros - 16 customizable buttons for quick command transmission
  • πŸ“ˆ Real-time Statistics - Data counters, connection time, error tracking
  • πŸŽ›οΈ Control Signals - DTR, RTS, Break signal management
  • 🎨 Professional GUI - Clean, intuitive GTK3 interface with flexible layout
  • πŸ”— BRIDGE Integration - Launch virtual null modem directly from menu

BRIDGE - Virtual Null Modem Bridge & Serial Sniffer

  • πŸ”— Virtual Device Creation - Creates paired virtual serial devices using socat
  • πŸ•΅οΈ Universal Serial Sniffing - Professional-grade serial data capture and analysis
  • πŸ“‘ Multiple Output Methods - Named pipes, TCP sockets, UDP streams, file logging
  • 🎯 Real-time Data Streaming - Live data feeds for external applications
  • πŸ” Configurable Filtering - RX only, TX only, or bidirectional capture
  • πŸ“Š Multiple Data Formats - Raw binary, hex dump, or formatted text output
  • βš™οΈ Configurable Paths - Customize device paths (default: /tmp/ttyV0 ↔ /tmp/ttyV1)
  • πŸ§ͺ Communication Testing - Built-in testing to verify device functionality
  • πŸ“Š Real-time Monitoring - Process health checking and status display
  • πŸ“ Comprehensive Logging - Detailed operation logs with timestamps
  • πŸ’Ύ Settings Persistence - Configuration saved between sessions
  • 🎨 Enhanced GUI - Organized interface with Configuration, Status, Settings, and Sniffing tabs
  • πŸ’» Laptop-Friendly Design - Optimized landscape layout for smaller screens

πŸš€ Quick Start

One-Line Installation

curl -sSL https://raw.githubusercontent.com/CFFinch62/LastBridge/main/deploy/install.sh | bash

Manual Installation

# Clone the repository
git clone https://github.com/CFFinch62/LastBridge.git
cd LastBridge

# Run the installer
./deploy/install.sh

Building from Source

# Install dependencies (Ubuntu/Debian)
sudo apt-get install build-essential libgtk-3-dev socat pkg-config

# Build both applications
make

# Run applications
./LAST/last
./BRIDGE/bridge

Integration Workflow

  1. Start BRIDGE: Launch and create virtual devices
  2. Start LAST: Use Tools β†’ BRIDGE menu or run separately
  3. Connect: In LAST, connect to /tmp/ttyV0 or /tmp/ttyV1
  4. Test: Send data between virtual devices

πŸ•΅οΈ Serial Data Sniffing

BRIDGE now includes professional-grade serial data sniffing capabilities, making it a universal serial communication analyzer:

Sniffing Architecture

Device A ←→ /tmp/ttyDevice1 ←→ Enhanced BRIDGE ←→ /tmp/ttyDevice2 ←→ Device B
                                        ↓
                               Data Sniffing Layer
                                        ↓
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚  Multiple Output Streams        β”‚
                    β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
                    β”‚ β€’ Named Pipe: /tmp/bridge_sniff β”‚
                    β”‚ β€’ TCP Socket: localhost:8888    β”‚
                    β”‚ β€’ UDP Stream: 239.1.1.1:9999   β”‚
                    β”‚ β€’ File Output: bridge_data.log  β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                        ↓
                          External Processing Applications

Use Cases

  • Marine Electronics: BBFF video data processing with LAST control
  • Protocol Analysis: Reverse engineer proprietary serial protocols
  • Device Debugging: Monitor communication between devices and software
  • Data Logging: Record serial sessions for offline analysis
  • Multi-app Integration: One device feeding multiple applications

Quick Sniffing Setup

  1. Launch BRIDGE and go to the "Sniffing" tab
  2. Enable sniffing and select output methods (TCP recommended)
  3. Start the bridge and begin sniffing
  4. Connect your devices to the virtual ports
  5. Connect your analysis application to the sniffing output
  6. Monitor real-time data flow

For detailed sniffing documentation, see BRIDGE/SNIFFING_GUIDE.md.

πŸ“‹ System Requirements

Supported Operating Systems

  • Ubuntu 18.04+ / Debian 10+
  • Fedora 30+
  • Arch Linux
  • Other Linux distributions with GTK3

Dependencies

  • Runtime: GTK3 libraries, socat utility
  • Build: GCC, Make, GTK3 development headers, pkg-config

Hardware

  • Any Linux-compatible serial ports
  • USB-to-Serial adapters
  • Built-in serial ports
  • Virtual devices (created by BRIDGE)

πŸ”§ Installation

Automatic Installation (Recommended)

# Download and run installer
curl -sSL https://raw.githubusercontent.com/CFFinch62/LastBridge/main/deploy/install.sh | bash

# Or clone and install
git clone https://github.com/CFFinch62/LastBridge.git
cd LastBridge
./deploy/install.sh

Package Installation

# Download release package
wget https://github.com/CFFinch62/LastBridge/releases/latest/download/LastBridge-1.0.0.tar.gz

# Extract and install
tar -xzf LastBridge-1.0.0.tar.gz
cd LastBridge-1.0.0
./deploy/install.sh

Manual Build

# Install dependencies
sudo apt-get install build-essential libgtk-3-dev socat pkg-config

# Build
make clean && make

# Install (optional)
sudo make install

🎯 Usage Examples

Basic Serial Communication

  1. Start LAST: last or find in applications menu
  2. Refresh ports to detect available devices
  3. Select port, configure parameters
  4. Click Connect
  5. Send/receive data in terminal

Virtual Null Modem Testing

  1. Start BRIDGE: bridge
  2. Configure device paths (default: /tmp/ttyV0, /tmp/ttyV1)
  3. Click "Start Virtual Null Modem"
  4. Start LAST (or use Tools β†’ BRIDGE menu)
  5. Connect to virtual devices for testing

File Operations

  • Send File: Use File menu in LAST to send files over serial
  • Save Data: Capture received data to files
  • Logging: Enable logging for session recording

πŸ—οΈ Architecture

Both applications follow a modular C architecture:

src/
β”œβ”€β”€ common.h          # Shared includes and structures
β”œβ”€β”€ main.c            # Application initialization
β”œβ”€β”€ ui.c/.h           # GTK3 user interface
β”œβ”€β”€ callbacks.c/.h    # Event handlers
β”œβ”€β”€ settings.c/.h     # Configuration management
β”œβ”€β”€ utils.c/.h        # Utility functions
└── [app-specific modules]

LAST Modules

  • serial.c/.h - Serial port operations and communication
  • file_ops.c/.h - File send/receive operations

BRIDGE Modules

  • nullmodem.c/.h - Virtual device management using socat

🀝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Quick Contribution Guide

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes and test thoroughly
  4. Commit: git commit -m 'Add amazing feature'
  5. Push: git push origin feature/amazing-feature
  6. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • GTK3 development team for the excellent GUI framework
  • socat developers for the versatile networking tool
  • Linux serial subsystem maintainers
  • Open source community for inspiration and feedback

πŸ“ž Support

πŸ”— Links


Copyright Β© 2025 Fragillidae Software - Chuck Finch

Made with ❀️ for the Linux community

About

A comprehensive serial communication solution

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published