linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Connection failures on Ubuntu
@ 2015-11-10 17:20 Mark Spruiell
  2015-11-11 10:53 ` Felipe Ferreri Tonello
  2015-11-14  0:51 ` Mark Spruiell
  0 siblings, 2 replies; 4+ messages in thread
From: Mark Spruiell @ 2015-11-10 17:20 UTC (permalink / raw)
  To: linux-bluetooth

I'm not able to connect to a service running on Ubuntu 15.10. The
system-provided BlueZ version is 5.35.

I can reproduce it using the test scripts. On Ubuntu:

./test-profile -s -u b85280dd-b78a-4a45-be4b-b6fec4abd86f -n "Test Server" -C 5

sdptool shows the service:

Service Name: Test Server
Service RecHandle: 0x10009
Service Class ID List:
  UUID 128: b85280dd-b78a-4a45-be4b-b6fec4abd86f
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 5

On a different host (this one running Fedora 22 with BlueZ 5.29), I
start a client:

./test-profile -u b85280dd-b78a-4a45-be4b-b6fec4abd86f -c

and then

./test-device connect <ubuntu-addr> b85280dd-b78a-4a45-be4b-b6fec4abd86f
Traceback (most recent call last):
  File "./test-device", line 104, in <module>
    device.ConnectProfile(args[2])
  File "/usr/lib64/python2.7/site-packages/dbus/proxies.py", line 70,
in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib64/python2.7/site-packages/dbus/proxies.py", line 145,
in __call__
    **keywords)
  File "/usr/lib64/python2.7/site-packages/dbus/connection.py", line
651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.bluez.Error.Failed: Connection refused

Other times I will get:

dbus.exceptions.DBusException: org.bluez.Error.Failed: Resource
temporarily unavailable

These hosts are already paired. Things work fine when both hosts are
using Fedora 22.

Any suggestions on how I can diagnose this further?

Thanks,
Mark

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Connection failures on Ubuntu
  2015-11-10 17:20 Connection failures on Ubuntu Mark Spruiell
@ 2015-11-11 10:53 ` Felipe Ferreri Tonello
  2015-11-14  0:39   ` Mark Spruiell
  2015-11-14  0:51 ` Mark Spruiell
  1 sibling, 1 reply; 4+ messages in thread
From: Felipe Ferreri Tonello @ 2015-11-11 10:53 UTC (permalink / raw)
  To: Mark Spruiell, linux-bluetooth

[-- Attachment #1: Type: text/plain, Size: 1876 bytes --]

Hi Mark,

On 10/11/15 17:20, Mark Spruiell wrote:
> I'm not able to connect to a service running on Ubuntu 15.10. The
> system-provided BlueZ version is 5.35.
> 
> I can reproduce it using the test scripts. On Ubuntu:
> 
> ./test-profile -s -u b85280dd-b78a-4a45-be4b-b6fec4abd86f -n "Test Server" -C 5
> 
> sdptool shows the service:
> 
> Service Name: Test Server
> Service RecHandle: 0x10009
> Service Class ID List:
>   UUID 128: b85280dd-b78a-4a45-be4b-b6fec4abd86f
> Protocol Descriptor List:
>   "L2CAP" (0x0100)
>   "RFCOMM" (0x0003)
>     Channel: 5
> 
> On a different host (this one running Fedora 22 with BlueZ 5.29), I
> start a client:
> 
> ./test-profile -u b85280dd-b78a-4a45-be4b-b6fec4abd86f -c
> 
> and then
> 
> ./test-device connect <ubuntu-addr> b85280dd-b78a-4a45-be4b-b6fec4abd86f
> Traceback (most recent call last):
>   File "./test-device", line 104, in <module>
>     device.ConnectProfile(args[2])
>   File "/usr/lib64/python2.7/site-packages/dbus/proxies.py", line 70,
> in __call__
>     return self._proxy_method(*args, **keywords)
>   File "/usr/lib64/python2.7/site-packages/dbus/proxies.py", line 145,
> in __call__
>     **keywords)
>   File "/usr/lib64/python2.7/site-packages/dbus/connection.py", line
> 651, in call_blocking
>     message, timeout)
> dbus.exceptions.DBusException: org.bluez.Error.Failed: Connection refused
> 
> Other times I will get:
> 
> dbus.exceptions.DBusException: org.bluez.Error.Failed: Resource
> temporarily unavailable
> 
> These hosts are already paired. Things work fine when both hosts are
> using Fedora 22.
> 
> Any suggestions on how I can diagnose this further?

I had this type of problem on Ubuntu when trying to register master's
build of bluetoothd to D-Bus on Ubuntu as well and not on Fedora.

Try to tweak /etc/dbus-1/system.d/bluetooth.conf user permissions just
for development.

-- 
Felipe

[-- Attachment #2: 0x92698E6A.asc --]
[-- Type: application/pgp-keys, Size: 4908 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Connection failures on Ubuntu
  2015-11-11 10:53 ` Felipe Ferreri Tonello
@ 2015-11-14  0:39   ` Mark Spruiell
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Spruiell @ 2015-11-14  0:39 UTC (permalink / raw)
  To: Felipe Ferreri Tonello; +Cc: linux-bluetooth

Hi Felipe,

On Wed, Nov 11, 2015 at 2:53 AM, Felipe Ferreri Tonello
<eu@felipetonello.com> wrote:
> Hi Mark,
>
> On 10/11/15 17:20, Mark Spruiell wrote:
>> I'm not able to connect to a service running on Ubuntu 15.10. The
>> system-provided BlueZ version is 5.35.
>>
>> I can reproduce it using the test scripts. On Ubuntu:
>>
>> ./test-profile -s -u b85280dd-b78a-4a45-be4b-b6fec4abd86f -n "Test Server" -C 5
>>
>> sdptool shows the service:
>>
>> Service Name: Test Server
>> Service RecHandle: 0x10009
>> Service Class ID List:
>>   UUID 128: b85280dd-b78a-4a45-be4b-b6fec4abd86f
>> Protocol Descriptor List:
>>   "L2CAP" (0x0100)
>>   "RFCOMM" (0x0003)
>>     Channel: 5
>>
>> On a different host (this one running Fedora 22 with BlueZ 5.29), I
>> start a client:
>>
>> ./test-profile -u b85280dd-b78a-4a45-be4b-b6fec4abd86f -c
>>
>> and then
>>
>> ./test-device connect <ubuntu-addr> b85280dd-b78a-4a45-be4b-b6fec4abd86f
>> Traceback (most recent call last):
>>   File "./test-device", line 104, in <module>
>>     device.ConnectProfile(args[2])
>>   File "/usr/lib64/python2.7/site-packages/dbus/proxies.py", line 70,
>> in __call__
>>     return self._proxy_method(*args, **keywords)
>>   File "/usr/lib64/python2.7/site-packages/dbus/proxies.py", line 145,
>> in __call__
>>     **keywords)
>>   File "/usr/lib64/python2.7/site-packages/dbus/connection.py", line
>> 651, in call_blocking
>>     message, timeout)
>> dbus.exceptions.DBusException: org.bluez.Error.Failed: Connection refused
>>
>> Other times I will get:
>>
>> dbus.exceptions.DBusException: org.bluez.Error.Failed: Resource
>> temporarily unavailable
>>
>> These hosts are already paired. Things work fine when both hosts are
>> using Fedora 22.
>>
>> Any suggestions on how I can diagnose this further?
>
> I had this type of problem on Ubuntu when trying to register master's
> build of bluetoothd to D-Bus on Ubuntu as well and not on Fedora.
>
> Try to tweak /etc/dbus-1/system.d/bluetooth.conf user permissions just
> for development.

I tried playing with some different settings in bluetooth.conf but
couldn't get it to work.

Thanks for the reply.

Mark

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Connection failures on Ubuntu
  2015-11-10 17:20 Connection failures on Ubuntu Mark Spruiell
  2015-11-11 10:53 ` Felipe Ferreri Tonello
@ 2015-11-14  0:51 ` Mark Spruiell
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Spruiell @ 2015-11-14  0:51 UTC (permalink / raw)
  To: linux-bluetooth

Just to follow up on my own post...

On Tue, Nov 10, 2015 at 9:20 AM, Mark Spruiell <mes@zeroc.com> wrote:
> I'm not able to connect to a service running on Ubuntu 15.10. The
> system-provided BlueZ version is 5.35.
>
> I can reproduce it using the test scripts. On Ubuntu:
>
> ./test-profile -s -u b85280dd-b78a-4a45-be4b-b6fec4abd86f -n "Test Server" -C 5
>
> sdptool shows the service:
>
> Service Name: Test Server
> Service RecHandle: 0x10009
> Service Class ID List:
>   UUID 128: b85280dd-b78a-4a45-be4b-b6fec4abd86f
> Protocol Descriptor List:
>   "L2CAP" (0x0100)
>   "RFCOMM" (0x0003)
>     Channel: 5
>
> On a different host (this one running Fedora 22 with BlueZ 5.29), I
> start a client:
>
> ./test-profile -u b85280dd-b78a-4a45-be4b-b6fec4abd86f -c
>
> and then
>
> ./test-device connect <ubuntu-addr> b85280dd-b78a-4a45-be4b-b6fec4abd86f
> Traceback (most recent call last):
>   File "./test-device", line 104, in <module>
>     device.ConnectProfile(args[2])
>   File "/usr/lib64/python2.7/site-packages/dbus/proxies.py", line 70,
> in __call__
>     return self._proxy_method(*args, **keywords)
>   File "/usr/lib64/python2.7/site-packages/dbus/proxies.py", line 145,
> in __call__
>     **keywords)
>   File "/usr/lib64/python2.7/site-packages/dbus/connection.py", line
> 651, in call_blocking
>     message, timeout)
> dbus.exceptions.DBusException: org.bluez.Error.Failed: Connection refused
>
> Other times I will get:
>
> dbus.exceptions.DBusException: org.bluez.Error.Failed: Resource
> temporarily unavailable
>
> These hosts are already paired. Things work fine when both hosts are
> using Fedora 22.
>
> Any suggestions on how I can diagnose this further?
>
> Thanks,
> Mark

When attempting to connect the profile, I noticed messages in the
Ubuntu system log such as:

bluetoothd[65069]: Authentication attempt without agent
bluetoothd[65069]: Test Server rejected <fedora-bdaddr>:
org.bluez.Error.Rejected

So I used bluetoothctl to configure the <fedora-bdaddr> device as
trusted. Instead of 'Connection refused' messages, the Fedora client
would now get 'Connection reset by peer'. There was nothing obvious in
the logs on either machine but I can post them if necessary.

I decided to try other versions of BlueZ to see if it made any
difference. I built and installed the following from source on Ubuntu
15.10:

v5.36: segfault on bluetoothd startup
v5.34: same failure behavior as 5.35 above
v5.33: same failure behavior as 5.35 above
v5.32: same failure behavior as 5.35 above
v5.31: same failure behavior as 5.35 above
v5.30: works!

I compared the v5.30 and v5.31 sources to see if anything stood out. I
noticed this entry in the ChangeLog:

> Fix issue with profile connections from remote devices.

Sounds like it might be relevant to my situation. Is there any more
information on this issue?

Mark

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-11-14  0:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-10 17:20 Connection failures on Ubuntu Mark Spruiell
2015-11-11 10:53 ` Felipe Ferreri Tonello
2015-11-14  0:39   ` Mark Spruiell
2015-11-14  0:51 ` Mark Spruiell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).