Linux-Bluetooth Archive on lore.kernel.org
 help / Atom feed
* Error setting UUIDs discovery filter on big endian systems
@ 2018-12-03 13:56 Matt
  2018-12-04 19:53 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 3+ messages in thread
From: Matt @ 2018-12-03 13:56 UTC (permalink / raw)
  To: linux-bluetooth

Hi,

When setting a UUIDs discovery filter I am receiving 
"org.bluez.Error.InProgress" on starting a scan (which isn't in progress 
and will not start unless the discovery filter is cleared).

I am using bluez 5.50 (on openWRT). The problem seems to only appear on 
big endian hardware (tested a couple of recent kernel and bluez 
versions), the same software compiled for and tested on little endian 
hardware works as expected. The issue can be reproduced in the following 
way using bluetoothctl:

# /etc/init.d/bluetoothd restart
# bluetoothctl
[bluetooth]# power on
Changing power on succeeded
[CHG] Controller 00:1A:7D:DA:71:13 Powered: yes
[bluetooth]# menu scan
[bluetooth]# uuids 0000180f-0000-1000-8000-00805f9b34fb
[bluetooth]# back
[bluetooth]# scan on
SetDiscoveryFilter success
Failed to start discovery: org.bluez.Error.InProgress

Setting an rssi filter does work as expected on my big endian hardware, 
it is only the uuids filter that appears to show this problem. The issue 
appears whether set using bluetoothctl or directly using DBus.

Thank you for your help and attention,
Matt

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

* Re: Error setting UUIDs discovery filter on big endian systems
  2018-12-03 13:56 Error setting UUIDs discovery filter on big endian systems Matt
@ 2018-12-04 19:53 ` Luiz Augusto von Dentz
  2018-12-05  0:27   ` Matt
  0 siblings, 1 reply; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2018-12-04 19:53 UTC (permalink / raw)
  To: mwtaylor; +Cc: linux-bluetooth

Hi Matt,
On Mon, Dec 3, 2018 at 3:59 PM Matt <mwtaylor@gmail.com> wrote:
>
> Hi,
>
> When setting a UUIDs discovery filter I am receiving
> "org.bluez.Error.InProgress" on starting a scan (which isn't in progress
> and will not start unless the discovery filter is cleared).
>
> I am using bluez 5.50 (on openWRT). The problem seems to only appear on
> big endian hardware (tested a couple of recent kernel and bluez
> versions), the same software compiled for and tested on little endian
> hardware works as expected. The issue can be reproduced in the following
> way using bluetoothctl:
>
> # /etc/init.d/bluetoothd restart
> # bluetoothctl
> [bluetooth]# power on
> Changing power on succeeded
> [CHG] Controller 00:1A:7D:DA:71:13 Powered: yes
> [bluetooth]# menu scan
> [bluetooth]# uuids 0000180f-0000-1000-8000-00805f9b34fb
> [bluetooth]# back
> [bluetooth]# scan on
> SetDiscoveryFilter success
> Failed to start discovery: org.bluez.Error.InProgress
>
> Setting an rssi filter does work as expected on my big endian hardware,
> it is only the uuids filter that appears to show this problem. The issue
> appears whether set using bluetoothctl or directly using DBus.

Do you have the bluetoothd logs when that happens? I wonder if it is
something with our string to UUID conversion.


-- 
Luiz Augusto von Dentz

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

* Re: Error setting UUIDs discovery filter on big endian systems
  2018-12-04 19:53 ` Luiz Augusto von Dentz
@ 2018-12-05  0:27   ` Matt
  0 siblings, 0 replies; 3+ messages in thread
From: Matt @ 2018-12-05  0:27 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Hi Luiz,

On 04/12/2018 19:53, Luiz Augusto von Dentz wrote:
> Hi Matt,
> On Mon, Dec 3, 2018 at 3:59 PM Matt <mwtaylor@gmail.com> wrote:
>> Hi,
>>
>> When setting a UUIDs discovery filter I am receiving
>> "org.bluez.Error.InProgress" on starting a scan (which isn't in progress
>> and will not start unless the discovery filter is cleared).
>>
>> I am using bluez 5.50 (on openWRT). The problem seems to only appear on
>> big endian hardware (tested a couple of recent kernel and bluez
>> versions), the same software compiled for and tested on little endian
>> hardware works as expected. The issue can be reproduced in the following
>> way using bluetoothctl:
>>
>> # /etc/init.d/bluetoothd restart
>> # bluetoothctl
>> [bluetooth]# power on
>> Changing power on succeeded
>> [CHG] Controller 00:1A:7D:DA:71:13 Powered: yes
>> [bluetooth]# menu scan
>> [bluetooth]# uuids 0000180f-0000-1000-8000-00805f9b34fb
>> [bluetooth]# back
>> [bluetooth]# scan on
>> SetDiscoveryFilter success
>> Failed to start discovery: org.bluez.Error.InProgress
>>
>> Setting an rssi filter does work as expected on my big endian hardware,
>> it is only the uuids filter that appears to show this problem. The issue
>> appears whether set using bluetoothctl or directly using DBus.
> Do you have the bluetoothd logs when that happens? I wonder if it is
> something with our string to UUID conversion.
>
>
When performing the above sequence in bluetoothctl with 'bluetoothd -d' 
I get the following in my log:

daemon.debug bluetoothd[22991]: src/agent.c:agent_ref() 0xb03e60: ref=1
daemon.debug bluetoothd[22991]: src/agent.c:register_agent() agent :1.29
daemon.debug bluetoothd[22991]: src/adapter.c:property_set_mode() 
sending Set Powered command for index 0
daemon.debug bluetoothd[22991]: 
src/adapter.c:property_set_mode_complete() Success (0x00)
daemon.debug bluetoothd[22991]: src/adapter.c:new_settings_callback() 
Settings: 0x00000ad1
daemon.debug bluetoothd[22991]: src/adapter.c:settings_changed() Changed 
settings: 0x00000001
daemon.debug bluetoothd[22991]: src/adapter.c:adapter_start() adapter 
/org/bluez/hci0 has been enabled
daemon.debug bluetoothd[22991]: src/adapter.c:trigger_passive_scanning()
daemon.debug bluetoothd[22991]: src/adapter.c:set_discovery_filter() 
sender :1.29
daemon.debug bluetoothd[22991]: 
src/adapter.c:parse_discovery_filter_dict() filtered discovery params: 
transport: 7 rssi: 32767 pathloss: 32767  duplicate data: false
daemon.debug bluetoothd[22991]: src/adapter.c:set_discovery_filter() 
successfully pre-set filter
daemon.debug bluetoothd[22991]: src/adapter.c:start_discovery() sender :1.29
daemon.debug bluetoothd[22991]: src/adapter.c:update_discovery_filter()
daemon.debug bluetoothd[22991]: src/adapter.c:discovery_filter_to_mgmt_cp()
daemon.debug bluetoothd[22991]: src/adapter.c:trigger_start_discovery()
daemon.debug bluetoothd[22991]: src/adapter.c:cancel_passive_scanning()
daemon.debug bluetoothd[22991]: src/adapter.c:start_discovery_timeout()
daemon.debug bluetoothd[22991]: src/adapter.c:start_discovery_timeout() 
adapter->current_discovery_filter == 1
daemon.debug bluetoothd[22991]: src/adapter.c:start_discovery_timeout() 
sending MGMT_OP_START_SERVICE_DISCOVERY 127, 7, 1
daemon.debug bluetoothd[22991]: src/adapter.c:start_discovery_complete() 
status 0x0d
kern.err kernel: [709588.482104] Bluetooth: service_discovery: expected 
4100 bytes, got 20 bytes
daemon.debug bluetoothd[22991]: src/agent.c:agent_disconnect() Agent 
:1.29 disconnected
daemon.debug bluetoothd[22991]: src/agent.c:agent_destroy() agent :1.29
daemon.debug bluetoothd[22991]: src/agent.c:agent_unref() 0xb03e60: ref=0

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

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-03 13:56 Error setting UUIDs discovery filter on big endian systems Matt
2018-12-04 19:53 ` Luiz Augusto von Dentz
2018-12-05  0:27   ` Matt

Linux-Bluetooth Archive on lore.kernel.org

Archives are clonable: git clone --mirror https://lore.kernel.org/linux-bluetooth/0 linux-bluetooth/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-bluetooth linux-bluetooth/ https://lore.kernel.org/linux-bluetooth \
		linux-bluetooth@vger.kernel.org linux-bluetooth@archiver.kernel.org
	public-inbox-index linux-bluetooth


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-bluetooth


AGPL code for this site: git clone https://public-inbox.org/ public-inbox