List Info

Thread: accessing to the ICD with dbus and python




accessing to the ICD with dbus and python
user name
2006-07-27 18:01:34
Hi
I'm trying to use the ICD daemon from within a python
progam. In order
to start I made simple program asking some info about the
present wlan
connection.

if I use the synchronous rpc interface with the command

ret = osso_c.rpc_run("com.nokia.icd",
"/com/nokia/icd",
"com.nokia.icd", "get_ipinfo",
wait_reply = True, use_system_bus=True)

I get an aswer, but in ret it contains only the first return
parameter, the name of the connection, instead of all the
four
parameters from the specs:

Return Parameters: 1. string - Name of the current IAP
                   2. string - IP address of the interface
                   3. string - Netmask
                   4. stinrg - IP address of the default
gateway

If I try to use the async interface, I've to problems:
1) I don't know how to access the system bus , since
there's no
use_system_bus_flag
2) the call leads to a seg fault
osso_c.rpc_async_run("com.nokia.icd",
"/com/nokia/icd",
            "com.nokia.icd",
"get_ipinfo", callback = cb)

any idea? thanks

-- 
Fabio Forno, PhD
Istituto Superiore Mario Boella
Jabber ID: xmpp:ffkamin.polito.it
** Try Jabber http://www.jabber.org
_______________________________________________
maemo-developers mailing list
maemo-developersmaemo.org
h
ttps://maemo.org/mailman/listinfo/maemo-developers
accessing to the ICD with dbus and python
user name
2006-07-27 18:53:24
> I get an aswer, but in ret it contains only the first
return
> parameter, the name of the connection, instead of all
the four
> parameters from the specs:
>
rpc_run() is only a "shortcut" for a set of
OSSO/D-BUS calls that return 
only one parameter. So you must use the generic D-BUS
bindings to do the 
ICD call you want.

>
> osso_c.rpc_async_run("com.nokia.icd",
"/com/nokia/icd",
>            "com.nokia.icd",
"get_ipinfo", callback = cb)
>
This seems to be a binding bug, we will investigate that.


_______________________________________________
maemo-developers mailing list
maemo-developersmaemo.org
h
ttps://maemo.org/mailman/listinfo/maemo-developers
accessing to the ICD with dbus and python
user name
2006-07-27 20:52:33
>> I get an aswer, but in ret it contains only the
first return
>> parameter, the name of the connection, instead of
all the four
>> parameters from the specs:
>>
> rpc_run() is only a "shortcut" for a set of
OSSO/D-BUS calls that return 
> only one parameter. So you must use the generic D-BUS
bindings to do the 
> ICD call you want.
> 
>>
>> osso_c.rpc_async_run("com.nokia.icd",
"/com/nokia/icd",
>>            "com.nokia.icd",
"get_ipinfo", callback = cb)
>>
> This seems to be a binding bug, we will investigate
that.

I've reported this as a bug[#726] on Maemo bugzilla. As
Elvis said, we 
will take a look on this.
_______________________________________________
maemo-developers mailing list
maemo-developersmaemo.org
h
ttps://maemo.org/mailman/listinfo/maemo-developers
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )