This is what I tried doing it, I am very new to these stuffs :( DBusMessage * agent_update_passphrase(DBusConnection *connection, char * serv_str, char * pass) { DBusMessage *message, *reply; DBusError error; DBusMessageIter iter; DBusMessageIter args; static char *path = NULL; char *property = "Passphrase"; int type = DBUS_TYPE_STRING; char *param = AGENT_PATH; path = g_strdup_printf("/net/connman/service/%s", serv_str); message = dbus_message_new_method_call( CONNMAN_SERVICE, path, CONNMAN_AGENT_INTERFACE, "RequestInput" ); if (message == NULL) return NULL;
dbus_error_init(&error); dbus_message_iter_init_append(message, &iter); if (append_variant(&iter, property, type, pass) < 0) { dbus_message_unref(message); return -EINVAL; } reply = dbus_connection_send_with_reply_and_block(connection, message, -1, &error); if (reply == NULL) { if (dbus_error_is_set(&error) == TRUE) { printf("%s", error.message); dbus_error_free(&error); } else { printf("%s", error.message); } dbus_message_unref(message); return NULL; } dbus_message_unref(message); dbus_message_unref(reply); return reply; } Regards, <Ram> -----Original Message----- From: connman [mailto:connman-boun...@connman.net] On Behalf Of Patrik Flykt Sent: Tuesday, March 17, 2015 3:31 PM To: connman@connman.net Subject: Re: connman connection policy On Tue, 2015-03-17 at 08:54 +0000, Kallumari Nagaraja Rao, RammohanX wrote: > Is there a simple way to update a service with the passphrase we > receive as a parameter ? Yes, by replying to the Agent API RequestInput D-Bus method call. HTH, Patrik _______________________________________________ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman _______________________________________________ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman