Skip to content

[bug] iwinfo: ssid is a required property #729

@asmodehn

Description

@asmodehn

Describe the bug
In the schema here the SSID of the Wireless access point is marked as mandatory.

However, in my tests, with the monitoring agent, while having iwinfo enabled (iwinfo.lua file present on device)
AND having a Master wireless interface disabled, the monitoring agent does not report any SSID (which makes sense)

Should we make the SSID not required in the schema ? Is there a more involved fix required elsewhere ?

Steps To Reproduce
Steps to reproduce the behavior:

  1. On your device, make sure you have iwinfo.lua in there:
# ls /usr/lib/lua/openwisp-monitoring/
dhcp.lua        interfaces.lua  iwinfo.lua      monitoring.lua  neighbors.lua   resources.lua   utils.lua       wifi.lua

If not, it is safe to create it with the same content as from the source

  1. Verify that you now get more details about your wireless interface when running netjson-monitoring --dump <iface_name>

  2. On the device (maybe via LUCI -> Wireless), disable an Access Point

  3. Check your logs on openwisp server, you should see something like:

Invalid data in "#/interfaces/9/wireless", validator says:
'ssid' is a required property

Expected behavior
We should still receive data, even if one Access Point is disabled (some device may have multiple access points, some enabled, some disabled...)

System Information
My system is somewhat custom (custom OpenWRT build on device and django 4.2 running openwisp 24.11 with some extensions), but afaict it should not have any impact on this bug.
Feel free to ping me for additional information if necessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions