You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying since few days to implement a Mesh provisioner with your library for test purpose. According to the bluez mesh-api.txt file the CreateNetwork method is "This is the first method that an application calls to becomea Provisioner node, and a Configuration Client on a newly created Mesh Network."
I tried to do the operation with your library with the following code :
importasyncioimportloggingimportsecretsfromtimeimportsleepfrombluetooth_mesh.bluez.applicationimportApplication, Element, Capabilitiesfrombluetooth_mesh.cryptoimportApplicationKey, DeviceKey, NetworkKeyfrombluetooth_mesh.messages.configimportGATTNamespaceDescriptor, StatusCodefrombluetooth_mesh.modelsimportConfigClient, ConfigServer, HealthClient, HealthServerclassPrimaryElement(Element):
LOCATION=GATTNamespaceDescriptor.MAINMODELS= [
ConfigClient,
ConfigServer,
HealthClient,
]
classSampleApplication(Application):
COMPANY_ID=0x025EPRODUCT_ID=1VERSION_ID=1ELEMENTS= {
0: PrimaryElement,
}
CRPL=32767PATH="/fr/scheiber/mesh"@propertydefdev_key(self):
returnDeviceKey(secrets.token_bytes(16))
@propertydefnet_key(self):
return0, NetworkKey(secrets.token_bytes(16))
@propertydefapp_keys(self):
return {0: ApplicationKey(secrets.token_bytes(16))}
asyncdefmain():
# Set up logginglogging.basicConfig(level=logging.INFO)
# Create an event looploop=asyncio.get_event_loop()
# Create an instance of the Application classapp=SampleApplication(loop=loop)
try:
# Connect to BlueZawaitapp.dbus_connect()
app.address=0x0001awaitapp.create_network()
exceptExceptionase:
logging.error("Error occurred: %s", e)
# Run the asynchronous functionasyncio.run(main())
When I run the python file I get the following error :
Hello,
I'm trying since few days to implement a Mesh provisioner with your library for test purpose. According to the bluez mesh-api.txt file the CreateNetwork method is "This is the first method that an application calls to becomea Provisioner node, and a Configuration Client on a newly created Mesh Network."
I tried to do the operation with your library with the following code :
When I run the python file I get the following error :
Here is my bluetooth-mesh.service status :
According the provided code, Do you have any idea how to solve my problem?
Thank you for your reply.
The text was updated successfully, but these errors were encountered: