Closed johanneskpp closed 5 years ago
Hello,
I've been facing the same problem. If you put Bleno initialization (bleno = Bleno()
) AFTER Pizza Service init, in peripheral.py, it will work. By the way, I'm testing in a Raspberry Pi Zero W.
Best regards,
Enrique
This issue arises from the inherence threading model difference between Python, and Nodejs from which this library was ported. In Node, the main event loop pauses until the the of the initialization process. In Python, the initialization (and hence the 'power on' event) is performed as soon as the Bleno() object is created. I have updated the API to now require the use of bleno.Start() - this gives the opportunity to register your callbacks before the subsystem is started.
Remember to update your code to use bleno.Start()! See the updated examples.
Thanks.
Fixed by fa245fa1b1701af682c8880f60a41795d4ce9700
The Pizza-Example does not start advertising. The node version works fine but I need it for python. Hope you can help me!