-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug in dbus getall method read failure #2414
Comments
@superwhd pls help, thanks |
How should I set it up to fix this? |
This seems to be an existing issue: #2133 @morningboata I wonder if this has been fixed or not? Regarding this one, @yf-fan-org you may try getting the properties you're interested in (this should work) instead of getting all properties. |
#2133 is not fixed. Added a comment in it. |
@superwhd Thank you very much, mainly because I need to be able to get all the properties when initializing so that I can read the data in the cache next time, is there any way I can make get all work? It's too much trouble for me to read them one by one. |
I've tried to turn on attribute configurations that may not be turned on, but I still get the same error, all attributes should be supported at this time @superwhd |
I was trying to fix the issue by abandoning the opened container on error but otbr-agent crashed after handling the message. The client also failed to receive the response: for (auto &p : mGetPropertyHandlers.at(interfaceName))
{
DBusMessageIter subIter, dictEntryIter;
VerifyOrExit(dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY,
"{" DBUS_TYPE_STRING_AS_STRING DBUS_TYPE_VARIANT_AS_STRING "}",
&subIter),
error = OT_ERROR_FAILED);
VerifyOrExit(dbus_message_iter_open_container(&subIter, DBUS_TYPE_DICT_ENTRY, nullptr, &dictEntryIter),
error = OT_ERROR_FAILED);
VerifyOrExit(DBusMessageEncode(&dictEntryIter, p.first) == OTBR_ERROR_NONE, error = OT_ERROR_FAILED);
-> if (p.second(dictEntryIter) != OT_ERROR_NONE) {
-> dbus_message_iter_abandon_container_if_open(&subIter, &dictEntryIter);
-> dbus_message_iter_abandon_container_if_open(&iter, &subIter);
-> continue;
}
VerifyOrExit(dbus_message_iter_close_container(&subIter, &dictEntryIter), error = OT_ERROR_FAILED);
VerifyOrExit(dbus_message_iter_close_container(&iter, &subIter));
} |
Wow! I come in the issues section for the same thing. But it seems that many issues exists.
What is the status of this issue or related issues ?
Some logsCommand 1: Logs of the command:
Logs of otbr-agent:
Command 2: Logs of the command:
Logs of otbr-agent:
I have So maybe there is something else that returns "not implemented". (#2133 (comment)) |
D-BUS API will be continuously maintained but the priorities of the methods may vary, depending on the use cases. So far the |
I was thinking about something like this directly in openthread website: So that everybody know there is a DBUS API and how to use. But in any cases, it will be (maybe) the same informations as introspect.xml, eventually with some dbus-send examples. Edit: i am happy to ear that DBUS is continuously improved, so i am in the good direction. |
command:
sudo gdbus call --system
--dest io.openthread.BorderRouter.wpan0
--object-path /io/openthread/BorderRouter/wpan0
--method org.freedesktop.DBus.Properties.GetAll
"io.openthread.BorderRouter"
1、Dbus log:
method call time=1722911624.010217 sender=:1.7 -> destination=io.openthread.BorderRouter.wpan0 serial=3 path=/io/openthread/BorderRouter/wpan0; interface=org.freedesktop.DBus.Properties; member=GetAll
string "io.openthread.BorderRouter"
error time=1722911624.010249 sender=:1.4 -> destination=:1.7 error_name=io.openthread.Error.NotImplemented reply_serial=3
2、otbr log:
ubuntu@raspberrypi:~$ sudo journalctl -u otbr-agent.service -f
[sudo] password for ubuntu:
Aug 06 02:38:04 raspberrypi otbr-agent[69324]: 20:42:17.125 [I] MeshForwarder-: src:[fe80:0:0:0:3c63:d052:1e9a:b8e9]:19788
Aug 06 02:38:04 raspberrypi otbr-agent[69324]: 20:42:17.126 [I] MeshForwarder-: dst:[ff02:0:0:0:0:0:0:1]:19788
Aug 06 02:38:16 raspberrypi otbr-agent[69324]: 20:42:29.214 [I] Mle-----------: Send Advertisement (ff02:0:0:0:0:0:0:1)
Aug 06 02:38:16 raspberrypi otbr-agent[69324]: 20:42:29.220 [I] MeshForwarder-: Sent IPv6 UDP msg, len:91, chksum:9f33, ecn:no, to:0xffff, sec:no, prio:net
Aug 06 02:38:16 raspberrypi otbr-agent[69324]: 20:42:29.220 [I] MeshForwarder-: src:[fe80:0:0:0:3c63:d052:1e9a:b8e9]:19788
Aug 06 02:38:16 raspberrypi otbr-agent[69324]: 20:42:29.220 [I] MeshForwarder-: dst:[ff02:0:0:0:0:0:0:1]:19788
Aug 06 02:38:19 raspberrypi otbr-agent[69324]: 20:42:32.350 [I] MeshForwarder-: Received IPv6 UDP msg, len:83, chksum:3fcf, ecn:no, from:4a7ccb61bb6143a7, sec:no, prio:net, rss:-24.0
Aug 06 02:38:19 raspberrypi otbr-agent[69324]: 20:42:32.350 [I] MeshForwarder-: src:[fe80:0:0:0:487c:cb61:bb61:43a7]:19788
Aug 06 02:38:19 raspberrypi otbr-agent[69324]: 20:42:32.350 [I] MeshForwarder-: dst:[ff02:0:0:0:0:0:0:1]:19788
Aug 06 02:38:19 raspberrypi otbr-agent[69324]: 20:42:32.351 [I] Mle-----------: Receive Announce (fe80:0:0:0:487c:cb61:bb61:43a7)
Aug 06 02:38:25 raspberrypi otbr-agent[69324]: [ERR ]-UTILS---: Replied to org.freedesktop.DBus.Properties.GetAll with result io.openthread.Error.NotImplemented
Aug 06 02:38:25 raspberrypi otbr-agent[69324]: 20:42:38.768 [I] MeshForwarder-: Received IPv6 UDP msg, len:91, chksum:efa2, ecn:no, from:4a7ccb61bb6143a7, sec:no, prio:net, rss:-24.0
Aug 06 02:38:25 raspberrypi otbr-agent[69324]: 20:42:38.769 [I] MeshForwarder-: src:[fe80:0:0:0:487c:cb61:bb61:43a7]:19788
Aug 06 02:38:25 raspberrypi otbr-agent[69324]: 20:42:38.769 [I] MeshForwarder-: dst:[ff02:0:0:0:0:0:0:1]:19788
Aug 06 02:38:25 raspberrypi otbr-agent[69324]: 20:42:38.769 [I] Mle-----------: Receive Advertisement (fe80:0:0:0:487c:cb61:bb61:43a7,0x1000)
Aug 06 02:38:29 raspberrypi otbr-agent[69324]: 20:42:41.820 [I] Mle-----------: Send Advertisement (ff02:0:0:0:0:0:0:1)
Aug 06 02:38:29 raspberrypi otbr-agent[69324]: 20:42:41.827 [I] MeshForwarder-: Sent IPv6 UDP msg, len:91, chksum:9b06, ecn:no, to:0xffff, sec:no, prio:net
Aug 06 02:38:29 raspberrypi otbr-agent[69324]: 20:42:41.827 [I] MeshForwarder-: src:[fe80:0:0:0:3c63:d052:1e9a:b8e9]:19788
Aug 06 02:38:29 raspberrypi otbr-agent[69324]: 20:42:41.827 [I] MeshForwarder-: dst:[ff02:0:0:0:0:0:0:1]:19788
The text was updated successfully, but these errors were encountered: