Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions bluetooth_mesh/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down
4 changes: 2 additions & 2 deletions bluetooth_mesh/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down