All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rene Mayrhofer <rene@soft.uni-linz.ac.at>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: BlueZ Mailing List <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] Stress testing (Was: Re: command tx timeout and continuous inquiry.)
Date: Tue, 21 Oct 2003 16:31:36 +0200	[thread overview]
Message-ID: <3F954348.7090700@soft.uni-linz.ac.at> (raw)
In-Reply-To: <1066738444.13788.124.camel@pegasus>

Hi Marcel

I've now done a bit of stress-testing and these are the results:

With the Epox adapter (HCI 16.4), I was able to go up to the theoretical 
maximum of 7 concurrent l2ping instances to different devices. All 7 
instances run and get their reply packets back. However, only 3 of them 
report "20 bytes from ...." while the other 4 report "0 bytes from 
....". I am not sure what causes this, but it might be the devices 
themselves. The Bluetooth stacks on the devices I used in this test are 
vastly different, ranging from Compaq Ipaq, FSC Pocket Loox, Sony Vaio 
with WinXP to other bluez boxes under x86 or Compaq Ipaq. There were 
even a few mobile phones in the pool....
And the background inquiry even returned some devices under this load, 
I'm now nearly where I want to go :)

Although this sounds very good, there are a few catches:
- Starting the l2ping instances was very tricky. The more were already 
running, the more difficult it got to start an additional one. For the 
last 2 instances, I had to try for about 25 times until it started 
correctly. Before that, it always returned "Can't connect.: Device or 
resource busy". Are there any internal kernel timeouts for freeing 
resources ? I have no idea why in the beginning it doesn't work but then 
suddenly it does. As soon as the l2ping starts, it seems reliable most 
of the time (some connection break but can be re-established, maybe it's 
just the radio link that's bad in these cases).
- Sometimes the same happens for the inquiry. In my "while true; hcitool 
scan --flush; done" loop, it sometimes also goes crazy with "Inquiry 
failed.: Device or resource busy" for about 30 seconds and then starts 
to work again.

How is an application supposed to deal with these phenomena ? Is there a 
maximum period during which a call is allowed to fail or is it random ? 
Although my application still can't create two L2 connections, this test 
shows that (with a current HCI firmware) it is in principle possible. I 
still have to find out why my code (which is mostly copied from l2ping) 
does not perform the same - I still think that it has to do with 
multi-threading somehow. But I am getting closer now.....

As a sidenote, bluez is rather unstable on my Sony Vaio PCG-SRX51P/A, 
which has a CSR chip with build ID 0x77 (which is reported as HCI 12.1). 
After a while of moderate load, the kernel log starts to get entries such as
kernel: hci_cmd_task: hci0 command tx timeout
kernel: Warning: null TTY for (d8:00) in tty_fasync
(I use rfcomm connections to a Siemens S55).
Reloading the bluez stack seems to reset everything so that it works 
again (until it breaks again....) - at least I don't have to reboot to 
get it back to work and can still claim that bluez is more mature than 
the Sony Bluespace stack :)
On my Debian system, this typically means
/etc/init.d/bluez-sdp stop
/etc/init.d/bluez-utils stop
/etc/init.d/hotplug restart
/etc/init.d/bluez-utils start
/etc/init.d/bluez-sdp start
Another sequence won't work, especially restarting the whole USB 
subsystem is necessary so that hci_usb gets reloaded.

PS: I can now confirm that Acer indeed has no updated firmware for their 
Bluetooth adapters BT-500 and does not plan to create one - our 
technician has talked to our Acer contact. Thus, I can not recommend 
this adapter for any more serious use under Linux.

best regards,
Rene

-- 
------------------------------------------------
Pervasive 2004:            www.pervasive2004.org
------------------------------------------------

      parent reply	other threads:[~2003-10-21 14:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3F86784F.9050608@soft.uni-linz.ac.at>
     [not found] ` <1065778372.14923.336.camel@baroque.rococosoft.com>
     [not found]   ` <3F86A88E.4090106@soft.uni-linz.ac.at>
     [not found]     ` <1065790691.14513.173.camel@pegasus>
     [not found]       ` <3F86AF96.7000904@soft.uni-linz.ac.at>
     [not found]         ` <1065791594.14514.179.camel@pegasus>
2003-10-10 13:23           ` [Bluez-devel] Re: command tx timeout and continuous inquiry Rene Mayrhofer
2003-10-13 10:28           ` Rene Mayrhofer
2003-10-13  9:19             ` Marcel Holtmann
     [not found]           ` <3F8FB6D9.8030000@soft.uni-linz.ac.at>
     [not found]             ` <1066636708.902.5.camel@pegasus>
2003-10-21 10:45               ` Rene Mayrhofer
2003-10-21 11:32                 ` Marcel Holtmann
2003-10-21 12:09                   ` Rene Mayrhofer
2003-10-21 12:13                     ` Marcel Holtmann
2003-10-21 13:04                       ` Rene Mayrhofer
2003-10-21 14:31                       ` Rene Mayrhofer [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=3F954348.7090700@soft.uni-linz.ac.at \
    --to=rene@soft.uni-linz.ac.at \
    --cc=bluez-devel@lists.sourceforge.net \
    --cc=marcel@holtmann.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.