From 8fecc1b38c365c9b78899278f259161158e876f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mats=20J=C3=B8rgen=20=C3=98yan?= Date: Wed, 22 Jun 2022 14:57:04 +0200 Subject: [PATCH 1/2] bugfix: Join fail issue #150 --- bluetooth_mesh/application.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/bluetooth_mesh/application.py b/bluetooth_mesh/application.py index 467b5b1b..12086a83 100644 --- a/bluetooth_mesh/application.py +++ b/bluetooth_mesh/application.py @@ -803,20 +803,22 @@ async def join(self): waiting for PB-ADV based provisioner. """ self.logger.info("Join %s", self.uuid) - - self._join_complete = asyncio.Future() + self._join_complete = JoinComplete( + self._join_callback, asyncio.Future() + ) await self.network_interface.join("/", self.uuid) - return await self._join_complete + return await self._join_complete.future async def create_network(self): """ Create a new mesh network. """ self.logger.info("Create %s", self.uuid) - - self._join_complete = asyncio.Future() + self._join_complete = JoinComplete( + self._join_callback, asyncio.Future() + ) await self.network_interface.create_network("/", self.uuid) - return await self._join_complete + return await self._join_complete.future async def cancel(self): """ From 6b5d35fdc316d3c956fa0e600cdd1ae333b805eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mats=20J=C3=B8rgen=20=C3=98yan?= Date: Thu, 23 Jun 2022 08:47:09 +0200 Subject: [PATCH 2/2] bugfix: rfu was upper-case, correct is lower-case --- bluetooth_mesh/models/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bluetooth_mesh/models/models.py b/bluetooth_mesh/models/models.py index 65809bcf..daf44171 100644 --- a/bluetooth_mesh/models/models.py +++ b/bluetooth_mesh/models/models.py @@ -908,7 +908,7 @@ async def set_publication( ttl=ttl, app_key_index=app_key_index, credential_flag=PublishFriendshipCredentialsFlag.MASTER_SECURITY, - RFU=0, + rfu=0, publish_period=dict( step_resolution=publish_step_resolution, number_of_steps=publish_number_of_steps, @@ -929,7 +929,7 @@ async def set_publication( ttl=ttl, app_key_index=app_key_index, credential_flag=PublishFriendshipCredentialsFlag.MASTER_SECURITY, - RFU=0, + rfu=0, publish_period=dict( step_resolution=publish_step_resolution, number_of_steps=publish_number_of_steps,