Quick Start & Installation
Relevant source files
The following files were used as context for generating this wiki page:
LuCI Mobile provides a mobile interface for managing OpenWrt routers via the LuCI RPC protocol. This guide covers the environmental requirements, installation steps for users and developers, and mandatory router configurations necessary for the application to function.
Sources: README.md:12-14, pubspec.yaml:2-3
Developer Environment Setup
Development requires the Flutter SDK and specific mobile platform tools. The project uses Dart 3.8.1 or newer.
Prerequisites
You must install the following tools before setting up the project:
- Flutter SDK: Version 3.8.1 or higher.
- Dart SDK: Included with the Flutter SDK.
- Git: For version control and cloning.
- IDE: VS Code, Android Studio, or IntelliJ IDEA with Flutter/Dart extensions.
Sources: CONTRIBUTING.md:16-22, pubspec.yaml:26-27
Project Initialization
Follow these steps to prepare the local development environment:
- Clone the Repository:
git clone https://github.com/cogwheel0/luci-mobile.git cd luci-mobile - Install Dependencies:
flutter pub get - Run the Application:
flutter run
Sources: README.md:94-99, CONTRIBUTING.md:24-34
Development Workflow
The following diagram illustrates the standard development and verification cycle for contributors.
The diagram shows the sequence of commands required to validate changes before submission.
Sources: CONTRIBUTING.md:65-80, README.md:101-104
Router Configuration
The application requires specific modules installed on the OpenWrt router to communicate via the LuCI RPC interface.
Required Packages
You must install rpcd-mod-luci and rpcd-mod-iwinfo for the dashboard and wireless management features to work.
| Package | Purpose |
|---|---|
rpcd-mod-luci | Enables LuCI RPC calls for system and network management. |
rpcd-mod-iwinfo | Provides wireless signal and interface data. |
Sources: README.md:108-112
Installation Steps (Router CLI)
Execute these commands on your router via SSH:
# For routers using opkg
opkg update
opkg install rpcd-mod-luci rpcd-mod-iwinfo
# For routers using apk
apk update
apk add rpcd-mod-luci rpcd-mod-iwinfo
# Restart the RPC daemon
/etc/init.d/rpcd restart
Sources: README.md:112-124
Communication Architecture
The application acts as a client that interacts with the router's rpcd (RPC daemon) service.
The sequence illustrates the authentication and data retrieval flow using ubus calls.
Sources: README.md:12-14, README.md:126-130
Release and Versioning
The project follows Semantic Versioning (MAJOR.MINOR.PATCH) and uses a script to automate version bumps in pubspec.yaml.
Release Script Usage
The scripts/release.sh utility automates the release process:
- Validates that the git working directory is clean.
- Parses the current version from
pubspec.yaml. - Increments the version based on the argument (
major,minor, orpatch). - Increments the build number.
- Updates
pubspec.yaml, commits the change, and creates a git tag.
# Example: Create a patch release
./scripts/release.sh patch
Sources: scripts/release.sh:1-93, CONTRIBUTING.md:188-193
Summary
To start using LuCI Mobile, you must ensure your OpenWrt router has the necessary RPC modules installed and the RPC daemon is running. Developers can initialize the environment using standard Flutter commands, ensuring the Dart SDK version meets the minimum requirement of 3.8.1. All sensitive credentials, such as router passwords, are managed via flutter_secure_storage to ensure local device security.
Sources: README.md:94-96, README.md:108-110, pubspec.yaml:26-27, README.md:85-87