Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Nov 2005 15:28:48 -0600
From:      Eric Anderson <anderson@centtech.com>
To:        Maksim Yevmenkin <maksim.yevmenkin@savvis.net>
Cc:        bluetooth <bluetooth@freebsd.org>
Subject:   Re: No route to host for bluetooth devices
Message-ID:  <437BA490.1010704@centtech.com>
In-Reply-To: <437B93CF.4000403@savvis.net>
References:  <437B2E58.50709@centtech.com> <437B52FF.9040407@savvis.net> <437B5CE2.5000601@centtech.com> <437B93CF.4000403@savvis.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Maksim Yevmenkin wrote:
> Eric,
> 
>>>> Well, I've recently updated to the latest current, and while 
>>>> yesterday everything seemed to be working fine, this morning after 
>>>> booting up (no changes were made anywhere, except rebooting), I 
>>>> cannot use bluetooth devices.  Here's some quick info:
>>>>
>>>> snippets from /var/log/messages:
>>>> Nov 16 06:30:58 neutrino kernel: ubt0: ALPS UGX, rev 1.10/11.68, addr 3
>>>> Nov 16 06:30:58 neutrino kernel: ubt0: ALPS UGX, rev 1.10/11.68, addr 3
>>>> Nov 16 06:30:58 neutrino kernel: ubt0: Interface 0 endpoints: 
>>>> interrupt=0x81, bulk-in=0x82, bulk-out=0x2
>>>> Nov 16 06:30:58 neutrino kernel: ubt0: Interface 1 (alt.config 5) 
>>>> endpoints: isoc-in=0x83, isoc-out=0x3; wMaxPacketSize=49; nframes=6, 
>>>> buffer size=294
>>>> Nov 16 06:31:08 neutrino kernel: ng_hci_process_command_timeout: 
>>>> ubt0hci - unable to complete HCI command OGF=0x3, OCF=0x3. Timeout
>>>
>>>
>>> device initialization failed. reset command has timed out. there 
>>> should be message like
>>>
>>> "Unable to setup Bluetooth stack for device"
>>>
>>> somewhere in your logs.
>>
>>
>> I could not find that message anywhere (dmesg, or /var/log/messages). 
>> Only thing I saw was:
>> WARNING: attempt to net_add_domain(bluetooth) after domainfinalize()
>> which I believe is harmless.
> 
> 
> /etc/rc.d/bluetooth uses err() and warn() from /etc/rc.subr to complain 
> about errors. both err() and warn() use /usr/bin/logger to send 
> messages. according to the logger(1) man page it uses default 
> user.notice priority.
> 
> could you please try to run as root
> 
> # logger foo
> 
> and then check your /var/log/messages to see if you got "foo" line in 
> there.

As root or regular user, I see the foo message in /var/log/messages.


> 
> if you dont, then verify syslogd(8) is runnig and check your 
> /etc/syslog.conf to see where do you redirect *.notice messages (or more 
> specifically user.notice).
> 
> i will double check if there is an ordering issue, i.e. devd(8) is 
> started before syslogd(8) and thus error messages are not logged.

Here's my syslog.conf:
# $FreeBSD: src/etc/syslog.conf,v 1.28 2005/03/12 12:31:16 glebius Exp $
#
#       Spaces ARE valid field separators in this file. However,
#       other *nix-like systems still insist on using tabs as field
#       separators. If you are sharing this file between systems, you
#       may want to use only tabs as field separators here.
#       Consult the syslog.conf(5) manpage.
*.err;kern.warning;auth.notice;mail.crit                /dev/console
*.notice;authpriv.none;kern.debug;lpr.info;mail.crit;news.err 
/var/log/messages
security.*                                      /var/log/security
auth.info;authpriv.info                         /var/log/auth.log
mail.info                                       /var/log/maillog
lpr.info                                        /var/log/lpd-errs
ftp.info                                        /var/log/xferlog
cron.*                                          /var/log/cron
*.=debug                                        /var/log/debug.log
*.emerg                                         *
# uncomment this to log all writes to /dev/console to /var/log/console.log
#console.info                                   /var/log/console.log
# uncomment this to enable logging of all log messages to /var/log/all.log
# touch /var/log/all.log and chmod it to mode 600 before it will work
#*.*                                            /var/log/all.log
# uncomment this to enable logging to a remote loghost named loghost
#*.*                                            @loghost
# uncomment these if you're running inn
# news.crit                                     /var/log/news/news.crit
# news.err                                      /var/log/news/news.err
# news.notice                                   /var/log/news/news.notice
!startslip
*.*                                             /var/log/slip.log
!ppp
*.*                                             /var/log/ppp.log
!mpd
*.*                                             /var/log/mpd.log



> 
>>>> # bthidcontrol -a logimouse query
>>>> Could not perform SDP query on the device 00:07:61:31:27:15. No 
>>>> route to host (65)
>>>
>>>
>>> yes, and this is because stack was not set properly and as far as 
>>> system concerns you do not have active bluetooth devices. its kinda 
>>> like using the network without network card.
>>>
>>>> and just now I did:
>>>> /etc/rc.d/bluetooth stop ubt0
>>>> /etc/rc.d/bluetooth start ubt0
>>>>
>>>> and it started working, so I think my message is bogus, except for one 
>>>
>>>
>>> ok. you basically restart the device and now it works. are you 
>>> getting "ng_hci_process_command_timeout" error when you boot with 
>>> device attached?
>>
>>
>> Yes - see the log message output above.
> 
> 
> ok
> 
>>>> question:  am I supposed to have a bluetooth_enable="YES"  in 
>>>> /etc/rc.conf?  I think that's the problem..
>>>
>>>
>>> no, that is not your problem. the fact that you got the error means 
>>> that /etc/rc.d/bluetooth was called and tried to setup the stack. 
>>> like i said, your problem is that device did not respond to "reset" 
>>> command for the very first time.
>>>
>>> i will cvsup to -current today and try to reproduce it.
>>
>>
>> Ok, thanks.  This is a laptop, with an internal bluetooth adapter.  I 
>> can reboot again and see if it does the same thing a second time.  It 
>> could be a timing issue.
> 
> 
> i have updated my system to the most recent -current, and booted with 
> bluetooth usb dongle (3com) attached. no problem here. so i guess there 
> is something about your internal bluetooth adapter that makes it bad. do 
> you have, like, bluetooth on/off button on you laptop? what laptop do 
> you have?

I have a Sony VGN-A170P laptop, which does indeed include a switch.  I 
verified that the switch was on, and the blue light that indicates the 
bluetooth is running was lit.  The switch also controls the wireless 
card, which was working fine at the time.  I also tried switching it 
off, waiting until the blue light went away, and then switching it back 
on, with no change. Only running the bluetooth script helped.

Eric



-- 
------------------------------------------------------------------------
Eric Anderson        Sr. Systems Administrator        Centaur Technology
Anything that works is better than anything that doesn't.
------------------------------------------------------------------------



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?437BA490.1010704>