Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Mar 2020 16:04:33 +0100
From:      Andrea Venturoli <ml@netfence.it>
To:        freebsd-questions@freebsd.org
Subject:   Bluetooth doesn't work properly after upgrading to 12.1
Message-ID:  <2e0008f2-c4ab-b234-7890-ecd18b378b51@netfence.it>

next in thread | raw e-mail | index | archive | help
Hello.

I'm facing yet another trouble with 12.1: I've been using BT to transfer 
pictures from my phone (Android) to a FreeBSD box for years, but now 
it's not working anymore: no matter what I try the phone won't see the 
computer available as a destination.



hcsecd is running.
The handbook says "service bluetooth start ubt0" should output a lot of 
details: it doesn't.
Instead, sometimes it prints:
> /etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device ubt0
Other time it prints nothing; I think this means it succeeded.



Anyway, "hccontrol inquiry" correctly performs a scan and finds other 
devices.
"l2ping -a foo" succeeds (more or less):
> 0 bytes from doh seq_no=0 time=5177.894 ms result=0x4 
> 44 bytes from doh seq_no=1 time=1893.984 ms result=0 
> 44 bytes from doh seq_no=2 time=17.314 ms result=0 
> 44 bytes from doh seq_no=3 time=12.920 ms result=0 
> ...

> # sdpcontrol -l browse
> 
> Record Handle: 00000000
> Service Class ID List:
> 	Service Discovery Server (0x1000)
> Protocol Descriptor List:
> 	L2CAP (0x0100)
> 	SDP (0x0001)
> Bluetooth Profile Descriptor List:
> 	Service Discovery Server (0x1000) ver. 1.0
> 
> Record Handle: 0x00000001
> Service Class ID List:
> 	Browse Group Descriptor (0x1001)
> 
> Record Handle: 0x0000000a
> Service Class ID List:
> 	OBEX Object Push (0x1105)
> Protocol Descriptor List:
> 	L2CAP (0x0100)
> 	RFCOMM (0x0003)
> 		Protocol specific parameter #1: u/int8/bool 30
> 	OBEX (0x0008)
> Bluetooth Profile Descriptor List:
> 	OBEX Object Push (0x1105) ver. 1.0
> 
> Record Handle: 0x0000000b
> Service Class ID List:
> 	OBEX File Transfer (0x1106)
> Protocol Descriptor List:
> 	L2CAP (0x0100)
> 	RFCOMM (0x0003)
> 		Protocol specific parameter #1: u/int8/bool 30
> 	OBEX (0x0008)
> Bluetooth Profile Descriptor List:
> 	OBEX File Transfer (0x1106) ver. 1.0

Still the phone won't find the computer.



After searching the web for a long time, I came across these two commands:
> hccontrol -n ubt0hci write_authentication_enable 1
> hccontrol -n ubt0hci write_scan_enable 3

Not sure what they do and if they are needed (if so, why are they not 
mentioned in the Handbook?), but they allowed me to pair my computer and 
my phone.



Still no luck however: when sending a picture, I can now select my 
computer as target, but the process will end with "Connection failed".



I'm open to any suggestion, here. (*)

  bye & Thanks
	av.


(*) While I'd be delighted to have Bluetooth working in general, I'll 
also consider other means to transfer pictures via USB cable: all my 
tentative on that path also failed.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2e0008f2-c4ab-b234-7890-ecd18b378b51>