Luci version: 19.07.1
Platform: x86_64
The wireless page on my Luci interface is displaying incorrect information. The image below shows what I mean
It's putting in Generic data for the hardware name and the strings for channel and Bitrate are null. It also thinks the wireless is not associated. Despite there being a number of stations associated.
By comparison, my 15.05 displays the data correctly, so you can see what should actually be displayed. The radio0 is clearly identified by it's hardware name and the BSSIS and Encryption type is shown instead of the "not associated" messager.
Digging into the javascript code for Luci, specifically /www/luci-static/resources/network.js, the call to ubus('dev', 'iwinfo', 'hardware') in this function is failing in the second line of the function. Clearly, similar calls are failing elsewhere as other information is also not being return correctly: the channel and bitrate for example.
getI18n: function() {
var hw = this.ubus('dev', 'iwinfo', 'hardware'),
type = L.isObject(hw) ? hw.name : null; // L.isObject(hw) is false and so hwname is set to null
if (this.ubus('dev', 'iwinfo', 'type') == 'wl')
type = 'Broadcom';
var hwmodes = this.getHWModes(),
modestr = '';
hwmodes.sort(function(a, b) {
return (a.length != b.length ? a.length > b.length : a > b);
});
modestr = hwmodes.join('');
return '%s 802.11%s Wireless Controller (%s)'.format(type || 'Generic', modestr, this.getName());
},
However, doing some sanity checks with the ubus command line utility shows that ubus seems to be working fine, as it returns the required information for this radio device correctly, so that call to ubus in network.js should not be returning a null object.
root@OpenWrt:~# ubus call iwinfo info '{ "device": "radio0" }'
{
"phy": "phy0",
"bssid": "00:19:70:A2:89:15",
"country": "AM",
"mode": "Master",
"channel": 44,
"frequency": 5220,
"frequency_offset": 0,
"txpower": 30,
"txpower_offset": 0,
"quality_max": 70,
"noise": 0,
"htmodes": [
"HT20",
"HT40",
"VHT20",
"VHT40",
"VHT80"
],
"hwmodes": [
"ac",
"n"
],
"hardware": {
"id": [
5772,
60,
0,
0
],
"name": "Qualcomm Atheros QCA9880"
}
}
If anyone with deeper knowledge of the internals can perhaps point me in the right direction as to other checks I can do to track down this problem, that would be really helpful.
Note: I have done a full clean, update of feeds and a recompile multiple times. I've tested this against both uhttpd and nginx and the behaviour is the same.