A comprehensive graphical user interface for managing multiple hardware modules in embedded Linux systems.
- GPS Module - Real-time position tracking, satellite display, NMEA logging
- LoRa Radio - Message transmission/reception, signal monitoring
- RTL-SDR - Software Defined Radio control and spectrum display
- RTC - Real-time clock with alarm and temperature monitoring
- USB Hub - Device enumeration and power management
- Real-time Data Display - Live updates from all modules
- Configuration Management - JSON-based configuration files
- Event Logging - Track all hardware events
- Dark Theme - Professional UI optimized for long-term use
- Multi-Tab Interface - Easy navigation between modules
The easiest way to install is using the automated installation script:
cd hardware-control-center
./install.shThe installer will:
- Check Python version (3.7+ required)
- Install system dependencies (requires sudo)
- Create a Python virtual environment
- Install Python packages in the virtual environment
- Add your user to hardware access groups
- Create a desktop launcher
- Set executable permissions
IMPORTANT: After installation completes, logout and login for group changes to take effect!
If you prefer manual installation:
# System dependencies (Debian/Ubuntu/Raspberry Pi OS)
sudo apt-get update
sudo apt-get install -y \
python3-pip \
python3-venv \
python3-full \
libusb-1.0-0 \
i2c-tools \
libi2c-dev
# Add user to required groups
sudo usermod -a -G dialout,i2c,spi,plugdev,gpio $USER
# Logout and login for group changes to take effect
# Create virtual environment
python3 -m venv venv
# Activate virtual environment
source venv/bin/activate
# Install Python packages
pip3 install -r requirements.txt
# Deactivate when done
deactivate# Run with default configuration
./run.sh
# Run with custom configuration
./run.sh --config my_config.json
# Run in fullscreen mode
./run.sh --fullscreen
# Or find "Hardware Control Center" in your application menuThe run.sh script automatically activates the virtual environment and launches the application.
Create a configuration file (e.g., configs/my_config.json):
{
"gps": {
"enabled": true,
"device": "/dev/ttyUSB0",
"baud_rate": 9600
},
"lora": {
"enabled": true,
"spi_device": "/dev/spidev0.0",
"frequency": 915000000,
"spreading_factor": 7,
"bandwidth": 125000,
"tx_power": 17
},
"rtlsdr": {
"enabled": false,
"device_index": 0,
"sample_rate": 2048000,
"frequency": 100000000
},
"rtc": {
"enabled": true,
"type": "ds3231",
"i2c_device": "/dev/i2c-1"
},
"usb": {
"enabled": true
}
}- Click Connect to connect to GPS module
- Wait for GPS fix (status will turn green)
- View real-time position, satellites, and speed
- Click Start Logging to save NMEA data to file
- Logged data saved in standard NMEA format
- Click Initialize LoRa to start LoRa radio
- Configure frequency, spreading factor, and power
- Click Apply Configuration to update settings
- Type message and click Send Message to transmit
- Click Start Listening to receive messages
- Received messages appear in log with RSSI/SNR
- Click Initialize SDR to start RTL-SDR
- Set desired frequency and sample rate
- Click Apply Settings to update
- Click Start Capture to begin reception
- Spectrum display shows real-time waterfall (if pyqtgraph installed)
- Click Connect RTC to initialize real-time clock
- View current date and time
- View temperature (DS3231 only)
- Set time manually or sync from system
- Configure alarms (future enhancement)
- View all connected USB devices
- See vendor/product IDs and descriptions
- Click Refresh to rescan devices
- Device power management (future enhancement)
- F5 - Rescan devices
- F11 - Toggle fullscreen
- Ctrl+Q - Quit application
- Open Configuration - Load configuration from file
- Save Configuration - Save current settings
- Exit - Close application
- Fullscreen - Toggle fullscreen mode
- Settings - Open configuration dialog
- Rescan Devices - Refresh all hardware connections
- About - Application information
- Documentation - Quick help guide
# Check device exists
ls -l /dev/ttyUSB*
# Check permissions
sudo usermod -a -G dialout $USER
# Logout and login
# Test with screen
screen /dev/ttyUSB0 9600# Check SPI is enabled
ls -l /dev/spidev*
# Enable SPI (Raspberry Pi)
sudo raspi-config
# Interface Options > SPI > Enable# Check I2C devices
i2cdetect -y 1
# Should show 0x68 for DS3231
# Enable I2C if not visible
sudo raspi-config
# Interface Options > I2C > Enable# Install pyusb
pip3 install pyusb
# Check USB devices from command line
lsusb
# Fix permissions
sudo usermod -a -G plugdev $USERAll hardware access requires appropriate permissions:
# Add to all required groups
sudo usermod -a -G dialout,i2c,spi,plugdev,gpio $USER
# Logout and login for changes to take effect
# Or run with sudo (not recommended for regular use)
sudo ./run.shIf you see "ModuleNotFoundError" errors:
# Make sure you're using the run.sh script (not python3 main.py directly)
./run.sh
# Or activate the virtual environment manually
source venv/bin/activate
python3 main.py
deactivateOn newer systems (Debian 12+, Ubuntu 23.04+, Raspberry Pi OS Bookworm+), Python enforces PEP 668 which prevents system-wide pip installations. This is why we use a virtual environment. If you see this error:
error: externally-managed-environment
Solution: Use the provided install.sh script which creates a virtual environment automatically, or follow the manual installation instructions to create one yourself. Do not use --break-system-packages as it can damage your system.
hardware-control-center/
├── main.py # Main application entry point
├── gui/ # GUI modules
│ ├── __init__.py
│ ├── gps_panel.py # GPS control panel
│ ├── lora_panel.py # LoRa control panel
│ ├── rtc_panel.py # RTC control panel
│ ├── rtlsdr_panel.py # RTL-SDR control panel
│ ├── usb_panel.py # USB management panel
│ └── config_dialog.py # Configuration dialog
├── modules/ # Hardware interface modules
├── utils/ # Utility functions
├── resources/ # Icons and images
├── configs/ # Configuration files
├── requirements.txt # Python dependencies
└── README.md # This file
To add a new module panel:
- Create new panel file in
gui/directory - Inherit from
QWidget - Implement
initialize(),get_config(),apply_config(),cleanup()methods - Add to main.py tab widget
Example:
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QLabel
class MyPanel(QWidget):
def __init__(self, config):
super().__init__()
self.config = config
self.init_ui()
def init_ui(self):
layout = QVBoxLayout()
layout.addWidget(QLabel("My Panel"))
self.setLayout(layout)
def initialize(self):
# Initialize hardware
pass
def get_config(self):
return self.config
def apply_config(self, config):
self.config = config
def cleanup(self):
# Cleanup resources
pass- CPU: ARM Cortex-A7 or better (Raspberry Pi 3+)
- RAM: 1GB
- OS: Linux with Python 3.7+
- Display: 800x600 minimum
- CPU: ARM Cortex-A72 or better (Raspberry Pi 4)
- RAM: 2GB+
- OS: Raspberry Pi OS (Debian-based)
- Display: 1024x768 or higher
- GPS: Any NMEA-compatible GPS (USB or UART)
- LoRa: SX1276/SX1278-based modules (SPI)
- RTL-SDR: RTL2832U-based SDR dongles
- RTC: DS3231, DS1307, PCF8523, RV3028 (I2C)
- USB: Built-in USB host
MIT License - Free to use for commercial and personal projects.
- RTL-SDR API Examples
- LoRa API Examples
- GPS API Examples
- RTC API Examples
- USB Hub API Examples
- Unified API Examples
For issues, questions, or contributions:
- Check the troubleshooting section above
- Review module-specific documentation
- Check system logs:
dmesg | tail - Verify hardware connections
Built with:
- PyQt5 - GUI framework
- pyserial - Serial communication
- pyusb - USB device access
- pynmea2 - GPS NMEA parsing
- Initial release
- Support for GPS, LoRa, RTL-SDR, RTC, USB modules
- JSON configuration
- Dark theme UI
- Real-time data display
