Skip to content

[dbus] GetAll fails on properties returning NotImplemented #2754

@jdswensen

Description

@jdswensen

Describe the bug A clear and concise description of what the bug is.

Calls to the GetAll dbus property are failing on properties that have compile time settings that result in returning NotImplemented.

Additionally, there are two other contexts in which GetAll will fail.

  1. During startup, when querying the Leader Data and the device's role is Detached. This gets translated into an error by this line.
  2. When retrieving radio coexistence metrics from a radio that doesn't have them enabled.

I've partially fixed the issue in this branch, but I'm not sure what the best way to handle the Leader Data or Coex Metrics.

To Reproduce Information to reproduce the behavior, including:

sudo dbus-send --system --dest=io.openthread.BorderRouter.wpan0 --print-reply /io/openthread/BorderRouter/wpan0 org.freedesktop.DBus.Properties.GetAll string:io.openthread.BorderRouter
  1. Git commit id
    Head of OTBR and Openthread

  2. IEEE 802.15.4 hardware platform
    NRF52 dongle

  3. Build steps

INFRA_IF_NAME=enp0s5 ./script/cmake-build -DCMAKE_BUILD_TYPE=Debug

Expected behavior A clear and concise description of what you expected to happen.

Don't fail on GetAll. 😄

Console/log output If applicable, add console/log output to help explain your problem.

otbr-agent[50392]: [DEBG]-DBUS----: Handling method org.freedesktop.DBus.Properties.GetAll
otbr-agent[50392]: [DEBG]-DBUS----: { "io.openthread.BorderRouter", }
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: Capabilities
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: InfraLinkInfo
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: Nat64Cidr
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: EphemeralKeyEnabled
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: Nat64ErrorCounters
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: Nat64State
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: Uptime
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: Nat64ProtocolCounters
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: ThreadVersion
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: OtRcpVersion
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: BorderRoutingCounters
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: OtbrVersion
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: DnssdCounters
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: RadioRegion
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: Ip6Counters
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: OtHostVersion
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: LeaderData
otbr-agent[50392]: [ERR ]-DBUS----: Replied to org.freedesktop.DBus.Properties.GetAll with result io.openthread.Error.Detached
otbr-agent[50392]: [DEBG]-DBUS----: Handling method org.freedesktop.DBus.Properties.GetAll
otbr-agent[50392]: [DEBG]-DBUS----: { "io.openthread.BorderRouter", }
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: Capabilities
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: InfraLinkInfo
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: Nat64Cidr
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: EphemeralKeyEnabled
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: Nat64ErrorCounters
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: Nat64State
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: Uptime
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: Nat64ProtocolCounters
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: ThreadVersion
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: OtRcpVersion
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: BorderRoutingCounters
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: OtbrVersion
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: DnssdCounters
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: RadioRegion
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: Ip6Counters
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: OtHostVersion
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: LeaderData
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: ActiveDatasetTlvs
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: Channel
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: RadioSpinelMetrics
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: Eui64
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: NetworkName
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: SrpServerInfo
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: LinkSupportedChannelMask
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: Rloc16
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: InstantRssi
otbr-agent[50392]: 00:00:54.902 [D] P-SpinelDrive-: Sent spinel frame, flg:0x2, iid:0, tid:2, cmd:PROP_VALUE_GET, key:PHY_RSSI
otbr-agent[50392]: 00:00:54.902 [D] P-RadioSpinel-: Wait response: tid=2 key=38
otbr-agent[50392]: 00:00:54.903 [D] P-SpinelDrive-: Received spinel frame, flg:0x2, iid:0, tid:2, cmd:PROP_VALUE_IS, key:PHY_RSSI, rssi:-90
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: LinkCounters
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: NetworkKey
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: PanId
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: DnsUpstreamQueryState
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: CcaFailureRate
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: LocalLeaderWeight
otbr-agent[50392]: [DEBG]-DBUS----: GetAll: RadioCoexMetrics
otbr-agent[50392]: 00:00:54.903 [D] P-SpinelDrive-: Sent spinel frame, flg:0x2, iid:0, tid:3, cmd:PROP_VALUE_GET, key:RADIO_COEX_METRICS
otbr-agent[50392]: 00:00:54.903 [D] P-RadioSpinel-: Wait response: tid=3 key=4620
otbr-agent[50392]: 00:00:54.903 [D] P-SpinelDrive-: Received spinel frame, flg:0x2, iid:0, tid:3, cmd:PROP_VALUE_IS, key:LAST_STATUS, status:PROP_NOT_FOUND
otbr-agent[50392]: 00:00:54.903 [W] P-RadioSpinel-: Error processing result: NotImplemented
otbr-agent[50392]: 00:00:54.903 [W] P-RadioSpinel-: Error waiting response: NotImplemented
otbr-agent[50392]: 00:00:54.903 [W] P-RadioSpinel-: Get Coex Metrics failed: NotImplemented
otbr-agent[50392]: [ERR ]-DBUS----: Replied to org.freedesktop.DBus.Properties.GetAll with result io.openthread.Error.NotImplemented

Additional context Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions