From: Johan Hedberg <johan.hedberg@gmail.com>
To: Shreesh Holla <hshreesh@yahoo.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [HCI Events] Connection Event Processing
Date: Sun, 18 Jul 2010 09:02:29 +0100 [thread overview]
Message-ID: <20100718080229.GA30607@jh-x301> (raw)
In-Reply-To: <4947.70805.qm@web56502.mail.re3.yahoo.com>
Hi Shreesh,
On Fri, Jul 16, 2010, Shreesh Holla wrote:
> I'm trying to build a handler for a project and needed to process the
> Connection Request Event.
> I'm able to get that properly. But I tried adding a "reject Connection" -
> command in the handler and invariably an "Accept Connection" command is
> issued.This is what I can see from hcidump and my event handling code.
>
> I need to override that. So where is this done? In the Bluez library,
> bluetoothd
>
> or btusb? Or somewhere else? Or is there some other kind of setup/hooks that
> needs to be modified to insert my own event handler?
>
> Any help would be great here.
The response to the connect request is more or less hardcoded into the
hci_conn_request_evt function in net/bluetooth/hci_event.c. There's a
patch[1] in the bluetooth-next-2.6 tree which adds blacklist support,
but afaik it's only headed for 2.6.36. It's also only a static list of
addresses to be rejected, so if you want something more dynamic it wont
be of much help.
Another way to avoid the kernel response to the connect request is to
set the HCI device into RAW mode but then you also loose all other
Bluetooth functionality provided by the kernel and userspace (i.e. you'd
essentially need to implement a full host stack yourself).
Johan
[1] http://git.kernel.org/?p=linux/kernel/git/holtmann/bluetooth-next-2.6.git;a=commitdiff;h=a1e716eedbed0bac3e9b84b7f53de182e12345cb
next prev parent reply other threads:[~2010-07-18 8:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-17 4:09 [HCI Events] Connection Event Processing Shreesh Holla
2010-07-18 8:02 ` Johan Hedberg [this message]
2010-07-19 18:03 ` Shreesh Holla
2010-07-19 18:10 ` Marcel Holtmann
2010-07-19 18:30 ` Shreesh Holla
2010-07-19 18:39 ` Marcel Holtmann
2010-07-19 18:45 ` Shreesh Holla
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=20100718080229.GA30607@jh-x301 \
--to=johan.hedberg@gmail.com \
--cc=hshreesh@yahoo.com \
--cc=linux-bluetooth@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).