Some usage problems about BLE stack "nimble" #1458
Replies: 3 comments 5 replies
-
There is a way to do it with the current implementation.
Then client subscribes to the READ_RESULT and writes to REQUEST_READ (any payload) when it wants sensor data. The toit app will then sit in a loop and wait for a requiest to REQUEST_READ and read the sensor and notify the READ_RESULT. I acknowledge that we can not at the moment implement any existing BLE scheme with the toit driver. The read with callback is something that we have discussed and will probably make it at some point. |
Beta Was this translation helpful? Give feedback.
-
Should be fixed in #1470. Please check it out and let me know if that solves the problem. |
Beta Was this translation helpful? Give feedback.
-
Yes, you are right, you will need more tasks to handle the long waits. |
Beta Was this translation helpful? Give feedback.
-
I think the "nimble" is not well designed for async message management, like reading sensor data from remote BLE service characteristics, and if it cost about 1s.
In esp-idf, I can read sensor data in nimble callback function and then send result, so the client in host side always can get the data. But in toit, we need application update this characteristics and then client is able to get this data.
My request is as following:
Beta Was this translation helpful? Give feedback.
All reactions