Bluetooth deactivates after some time
-
I want to send data from Puck.js to WiPy over Bluetooth and generally this works fine. But after some minutes, the Bluetooth of the WiPy seems to deactivate itself. Because neither the Puck.js nor my smartphone is finding the device anymore.
Here's my code
bluetooth = Bluetooth() bluetooth.set_advertisement(name='Terrarium_Base', service_uuid=uuid2bytes('0612038a-e6fa-42d2-9379-fbbf70a56e5c')) bluetooth.advertise(True) bluetooth.callback(trigger=Bluetooth.CLIENT_CONNECTED | Bluetooth.CLIENT_DISCONNECTED, handler=conn_cb) srv1 = bluetooth.service(uuid=uuid2bytes('0612038a-e6fa-42d2-9379-fbbf70a56e5c'), isprimary=True) chr1 = srv1.characteristic(uuid=uuid2bytes('0de36786-4bbc-49bc-9b3c-8f257e4f035c'), value=5) char1_cb = chr1.callback(trigger=Bluetooth.CHAR_WRITE_EVENT, handler=char1_cb)Am I missing something?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login