From 148f0dc99ce5bb7ea5eda496e0057a8236ce20ed Mon Sep 17 00:00:00 2001 From: David Escalona Date: Mon, 27 Mar 2023 13:54:42 +0200 Subject: [PATCH] connectcore-demo-example: limit demo to use only native BT adapter By default, when retrieving the Bluetooth interface to use in the demo, the service first tries with the native Bluetooth adapter and, in the case it fails, it looks for connected XBee devices with Bluetooth capabilities. This is causing the demo to lock the XBee port if the native Bluetooth interface is not present or fails to initialize. Avoid this behavior by limiting the Bluetooth service to use only the native Bluetooth interface for this demo. Signed-off-by: David Escalona --- connectcore-demo-example/demoserver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connectcore-demo-example/demoserver.py b/connectcore-demo-example/demoserver.py index 0f07e1f..675b6e0 100755 --- a/connectcore-demo-example/demoserver.py +++ b/connectcore-demo-example/demoserver.py @@ -666,7 +666,7 @@ class BluetoothService: """ with self._lock: try: - self._ble_service = ConnectCoreBLEService.get_instance() + self._ble_service = ConnectCoreBLEService.get_instance(ble_interface=BLEInterface.ADAPTER) self._ble_service.add_connect_callback(self._connection_cb) self._ble_service.add_data_received_callback(self._data_received_cb) self._ble_service.set_password(get_bt_password())