Skip to content

RDKBWIFI-454: Added station RSSI (unassociated STA statistics) implementation#1157

Open
vlad-safonov wants to merge 6 commits into
rdkcentral:developfrom
vlad-safonov:RDKBWIFI-454-adding-station-RSSI
Open

RDKBWIFI-454: Added station RSSI (unassociated STA statistics) implementation#1157
vlad-safonov wants to merge 6 commits into
rdkcentral:developfrom
vlad-safonov:RDKBWIFI-454-adding-station-RSSI

Conversation

@vlad-safonov
Copy link
Copy Markdown
Contributor

@vlad-safonov vlad-safonov commented May 29, 2026

Reason for change: added implementation of new RBUS method "Device.WiFi.AccessPoint.{i}.X_RDKCENTRAL-COM_GetNaSta". Aslo added support unassoc STA datamodel in the Easymesh translator

Dependent PR: rdk-wifi-hal/#721, rdkb-halif-wifi/#109

Test procedure: Execute rbus request: Device.WiFi.AccessPoint.{i}.X_RDKCENTRAL-COM_GetNaSta
with Json string, e.g.

  "Version": "1.0",
  "SubDocName": "UnassocStaQuery",
  "UnassocStaQueryList": [
    {
      "opclass": 115,
      "channels_length": 2,
      "channels": [
        {
          "channel": 36,
          "sta_list_length": 2,
          "sta_macs": ["AA:BB:CC:DD:EE:01", "AA:BB:CC:DD:EE:02"]
        },
        {
          "channel": 40,
          "sta_list_length": 1,
          "sta_macs": ["AA:BB:CC:DD:EE:03"]
        }
      ]
    },
    {
      "opclass": 128,
      "channels_length": 1,
      "channels": [
        {
          "channel": 40,
          "sta_list_length": 1,
          "sta_macs": ["AA:BB:CC:DD:EE:04"]
        }
      ]
    }
  ]
}

and subscribe for rbus event Device.WiFi.EM.NaStaResponse:, expect to get response, like this

{
  "UnassociatedSTALinkMetricsResponse": {
    "num_sta": 2,
    "sta_list": [
      {
        "sta_mac": "AA:BB:CC:DD:EE:FF",
        "channel": 6,
        "op_class": 81,
        "rcpi": 120
      },
      {
        "sta_mac": "11:22:33:44:55:66",
        "channel": 36,
        "op_class": 115,
        "rcpi": 95
      }
    ],
  }
}

Note: Channel parameter:
The primary channel is expected in "UnassocStaQuery" JSON. "op_class" and primary channel are used internally to calculate center frequency and bandwidth.

RCPI:

MAX_RSSI = MAX(RSSI[ant0]...RSSI[ant4]);
RCPI = (MAX_RSSI + 110) * 2;
RCPI = CLAP(RCPI, 0, 220);

Priority: P2
Risks: Low

@vlad-safonov vlad-safonov requested a review from a team as a code owner May 29, 2026 13:40
@vlad-safonov vlad-safonov marked this pull request as draft May 29, 2026 13:40
@github-actions github-actions Bot added the community contribution Contributions from community. label May 29, 2026
@rdkcmf-jenkins
Copy link
Copy Markdown
Contributor

b'## Copyright scan failure
Commit: 57708ce
Report detail: https://gist.github.com/rdkcmf-jenkins/b578d829cf751f171fddb51314ed8651'

@rdkcmf-jenkins
Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 2 files pending identification.

  • Protex Server Path: /home/blackduck/github/OneWifi/1157/rdkb/components/opensource/ccsp/OneWifi

  • Commit: 57708ce

Report detail: gist'

@vlad-safonov vlad-safonov force-pushed the RDKBWIFI-454-adding-station-RSSI branch from 173a212 to ac79d94 Compare May 29, 2026 13:50
@vlad-safonov vlad-safonov marked this pull request as ready for review May 29, 2026 14:28
@rdkcmf-jenkins
Copy link
Copy Markdown
Contributor

b'## Copyright scan failure
Commit: ac79d94
Report detail: https://gist.github.com/rdkcmf-jenkins/b807dcb2ebfc2eb703bf1e649dc89436'

@rdkcmf-jenkins
Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 3 files pending identification.

  • Protex Server Path: /home/blackduck/github/OneWifi/1157/rdkb/components/opensource/ccsp/OneWifi

  • Commit: ac79d94

Report detail: gist'

@vlad-safonov
Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@vlad-safonov vlad-safonov changed the title Added station RSSI (unassociated STA statistics) implementation RDKBWIFI-454: Added station RSSI (unassociated STA statistics) implementation May 29, 2026
@rdkcmf-jenkins
Copy link
Copy Markdown
Contributor

b'## Copyright scan failure
Commit: c6613ee
Report detail: https://gist.github.com/rdkcmf-jenkins/91b9e37f107cdb5612c5af07dd0ad959'

@rdkcmf-jenkins
Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 3 files pending identification.

  • Protex Server Path: /home/blackduck/github/OneWifi/1157/rdkb/components/opensource/ccsp/OneWifi

  • Commit: c6613ee

Report detail: gist'

@vlad-safonov vlad-safonov marked this pull request as draft June 1, 2026 09:57
@vlad-safonov vlad-safonov force-pushed the RDKBWIFI-454-adding-station-RSSI branch 3 times, most recently from ec58522 to ca4a5a3 Compare June 1, 2026 13:11
@vlad-safonov vlad-safonov marked this pull request as ready for review June 1, 2026 13:12
@rdkcmf-jenkins
Copy link
Copy Markdown
Contributor

b'## Copyright scan failure
Commit: ca4a5a3
Report detail: https://gist.github.com/rdkcmf-jenkins/a921424702e64f2fad7225396af30281'

@rdkcmf-jenkins
Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 3 files pending identification.

  • Protex Server Path: /home/blackduck/github/OneWifi/1157/rdkb/components/opensource/ccsp/OneWifi

  • Commit: ca4a5a3

Report detail: gist'

@rdkcmf-jenkins
Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 3 files pending identification.

  • Protex Server Path: /home/blackduck/github/OneWifi/1157/rdkb/components/opensource/ccsp/OneWifi

  • Commit: ca4a5a3

Report detail: gist'

@mhughesacn
Copy link
Copy Markdown

Hi @vlad-safonov : Please add a credit for MaxLinear to the end of the NOTICE file at the top level in this component:

Copyright 2026 MaxLinear, Inc
Licensed under the Apache License, Version 2.0

and I will clear off the checks.
Thank you - MartinH, RDK CMF Compliance Team

@rdkcmf-jenkins
Copy link
Copy Markdown
Contributor

b'## Blackduck scan failure details

Summary: 0 violations, 0 files pending approval, 3 files pending identification.

  • Protex Server Path: /home/blackduck/github/OneWifi/1157/rdkb/components/opensource/ccsp/OneWifi

  • Commit: 9cb0642

Report detail: gist'

@rdkcmf-jenkins
Copy link
Copy Markdown
Contributor

b'## WARNING: A Blackduck scan failure has been waived

A prior failure has been upvoted

  • Upvote reason: Thank you

  • Commit: 9cb0642
    '

Comment thread source/webconfig/Makefile.am
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for unassociated station (NaSta) RSSI statistics by introducing a new WebConfig subdoc (UnassocStaQuery), wiring it into the controller apply path, and exposing a new RBUS method Device.WiFi.AccessPoint.{i}.X_RDKCENTRAL-COM_GetNaSta that publishes results asynchronously via Device.WiFi.EM.NaStaResponse.

Changes:

  • Add UnassocStaQuery WebConfig subdoc with request decode + response encode.
  • Add controller apply logic to call wifi_getNASta() and publish an async RBUS response event.
  • Add an RBUS test utility (wifi_rbus) plus MXL-specific scaffolding for wifi_api2.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
source/webconfig/wifi_webconfig.c Registers the new webconfig_subdoc_type_nasta_query subdoc.
source/webconfig/wifi_webconfig_nasta.c Implements NaSta query decode and response encode logic.
source/webconfig/Makefile.am Adds wifi_webconfig_nasta.c to libwifi_webconfig sources.
source/test/wifi_rbus.c New RBUS CLI tool to invoke X_RDKCENTRAL-COM_GetNaSta and print async response.
source/test/Makefile.am Builds and links the new wifi_rbus test utility.
source/core/wifi_ctrl_wifiapi_handlers.c Adds MXL-gated inclusion of extra wifi_api2 entries (currently problematic).
source/core/wifi_ctrl_webconfig.c Adds webconfig_nasta_apply() to execute HAL calls and publish response event.
source/core/wifi_ctrl_rbus_handlers.c Adds RBUS method handler get_NaSta and registers method/event elements.
source/core/wifi_ctrl_queue_handlers.c Routes new queue subtype wifi_event_webconfig_set_data_nasta through webconfig decode/apply.
source/core/mxl_wifi_ctrl_wifiapi_handlers.h Declares MXL wifi_api2 list macro and handler prototype (currently mismatched).
source/core/mxl_wifi_ctrl_wifiapi_handlers.c Adds MXL handler implementation for wifi_getNASta (scaffolding).
source/core/Makefile.am Conditionally builds MXL handler implementation when MXL_WIFI is enabled.
include/wifi_webconfig.h Adds new subdoc/object types and decoded data fields for NaSta.
include/wifi_events.h Adds new event subtype wifi_event_webconfig_set_data_nasta.
include/wifi_base.h Adds NaSta RBUS method/event names and query/response structures and limits.
configure.ac Adds AM_CONDITIONAL([MXL_WIFI], ...).
NOTICE Adds MaxLinear 2026 notice entry.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/test/wifi_rbus.c Outdated
return (UINT)v;
}

static void get_arg_mac(int arg_num, mac_address_t mac)
Comment thread source/test/wifi_rbus.c Outdated
mac[i] = (uint8_t)b[i];
}

static void print_mac(const mac_address_t mac)
Comment thread source/test/wifi_rbus.c Outdated
}
}

static rbusError_t invoke_method_bytes(rbusHandle_t handle,
Comment thread source/core/wifi_ctrl_rbus_handlers.c Outdated
Comment on lines +31 to +33
#define MXL_WIFI_API_LIST \
{"wifi_getNASta", 4, "<ap index> <STA MAC> <op_class> <channel>", HANDLE_MXL_wifi_getNASta},

Comment thread source/core/wifi_ctrl_webconfig.c Outdated
Comment thread source/core/wifi_ctrl_rbus_handlers.c Outdated
@vlad-safonov vlad-safonov force-pushed the RDKBWIFI-454-adding-station-RSSI branch 2 times, most recently from 5c0537b to abf59e3 Compare June 3, 2026 13:51
@vlad-safonov vlad-safonov force-pushed the RDKBWIFI-454-adding-station-RSSI branch from abf59e3 to 1cb6e58 Compare June 3, 2026 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community contribution Contributions from community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants