[clug] Re: Software Feedom Day [SEC=UNCLASSIFIED]

Ian darkstarsword at gmail.com
Thu Sep 20 03:22:28 GMT 2007

Hi Fred,

Make sure that your device has page scan enabled with hciconfig
(should display at least UP RUNNING and PSCAN). If not 'hciconfig hci0
pscan' will enable it, or if you want to be "visible": 'hciconfig hci0

I've been having that problem with the dongle on my desktop machine,
but none of my other linux devices had the issue, even my laptop when
it had identical software configuration. The only thing I was noticing
that I figured could cause this problem was this:
$ sudo hciconfig
hci0:   Type: USB
        BD Address: 00:00:00:00:00:00 ACL MTU: 377:10 SCO MTU: 16:0
        RX bytes:408 acl:0 sco:0 events:17 errors:0
        TX bytes:316 acl:0 sco:0 commands:17 errors:0

BD address 00:00:00:00:00:00... That doesn't sound like an address
that I would try to reconnect to automatically if I was a bluetooth
keyboard or mouse... Heck, for all I know the BT standard probably
forbids page scans for that address (maybe, haven't looked).

So, I got another bluetooth dongle from ebay (not actually for this
reason, <rant>I got it because the page claimed it had a CSR chipset,
which it doesn't appear to }-(, also it's antenna is just a stick of
plastic put on to make you think it has longer range. Looking at the
actual antenna my guess is the range is probably less than most
dongles</rant>) that had a valid looking BD address. So I just tried
connecting my keyboard to it, turning it off and back on, pressing
some keys... It reconnected perfectly :o

Unfortunately, if your BD Address is all 0s your only option might be
a shell script that attempts to reconnect the mouse once a minute or
so. I think I recall reading about some linux command to flash a new
BDAddr to the dongle, but I can't find the reference at the moment,
I'll email again if I find it.

Some other things you can try that might help: (Assuming config files
on your distro are the same as ubuntu):

Add to the end of your /etc/bluetooth/hcid.conf
device PutTheMouseBDAddrHere {
        name "Some meaningful name";
        auth enable; #Only if it supports it well - I have this for my
keyboard but not my mouse
        encrypt enable; #If it supports it
Also look in the device section to see which of iscan and pscan are
enabled be default, you probably want something like:
iscan disable; pscan enable;

Then edit your /etc/default/bluetooth file and make sure that
something like "--master --server". You may find that you also need to
add "--connect BTAddrOfYourKeyboardOrMouse" to the end of it to force
it to connect at boot time.

On 19/09/2007, Pilcher, Fred <Fred.Pilcher at act.gov.au> wrote:
> I got a Targus Bluetooth mouse with my HP laptop. After some struggling
> I can get it to connect and work by issuing a command line command, but
> if I leave the mouse untouched for a few minutes it drops out and I need
> to manually reconnect by issuing the command again. (Don't have it here
> at work, but from recollection it's something really simple like "XXXX
> scan".)
> Any idea how I can get it to stay connected?
> The Bluetooth connection process is one area in which M$ tramples all
> over the pengie.
> Fred
On the day *I* go to work for Microsoft, faint oinking sounds will be
heard from far overhead, the moon will not merely turn blue but
develop polkadots, and hell will freeze over so solid the brimstone
will go superconductive.
     -- Erik Raymond, 2005
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

More information about the linux mailing list