-
Notifications
You must be signed in to change notification settings - Fork 22
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
Steep learning curve #28
Comments
Note that the proxy interface needs an object path, e.g.
(Not sure if that exact path will work. Try running the |
Thanks for the quick answer.
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name="/">
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg name="xml" type="s" direction="out"/>
</method>
</interface>
<interface name="net.connman.Manager">
<method name="GetProperties">
<arg name="properties" type="a{sv}" direction="out"/>
</method>
<method name="SetProperty">
<arg name="name" type="s" direction="in"/>
<arg name="value" type="v" direction="in"/>
</method>
<method name="GetTechnologies">
<arg name="technologies" type="a(oa{sv})" direction="out"/>
</method>
<method name="RemoveProvider">
<arg name="provider" type="o" direction="in"/>
<annotation
name="org.freedesktop.DBus.Deprecated"
value="true"
/>
</method>
<method name="GetServices">
<arg name="services" type="a(oa{sv})" direction="out"/>
</method>
<method name="GetPeers">
<arg name="peers" type="a(oa{sv})" direction="out"/>
</method>
<method name="ConnectProvider">
<arg name="provider" type="a{sv}" direction="in"/>
<arg name="path" type="o" direction="out"/>
<annotation
name="org.freedesktop.DBus.Deprecated"
value="true"
/>
</method>
<method name="RegisterAgent">
<arg name="path" type="o" direction="in"/>
</method>
<method name="UnregisterAgent">
<arg name="path" type="o" direction="in"/>
</method>
<method name="RegisterCounter">
<arg name="path" type="o" direction="in"/>
<arg name="accuracy" type="u" direction="in"/>
<arg name="period" type="u" direction="in"/>
</method>
<method name="UnregisterCounter">
<arg name="path" type="o" direction="in"/>
</method>
<method name="CreateSession">
<arg name="settings" type="a{sv}" direction="in"/>
<arg name="notifier" type="o" direction="in"/>
<arg name="session" type="o" direction="out"/>
</method>
<method name="DestroySession">
<arg name="session" type="o" direction="in"/>
</method>
<method name="RequestPrivateNetwork">
<arg name="path" type="o" direction="out"/>
<arg name="settings" type="a{sv}" direction="out"/>
<arg name="socket" type="h" direction="out"/>
</method>
<method name="ReleasePrivateNetwork">
<arg name="path" type="o" direction="in"/>
</method>
<method name="RegisterPeerService">
<arg name="specification" type="a{sv}" direction="in"/>
<arg name="master" type="b" direction="in"/>
</method>
<method name="UnregisterPeerService">
<arg name="specification" type="a{sv}" direction="in"/>
</method>
<signal name="PropertyChanged">
<arg name="name" type="s"/>
<arg name="value" type="v"/>
</signal>
<signal name="TechnologyAdded">
<arg name="path" type="o"/>
<arg name="properties" type="a{sv}"/>
</signal>
<signal name="TechnologyRemoved">
<arg name="path" type="o"/>
</signal>
<signal name="ServicesChanged">
<arg name="changed" type="a(oa{sv})"/>
<arg name="removed" type="ao"/>
</signal>
<signal name="PeersChanged">
<arg name="changed" type="a(oa{sv})"/>
<arg name="removed" type="ao"/>
</signal>
</interface>
<interface name="net.connman.Clock">
<method name="GetProperties">
<arg name="properties" type="a{sv}" direction="out"/>
</method>
<method name="SetProperty">
<arg name="name" type="s" direction="in"/>
<arg name="value" type="v" direction="in"/>
</method>
<signal name="PropertyChanged">
<arg name="name" type="s"/>
<arg name="value" type="v"/>
</signal>
</interface>
<node name="net">
<node name="connman">
<node name="iwd_agent">
<interface name="org.freedesktop.DBus.Introspectable"/>
<interface name="net.connman.iwd.Agent">
<method name="Release"/>
<method name="RequestPassphrase">
<arg name="path" type="o" direction="in"/>
<arg name="passphrase" type="s" direction="out"/>
</method>
<method name="Cancel">
<arg name="reason" type="s" direction="in"/>
</method>
</interface>
</node>
<node name="service">
<node name="ethernet_02693694c027_cable">
<interface
name="org.freedesktop.DBus.Introspectable"
/>
<interface name="net.connman.Service">
<method name="GetProperties">
<arg
name="properties"
type="a{sv}"
direction="out"
/>
<annotation
name="org.freedesktop.DBus.Deprecated"
value="true"
/>
</method>
<method name="SetProperty">
<arg name="name" type="s" direction="in"/>
<arg name="value" type="v" direction="in"/>
</method>
<method name="ClearProperty">
<arg name="name" type="s" direction="in"/>
</method>
<method name="Connect"/>
<method name="Disconnect"/>
<method name="Remove"/>
<method name="MoveBefore">
<arg name="service" type="o" direction="in"/>
</method>
<method name="MoveAfter">
<arg name="service" type="o" direction="in"/>
</method>
<method name="ResetCounters"/>
<signal name="PropertyChanged">
<arg name="name" type="s"/>
<arg name="value" type="v"/>
</signal>
</interface>
</node>
<node name="ethernet_366cdd276940_cable">
<interface
name="org.freedesktop.DBus.Introspectable"
/>
<interface name="net.connman.Service"/>
</node>
<node name="ethernet_723575276940_cable">
<interface
name="org.freedesktop.DBus.Introspectable"
/>
<interface name="net.connman.Service"/>
</node>
<node name="ethernet_ae8d48867953_cable">
<interface
name="org.freedesktop.DBus.Introspectable"
/>
<interface name="net.connman.Service"/>
</node>
<node name="ethernet_ba6926867953_cable">
<interface
name="org.freedesktop.DBus.Introspectable"
/>
<interface name="net.connman.Service"/>
</node>
<node
name="wifi_001500d77076_4e4554474541525f31314143_managed_psk"
>
<interface
name="org.freedesktop.DBus.Introspectable"
/>
<interface name="net.connman.Service"/>
</node>
</node>
<node name="technology">
<node name="bluetooth">
<interface
name="org.freedesktop.DBus.Introspectable"
/>
<interface name="net.connman.Technology">
<method name="GetProperties">
<arg
name="properties"
type="a{sv}"
direction="out"
/>
<annotation
name="org.freedesktop.DBus.Deprecated"
value="true"
/>
</method>
<method name="SetProperty">
<arg name="name" type="s" direction="in"/>
<arg name="value" type="v" direction="in"/>
</method>
<method name="Scan"/>
<signal name="PropertyChanged">
<arg name="name" type="s"/>
<arg name="value" type="v"/>
</signal>
</interface>
</node>
<node name="ethernet">
<interface
name="org.freedesktop.DBus.Introspectable"
/>
<interface name="net.connman.Technology"/>
</node>
<node name="wifi">
<interface
name="org.freedesktop.DBus.Introspectable"
/>
<interface name="net.connman.Technology"/>
</node>
</node>
</node>
</node>
</node> I changed the relevant part in (your guess about the missing path seems correct to me): print('-----------------------------------')
t = p[1]
print(f'-- {t["Name"][1]}: {p[0]} --')
if use_dbussy:
i = bus['net.connman']['/net/connman/technology/wifi'].get_interface('net.connman.Technology')
await i.Scan()
elif use_ravel:
s = await bus.get_proxy_interface_async(bus_name, p[0], 'net.connman.Technology')
i = s(connection=bus.connection, dest='net.connman.Technology')['/net/connman/technology/wifi']
await i.Scan()
else: # use old
import dbus
i = dbus.Interface(dbus.SystemBus().get_object("net.connman",
"/net/connman/technology/wifi"),
"net.connman.Technology")
i.Scan()
await asyncio.sleep(10) and
Any further hint? |
That’s a mysterious message to get at that point. Perhaps try dumping out some more info about the “i” object before that |
Hi,
first and foremost: Thanks for all the good work.
I'm trying to use dbussy/ravel to interface ConnMan.
Since I'm new to all of them: ConnMan, D-Bus and Your code, there's little surprise in me having problems, sorry.
I am trying to do things stepwise and I have the following test code:
This code, mostly stealed from
useless_managed_object_server_ravelled
, results in an exception:Reference code I'm trying to convert to ravel is:
What am I doing so wrong?
Thanks in Advance
Mauro
The text was updated successfully, but these errors were encountered: