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

Vendor specific UUID not maintained by adapter.js #114

Open
kenr opened this issue Nov 28, 2017 · 1 comment
Open

Vendor specific UUID not maintained by adapter.js #114

kenr opened this issue Nov 28, 2017 · 1 comment
Labels

Comments

@kenr
Copy link
Contributor

kenr commented Nov 28, 2017

adapter.js adds vendor specific UUIDs to the SoftDevice on the BLE_GATTC_EVT_READ_RSP SoftDevice event.

The issue is that these UUIDs are not removed from the SoftDevice after use, making the SD run of of memory (NRF_ERROR_NO_MEM).

I think the following operations should remove the VS UUIDs automatically:

  • peripheral/central containing VS UUID disconnects
  • service change on VS UUID

VS UUIDs already registered with the device should not be added. But I'm not sure if the SoftDevice maps the UUIDs to handles (connection or GATT, ...)...

Here is the function that adds VS UUIDs to the SoftDevice:

_parseGattcReadResponseEvent(event) {

@bihanssen bihanssen added the bug label Nov 28, 2017
@bihanssen
Copy link
Contributor

One underlying issue is that pc-ble-driver-js uses an softdevice attribute discovery procedure that requires vendor specific UUIDs to be stored on the device. When performing attribute discovery on a device that uses many VS UUIDs, the reserved memory will quickly run out.

The best solution would probably be to use a different service discovery procedure, one that does not require storing VS UUIDs (i.e. using SD_BLE_GATTC_ATTR_INFO_DISCOVER procedure)

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

No branches or pull requests

2 participants