2008-11-20 02:57:03

by Liu, Raymond

[permalink] [raw]
Subject: [Bluez-devel] could not uses introspect in obexd client for session or ftp from the root path.

Hi Vinicius

I am trying to use the obex-client for ftp recent days.
I found that after I call the CreateSession method. The data return by introspect method is not updated in the root path.
Say, I can only use dbus-send --print-reply --dest=org.openobex.client /org/openobex/session0 org.freedesktop.DBus.Introspectable.Introspect to find out the ftp method.
But dbus-send --print-reply --dest=org.openobex.client / org.freedesktop.DBus.Introspectable.Introspect will not show that there are a /org/openobex node under this path. So it might not be easy for a user to know what kind of interfaces is provided for the whole org.openobex.client service. Since they will not know what's the right node path name.

I guess we can add a node, or child field, and a parent field in the generic_data structure, and update these information during the interface register operation, so that the introspect method can show the child node under a certain path?

Best Regards,
Raymond Liu


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


2008-11-21 02:44:20

by Liu, Raymond

[permalink] [raw]
Subject: obexd: Application parameter for PBAP in gwobex?

Hi Vinicius, johan, holtmann
=09
In the current obexd, gw_obex_get function do not handle the application p=
arameter for PBAP function head. I heard that someone have a patch for this=
, but I can not find it on the list's archive. Can you kindly share me the =
information?

And if there are no such patch I plan to write another pce_gw_obex_get fun=
ction for this purpose, for I think add too much input parameters in the gw=
_obex_get function might not be a good choice. How do you think about it?

Raymond

2008-11-20 08:27:10

by Liu, Raymond

[permalink] [raw]
Subject: Re: [Bluez-devel] could not uses introspect in obexd client for session or ftp from the root path.

>>>Using this trick I was able to verify that the
>>>"/org/openobex/session0" node is being added to
>>>the bus, it is just not being added as a child of the "/" node, but in
>>>parallel to it.
>>
>>Yes, I try it out. It a good tool, Thanks!
>>However, as you said, it will not recognize the node under "/", I am wondering,
>>is that because we do not provide the introspect info for child node , or just
>>the bad of this tool? So user who use d-feet still could not find our secret
>>interface :)
>
>Hi, I just try out /org/freedesktop/Hal, it also employ a set of child nodes
>under "/" path, however, d-feet can read them out correctly, So I guess, for
>obexd, the reason it do not work is because we do not provide the child node
>info in the "/"'s introspect method. Not the bad of d-feet tool
>

Really strange, Thanks for johan's help, I notice that bluez's introspect method work for the child node too, it can show the adapter's interface correctly. And the gdbus dir of bluez and obexd is almost the same! I have double check for several times, then why one is working while another don't?

Raymond

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2008-11-20 07:04:46

by Liu, Raymond

[permalink] [raw]
Subject: obexd: register_record function for PBAP client

Hi holtmann, johan

I am writing PBAP client code for obex-client. While I found that the regi=
ster_record function which adds record to SDP is in the manager.c file. Whi=
le for FTP and OPP, they don't need a SDP record in Client side. So it's ok=
. But for PBAP Client, the spec requires the PBAP client to register its re=
cord PCE in SDP.
So, Should we move this function out to some library? Or I just copy the c=
ode into client side?

Raymond

2008-11-20 05:07:40

by Liu, Raymond

[permalink] [raw]
Subject: Re: [Bluez-devel] could not uses introspect in obexd client for session or ftp from the root path.


>>Using this trick I was able to verify that the
>>"/org/openobex/session0" node is being added to
>>the bus, it is just not being added as a child of the "/" node, but in
>>parallel to it.
>
>Yes, I try it out. It a good tool, Thanks!
>However, as you said, it will not recognize the node under "/", I am wondering,
>is that because we do not provide the introspect info for child node , or just
>the bad of this tool? So user who use d-feet still could not find our secret
>interface :)

Hi, I just try out /org/freedesktop/Hal, it also employ a set of child nodes under "/" path, however, d-feet can read them out correctly, So I guess, for obexd, the reason it do not work is because we do not provide the child node info in the "/"'s introspect method. Not the bad of d-feet tool

Raymond


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2008-11-20 04:47:07

by Liu, Raymond

[permalink] [raw]
Subject: Re: [Bluez-devel] could not uses introspect in obexd client for session or ftp from the root path.

Hi Vinicius
>
>
>Or taking a look at the documentation at doc/client-api.txt ;-)
>
>> But dbus-send --print-reply --dest=org.openobex.client /
>org.freedesktop.DBus.Introspectable.Introspect will not show that there are a
>/org/openobex node under this path. So it might not be easy for a user to know
>what kind of interfaces is provided for the whole org.openobex.client service.
>Since they will not know what's the right node path name.
>>
>
>They will know the right path name, because CreateSession returned it.

OK, I see. However, what if the other one who not want to create the session by themselves. They just want to know is there already a session exist and can be used through Dbus interface? They might probably not read the client-api doc 8 )

>
>I find d-feet very useful when I am exploring some app DBus interface.
>Just be aware
>that d-feet doesn't like very much the "/" root path, you might find
>it useful to change
>the root path (client/main.c:41) to something other than "/"
>("/client" for example).
>
>Using this trick I was able to verify that the
>"/org/openobex/session0" node is being added to
>the bus, it is just not being added as a child of the "/" node, but in
>parallel to it.

Yes, I try it out. It a good tool, Thanks!
However, as you said, it will not recognize the node under "/", I am wondering, is that because we do not provide the introspect info for child node , or just the bad of this tool? So user who use d-feet still could not find our secret interface :)

>
>> I guess we can add a node, or child field, and a parent field in the
>generic_data structure, and update these information during the interface
>register operation, so that the introspect method can show the child node under
>a certain path?
>
>We really could, but as this way has been working very well for BlueZ,
>I don't really see this as a bug.

OK, I just think that to support child node info in introspect from the root path might be more friend to the end user. If you think it's ok, it is :)

>
>P.S.: http://pastebin.com/m49d7d516 an example ftp test script,
>it isn't very clean, but it works ;-)

Got it! Thanks.

Raymond

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2008-11-20 04:03:29

by Vinicius Costa Gomes

[permalink] [raw]
Subject: Re: [Bluez-devel] could not uses introspect in obexd client for session or ftp from the root path.

Hi Raymond,

On Wed, Nov 19, 2008 at 11:57 PM, Liu, Raymond <[email protected]> wrote:
> Hi Vinicius
>
> I am trying to use the obex-client for ftp recent days.
> I found that after I call the CreateSession method. The data return by introspect method is not updated in the root path.
> Say, I can only use dbus-send --print-reply --dest=org.openobex.client /org/openobex/session0 org.freedesktop.DBus.Introspectable.Introspect to find out the ftp method.

Or taking a look at the documentation at doc/client-api.txt ;-)

> But dbus-send --print-reply --dest=org.openobex.client / org.freedesktop.DBus.Introspectable.Introspect will not show that there are a /org/openobex node under this path. So it might not be easy for a user to know what kind of interfaces is provided for the whole org.openobex.client service. Since they will not know what's the right node path name.
>

They will know the right path name, because CreateSession returned it.

I find d-feet very useful when I am exploring some app DBus interface.
Just be aware
that d-feet doesn't like very much the "/" root path, you might find
it useful to change
the root path (client/main.c:41) to something other than "/"
("/client" for example).

Using this trick I was able to verify that the
"/org/openobex/session0" node is being added to
the bus, it is just not being added as a child of the "/" node, but in
parallel to it.

> I guess we can add a node, or child field, and a parent field in the generic_data structure, and update these information during the interface register operation, so that the introspect method can show the child node under a certain path?
>

We really could, but as this way has been working very well for BlueZ,
I don't really see this as a bug.

> Best Regards,
> Raymond Liu
>
>

Cheers,
--
Vinicius Gomes
INdT - Instituto Nokia de Tecnologia

P.S.: http://pastebin.com/m49d7d516 an example ftp test script,
it isn't very clean, but it works ;-)

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel