Ya existe una propuesta en el figma:
https://www.figma.com/file/auIzuiYMoZcFicqtd0MvU1/LimeApp–-General?node-id=0%3A1
Parece q en los packages q usa en el backend necesitan algo de amor:
lime-metrics
, iwinfo
, lime-utils
lime-packages/packages/lime-app/files/usr/share/rpcd/acl.d/iwinfo.json
ubus -v list iwinfo
'iwinfo' @786afd0d
"devices":{}
"info":{"device":"String"}
"scan":{"device":"String"}
"assoclist":{"device":"String","mac":"String"}
"freqlist":{"device":"String"}
"txpowerlist":{"device":"String"}
"countrylist":{"device":"String"}
"survey":{"device":"String"}
"phyname":{"section":"String"}
iw
para integrar en ubus. (probablemente iwinfo usa iw. Seria un buen sitio donde mirar)Cada radio maneja mas de una antena, ejemplo una horizontal y una vertical, para mejorar la relacion signal/noise. Cada chain es una antena en la radio. Información sobre cada una de las radios. Ejemplo, si el chain esta muerto (signal -87).
un paquete de openwrt que hay que ver como esta echo adentro es libiwinfo-lua en particular lo interesante es ver si llama adentro directamente las llamadas de librerias C de iwinfo (y quisas podria ser facil extender para que nos pase las informacion de los chains por ejemplo) o si es un wrapper del mando iwinfo y ene se caso no nos interesa extender eso
https://openwrt.org/packages/pkgdata/libiwinfo-lua
https://github.com/openwrt/openwrt/tree/openwrt-21.02/package/network/utils/iwinfo
A/B
x la calcomania…iw dev wlan0 station dump
, donde se consige la info de la chain en signal
Utils q no sirven:
ubus -v call network.wireless status
ubus -v call iwinfo info '{"device": "wlan0"}'
ubus -v call network.interface dump
iw dev wlan0 station dump
De Gio:
aca te paso unos mandos para ver el tema de los puertos en router no DSA swconfig list swconfig dev switch0 show uno de los problemas es que no hay una manera 100% confiable de determinar que puerto real corresponde con el numerito que aparece en swconfig algo de informacion te lo encuentras en /etc/board.json en aparatos con soporte mas modernos tambien hay /proc/device-tree de todas formas acuerdate de montar esto siempre de forma modular y reusable, muy problemente nos acabará sirviendo esta informacion tambien en la parte de ruteo etc.
is this a librerouter
para q la app tenga un flow concreto). cat /etc/board.json | grep model -A3
https://github.com/libremesh/lime-packages/pull/959
ip link show
? ethtool
?wan
y cual lan
?Como hacerlo?
Persistencia estado de red: Historico de como esta la red en el mejor estado por si algo falla poder avisar.
(control estadistico de procesos)
root@ql-berta:~# cat /proc/loadavg
0.13 0.20 0.24 1/61 31281
Usar last known path para saber cual es el camino roto: cat /etc/last_internet_path
. Pero ver como lo hace actualmente, si lo hace.
ubus -v call iwinfo info '{"device": "wlan0"}'
{
"phy": "phy0",
"ssid": "XXXXXXX",
"bssid": "XX:XX:XX:XX:XX:XX",
"country": "TZ",
"mode": "Client",
"channel": 40,
"frequency": 5200,
"frequency_offset": 0,
"txpower": 20,
"txpower_offset": 5,
"quality": 39,
"quality_max": 70,
"signal": -71,
"noise": -95,
"bitrate": 180000,
"encryption": {
"enabled": true,
"wpa": [
2
],
"authentication": [
"psk"
],
"ciphers": [
"ccmp"
]
},
"htmodes": [
"HT20",
"HT40"
],
"hwmodes": [
"a",
"n"
],
"hardware": {
"id": [
5772,
42,
1911,
59397
],
"name": "Ubiquiti airOS XM"
}
}
ubus -v call network.wireless status
{
"radio0": {
"up": true,
"pending": false,
"autostart": true,
"disabled": false,
"retry_setup_failed": false,
"config": {
"hwmode": "11a",
"country": "TZ",
"phy": "phy0",
"distance": 5000,
"txpower": 27,
"htmode": "HT20",
"channel": "161"
},
"interfaces": [
{
"section": "wifinet2",
"ifname": "wlan0",
"config": {
"ssid": "MIWIFI_seYb",
"mode": "sta",
"key": "Barpatxoca8888",
"encryption": "psk2",
"mode": "sta",
"network": [
"wwan"
]
}
}
]
}
}
ubus -v call network.interface dump
{
"interface": [
{
"interface": "lan",
"up": true,
"pending": false,
"available": true,
"autostart": true,
"dynamic": false,
"uptime": 10418,
"l3_device": "br-lan",
"proto": "static",
"device": "br-lan",
"updated": [
"addresses"
],
"metric": 0,
"dns_metric": 0,
"delegation": true,
"ipv4-address": [
{
"address": "10.1.61.129",
"mask": 27
}
],
"ipv6-address": [
],
"ipv6-prefix": [
],
"ipv6-prefix-assignment": [
],
"route": [
],
"dns-server": [
"8.8.8.8"
],
"dns-search": [
],
"neighbors": [
],
"inactive": {
"ipv4-address": [
],
"ipv6-address": [
],
"route": [
],
"dns-server": [
],
"dns-search": [
],
"neighbors": [
]
},
"data": {
}
},
{
"interface": "loopback",
"up": true,
"pending": false,
"available": true,
"autostart": true,
"dynamic": false,
"uptime": 10418,
"l3_device": "lo",
"proto": "static",
"device": "lo",
"updated": [
"addresses"
],
"metric": 0,
"dns_metric": 0,
"delegation": true,
"ipv4-address": [
{
"address": "127.0.0.1",
"mask": 8
}
],
"ipv6-address": [
],
"ipv6-prefix": [
],
"ipv6-prefix-assignment": [
],
"route": [
],
"dns-server": [
],
"dns-search": [
],
"neighbors": [
],
"inactive": {
"ipv4-address": [
],
"ipv6-address": [
],
"route": [
],
"dns-server": [
],
"dns-search": [
],
"neighbors": [
]
},
"data": {
}
},
{
"interface": "mesh0",
"up": false,
"pending": false,
"available": false,
"autostart": true,
"dynamic": false,
"proto": "none",
"device": "wif0",
"data": {
},
"errors": [
{
"subsystem": "interface",
"code": "NO_DEVICE"
}
]
},
{
"interface": "mesh1",
"up": false,
"pending": false,
"available": false,
"autostart": true,
"dynamic": false,
"proto": "none",
"device": "wif1_t",
"data": {
},
"errors": [
{
"subsystem": "interface",
"code": "NO_DEVICE"
}
]
},
{
"interface": "wif1",
"up": false,
"pending": false,
"available": false,
"autostart": true,
"dynamic": false,
"proto": "none",
"data": {
},
"errors": [
{
"subsystem": "interface",
"code": "NO_DEVICE"
}
]
},
{
"interface": "wwan",
"up": true,
"pending": false,
"available": true,
"autostart": true,
"dynamic": false,
"uptime": 10406,
"l3_device": "wlan0",
"proto": "dhcp",
"device": "wlan0",
"updated": [
"addresses",
"routes",
"data"
],
"metric": 0,
"dns_metric": 0,
"delegation": true,
"ipv4-address": [
{
"address": "192.168.1.128",
"mask": 24
}
],
"ipv6-address": [
],
"ipv6-prefix": [
],
"ipv6-prefix-assignment": [
],
"route": [
{
"target": "0.0.0.0",
"mask": 0,
"nexthop": "192.168.1.1",
"source": "192.168.1.128/32"
}
],
"dns-server": [
"212.230.135.2",
"212.230.135.1"
],
"dns-search": [
"home"
],
"neighbors": [
],
"inactive": {
"ipv4-address": [
],
"ipv6-address": [
],
"route": [
],
"dns-server": [
],
"dns-search": [
],
"neighbors": [
]
},
"data": {
"leasetime": 86400
}
}
]
}
iw dev wlan0 station dump
Station 44:ad:b1:90:f0:fa (on wlan0)
inactive time: 10 ms
rx bytes: 161213085
rx packets: 316295
tx bytes: 15316106
tx packets: 75178
tx retries: 6625
tx failed: 41
beacon loss: 0
beacon rx: 93820
rx drop misc: 248
signal: -76 [-77, -83] dBm
signal avg: -75 [-75, -82] dBm
beacon signal avg: -74 dBm
tx bitrate: 90.0 MBit/s MCS 10 40MHz short GI
rx bitrate: 81.0 MBit/s MCS 4 40MHz
rx duration: 0 us
last ack signal:19 dBm
expected throughput: 37.994Mbps
authorized: yes
authenticated: yes
associated: yes
preamble: long
WMM/WME: yes
MFP: no
TDLS peer: no
DTIM period: 1
beacon interval:100
short slot time:yes
connected time: 9666 seconds