Replies: 2 comments
-
Hi @programbo! The implementation is based on Nimble, so I imagine that we just need to expose a bit more functionality here: https://github.com/toitlang/toit/blob/master/lib/ble.toit. The primitives -- the C++ code used by the high-level Toit code -- are implemented here: https://github.com/toitlang/toit/blob/master/src/resources/ble_esp32.cc. Do you have a proposed API for listing and writing to RemoteCharacteristics? |
Beta Was this translation helpful? Give feedback.
-
Good question. The underlying API exposes
And I don't know enough about it yet to determine when the cache could be populated with Characteristic data. Great work so far, though! The engineers on working on Toit have to know waaaaaay more about this than I do so I have every confidence that this can be solved 😄 /**
* @brief Find all the characteristic with the given service in the gattc cache
* Note: It just get characteristic from local cache, won't get from remote devices.
*
* @param[in] gattc_if: Gatt client access interface.
* @param[in] conn_id: connection ID which identify the server.
* @param[in] start_handle: the attribute start handle.
* @param[in] end_handle: the attribute end handle
* @param[out] result: The pointer to the characteristic in the service.
* @param[inout] count: input the number of characteristic want to find,
* it will output the number of characteristic has been found in the gattc cache with the given service.
* @param[in] offset: Offset of the characteristic position to get.
*
* @return
* - ESP_OK: success
* - other: failed
*
*/
esp_gatt_status_t esp_ble_gattc_get_all_char(esp_gatt_if_t gattc_if,
uint16_t conn_id,
uint16_t start_handle,
uint16_t end_handle,
esp_gattc_char_elem_t *result,
uint16_t *count, uint16_t offset); |
Beta Was this translation helpful? Give feedback.
-
Is there a roadmap or estimated timeline for adding features to the
ble
lib? What is implemented works well enough so far, though being able to list and write toRemoteCharacteristic
s would be particularly helpful.Beta Was this translation helpful? Give feedback.
All reactions