Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Nov 2005 19:48:39 -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:  <437D32F7.10706@centtech.com>
In-Reply-To: <437CC544.6080509@savvis.net>
References:  <437B2E58.50709@centtech.com> <437B52FF.9040407@savvis.net> <437B5CE2.5000601@centtech.com> <437B93CF.4000403@savvis.net> <437BA490.1010704@centtech.com> <437BAF32.5030502@savvis.net> <437C8547.3060708@centtech.com> <437CC544.6080509@savvis.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Maksim Yevmenkin wrote:
> Eric,
> 
> [...]
> 
>>>> 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.
>>>
>>>
>>> hmm... i'm surprised that switch did not help. on some laptops 
>>> bluetooth button/switch usually makes internal device to 
>>> disconnect/connect. in this case devd(8) will get detach/attach event 
>>> which will trigger 'bluetooth stop/start'. perhaps the switch only 
>>> controls the light? or may be the radio part of the device, i.e. 
>>> device will always stay attached, but the radio is powered off? did 
>>> you try to turn switch off and then bluetooth stop/start? does it 
>>> give you the same timeout error?
>>
>>
>> Well, here's more information.  First, it's reproducable every time I 
>> boot up.  Doing:
>> /etc/rc.d/bluetooth start ubt0
>> does not fix it by itself, but doing:
>> /etc/rc.d/bluetooth stop ubt0
>> /etc/rc.d/bluetooth start ubt0
>> does.
> 
> 
> now, i really puzzled. because device fails on to start at boot time, 
> /etc/rc.d/bluetooth should have backed out and removed all netgraph 
> nodes it tried to create (except device node and socket nodes). so i do 
> not understand why do you need to do 'stop' before 'start'. 'stop' 
> should really be a noop in this case.
> 
> could you please do the following
> 
> 1) do a fresh boot with bluetooth device turned on
> 
> 2) after system boots (and bluetooth device failed to start) please run 
> as root
> 
> # ngctl li


There are 7 total nodes:
   Name: ngctl992        Type: socket          ID: 0000001d   Num hooks: 0
   Name: ubt0l2cap       Type: l2cap           ID: 00000017   Num hooks: 3
   Name: ubt0hci         Type: hci             ID: 00000013   Num hooks: 3
   Name: btsock_l2c      Type: btsock_l2c      ID: 00000004   Num hooks: 1
   Name: btsock_l2c_raw  Type: btsock_l2c_raw  ID: 00000003   Num hooks: 1
   Name: btsock_hci_raw  Type: btsock_hci_raw  ID: 00000002   Num hooks: 1
   Name: ubt0            Type: ubt             ID: 00000001   Num hooks: 1


>> I also tried a fresh boot, then switching the bluetooth off, waiting 
>> about 20 seconds, and flipping it back on, which *did* in fact work. I 
>> may not have waited long enough the previous time that failed.
> 
> 
> ah, ok. could you please check the /var/log/messages file to see if you 
> get a message saying ubt0 is detached/attached?

Here's the snippet upon boot:

Nov 17 19:31:32 neutrino kernel: ubt0: ALPS UGX, rev 1.10/11.68, addr 3
Nov 17 19:31:32 neutrino kernel: ubt0: ALPS UGX, rev 1.10/11.68, addr 3
Nov 17 19:31:32 neutrino kernel: ubt0: Interface 0 endpoints: 
interrupt=0x81, bulk-in=0x82, bulk-out=0x2
Nov 17 19:31:32 neutrino kernel: ubt0: Interface 1 (alt.config 5) 
endpoints: isoc-in=0x83, isoc-out=0x3; wMaxPacketSize=49; nframes=6, 
buffer size=294
Nov 17 19:31:32 neutrino kernel: Device configuration finished.
Nov 17 19:31:33 neutrino kernel: WARNING: attempt to 
net_add_domain(bluetooth) after domainfinalize()
Nov 17 19:31:34 neutrino kernel: WARNING: attempt to 
net_add_domain(netgraph) after domainfinalize()
Nov 17 19:31:34 neutrino power_profile: changed to 'performance'
Nov 17 19:31:35 neutrino savecore: no dumps found
Nov 17 19:31:35 neutrino root: /etc/rc: INFO: amd depends on rpcbind, 
which will be forced to start.
Nov 17 19:31:35 neutrino rpcbind: cannot create socket for udp6
Nov 17 19:31:41 neutrino kernel: ng_hci_process_command_timeout: ubt0hci 
- unable to complete HCI command OGF=0x3, OCF=0x3. Timeout
Nov 17 19:31:43 neutrino kernel: kbd: new array size 4
Nov 17 19:31:43 neutrino kernel: kbd1 at vkbd0
Nov 17 19:31:43 neutrino lpd[613]: lpd startup: logging=1 net-secure
Nov 17 19:31:44 neutrino lpd[613]: lpd startup: ready to accept requests
Nov 17 19:31:45 neutrino sdpd[659]: Could not bind control socket. 
Permission denied (13)
Nov 17 19:32:01 neutrino kernel: acpi_ec0: info: new max delay is 480 us
Nov 17 19:37:19 neutrino kernel: acpi_ec0: info: new max delay is 530 us
Nov 17 19:37:42 neutrino kernel: acpi_ec0: info: new max delay is 540 us
Nov 17 19:37:54 neutrino kernel: acpi_ec0: info: new max delay is 560 us
Nov 17 19:38:21 neutrino kernel: acpi_ec0: info: new max delay is 610 us

now I'll run the bluetooth stop, which produces no output.

ngctl li now looks like:
There are 5 total nodes:
   Name: ngctl1015       Type: socket          ID: 00000020   Num hooks: 0
   Name: btsock_l2c      Type: btsock_l2c      ID: 00000004   Num hooks: 0
   Name: btsock_l2c_raw  Type: btsock_l2c_raw  ID: 00000003   Num hooks: 0
   Name: btsock_hci_raw  Type: btsock_hci_raw  ID: 00000002   Num hooks: 0
   Name: ubt0            Type: ubt             ID: 00000001   Num hooks: 0

Now I ran bluetooth start, which produces no output, and nothing in 
/var/log/messages.

ngctl li now looks like this:
There are 7 total nodes:
   Name: ngctl1045       Type: socket          ID: 0000002c   Num hooks: 0
   Name: ubt0l2cap       Type: l2cap           ID: 00000026   Num hooks: 3
   Name: ubt0hci         Type: hci             ID: 00000022   Num hooks: 3
   Name: btsock_l2c      Type: btsock_l2c      ID: 00000004   Num hooks: 1
   Name: btsock_l2c_raw  Type: btsock_l2c_raw  ID: 00000003   Num hooks: 1
   Name: btsock_hci_raw  Type: btsock_hci_raw  ID: 00000002   Num hooks: 1
   Name: ubt0            Type: ubt             ID: 00000001   Num hooks: 1


Now I wiggle my mouse, and I see this in /var/log/messages:
Nov 17 19:47:58 neutrino bthidd[603]: Accepted control connection from 
00:07:61:31:27:15
Nov 17 19:47:58 neutrino bthidd[603]: Accepted interrupt connection from 
00:07:61:31:27:15

and my mouse now works.



>> Oddly enough, I never had a problem before now.  I previously started 
>> the bluetooth stuff from rc.local.  The only things I have changed 
>> are: updated to latest -current, removed inet6 from kernel, rebuilt 
>> world/kernel, switched to new rc.d bluetooth scripts.  I can try 
>> anything you like.
> 
> 
> one thing you could try to do is to comment out ubt0 section in 
> /etc/devd.conf and go back to old style rc.bluetooth script to see if 
> you have the same problem. if you do - then its not bluetooth related, 
> if you dont - then its related to new bluetooth rc.d scripts.

I can do that if you'd like..

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?437D32F7.10706>