iwd.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* No Agent registered when calling Connect method
@ 2023-03-23  9:52 clement.legoffic
  2023-03-23 23:02 ` James Prestwood
  0 siblings, 1 reply; 6+ messages in thread
From: clement.legoffic @ 2023-03-23  9:52 UTC (permalink / raw)
  To: iwd

Hello,

I want to connect to a psk network using iwd D-BUS interface.
I am using IWD version 1.25 with sytemd.
To call D-BUS method I use busctl.
My actions are :

Scan for networks :
busctl call net.connman.iwd /net/connman/iwd/0/6 net.connman.iwd.Station Scan

Register an agent :
busctl call net.connman.iwd /net/connman/iwd net.connman.iwd.AgentManager RegisterAgent o /test/agent/1234

Call Connect method my object Interface
busctl call net.connman.iwd /net/connman/iwd/0/6/Xxxxx net.connman.iwd.Network Connect

But I get the error :
Call failed: No Agent registered

So I restart iwd deamon with debug output and try to connect to my network using iwctl
iwctl station wlan0 connect SSID

IWD debug output with the iwctl command is :
src/agent.c:agent_register() agent register called
src/agent.c:agent_register() agent :1.71 path /agent/471
src/network.c:network_connect()
src/network.c:network_connect_psk() ask_passphrase: true
src/agent.c:agent_request_passphrase() agent 0xb9ca8 owner :1.71 path /agent/471
src/agent.c:agent_send_next_request() send request to :1.71 /agent/471
src/agent.c:agent_receive_reply() agent 0xb9ca8 request id 22
src/network.c:passphrase_callback() result 0

And I get connected

Whereas the debug output using the D-BUS Call is :
src/agent.c:agent_register() agent register called
src/agent.c:agent_register() agent :1.78 path /test/agent/1234
src/agent.c:agent_disconnect() agent :1.78 disconnected
src/agent.c:agent_free() agent free 0xbb1a0
src/network.c:network_connect()
src/network.c:network_connect_psk() ask_passphrase: true

And I'm not able to connect to my network/

We can observe that the agent disconnect before the network_connect(), Is it a normal behaviour ?

So my question is how to use the RegisterAgent method in order to connect to a psk Network with DBUS ?

Thanks in advance


Ce message et toutes les pieces jointes (ci-apres le "message") sont etablis a l'intention exclusive de ses destinataires.
Si vous recevez ce message par erreur, merci de le detruire et d'en avertir immediatement l'expediteur par e-mail.
Toute utilisation de ce message non conforme a sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. Les communications sur Internet n'etant pas securisees, l'expediteur informe qu'il ne peut accepter aucune responsabilite quant au contenu de ce message.
This mail message and attachments (the "message") are solely intended for the addresses. It is confidential in nature.
If you receive this message in error, please delete it and immediately notify the sender by e-mail.
Any use other than its intended purpose, dissemination or disclosure, either whole or partial, is prohibited except if formal approval is granted. As communication on the Internet is not secure, the sender does not accept responsibility for the content of this message.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-04-05 10:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-23  9:52 No Agent registered when calling Connect method clement.legoffic
2023-03-23 23:02 ` James Prestwood
2023-03-24  9:42   ` clement.legoffic
2023-03-24 15:13     ` James Prestwood
2023-03-27  7:16       ` clement.legoffic
2023-04-05 10:26         ` Joakim Lotsengård

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).