-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide support for BLE GattClient Adaptation Layer #32
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to detail what the following functions do:
- aci_gatt_read_charac_val: Does it send a single ATT read request ?
- aci_gatt_read_long_charac_val: Does it sends automatically multiple ATT Read Blob Request and therefore receive multiple Read Blob responses ?
- aci_gatt_read_multiple_charac_val: Does it send a single ATT Read multiple response ?
- aci_gatt_write_charac_value: Does it send a single ATT write request ?
Command complete should be handled for:
- aci_gatt_exchange_configuration
- aci_gatt_write_without_response
- aci_gatt_signed_write_without_resp
I think command complete should be handled via a set of procedure control block, which use the connection handle as identification key (More on that latter).
@@ -397,7 +397,7 @@ extern "C" { | |||
evt_disconn_complete *evt = (evt_disconn_complete*)event_pckt->data; | |||
|
|||
if(BlueNRGGap::getInstance().getGapRole() == Gap::CENTRAL) { | |||
BlueNRGGattClient::getInstance().removeGattConnectionClient(evt->handle, evt->reason); | |||
//ble::pal::st::BlueNRGGattClient::getInstance().terminate(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose this comment and the condition can be removed.
case EVT_BLUE_GATT_PROCEDURE_COMPLETE: | ||
case EVT_BLUE_GATT_ERROR_RESP: | ||
{ | ||
ble::pal::st::BlueNRGGattClient::getInstance().aci_event_cb(blue_evt); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it mandatory to check the event code ?
aci_event_cb
will also check the event code.
I think aci_event_cb
can be invoked in the default
case.
case BLE_STATUS_SUCCESS: return BLE_ERROR_NONE; | ||
// TODO: map other kind of errors | ||
// FIXME: the current version of the BlueNRG FW (7.2c) | ||
// sometimes returns TIMEOUT (0xFF). Ignore the error by now... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you filter out timeout and handle other cases ?
|
||
private: | ||
BlueNRGGattClient() { } | ||
|
||
uint8_t gattClientState; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the enum type.
No description provided.