A modern Qt6-based cellular modem testing interface with SMS capabilities and REST API testing functionality. This application provides a user-friendly GUI for controlling cellular modems and testing internet connectivity on Linux systems.
- The Implementation Chronicles: A7670E USB Modem: Part 1
- Driver Support for A7670E: Kernel Module Implementation: Part 2
- Testing A7670E Modem Features with CellularPi: Part 3
- Send SMS messages through cellular modem
- Real-time delivery status updates
- Message length tracking and validation
- Queue management for multiple messages
- Automatic retry mechanism
- Error handling and user feedback
- REST API testing interface
- Support for common HTTP methods (GET, POST, PUT, DELETE)
- JSON request/response visualization
- SSL/TLS support
- Built-in demo API integration
- Linux-based operating system
- ModemManager service installed and running
- Qt 6.7.0 or later
- CMake 3.16 or later
- C++17 compliant compiler
- Qt Core
- Qt Quick
- Qt Network
- Qt DBus
- Qt Concurrent
CellularPi/
├── CMakeLists.txt # Main CMake configuration
├── Modem/ # Modem management module
│ ├── CMakeLists.txt
│ ├── modem.h/cpp # Core modem functionality
│ └── modemdbusmanager.h/cpp # D-Bus communication
├── REST/ # REST client module
│ ├── CMakeLists.txt
│ └── restclient.h/cpp # REST API functionality
├── Qml/ # QML interface files
│ ├── CMakeLists.txt
│ └── Main.qml # Main application window
└── README.md
Follow the comprehensive setup guide at QTonRaspberryPi to properly configure your Raspberry Pi for Qt development. This includes:
- Installing required packages
- Setting up Qt development tools
- Configuring the build environment
For faster development and build times, we recommend using cross-compilation. Here's how to set it up:
- Clone the development environment repository:
git clone https://github.com/learnqtkenya/QTonRaspberryPi.git
cd QTonRaspberryPi- Clone CellularPi into the project directory:
rm -rf project && git clone https://github.com/learnqtkenya/CellularPi.git project- Create a build script (build.sh):
#!/bin/bash
# Function to run a command and print a warning if it fails
run_command() {
"$@"
if [ $? -ne 0 ]; then
echo "Warning: Command failed: $@"
fi
}
# Run each command using the run_command function
run_command rm -rf appCellularPi
run_command docker rm tmpbuild
run_command docker build -t qtcrossbuild .
run_command docker create --name tmpbuild qtcrossbuild
run_command docker cp tmpbuild:/build/project/appCellularPi ./appCellularPi
echo "Build script completed."- Make the script executable and run it:
chmod +x build.sh
./build.shThis will create a Docker container with the necessary cross-compilation environment, build CellularPi, and copy the resulting binary to your host machine.
- Deploy to Raspberry Pi:
scp appCellularPi pi@raspberrypi:/home/pi/After deploying to the Raspberry Pi, verify the build:
# On the Raspberry Pi
chmod +x appCellularPi
./appCellularPi - Modern, responsive design
- Universal theme support
- Dynamic scaling for different screen sizes
- Tabbed interface for organized functionality
- Real-time status updates
- Launch the application
- Enter the recipient's phone number in international format (e.g., +1234567890)
- Type your message (160 characters max)
- Click "Send SMS" to transmit
- Switch to the "Internet" tab
- Select an endpoint from the dropdown or enter a custom one
- Use the GET/POST buttons to make requests
- View formatted responses in the response area
- Test custom APIs by modifying the base URL
- Uses ModemManager's D-Bus interface
- Asynchronous message handling
- Queued message processing
- Automatic retry mechanism for failed messages
- Based on Qt 6.7's new REST client features
- Support for modern REST APIs
- JSON parsing and formatting
- Error handling and retry logic
- SSL/TLS certificate handling
- Modular design with separate components for modem and REST functionality
- QML for the user interface
- C++ for core functionality
- Event-driven communication between components
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
Please follow our coding style and include appropriate tests.
This project is licensed under the MIT License - see the LICENSE file for details.
- Qt Company for Qt 6.7 and the REST client features
- ModemManager team for the D-Bus interface
- JSONPlaceholder for the demo API


