Skip to contentSkip to conversation

Creating connections with the network DBUS API

Bluez-users Chris Dragga 2 participants 2 messages Oct 28, 2007 – Oct 31, 2007 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hi,

I'm back with another question about the network features of DBUS. Specifically, I'm trying to create a connection using NAP as described on the wiki, albeit in C, rather than Python, and when I execute the Connect method on the connection object, I get the error: "Operation now in progresss." In addition, I never get a Connected signal (though I do have it handled correctly, I'm pretty sure), and hcitool shows no connections active once I've done this. Note that the same error also occurs with GN. Is there some sort of setting for Bluetooth itself that I'm missing, or do I need to introduce a delay somewhere in the code? For what it's worth, the relevant sections of code are as follows:

/*Connects the signal properly*/

        dbus_g_object_register_marshaller(
                        g_cclosure_marshal_VOID__VOID,
                        G_TYPE_NONE, G_TYPE_NONE,
                        G_TYPE_INVALID);
        dbus_g_proxy_add_signal(network_conn, "Connected",
                        G_TYPE_INVALID);
        dbus_g_proxy_connect_signal(network_conn, "Connected",
                        G_CALLBACK(connected_handler), network_iface, NULL);
/*The actual connection method call*/
        if (!dbus_g_proxy_call(network_conn, "Connect", &error,
                        G_TYPE_INVALID, G_TYPE_STRING, &network_iface,
                        G_TYPE_INVALID)){
                handle_error(error);
                g_print("The network interface might be: %s\n", network_iface);
/*              return NULL;*/
        }

Also, when the documentation says that the Connect method returns the network interface, would this be something along the lines of bnep0? Finally, correct me if I'm wrong, but since there is no "CreateServer" method in the network manager object (despite what the wiki says), the servers that ListServers lists are the only ones available. Any help would be appreciated.

Thanks,
Chris Dragga

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

maintainer
#1 lore raw

Hi Chris,

Quoted 1 line

I'm back with another question about the network features of DBUS. Specifically, I'm trying to create a connection using NAP as described on the wiki, albeit in C, rather than Python, and when I execute the Connect method on the connection object, I get the error: "Operation now in progresss." In addition, I never get a Connected signal (though I do have it handled correctly, I'm pretty sure), and hcitool shows no connections active once I've done this. Note that the same error also occurs with GN. Is there some sort of setting for Bluetooth itself that I'm missing, or do I need to introduce a delay somewhere in the code? For what it's worth, the relevant sections of code are as follows:

I have used the network service and the connection creation works perfectly fine. Don't see the problem. However make sure you are running the latest release since there were some glitches.

Quoted 1 line

Also, when the documentation says that the Connect method returns the network interface, would this be something along the lines of bnep0? Finally, correct me if I'm wrong, but since there is no "CreateServer" method in the network manager object (despite what the wiki says), the servers that ListServers lists are the only ones available. Any help would be appreciated.

By definition there are only 3 servers. NAP, GN and PANU and they are all available, but disabled by default. I am even thinking about moving these settings into a config file instead of a D-Bus interface.

Regards

Marcel

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users