From: Terry Hardie <terryh@orcas.net>
To: Anderson Lizardo <anderson.lizardo@openbossa.org>
Cc: Adam Warski <adam@warski.org>,
BlueZ development <linux-bluetooth@vger.kernel.org>,
linux-bluetooth-owner@vger.kernel.org
Subject: Re: Passive scanning of iBeacons results in a "Data Buffer Overflow"
Date: Wed, 19 Mar 2014 16:47:07 -0700 [thread overview]
Message-ID: <59e67d6df57ced71c2e1c5c8901847da@orcas.net> (raw)
In-Reply-To: <CAJdJm_O6nF3NH7H+jZ8dZv=ED0VyP8-z4BqYnmxNqBcqOM8wNQ@mail.gmail.com>
On 2014-03-18 07:07, Anderson Lizardo wrote:
>> And the same as before, after a short amount of time I start getting
>> similar (not exactly the same [2]) errors. So it's not the dongle :)
>
> The logs seem to show the same behaviour as the other dongle:
> seemingly "random" packets with nonsense parameters (simply because
> the HCI packet was assembled incorrectly).
>
> I still blame the USB controller in RPi/Beaglebone for not feeding all
> USB fragments to the bluetooth subsystem... at least is my
> interpretation from Terry's logs (which are from USB sniffing).
>
> What I have no clue is why this is happenning: both of you tried
> powered USB hubs, and this was my only guess (insufficient power on
> the bus). If you could find a kernel version for your boards that are
> not causing any problems, then we can rule out HW related issues...
I agree that it looks like the USB controller's fault. It seems highly
unlikely, though. A few reasons why I think so:
1. The 2 boards use completely different USB controllers.
2. Both those platforms talk to other USB devices pushing much higher
data rates without any issue.
3. The problem doesn't show up when the bus is forced to USB 1.1 (Full
speed instead of high speed)
4. The problem doesn't only show up during non-duplicate-filtered scans.
I can reproduce it (although it takes a lot longer) with LE
Advertisement packets only coming in once per second.
Let me ask another question:
Are there any other USB devices that ever send a bunch of data with no
polling from the host? IE, if the host has no buffer space to accept an
INT transaction, it will just be lost, and all other USB devices wait
for the INT to be processed by getting an acknowledgement before
generating another INT? Apologies for my lack of in-depth knowledge for
the workings of USB bus transactions.
My suspicion is that if you follow the Bluetooth spec for HCI over USB
(which all of these vendors making these USB devices should) then if the
host USB controller is not fast enough, it can be overwhelmed. Forcing
the bus to full-speed mode, means the bluetooth receiver is forced to
buffer on its end, since it simply cannot transfer data to the host fast
enough to overwhelm it. If my suspicion is true, then that means any
packets of this type could overflow a host if it is busy enough,
although much less likely to happen if the host is more powerful (in
terms of processing power).
Regards,
Terry
next prev parent reply other threads:[~2014-03-19 23:47 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-28 12:41 Passive scanning of iBeacons results in a "Data Buffer Overflow" Adam Warski
2014-02-28 16:14 ` Anderson Lizardo
2014-03-01 9:34 ` Adam Warski
2014-03-01 19:11 ` Anderson Lizardo
2014-03-02 15:07 ` Adam Warski
2014-03-03 15:27 ` Adam Warski
[not found] ` <0BA8DEFD-9E73-4A6A-A9E6-1957634CABF8@warski.org>
2014-03-03 18:02 ` Anderson Lizardo
2014-03-03 21:06 ` Adam Warski
2014-03-03 21:25 ` Adam Warski
2014-03-03 23:07 ` Anderson Lizardo
2014-03-05 20:41 ` Adam Warski
2014-03-10 13:09 ` Anderson Lizardo
2014-03-16 19:53 ` Adam Warski
2014-03-18 14:07 ` Anderson Lizardo
2014-03-19 23:47 ` Terry Hardie [this message]
2014-04-18 9:59 ` Adam Warski
2014-03-08 7:19 ` Terry Hardie
2014-03-09 6:25 ` Terry Hardie
2014-03-10 13:21 ` Anderson Lizardo
2014-03-11 0:54 ` Terry Hardie
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=59e67d6df57ced71c2e1c5c8901847da@orcas.net \
--to=terryh@orcas.net \
--cc=adam@warski.org \
--cc=anderson.lizardo@openbossa.org \
--cc=linux-bluetooth-owner@vger.kernel.org \
--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