Hi! We've been trying to get into development with Nrf52840 Dongle using Node.js / pc-ble-driver-js.
We have two dongles, and we just tried to test the heart rate examples with mixed feelings.
- First off, the collector seemed to be working, all well. However, connector threw some errors everytime when trying to connect the two -> Found out there was a bug in the connector code (it keeps trying to connect, even though first connection is still pending, then kicks out). This got fixed.
- Next the connector stopped working. This one I couldn't solve:
** 1. Issue: Running the heart_rate_connector.js
connector does not work. Here's the result.
$ node heart_rate_connector.js COM5 v5
internal/modules/cjs/loader.js:968
throw err;
^
Error: Cannot find module 'C:\Users\pc-ble-driver-js\examples\heart_rate_connector.js'
←[90m at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)←[39m
←[90m at Function.Module._load (internal/modules/cjs/loader.js:841:27)←[39m
←[90m at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)←[39m
←[90m at internal/main/run_main_module.js:17:47←[39m {
code: ←[32m'MODULE_NOT_FOUND'←[39m,
requireStack: []
}
** 2. Issue / Question. How to modify the connector code to work with custom characteristics?
So I have a device with custom characteristics. I know the uuid, but I don't know how the cccd (uint16_t) is created in the sdk?
The connector.js code seems to require cccd uuid to work. Is there a way to just start notifications without knowing it?
I already tried this, but it didn't work like this... (found it from here: https://nordicsemiconductor.github.io/pc-ble-driver-js/Adapter.html ):
We first put some effort into web bluetooth api, there it was pretty much this simple (not functional code, but basic idea is this simple):
Is there a way to reach something like this? Where I know the characteristic uuid and then just turn notifications on / off, or do I have to first somehow find them etc. ?