Skip to content

Fix GIT 497 CurieBLE: SensorTag example no longer works out of the box #502

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

Closed
wants to merge 1 commit into from

Conversation

sgbihu
Copy link
Contributor

@sgbihu sgbihu commented Mar 27, 2017

Add mechanism to promise the scan response can be returned.

Changed Files
BLEDeviceManager.cpp - Change the API to return the device when scan response changed
BLEDeviceManager.h - Modify the API

The issues need to be discussed:
The SensorTag will return twice. The ADV and Scan response.

@sandeepmistry
Copy link
Contributor

@SidLeung I prefer the behaviour of #500 over this.

I get 2 events from the SensorTag, testing with the scan example:

Discovered a peripheral
-----------------------
Address: 68:C9:0B:06:BC:81
Service UUID's: aa80 
RSSI: -62

Discovered a peripheral
-----------------------
Address: 68:C9:0B:06:BC:81
Local Name: CC2650 SensorTag
Service UUID's: aa80 
RSSI: -62

however with #500 I just get a single:

Discovered a peripheral
-----------------------
Address: 68:C9:0B:06:BC:81
Local Name: CC2650 SensorTag
Service UUID's: aa80 
RSSI: -62

which is what I expect.

@sgbihu
Copy link
Contributor Author

sgbihu commented Mar 28, 2017

Yes. That's why I add the comment at the end of this PR. I think both your PR and mine are not perfect solution.

This is behavior's conflicts. The peripheral has two part in advertise step, the advertising and scan response are come in different time stamp. And some connectable peripheral also can not send out the scan response. We can't define a policy to adapt all scenario when enable the duplicate filter.

I suddenly have another idea to use time stamp to return the device when call available. The scan request will send out after the central see the advertising. So the scan response will be got in an expected time. The implementation can add a delay to return new device. I will try to implement a solution and you can test again.

@sgbihu sgbihu force-pushed the scanresponsechanged branch from 001de9d to 67291e0 Compare March 28, 2017 05:12
Add timeout mechanism to promise the scan response can be returned.

Changed Files
BLEDeviceManager.cpp -The available API use timeout mechanism to get the device
@SidLeung
Copy link
Contributor

This PR will continue with #508.

@SidLeung SidLeung closed this Mar 30, 2017
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.

3 participants