thud migration: bluez5: update recipe to version 5.50
https://jira.digi.com/browse/DEL-6412 Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
This commit is contained in:
parent
ac53a74443
commit
cf0165fa42
|
|
@ -50,8 +50,8 @@ GCCVERSION ?= "7.%"
|
||||||
|
|
||||||
# Our layer only provides version 5.41, which we want to keep because
|
# Our layer only provides version 5.41, which we want to keep because
|
||||||
# it was used for Bluetooth certification. However by default the newer
|
# it was used for Bluetooth certification. However by default the newer
|
||||||
# 5.48 version should be used, which is provided by the poky layer.
|
# 5.50 version should be used, which is provided by the poky layer.
|
||||||
PREFERRED_VERSION_bluez5 ?= "5.48"
|
PREFERRED_VERSION_bluez5 ?= "5.50"
|
||||||
|
|
||||||
# Set the PREFERRED_PROVIDER for jpeg functionality based on the MACHINE
|
# Set the PREFERRED_PROVIDER for jpeg functionality based on the MACHINE
|
||||||
# architecture. For armv7a devices libjpeg-turbo should be used to take
|
# architecture. For armv7a devices libjpeg-turbo should be used to take
|
||||||
|
|
|
||||||
|
|
@ -1,49 +1,27 @@
|
||||||
From: Isaac Hermida <isaac.hermida@digi.com>
|
From: Arturo Buzarra <arturo.buzarra@digi.com>
|
||||||
Date: Thu, 3 Aug 2017 14:10:43 +0200
|
Date: Mon, 21 Jan 2019 12:15:06 +0100
|
||||||
Subject: [PATCH] port test-discovery to python3
|
Subject: [PATCH] port test-discovery to python3
|
||||||
|
|
||||||
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
|
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
|
||||||
|
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
|
||||||
---
|
---
|
||||||
test/bluezutils.py | 4 ++--
|
|
||||||
test/test-discovery | 16 +++++++++-------
|
test/test-discovery | 16 +++++++++-------
|
||||||
2 files changed, 11 insertions(+), 9 deletions(-)
|
1 file changed, 9 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
diff --git a/test/bluezutils.py b/test/bluezutils.py
|
|
||||||
index de08cbdcb712..cd8964082450 100644
|
|
||||||
--- a/test/bluezutils.py
|
|
||||||
+++ b/test/bluezutils.py
|
|
||||||
@@ -15,7 +15,7 @@ def find_adapter(pattern=None):
|
|
||||||
|
|
||||||
def find_adapter_in_objects(objects, pattern=None):
|
|
||||||
bus = dbus.SystemBus()
|
|
||||||
- for path, ifaces in objects.iteritems():
|
|
||||||
+ for path, ifaces in objects.items():
|
|
||||||
adapter = ifaces.get(ADAPTER_INTERFACE)
|
|
||||||
if adapter is None:
|
|
||||||
continue
|
|
||||||
@@ -35,7 +35,7 @@ def find_device_in_objects(objects, device_address, adapter_pattern=None):
|
|
||||||
if adapter_pattern:
|
|
||||||
adapter = find_adapter_in_objects(objects, adapter_pattern)
|
|
||||||
path_prefix = adapter.object_path
|
|
||||||
- for path, ifaces in objects.iteritems():
|
|
||||||
+ for path, ifaces in objects.items():
|
|
||||||
device = ifaces.get(DEVICE_INTERFACE)
|
|
||||||
if device is None:
|
|
||||||
continue
|
|
||||||
diff --git a/test/test-discovery b/test/test-discovery
|
diff --git a/test/test-discovery b/test/test-discovery
|
||||||
index cea77683d726..852611c862ea 100755
|
index cea77683d..852611c86 100755
|
||||||
--- a/test/test-discovery
|
--- a/test/test-discovery
|
||||||
+++ b/test/test-discovery
|
+++ b/test/test-discovery
|
||||||
@@ -1,4 +1,4 @@
|
@@ -1,4 +1,4 @@
|
||||||
-#!/usr/bin/python
|
-#!/usr/bin/python
|
||||||
+#!/usr/bin/python3
|
+#!/usr/bin/python3
|
||||||
|
|
||||||
from __future__ import absolute_import, print_function, unicode_literals
|
from __future__ import absolute_import, print_function, unicode_literals
|
||||||
|
|
||||||
@@ -18,9 +18,9 @@ def print_compact(address, properties):
|
@@ -18,9 +18,9 @@ def print_compact(address, properties):
|
||||||
name = ""
|
name = ""
|
||||||
address = "<unknown>"
|
address = "<unknown>"
|
||||||
|
|
||||||
- for key, value in properties.iteritems():
|
- for key, value in properties.iteritems():
|
||||||
+ for key, value in properties.items():
|
+ for key, value in properties.items():
|
||||||
if type(value) is dbus.String:
|
if type(value) is dbus.String:
|
||||||
|
|
@ -63,7 +41,7 @@ index cea77683d726..852611c862ea 100755
|
||||||
else:
|
else:
|
||||||
@@ -61,6 +61,8 @@ def skip_dev(old_dev, new_dev):
|
@@ -61,6 +61,8 @@ def skip_dev(old_dev, new_dev):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def interfaces_added(path, interfaces):
|
def interfaces_added(path, interfaces):
|
||||||
+ if "org.bluez.Device1" not in interfaces.keys():
|
+ if "org.bluez.Device1" not in interfaces.keys():
|
||||||
+ return
|
+ return
|
||||||
|
|
@ -71,23 +49,23 @@ index cea77683d726..852611c862ea 100755
|
||||||
if not properties:
|
if not properties:
|
||||||
return
|
return
|
||||||
@@ -70,7 +72,7 @@ def interfaces_added(path, interfaces):
|
@@ -70,7 +72,7 @@ def interfaces_added(path, interfaces):
|
||||||
|
|
||||||
if compact and skip_dev(dev, properties):
|
if compact and skip_dev(dev, properties):
|
||||||
return
|
return
|
||||||
- devices[path] = dict(devices[path].items() + properties.items())
|
- devices[path] = dict(devices[path].items() + properties.items())
|
||||||
+ devices[path] = dict(list(devices[path].items()) + list(properties.items()))
|
+ devices[path] = dict(list(devices[path].items()) + list(properties.items()))
|
||||||
else:
|
else:
|
||||||
devices[path] = properties
|
devices[path] = properties
|
||||||
|
|
||||||
@@ -93,7 +95,7 @@ def properties_changed(interface, changed, invalidated, path):
|
@@ -93,7 +95,7 @@ def properties_changed(interface, changed, invalidated, path):
|
||||||
|
|
||||||
if compact and skip_dev(dev, changed):
|
if compact and skip_dev(dev, changed):
|
||||||
return
|
return
|
||||||
- devices[path] = dict(devices[path].items() + changed.items())
|
- devices[path] = dict(devices[path].items() + changed.items())
|
||||||
+ devices[path] = dict(list(devices[path].items()) + list(changed.items()))
|
+ devices[path] = dict(list(devices[path].items()) + list(changed.items()))
|
||||||
else:
|
else:
|
||||||
devices[path] = changed
|
devices[path] = changed
|
||||||
|
|
||||||
@@ -152,7 +154,7 @@ if __name__ == '__main__':
|
@@ -152,7 +154,7 @@ if __name__ == '__main__':
|
||||||
om = dbus.Interface(bus.get_object("org.bluez", "/"),
|
om = dbus.Interface(bus.get_object("org.bluez", "/"),
|
||||||
"org.freedesktop.DBus.ObjectManager")
|
"org.freedesktop.DBus.ObjectManager")
|
||||||
Loading…
Reference in New Issue