Files
msm8916-openwrt/packages/configs-dongle/files/uci_defaults
T
Miguel Fuertes 104145900b Add battery monitoring and LED control features
- Implemented a battery-monitor service to track battery capacity and charging status, controlling LEDs accordingly.
- Created a battery status page in LuCI to display voltage, status, health, and estimated capacity.
- Added hotplug scripts to trigger battery status updates on power button presses and modem interface changes.
- Developed LED control scripts for modem and WiFi status indicators.
- Configured UCI defaults to enable WiFi and set up a modem interface with appropriate settings.
- Introduced a utility script for LED control with various actions (on, off, blink).
- Added a power button script for double-click shutdown functionality.
2025-10-22 11:30:28 +02:00

28 lines
748 B
Bash

#!/bin/sh
set -e
# Enabling WiFi
uci set wireless.@wifi-device[0].disabled='0'
uci set wireless.@wifi-iface[0].disabled='0'
# Create modem interface
uci set network.modem=interface
uci set network.modem.proto='modemmanager'
uci set network.modem.device='qcom-soc'
uci set network.modem.auth='none'
uci set network.modem.apn='internet'
uci set network.modem.allowedmode='4g|3g'
uci set network.modem.preferredmode='4g'
uci set network.modem.ifname='wwan0'
uci del_list firewall.@zone[1].network='modem'
uci add_list firewall.@zone[1].network='modem'
# We don't have eth0
uci -q del_list "network.@device[0].ports=eth0" 2>/dev/null || true
sed -i 's/"device": "eth0"/"device": "br-lan"/g' /etc/board.json
# Commit all changes
uci commit
exit 0