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
Hey, I would like to kindly ask you to try to extend the Usage description to provide one more slightly more advanced example
Sample function implementing the writing to the 'request' characteristic and get the response data back on 'response' characteristic using writeValue() and characteristicValueUpdatedPublisher. The API may look like this:
func command(request: Data) async throw -> Data {...}
The function may setup the characteristicValueUpdatedPublisher to observe response UUID characteristic which shall contain the response data received from the peripheral as the response once the request message is sent out by writeValue(request,...)
I tried to look into the cookbook project but It mostly covers the procedures up to getting the peripheral connected, but there is no best practice to be found covering sending the message to the peripheral and receive the response once asynchronously sent from the peripheral and processing it.
I would prefer to have Data() in and Data() out containing pure byte data...
I know it is partly my kind request for help doing so but I also think it may help anyone else in understanding how to use the AsyncBluetooth lib more easily.
Many thanks in advance Martin
The text was updated successfully, but these errors were encountered:
Hey, I would like to kindly ask you to try to extend the Usage description to provide one more slightly more advanced example
Sample function implementing the writing to the 'request' characteristic and get the response data back on 'response' characteristic using writeValue() and characteristicValueUpdatedPublisher. The API may look like this:
func command(request: Data) async throw -> Data {...}
The function may setup the
characteristicValueUpdatedPublisher
to observe response UUID characteristic which shall contain the response data received from the peripheral as the response once the request message is sent out bywriteValue(request,...)
I tried to look into the cookbook project but It mostly covers the procedures up to getting the peripheral connected, but there is no best practice to be found covering sending the message to the peripheral and receive the response once asynchronously sent from the peripheral and processing it.
I would prefer to have
Data()
in andData()
out containing pure byte data...I know it is partly my kind request for help doing so but I also think it may help anyone else in understanding how to use the AsyncBluetooth lib more easily.
Many thanks in advance Martin
The text was updated successfully, but these errors were encountered: