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 <david.escalona@digi.com>
This commit is contained in:
parent
4bb2a81a46
commit
148f0dc99c
|
|
@ -666,7 +666,7 @@ class BluetoothService:
|
||||||
"""
|
"""
|
||||||
with self._lock:
|
with self._lock:
|
||||||
try:
|
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_connect_callback(self._connection_cb)
|
||||||
self._ble_service.add_data_received_callback(self._data_received_cb)
|
self._ble_service.add_data_received_callback(self._data_received_cb)
|
||||||
self._ble_service.set_password(get_bt_password())
|
self._ble_service.set_password(get_bt_password())
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue