Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/KevinCruz-cell/Redes-de-comunicaciones-/llms.txt

Use this file to discover all available pages before exploring further.

The WiFi and switch panel lets you inspect your router’s wireless configuration, scan for nearby networks, see which devices are connected, and manage the hardware switch’s VLAN configuration. All actions are executed over SSH using standard OpenWrt tools. Navigate to /Wifi_Conmutador to open the panel.

WiFi info

The WiFi info panel fetches real-time data from the router and shows:
  • SSID — the name of the wireless network (uci get wireless.@wifi-iface[0].ssid)
  • Encryption — the security mode in use, e.g. psk2, none (uci get wireless.@wifi-iface[0].encryption)
  • Interface count — the number of configured WiFi interfaces (uci show wireless | grep -c '=wifi-iface')
  • Raw interface info — the full output of iwinfo wlan0 info, which includes channel, frequency, signal, and TX power
# Commands executed for the WiFi info panel
iwinfo wlan0 info
uci get wireless.@wifi-iface[0].ssid
uci get wireless.@wifi-iface[0].encryption
uci show wireless | grep -c '=wifi-iface'

Network scan

The network scan action runs iw dev wlan0 scan over SSH and parses the results to build a list of nearby wireless networks. Each detected network shows:
FieldDescription
SSIDNetwork name (or “Hidden” if not broadcast)
BSSIDAccess point MAC address
ChannelChannel number from the DS Parameter Set
SignalSignal strength in dBm
EncryptionWPA2 PSK if RSN/WPA elements are present, otherwise Open
iw dev wlan0 scan | grep -E 'BSS|SSID|DS Parameter|signal'
If iw returns no results, the controller falls back to iwinfo wlan0 scan and parses its output using a different regex.

Connected devices

The connected devices list reads /tmp/dhcp.leases from the router via SSH. This file is maintained by dnsmasq and contains one active lease per line:
cat /tmp/dhcp.leases
Each line in the leases file includes the expiry timestamp, MAC address, assigned IP address, hostname, and client ID.

Switch / VLAN configuration

The switch panel displays a matrix of ports (0–6) and VLANs. For each combination you can set the port mode:
ModeSymbolDescription
TaggedtPort carries traffic for this VLAN with an 802.1Q tag
UntaggeduPort carries traffic for this VLAN without a tag
Off(omitted)Port is not a member of this VLAN
When you save the matrix, the controller rebuilds all VLAN sections in the UCI network configuration:
# Remove old switch_vlan sections
uci show network | grep '=switch_vlan' | ...

# Create new sections for each VLAN
uci set network.vlan1=switch_vlan
uci set network.vlan1.device='switch0'
uci set network.vlan1.vlan='1'
uci set network.vlan1.ports='5t 1 2 3'

# Commit and restart networking
uci commit network
/etc/init.d/network restart
Saving switch configuration rewrites all VLAN sections and restarts the network subsystem. This will briefly interrupt all connected devices.
Only commands prefixed with swconfig dev switch0 are accepted by the custom switch command endpoint. Any other command is rejected with HTTP 403.

Port status

The port status panel queries each of the seven ports (0–6) individually:
swconfig dev switch0 port 0 get link
swconfig dev switch0 port 1 get link
# ... through port 6
For each port the panel reports:
FieldValues
Linkup / down
Speed10baseT, 100baseT, 1000baseT
Duplexfull-duplex / half-duplex
You can also enable or disable individual ports from the UI. Disabling a port sends:
swconfig dev switch0 port <id> set disable 1
Re-enabling it sends disable 0.

WiFi restart

The Restart WiFi button sends the following command sequence over SSH:
wifi down && sleep 3 && wifi up
This brings the wireless subsystem down, waits three seconds, and brings it back up. The router’s WiFi LED will turn off and then come back on once the radio is active again.

UCI apply

The UCI apply feature lets you send a list of arbitrary UCI commands, which are concatenated and executed as a single script. The controller automatically:
  1. Appends uci commit wireless if no uci commit is present in the command list
  2. Appends wifi down; sleep 2; wifi up if any command references wifi or hostapd
# Example: change the SSID and apply
uci set wireless.@wifi-iface[0].ssid='MyNetwork'
uci commit wireless
wifi down
sleep 2
wifi up
UCI apply always commits to the wireless UCI package. If you need to modify a different package (e.g. network), include an explicit uci commit <package> command in your list.

Build docs developers (and LLMs) love