Building BushNET-Tools¶
This guide explains how to build the CISCO / BushNET Serial Manager application from source.
Prerequisites¶
Required Packages¶
Ubuntu/Debian:
sudo apt update
sudo apt install build-essential cmake qt6-base-dev qt6-serialport-dev \
qt6-charts-dev libqt6network6
Fedora/RHEL:
Technology Stack¶
| Component | Requirement |
|---|---|
| Language | C++17 |
| Framework | Qt 6.2+ |
| Qt Modules | Core, Gui, Widgets, SerialPort, Network, Charts |
| Build System | CMake 3.16+ |
| Platform | Linux (Ubuntu/Debian, Fedora/RHEL) |
Building¶
Quick Build¶
# Clone the repository
git clone https://github.com/DefenceX/BushNET-Tools.git
cd BushNET-Tools
# Create build directory
mkdir build && cd build
# Configure with CMake
cmake ..
# Build
make -j$(nproc)
# Run
./bin/IE3300SerialManager
Using the Build Script¶
Alternatively, use the provided build script:
Project Structure¶
BushNET-Tools/
├── include/ # Header files (.h)
├── src/ # Source files (.cpp)
├── ui/ # Qt UI files (.ui)
├── resources/ # Qt resource files (.qrc) and icons
├── docs/ # User documentation
├── images/ # Application images
├── build/ # Build output directory
└── CMakeLists.txt # CMake build configuration
CMake Options¶
The CMakeLists.txt supports the following options:
# Build in release mode
cmake -DCMAKE_BUILD_TYPE=Release ..
# Build in debug mode
cmake -DCMAKE_BUILD_TYPE=Debug ..
Running the Application¶
After building, the executable is located at:
Serial Port Access¶
To access serial ports without root privileges, add your user to the dialout group:
Log out and back in for the changes to take effect.
Troubleshooting Build Issues¶
Qt6 Not Found¶
If CMake cannot find Qt6:
# Install Qt6 development packages
sudo apt install qt6-base-dev qt6-serialport-dev qt6-charts-dev
# Or set Qt6 path manually
cmake -DCMAKE_PREFIX_PATH=/path/to/qt6 ..
Missing SerialPort Module¶
# Ubuntu/Debian
sudo apt install qt6-serialport-dev
# Fedora/RHEL
sudo dnf install qt6-qtserialport-devel
Missing Charts Module¶
Build Fails with C++17 Errors¶
Ensure you have a C++17 compatible compiler:
Packaging¶
The project includes packaging configuration for Linux:
Creating a Debian Package¶
Creating an RPM Package¶
Development¶
Adding New Classes¶
- Create header in
include/newclass.h - Create source in
src/newclass.cpp - Optionally create UI file in
ui/newclass.ui - Add files to
CMakeLists.txt - Use
Q_OBJECTmacro if using signals/slots
Code Style¶
- Use C++17 features where appropriate
- Follow Qt coding conventions
- Use
camelCasefor functions and variables - Use
PascalCasefor class names - Prefix member variables with
m_(e.g.,m_serialPort)