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

Fix GIT #516 and 517 return success when respond with error #518

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

Conversation

sgbihu
Copy link
Contributor

@sgbihu sgbihu commented Mar 31, 2017

Root cause

  1. The return value indecate the read/write request send successfully.
  2. The subscribe will ignore the response and this will not be fixed.

Solution

  1. Add the error detect based on read/write response.

Changed files
BLECallbacks.cpp - Delete the error check for read response.
BLECharacteristicImp.cpp

  • Add the error check.
  • Optimize the memory allocate and clear the allocated memory.
    BLECharacteristicImp.h - Add varibles to flag the response error

Root cause
1. The return value indecate the read/write request send successfully.
2. The subscribe will ignore the response and this will not be fixed.

Solution
1. Add the error detect based on read/write response.

Changed files
BLECallbacks.cpp - Delete the error check for read response.
BLECharacteristicImp.cpp
  - Add the error check.
  - Optimize the memory allocate and clear the allocated memory.
BLECharacteristicImp.h - Add varibles to flag the response error
@sandeepmistry
Copy link
Contributor

The subscribe will ignore the response and this will not be fixed.

Will this be fixed later?

@sgbihu
Copy link
Contributor Author

sgbihu commented Apr 1, 2017

This always ignore the response in the stack. So the application can't get the result. This is the stack's limitation. And the return value stand for the gatt ccc write request send out. And it is an unblock call. I think we will not fix for the subscribe API.

@sandeepmistry
Copy link
Contributor

Is this a limitation of the firmware?

And it is an unblock call. I think we will not fix for the subscribe API.

I expect characteristic.subscribe() and characteristic.unsubscribe() to block.

@SidLeung SidLeung added this to the Elnath milestone Apr 4, 2017
@SidLeung SidLeung self-assigned this Apr 4, 2017
@kitsunami kitsunami removed this from the Elnath milestone Aug 30, 2017
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

5 participants