From: Marcel Holtmann <marcel@holtmann.org>
To: BlueZ users <bluez-users@lists.sourceforge.net>
Subject: Re: [Bluez-users] implement hcitool cc call with dbus interface
Date: Thu, 12 Jun 2008 15:08:31 +0200 [thread overview]
Message-ID: <1213276111.17870.50.camel@violet.holtmann.net> (raw)
In-Reply-To: <3e9cdced0806120337p5043c4celf7092d086f937691@mail.gmail.com>
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
prev parent reply other threads:[~2008-06-12 13:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1213276111.17870.50.camel@violet.holtmann.net \
--to=marcel@holtmann.org \
--cc=bluez-users@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox