public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-users] implement hcitool cc call with dbus interface
@ 2008-06-12 10:09 Fritz Code
  2008-06-12 10:29 ` Marcel Holtmann
  0 siblings, 1 reply; 6+ messages in thread
From: Fritz Code @ 2008-06-12 10:09 UTC (permalink / raw)
  To: bluez-users


[-- Attachment #1.1: Type: text/plain, Size: 322 bytes --]

Hi all,

hcitool cc --role=s <bdaddr>
establishes a low level ACL connection.

I have to do that in a self-written tool with error-handling etc.
How can this be done through the dbus-interface, I've actually found no
method in the interfaces listed here http://wiki.bluez.org/wiki

Thanks a lot!

-- 
Regards,
--Codefritz

[-- Attachment #1.2: Type: text/html, Size: 439 bytes --]

[-- Attachment #2: Type: text/plain, Size: 247 bytes --]

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Bluez-users] implement hcitool cc call with dbus interface
  2008-06-12 10:09 [Bluez-users] implement hcitool cc call with dbus interface Fritz Code
@ 2008-06-12 10:29 ` Marcel Holtmann
  2008-06-12 10:37   ` Fritz Code
  0 siblings, 1 reply; 6+ messages in thread
From: Marcel Holtmann @ 2008-06-12 10:29 UTC (permalink / raw)
  To: BlueZ users

Hi Fritz,

> hcitool cc --role=s <bdaddr> 
> establishes a low level ACL connection.
> 
> I have to do that in a self-written tool with error-handling etc.
> How can this be done through the dbus-interface, I've actually found
> no method in the interfaces listed here http://wiki.bluez.org/wiki

you don't have to do that at all. Never ever establish ACL links by
yourself. Let the kernel do it for you.

Regards

Marcel



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Bluez-users] implement hcitool cc call with dbus interface
  2008-06-12 10:29 ` Marcel Holtmann
@ 2008-06-12 10:37   ` Fritz Code
  2008-06-12 11:12     ` Fritz Code
  2008-06-12 13:08     ` Marcel Holtmann
  0 siblings, 2 replies; 6+ messages in thread
From: Fritz Code @ 2008-06-12 10:37 UTC (permalink / raw)
  To: BlueZ users


[-- Attachment #1.1: Type: text/plain, Size: 1614 bytes --]

hm but I have to setup a connection manually just like hcitool does (hcitool
cc --role=s) in my programm.
Is there now way to do that through the comfortable dbus interface?
So just the same as hcitool cc --role=s <bdaddr> (this establishes a ACL
connection, right? ) but more comfortable to implement error-handling etc.

>you don't have to do that at all. Never ever establish ACL links by
>yourself. Let the kernel do it for you.

In which ways does the kernel that for me, or how can I initiate it?
I thought this can be done with socket-calls etc. as it done by a lot of
tools like hcitool etc.

Thanks,
Fritz



On Thu, Jun 12, 2008 at 12:29 PM, Marcel Holtmann <marcel@holtmann.org>
wrote:

> Hi Fritz,
>
> > hcitool cc --role=s <bdaddr>
> > establishes a low level ACL connection.
> >
> > I have to do that in a self-written tool with error-handling etc.
> > How can this be done through the dbus-interface, I've actually found
> > no method in the interfaces listed here http://wiki.bluez.org/wiki
>

>>you don't have to do that at all. Never ever establish ACL links by
>>yourself. Let the kernel do it for you.

>
>
> Regards
>
> Marcel
>
>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Bluez-users mailing list
> Bluez-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>



-- 
Regards,
--Codefritz

[-- Attachment #1.2: Type: text/html, Size: 2526 bytes --]

[-- Attachment #2: Type: text/plain, Size: 247 bytes --]

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Bluez-users] implement hcitool cc call with dbus interface
  2008-06-12 10:37   ` Fritz Code
@ 2008-06-12 11:12     ` Fritz Code
  2008-06-12 13:09       ` Marcel Holtmann
  2008-06-12 13:08     ` Marcel Holtmann
  1 sibling, 1 reply; 6+ messages in thread
From: Fritz Code @ 2008-06-12 11:12 UTC (permalink / raw)
  To: BlueZ users


[-- Attachment #1.1: Type: text/plain, Size: 2170 bytes --]

Ok taking a look at hcitool.c I understand.
I will simply take the functions hci_open_dev and hci_create_connection
(provided by bluez-lib) in order to implement the
hcitool cc call in my application. So the kernel handles the low-level stuff
like socket-calls etc ....

But anyway is there a way to do that through  the comfortable dbus
interface? I guess not.

On Thu, Jun 12, 2008 at 12:37 PM, Fritz Code <codefritz@googlemail.com>
wrote:

> hm but I have to setup a connection manually just like hcitool does
> (hcitool cc --role=s) in my programm.
> Is there now way to do that through the comfortable dbus interface?
> So just the same as hcitool cc --role=s <bdaddr> (this establishes a ACL
> connection, right? ) but more comfortable to implement error-handling etc.
>
> >you don't have to do that at all. Never ever establish ACL links by
> >yourself. Let the kernel do it for you.
>
> In which ways does the kernel that for me, or how can I initiate it?
> I thought this can be done with socket-calls etc. as it done by a lot of
> tools like hcitool etc.
>
> Thanks,
> Fritz
>
>
>
>
> On Thu, Jun 12, 2008 at 12:29 PM, Marcel Holtmann <marcel@holtmann.org>
> wrote:
>
>> Hi Fritz,
>>
>> > hcitool cc --role=s <bdaddr>
>> > establishes a low level ACL connection.
>> >
>> > I have to do that in a self-written tool with error-handling etc.
>> > How can this be done through the dbus-interface, I've actually found
>> > no method in the interfaces listed here http://wiki.bluez.org/wiki
>>
>
> >>you don't have to do that at all. Never ever establish ACL links by
> >>yourself. Let the kernel do it for you.
>
>>
>>
>> Regards
>>
>> Marcel
>>
>>
>>
>> -------------------------------------------------------------------------
>> Check out the new SourceForge.net Marketplace.
>> It's the best place to buy or sell services for
>> just about anything Open Source.
>> http://sourceforge.net/services/buy/index.php
>> _______________________________________________
>> Bluez-users mailing list
>> Bluez-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/bluez-users
>>
>
>
>
> --
> Regards,
> --Codefritz
>
>
>
>


-- 
Regards,
--Codefritz

[-- Attachment #1.2: Type: text/html, Size: 3402 bytes --]

[-- Attachment #2: Type: text/plain, Size: 247 bytes --]

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Bluez-users] implement hcitool cc call with dbus interface
  2008-06-12 10:37   ` Fritz Code
  2008-06-12 11:12     ` Fritz Code
@ 2008-06-12 13:08     ` Marcel Holtmann
  1 sibling, 0 replies; 6+ messages in thread
From: Marcel Holtmann @ 2008-06-12 13:08 UTC (permalink / raw)
  To: BlueZ users

Hi Fritz,

> hm but I have to setup a connection manually just like hcitool does
> (hcitool cc --role=s) in my programm.
> Is there now way to do that through the comfortable dbus interface? 
> So just the same as hcitool cc --role=s <bdaddr> (this establishes a
> ACL connection, right? ) but more comfortable to implement
> error-handling etc.

let me repeat this. You should not do this at all! If a layer like
L2CAP, RFCOMM, SDP or whatever needs an ACL link, the kernel will create
it for you. No need to deal with it. So even in the case you issue a
manual HCI_Create_Connection, the kernel will take this down for you
after 2 seconds, if it has no users.

So again, don't deal with low-level ACL links by yourself. Your program
has no idea what it is doing anyway.

> >you don't have to do that at all. Never ever establish ACL links by
> >yourself. Let the kernel do it for you. 
> 
> In which ways does the kernel that for me, or how can I initiate it?
> I thought this can be done with socket-calls etc. as it done by a lot
> of tools like hcitool etc.

Call l2test -P 1 -n <bdaddr> and it will connect to the PSM for SDP and
the kernel will create the ACL in the background for you. Creating an
ACL link only is not useful at all. You always have to run a higher
level protocol.

Regards

Marcel



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Bluez-users] implement hcitool cc call with dbus interface
  2008-06-12 11:12     ` Fritz Code
@ 2008-06-12 13:09       ` Marcel Holtmann
  0 siblings, 0 replies; 6+ messages in thread
From: Marcel Holtmann @ 2008-06-12 13:09 UTC (permalink / raw)
  To: BlueZ users

Hi Fritz,

> Ok taking a look at hcitool.c I understand.
> I will simply take the functions hci_open_dev and
> hci_create_connection (provided by bluez-lib) in order to implement
> the 
> hcitool cc call in my application. So the kernel handles the low-level
> stuff like socket-calls etc ....

I am serious here. If you are trying to do this, then you are doing
something wrong. Your application should not deal with low-level ACL
link establishment.

> But anyway is there a way to do that through  the comfortable dbus
> interface? I guess not.

No and that is because it is not needed.

Regards

Marcel



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-06-12 13:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-12 10:09 [Bluez-users] implement hcitool cc call with dbus interface Fritz Code
2008-06-12 10:29 ` Marcel Holtmann
2008-06-12 10:37   ` Fritz Code
2008-06-12 11:12     ` Fritz Code
2008-06-12 13:09       ` Marcel Holtmann
2008-06-12 13:08     ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox