my system:
7.2-RELEASE-p4 FreeBSD 7.2-RELEASE-p4 #1: Sat Nov 21 16:55:14 GMT 2009
root@potato:/usr/src/sys/amd64/compile/POTATO amd64
The kernel is generic apart from ehci being commented out. Sources
cvsupped earlier today from cvsup.uk.freebsd.org
I'm trying to get my sony erikson T610 to work with a nexus bluemicro
pro dongle on 7.2-R. The galling thing is, I got it to work once, but it
was late and I forgot how. I can't get the bluetooth stack to start, and
I'm following the instructins as per the handbook
Firstly, the small size of the device means that it is very awkward to
pull the dongle out once it's pushed in. When restarting the computer,
is it sufficient to reboot(8) then power the machine off, wait a few
seconds then power it back up? I mean does this properly reset the
dongle, or does it truly have to be pulled out and pushed back in for
the system to re-read it?
I've tried various suggestions while googling trying to find the answer.
One suggestion (with a different device) was to disable ehci and
recompile the kernel, which I've done. No difference. Another was to
stop the bluetooth script before starting it:
potato# /etc/rc.d/bluetooth start ubt0
/etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device
ubt0
potato# /etc/rc.d/bluetooth stop ubt0
potato# /etc/rc.d/bluetooth start ubt0
/etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device
ubt0
I find that when the system boots up, only one bluetooth-related kernel module is loaded:
potato# kldstat
Id Refs Address Size Name
1 9 0xffffffff80100000 768b98 kernel
2 1 0xffffffff80869000 7128 geom_concat.ko
3 1 0xffffffff80871000 9808 ng_ubt.ko
4 2 0xffffffff8087b000 14e08 netgraph.ko
5 1 0xffffffff80a22000 978 pflog.ko
6 1 0xffffffff80a23000 2ae8c pf.ko
7 1 0xffffffff80a4e000 aa7a fuse.ko
8 1 0xffffffff80a59000 82e accf_http.ko
potato# ngctl li
There are 1 total nodes:
Name: ngctl1196 Type: socket ID: 00000001 Num hooks:0
When I try to start the stack, this happens:
potato# /etc/rc.d/bluetooth start ubt0
/etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device
ubt0
potato# /etc/rc.d/bluetooth stop ubt0
potato# /etc/rc.d/bluetooth start ubt0
/etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device
ubt0
let's do a kldstat again:
potato# kldstat
Id Refs Address Size Name
1 14 0xffffffff80100000 768b98 kernel
2 1 0xffffffff80869000 7128 geom_concat.ko
3 1 0xffffffff80871000 9808 ng_ubt.ko
4 6 0xffffffff8087b000 14e08 netgraph.ko
5 1 0xffffffff80a22000 978 pflog.ko
6 1 0xffffffff80a23000 2ae8c pf.ko
7 1 0xffffffff80a4e000 aa7a fuse.ko
8 1 0xffffffff80a59000 82e accf_http.ko
9 1 0xffffffff80a5a000 19ba ng_socket.ko
10 4 0xffffffff80a5c000 89a ng_bluetooth.ko
11 1 0xffffffff80a5d000 8b1a ng_hci.ko
12 1 0xffffffff80a66000 b498 ng_l2cap.ko
13 1 0xffffffff80a72000 12c9e ng_btsocket.ko
loads of stuff now.
potato# ngctl li
There are 4 total nodes:
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: btsock_l2c Type: btsock_l2c ID: 00000004 Num hooks: 0
Name: ngctl1781 Type: socket ID: 00000012 Num hooks: 0
but still I cannot get the stack to work! I have also tried commenting
out the ubt* stuff in devd.conf and rebooting, no difference. The little
light on the dongle flashes merrily, but if the stack won't start I
won't be able to do anything.
Can anyone help please?
--
John - comp dot john at googlemail dot com
OpenBSD firewall | FreeBSD desktop | Ubuntu Karmic laptop
GPG: 0xF08A33C5
> Firstly, the small size of the device means that it is very awkward to
> pull the dongle out once it's pushed in. When restarting the computer,
> is it sufficient to reboot(8) then power the machine off, wait a few
> seconds then power it back up? I mean does this properly reset the
> dongle, or does it truly have to be pulled out and pushed back in for
> the system to re-read it?
power down should be sufficient to reset the device entirely, internal
state is rarely kept (sometimes there is nvram for link keys but thats
all)
it seems (to me) that your modules setup is ok, since the modules are
loaded when you want them to be
> potato# /etc/rc.d/bluetooth start ubt0
> /etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device
> ubt0
Not sure if I can really be of much assistance, does hccontrol show that
the node is up and running?
Also, before you do this can you run hcidump as root user? It might show
something happening (or not)
Then, you could enable some kind of debugging in the startup script (use
sh -x at least) to see where it was failing
iain
On Sun, Nov 22, 2009 at 09:45:25AM +0000, Iain Hibbert wrote:
> On Sat, 21 Nov 2009, John wrote:
>
> > Firstly, the small size of the device means that it is very awkward to
> > pull the dongle out once it's pushed in. When restarting the computer,
> > is it sufficient to reboot(8) then power the machine off, wait a few
> > seconds then power it back up? I mean does this properly reset the
> > dongle, or does it truly have to be pulled out and pushed back in for
> > the system to re-read it?
>
> power down should be sufficient to reset the device entirely, internal
> state is rarely kept (sometimes there is nvram for link keys but thats
> all)
Yeah I thought it should be, but it seems that is not the case on my
hardware. (gigabyte motherboard & case, AMD Athalon 64 x2 6000+). Whilst
trying to fix things, I brought the OS up-to-date with 7-STABLE (I was
running 7.2-R p4) and went through mergemaster the long and hard way,
making sure all the bluetooth-related stuff was the newest. Rebooted,
still no joy. Then I pulled the dongle from the socket on the back and
plugged it into one at the front, and this showed more promise. ubt0
didn't appear in messages before, now it did. Seems it needs to be
unplugged then plugged back in. Additionally, I had to go through the
routine of stopping the bluetooth stack, starting it again, getting the
"Unable to setup Bluetooth stack for device ubt0" error, then starting
it again and getting no error.
Now I get:
potato# kldstat
Id Refs Address Size Name
1 14 0xffffffff80100000 bf99e0 kernel
2 1 0xffffffff80cfa000 7118 geom_concat.ko
3 1 0xffffffff80d02000 9808 ng_ubt.ko
4 6 0xffffffff80d0c000 14e98 netgraph.ko
5 1 0xffffffff80e22000 972 pflog.ko
6 1 0xffffffff80e23000 2aefc pf.ko
7 1 0xffffffff80e4e000 12c9e ng_btsocket.ko
8 3 0xffffffff80e61000 89a ng_bluetooth.ko
9 1 0xffffffff80e62000 aa7a fuse.ko
10 1 0xffffffff80e6d000 827 accf_http.ko
11 1 0xffffffff80e6e000 8b1a ng_hci.ko
12 1 0xffffffff80e77000 b498 ng_l2cap.ko
13 1 0xffffffff80e83000 19ba ng_socket.ko
and
potato# ngctl li
There are 7 total nodes:
Name: btsock_l2c_raw Type: btsock_l2c_raw ID: 00000002 Num hooks: 1
Name: ngctl23568 Type: socket ID: 00000063 Num hooks: 0
Name: ubt0hci Type: hci ID: 00000059 Num hooks: 3
Name: btsock_hci_raw Type: btsock_hci_raw ID: 00000001 Num hooks: 1
Name: ubt0l2cap Type: l2cap ID: 0000005d Num hooks: 3
Name: btsock_l2c Type: btsock_l2c ID: 00000003 Num hooks: 1
Name: ubt0 Type: ubt ID: 00000004 Num hooks: 1
so that looks OK
potato# hccontrol -n ubt0hci inquiry
Inquiry result, num_responses=1
Inquiry result #0
BD_ADDR: 00:0a:d9:3e:70:24
Page Scan Rep. Mode: 0x1
Page Scan Period Mode: 00
Page Scan Mode: 00
Class: 52:02:04
Clock offset: 0x273b
Inquiry complete.
Status: No error [00]
potato# hccontrol -n ubt0hci remote_name_request 00:0a:d9:3e:70:24
BD_ADDR: 00:0a:d9:3e:70:24
Name: T610
so, in the parlance of the literature, the phone is my server and this
is the server's MAC address: 00:0a:d9:3e:70:24
What I can't work out now is why i can't see the channels:
potato# l2ping -a 00:0a:d9:3e:70:24
0 bytes from 00:0a:d9:3e:70:24 seq_no=0 time=500.567 ms result=0
0 bytes from 00:0a:d9:3e:70:24 seq_no=1 time=31.890 ms result=0
0 bytes from 00:0a:d9:3e:70:24 seq_no=2 time=31.895 ms result=0
0 bytes from 00:0a:d9:3e:70:24 seq_no=3 time=31.897 ms result=0
0 bytes from 00:0a:d9:3e:70:24 seq_no=4 time=32.900 ms result=0
0 bytes from 00:0a:d9:3e:70:24 seq_no=5 time=30.906 ms result=0
^C
potato# l2control -a 00:0a:d9:3e:70:24 Read_Channel_List
l2control: Could not bind socket, bdaddr=00:0a:d9:3e:70:24: Network is
down
I have paired the handset with the device and it shows the fqdn of the
freebsd machine. If I do sdpcontrol -a 00:0a:d9:3e:70:24 browse I get
pages of output.
But! If I do rfcomm_sppd -a 00:0a:d9:3e:70:24 -t /dev/ttyp6 I see this
in messages:
Nov 23 01:38:24 potato rfcomm_sppd: Could not open(/dev/ptyp6).
Input/output error
any ideas? I think the l2control error and the rfcomm one may be
related, but I haven't a clue how to resolve the issue.
[...]
everything up to this point looks good
> What I can't work out now is why i can't see the channels:
>
> potato# l2ping -a 00:0a:d9:3e:70:24
> 0 bytes from 00:0a:d9:3e:70:24 seq_no=0 time=500.567 ms result=0
> 0 bytes from 00:0a:d9:3e:70:24 seq_no=1 time=31.890 ms result=0
> 0 bytes from 00:0a:d9:3e:70:24 seq_no=2 time=31.895 ms result=0
> 0 bytes from 00:0a:d9:3e:70:24 seq_no=3 time=31.897 ms result=0
> 0 bytes from 00:0a:d9:3e:70:24 seq_no=4 time=32.900 ms result=0
> 0 bytes from 00:0a:d9:3e:70:24 seq_no=5 time=30.906 ms result=0
this looks fine
> potato# l2control -a 00:0a:d9:3e:70:24 Read_Channel_List
> l2control: Could not bind socket, bdaddr=00:0a:d9:3e:70:24: Network is
> down
this will not work. as per l2control(8) man page
"
The l2control utility connects to the local device with the specified
BD_ADDR and attempts to send the specified command.
"
i.e. l2control(8) will display _local_ l2cap channels (basically l2cap
connections). you dont have any l2cap channels (i.e. connections).
i'm guessing you want to see the services offered on your t610 phone.
you need to use sdpcontrol(8) for this.
> I have paired the handset with the device and it shows the fqdn of the
> freebsd machine. If I do sdpcontrol -a 00:0a:d9:3e:70:24 browse I get
> pages of output.
yes, this will tell you service names and service parameters
> But! If I do rfcomm_sppd -a 00:0a:d9:3e:70:24 -t /dev/ttyp6 I see this
> in messages:
>
> Nov 23 01:38:24 potato rfcomm_sppd: Could not open(/dev/ptyp6).
> Input/output error
well, it could not open /dev/ptyp6? is it busy? did you try different terminal?
> any ideas? I think the l2control error and the rfcomm one may be
> related, but I haven't a clue how to resolve the issue.
l2control(8) is not an issue you. rfcomm_sppd(1) had problem with
opening master pty.
thanks
max
> Then I pulled the dongle from the socket on the back and
> plugged it into one at the front, and this showed more promise.
perhaps the one at the back is EHCI but the one at the front is not (or,
full-speed and high-speed or whatever they call it) since you had to
disable ehci to get it working..?
iain
No, I recompiled without EHCI on the basis that there were issues with
it enabled (I did a lot of googling before posting here, and it was
advice though I think it pertained to netbsd and some other specific
advice) but at that stage I was grasping at straws ;)
> this will not work. as per l2control(8) man page
oops! sorry for the noise.
> well, it could not open /dev/ptyp6? is it busy? did you try different terminal?
yep, got i/o error with them all.
> l2control(8) is not an issue you. rfcomm_sppd(1) had problem with
> opening master pty.
I'm going to update and buildworld again, and remake all my devices. I
saw some odd ownership for /dev/ttyp6 and friends.
cheers