Replies: 3 comments 2 replies
-
hi, |
Beta Was this translation helpful? Give feedback.
-
I would have expected your LEDs strips to be on the peripheral device that offers the service (the server) and the buttons to be on the central device that accesses the service as a client. I.e the other way around. However there are ways to ensure message integrity. Have a look at BLE notifications and indications. I've used notifications on the BLE api direct, but don't know if they are available via aioble. |
Beta Was this translation helpful? Give feedback.
-
You can implement a mechanism on the server to wait for an acknowledgement and resend the command if no acknowledgement is received within a specified timeout. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
For a my project I've implemented a BLE server with two buttons that based on which button is pressed send
two different commands to a BLE client that then drive two different strips of ws2812 led.
The two codes attached are based on some basic examples code found on the web adapted for my scope.
Both codes seems work quite well but the problem is that sometime also if the buttons are pressed
and the relative isr is activated , for some reason the client dosen't receive any command.
Due that I must be sure the the command is received I would like implement on the client a sort
of aknoledge message to be sent back to the server as confirmation of received command , and in case the server
dosen't receive an aknoledge within a certain time send the same command again.
To do that I've tryed to implemented in both side two additional characteristics to be used only
to communicate/recive the ack message , but I'm not able to see any ack message on the server side
also If I don't have apparently any error during runtime .
Where I'm wrong ?
Client and servers can both send and receive data one to/from each other ?
This is the code SERVER side :
This is the CLIENT code :
Beta Was this translation helpful? Give feedback.
All reactions