2007-12-11 11:00:13

by Geoffrey Doret

[permalink] [raw]
Subject: [Bluez-devel] Patch proposal for serial manager

Hello,

I have added a connect service method in the serial service manager that
take the address of an adapter as first parameter to be able to use more
than one adapter. I realy would like to contribute to bluez and see my patch
applied to the CVS. This is a first proposal, if you have any remarks, I
will take them into account.

Geoffrey Doret


Attachments:
(No filename) (349.00 B)
(No filename) (374.00 B)
patch4 (3.27 kB)
(No filename) (277.00 B)
(No filename) (164.00 B)
Download all attachments

2007-12-21 21:20:33

by Claudio Takahasi

[permalink] [raw]
Subject: Re: [Bluez-devel] Patch proposal for serial manager

On Dec 21, 2007 12:35 PM, Geoffrey Doret <[email protected]> wrote:
> The same patch as the previous one but with
> "ConnectServiceFromAdapter" naming and the method noted experimental
> in the documentation.
> Let me know if the patch is accepted or not.
>
> Regards,
> Geoffrey Doret
>

Hi Geoffrey,

patch committed! I added an example and some comments in the wiki:

http://wiki.bluez.org/wiki/Serial
http://wiki.bluez.org/wiki/HOWTO/SerialConnections

BR,
Claudio.
--
---------------------------------------------------------
Claudio Takahasi
Instituto Nokia de Tecnologia - INdT

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-12-21 09:16:43

by Geoffrey Doret

[permalink] [raw]
Subject: Re: [Bluez-devel] Patch proposal for serial manager

Hi Marcel,

>
> it has to take "hciX" strings or the local BD_ADDR of the adapter. Both
> must work. This is how other methods handle this. The reason behind it
> is that as an application developer using this method, you should not
> worry about the details. The service should do all the heavy lifting.

If I've understood, that is how hci_devid handle its parameter? If that is
correct, the new adapter parameter is correctly handled.
>
> Don't forget to document this new method in serial-api.txt.

Documentation is included in the last patch.

Regards,
Geoffrey Doret

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-12-20 15:17:40

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] Patch proposal for serial manager

Hi Geoffrey,

> I tied to speak on the channel two times but it seems we are not
> present at the same time. So I noted your remarks and reformulated my
> patch.
> First, I opted for "ConnectServiceByAdapter" but changing the naming
> is quite simple.
> Second, the format of the new adapter parameter is a string "hciX" or
> a string representing the adapter address.

it has to take "hciX" strings or the local BD_ADDR of the adapter. Both
must work. This is how other methods handle this. The reason behind it
is that as an application developer using this method, you should not
worry about the details. The service should do all the heavy lifting.

Don't forget to document this new method in serial-api.txt.

Try the IRC channel again. At some point, I might pick up the
conversation. If I am not responding, ask Johan.

Regards

Marcel



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2007-12-20 14:15:51

by Geoffrey Doret

[permalink] [raw]
Subject: Re: [Bluez-devel] Patch proposal for serial manager

Hi,

I tied to speak on the channel two times but it seems we are not present at
the same time. So I noted your remarks and reformulated my patch.
First, I opted for "ConnectServiceByAdapter" but changing the naming is
quite simple.
Second, the format of the new adapter parameter is a string "hciX" or a
string representing the adapter address.

Regards,
Geoffrey Doret


Attachments:
(No filename) (371.00 B)
(No filename) (418.00 B)
connect_service.patch (3.74 kB)
(No filename) (308.00 B)
(No filename) (164.00 B)
Download all attachments

2007-12-13 16:15:54

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] Patch proposal for serial manager

Hi Geoffrey,

> I have added a connect service method in the serial service manager
> that take the address of an adapter as first parameter to be able to
> use more than one adapter. I realy would like to contribute to bluez
> and see my patch applied to the CVS. This is a first proposal, if you
> have any remarks, I will take them into account.

first issue is the naming. You don't connect something to an adapter.
You use the adapter to connect to something. So it needs either to be
named ConnectServiceByAdapter or ConnectServiceFromAdapter. Join #bluez
channel on freenode.org to discuss this.

Second is that you did a nasty thing with the signature checking. That
is not how this should be implement. You should have your own callback
in the callback table. If code is shared between two callbacks then a
common function has to be created and both callbacks become a small shim
to call this function. Otherwise the code gets to complex and nobody
will understand it a year later.

Third is that we have to agree on the adapter parameter. Should it be
the adapter address or the adapter object path. Pros and cons needs to
be discussed on #bluez.

Regards

Marcel



-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel