Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pan-
Copy link
Member

@pan- pan- commented Sep 27, 2017

No description provided.

Copy link
Member Author

@pan- pan- left a 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();
Copy link
Member Author

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);
Copy link
Member Author

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...
Copy link
Member Author

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;
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants